sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
fa6cb24be96b939761cdec35c7d18f595e905f0eff665f07f68a0d8f8e2f4aee
C/C++
470
21
#pragma once #include <ATen/native/DispatchStub.h> #include <c10/util/ArrayRef.h> /* Depthwise 3x3 Winograd convolution operator */ namespace at { class Tensor; namespace native { using convolution_depthwise3x3_winograd_fn = Tensor (*)(const Tensor &, const Tensor &, const Tensor &, IntArrayRef, IntArrayRef,...
0aaaafbc59bb40807968ead65b9e8ec381607eb888bfedd356c73d44c975c76e
C/C++
477
20
/* * Copyright (C) 1994,2009 Bernd Feige * This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING). */ #ifndef STAT_H #define STAT_H #include <stdio.h> #define nrerror(err) fprintf(stderr, "%s\n", err) float betacf(float a, float b, float x); float betai(float a, float b, float x); float gamml...
0a07d0781cbd498f211d2c138a7da01c41992b864235558b65db7248b3ac7b87
C/C++
481
18
#pragma once #include <c10/metal/common.h> C10_METAL_CONSTEXPR unsigned kSoftmaxThreads = 256; C10_METAL_CONSTEXPR unsigned kSoftmaxMaxThreads = 1024; template <typename index_t = uint64_t> struct SoftmaxParams { index_t dim_size; index_t num_rows; index_t inner_size; index_t chunk_size; index_t n_chunks; ...
d660e333d5b7c66208dc84f6bf39c3fd1ee19c4424a7d9432acfca3b2f4bc2c5
C/C++
484
17
#pragma once #include <ATen/core/dispatch/Dispatcher.h> #include <c10/core/impl/TorchDispatchModeTLS.h> #include <c10/util/ArrayRef.h> #include <torch/library.h> #include <optional> namespace at::impl { TORCH_API bool tensor_has_dispatch(const at::Tensor& t); TORCH_API bool tensorlist_has_dispatch(at::ITensorListRef...
0069bc01665855e6db5152a4489d8c896dc43ae1379dbf8cf84bf00db49c571c
C/C++
485
20
#import <ATen/native/metal/MetalConvParams.h> #import <ATen/native/metal/MetalPrepackOpContext.h> #include <c10/util/ArrayRef.h> namespace at::native::metal { Tensor conv2d( const Tensor& input, const Tensor& weight, const std::optional<at::Tensor>& bias, IntArrayRef stride, IntArrayRef padding, ...
88b7b32a1022a58ded1fe186ba327e67946a47e1f46e1b384e07509fd7da8920
C/C++
487
14
#pragma once #include <c10/metal/common.h> template <typename idx_type_t = uint32_t> struct EmbeddingDenseBackwardParams { ::c10::metal::array<idx_type_t, ::c10::metal::max_ndim> outer_sizes; ::c10::metal::array<idx_type_t, ::c10::metal::max_ndim> grad_outer_strides; ::c10::metal::array<idx_type_t, ::c10::metal:...
e3d03028e479e76afe36486e48e175bac6ff51188c49132f0f6d89179a4a2278
C/C++
488
20
#ifndef NUMPY_CORE_INCLUDE_NUMPY_RANDOM_BITGEN_H_ #define NUMPY_CORE_INCLUDE_NUMPY_RANDOM_BITGEN_H_ #pragma once #include <stddef.h> #include <stdbool.h> #include <stdint.h> /* Must match the declaration in numpy/random/<any>.pxd */ typedef struct bitgen { void *state; uint64_t (*next_uint64)(void *st); uint32...
72de08fc3308b3e180cf30074372a888fec3921cc9c566948b959185024c9dde
C/C++
495
20
#include <ATen/core/Tensor.h> #include <ATen/native/DispatchStub.h> namespace at::native { using fused_adagrad_fn = void (*)( const at::Tensor& param, const at::Tensor& grad, const at::Tensor& state_sum, const at::Tensor& state_step, const double lr, const double lr_decay, const double wei...
4ed90a9eace5025a5fce794d0480da3541f10fcab5411111564963f95126e50e
C/C++
497
24
#pragma once #include <c10/macros/Macros.h> #include <type_traits> namespace at { /** Computes ceil(a / b) */ template <typename T, typename = std::enable_if_t<std::is_integral_v<T>>> C10_ALWAYS_INLINE C10_HOST_DEVICE T ceil_div(T a, T b) { return (a + b - 1) / b; } /** Computes ceil(a / b) * b; i.e., rounds...
10a49ebb7ffb6e236dc4c0cd17ae217639617ada20df4ac3d61c0d41a55a32d5
C/C++
503
28
#ifndef MOTIF_DETECTION_H #define MOTIF_DETECTION_H #include <src/jaz/gravis/t4Matrix.h> #include <src/jaz/tomography/dynamo/catalogue.h> class MotifDetection { public: MotifDetection(); MotifDetection( gravis::d4Matrix alignment, int centerIndex, int tomoIndex, double score); static Catal...
2602b53210f0a0cd71fce497711699a84e96999dc3a2798059cd19f162a21328
C/C++
505
23
#pragma once #include <cstddef> #include <c10/cuda/CUDACachingAllocator.h> namespace at::cuda { /// Allocator for Thrust to re-route its internal device allocations /// to the THC allocator class ThrustAllocator { public: typedef char value_type; char* allocate(std::ptrdiff_t size) { return static_cast<char...
717dd577abe606dd93f67b9f4f7ad00e095152a22b01f0d27c0562336284ee17
C/C++
506
22
/* * Copyright (c) Facebook, Inc. and its affiliates. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <immintrin.h> PYTORCH_QNNP_INLINE __m128i sub_zero_point(const __m128i va, co...
e8906417cedf7b8ed2454ebbef20d1ae0930819e0b73056a848ccc17c70c77b9
C/C++
506
18
/* FILE eyecal.h */ /* Lookup tables for load_data() */ #if (DOUBLE_AD_VALUES) #define LOOKUP_SIZE 8192 #else #define LOOKUP_SIZE 4096 #endif int OD_H_Lookup[LOOKUP_SIZE+1]; int OS_H_Lookup[LOOKUP_SIZE+1]; int OD_Eyecal, OS_Eyecal; /* Flags, set by eyecal, used by load */ /* Index: offset by LookupSize/2...
858535dabaaf34efa3d4424ae7254c5f45fc10ec17493ad4a2b13c71525dbd89
C/C++
507
25
#ifndef LOCAL_PARTICLE_REFINE_PROGRAM_H #define LOCAL_PARTICLE_REFINE_PROGRAM_H #include "refinement.h" #include <src/jaz/optics/aberrations_cache.h> #include <src/jaz/optics/aberration_fit.h> #include <src/jaz/math/tensor2x2.h> class LocalParticleRefineProgram : public RefinementProgram { public: LocalParticle...
4f1cae669e34b00e245cc934ab1aac04d0f5b3e085786cfb2d59474dcd226034
C/C++
509
22
/* * Copyright (c) Facebook, Inc. and its affiliates. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <arm_neon.h> PYTORCH_QNNP_INLINE uint16x8_t sub_zero_point(const uint8x8_t va...
341091087e499d0b0cd98dbc1a296523818adae8d3774883cb01458d77085ace
C/C++
516
21
#include <ATen/core/Tensor.h> #include <ATen/native/DispatchStub.h> namespace at::native { using fused_sgd_fn = void (*)( const at::Tensor& param, const at::Tensor& grad, const at::Tensor& momentum_buffer, const double weight_decay, const double momentum, const double lr, const double damp...
73e39ef887b434e78e5b6fec82b6f569d928b3215d88093973ab68e848d3d511
C/C++
520
14
#pragma once #include <ATen/cuda/CUDAConfig.h> #include <string> // AT_USE_JITERATOR(), controls whether we jit some elementwise kernels. // AT_DISABLE_JITERATOR is set by CMake when jiterator should be off. // Currently set under USE_ROCM + USE_ASAN, because jiterator JITs kernels // through hiprtc and we haven't set...
bed393e73bcf3b541936e86d18054f9a4dca461484aa104e0cf37ee1592fa86a
C/C++
520
14
#pragma once #include <c10/macros/Export.h> namespace at::native::scaled { // True if the current device supports torch._scaled_mm / torch._scaled_grouped_mm. // On CUDA: with no flags, allows SM >= 9.0 or SM 8.9 (Ada/L4). With sm90_only // and/or sm100_only set, checks for a matching SM major version (OR semantics ...
0c9effdb6295ff3fdd1db9bcf449c6d334946ace1fe0d9d3e4e8219963af1bde
C/C++
531
29
#ifndef RECONSTRUCT_PARTICLE_MPI_H #define RECONSTRUCT_PARTICLE_MPI_H #include <src/mpi.h> #include "reconstruct_particle.h" class ReconstructParticleProgramMpi : public ReconstructParticleProgram { private: MpiNode *node; public: //ReconstructParticleProgramMpi(int rank, int nodeCount); /** Destructor, cal...
d67e1aed4c6de22de98b191f1150a1d1f8b3f04c4679a790fa4754cc5a780e5a
C/C++
532
23
#pragma once #include <ATen/cuda/Exceptions.h> #include <cuda.h> #include <cuda_runtime.h> namespace at::cuda { inline Device getDeviceFromPtr(void* ptr) { cudaPointerAttributes attr{}; AT_CUDA_CHECK(cudaPointerGetAttributes(&attr, ptr)); #if !defined(USE_ROCM) TORCH_CHECK(attr.type != cudaMemoryTypeUnregis...
ebe939180411706443f672b010f6d446ad5dae75d297379dca8c4c206a40843a
C/C++
534
17
/* Autogenerated v4-0-0 from https://github.com/scottprahl/iad */ void RT_Layers(int n, double nslab, double ntopslide, double nbottomslide, int nlayers, double a[], double b[], double g[], double *UR1, double *UT1, double *URU, double *UTU); void RT_Layers_All(int n, double nslab, double ntop...
7f313071026988069d6851531066413538cb0793604f41affea54ddb46ad6e29
C/C++
535
20
// Copyright (c) Meta Platforms, Inc. and affiliates. // // This source code is licensed under the BSD-style license found in the // LICENSE file in the root directory of this source tree. #include <c10/macros/Macros.h> C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wdeprecated-declarations") #import <Foundation/Founda...
f718edf76a70f9ecef5ffffeb014f7708c899fe87c628de2f58413b136d6d3f0
C/C++
535
30
#ifndef IMAGE_CONVERSION_H #define IMAGE_CONVERSION_H #include "buffered_image.h" class Conversion { public: template <typename T> static BufferedImage<double> toDouble(const RawImage<T>& img); }; template <typename T> BufferedImage<double> Conversion::toDouble(const RawImage<T>& img) { BufferedImage<double...
a82a4a44d9dbc87c431c928eb72defe2fd51b36e7529d19043edc61fd3d59d66
C/C++
536
20
#pragma once #include <ATen/native/Activation.h> #include <cstdint> namespace at { struct TensorIteratorBase; class TensorBase; } namespace at::native { void launch_glu_backward_kernel(const TensorIteratorBase& iter, int64_t gI_stride, int64_t I_stride); void launch_log_sigmoid_forwa...
42a7f21599971b32cbd56ba11a173b496b0dabaf93011009b9fb2db13b8c8d0c
C/C++
537
14
/// Flush-To-Zero and Denormals-Are-Zero mode /// /// Flush-To-Zero (FTZ) and Denormals-Are-Zero (DAZ) are modes that bypass /// IEEE 754 methods of dealing with denormal floating-point numbers on x86-64 /// and some x86 CPUs. They result in reduced precision for values near zero, /// but increased performance. /// ///...
e93b01d3f95027addaf17dd60ae9fbd69494053068cfd972626c741258541177
C/C++
540
16
#pragma once #include <cudnn.h> #define STRINGIFY(x) #x #define STRING(x) STRINGIFY(x) #if CUDNN_MAJOR < 8 || (CUDNN_MAJOR == 8 && CUDNN_MINOR < 5) #pragma message("CuDNN v" STRING( \ CUDNN_MAJOR) " found, but need at least CuDNN v8. You can get the latest version of CuDNN from https://developer.nvidia.com/cudnn...
228aed6d661a88f5e85b8064a4d09d38db357fc325703ad4a0c0c68d4af43801
C/C++
549
21
namespace at { struct TensorIterator; } namespace c10 { class Scalar; } namespace at::native { void norm_launch_kernel(TensorIterator &iter, double val); void powsum_launch_kernel(TensorIterator &iter, double val); void min_launch_kernel(TensorIterator &iter); void max_launch_kernel(TensorIterator &iter); void amin...
6357e47ecae29d57c7b34775110c37ce2c0d18bafdfe772eea9b9ec9c15f4ad4
C/C++
549
26
#ifndef POINT_CLOUD_H #define POINT_CLOUD_H #include <src/jaz/gravis/t3Vector.h> #include <src/jaz/mesh/mesh.h> #include <vector> class PointCloud { public: PointCloud(); std::vector<gravis::d3Vector> vertices; std::vector<std::vector<int>> neighbors; void readCsv(std::string fn); void findNeigh...
3dbddb1a261880dbfd881c727c1d0dff38062acd1fafd15169ee07a04c405ff9
C/C++
550
20
#pragma once #include <ATen/native/DispatchStub.h> #include <cstdint> namespace at { class TensorBase; } namespace at::native { using weight_norm_fn = void(*)( TensorBase&, TensorBase&, const TensorBase&, const TensorBase&, int64_t); using weight_norm_backward_fn = void(*)( TensorBase&, TensorBase&, const Te...
ac9744a636a468ecbde761ff2c2bc0265a9349584009983fc955ec0289bc1610
C/C++
550
23
#ifndef ABERRATIONS_CACHE_H #define ABERRATIONS_CACHE_H #include <src/metadata_table.h> #include <src/jaz/image/buffered_image.h> class AberrationsCache { public: AberrationsCache(const MetaDataTable& opticsTable, const int size, const double pixelSize); int size, pixelSize; bool hasSymmetrical, hasAntisy...
401d0448e33e46086a431e36e1acca281eb5792b93ce6d0debc03b0afa2fa310
C/C++
551
36
/* r250.h prototypes for r250 random number generator, Kirkpatrick, S., and E. Stoll, 1981; "A Very Fast Shift-Register Sequence Random Number Generator", Journal of Computational Physics, V.40 also: see W.L. Maier, DDJ May 1991 */ #ifndef _R250_H_ #define _R250_H_ 1.2 #ifdef __cplusplus extern "C" { #...
4965dfa9b0f14f9b6cc688428859d1f35c65c28f716185be0071d383045c85eb
C/C++
553
19
#pragma once #include <ATen/TensorIterator.h> #include <ATen/native/DispatchStub.h> namespace at::native { using renorm_scale_factor_fn = void (*) (TensorIteratorBase& iter, double maxnorm); DECLARE_DISPATCH(renorm_scale_factor_fn, renorm_scale_factor_stub) enum class BatchNormBackend { Native, Cudnn, Miopen,...
480c8761a93496ba84df60cc10587cd5d3edd9703ba36e29826709c0cea87a2d
C/C++
557
18
#pragma once #include <c10/metal/common.h> template <typename idx_type_t = int64_t, unsigned N = c10::metal::max_ndim> struct CatSharedParams { int32_t ndim; int32_t cat_dim; ::c10::metal::array<idx_type_t, N> output_strides; ::c10::metal::array<idx_type_t, N> output_sizes; }; template <typename idx_type_t = ...
04c903f7b1fb873161c9f6440dbde45f0a1e25788838787c6abb2b3ec8707aa7
C/C++
571
27
#ifndef LINEAR_2D_DEFORMATION_H #define LINEAR_2D_DEFORMATION_H #include <src/jaz/gravis/t3Vector.h> #include "modular_alignment/linear_2D_deformation_model.h" #include "2D_deformation.h" class Linear2DDeformation : public Deformation2D { public: Linear2DDeformation(); Linear2DDeformation( gravis::i2Vec...
abdd6f8c236881d927c23554792c2dcc73f66f8912db2d0bdc5a8e2f6c11814f
C/C++
578
29
/* * Copyright (c) Facebook, Inc. and its affiliates. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ #ifdef __aarch64__ .macro SUB_ZERO_POINT vout, vin1, vin2 #if PYTORCH_QNNPACK_RUNTIME_QUANTIZATION ...
54f5b09dd69160a5cc04ebfc351e49379a885167e4e96148c54900f81073f1cc
C/C++
580
13
#pragma once #include <ATen/native/DispatchStub.h> #include <ATen/native/TensorIterator.h> namespace at::native { using masked_fill_kernel_quantized_fn = void(*)(TensorIterator& iter, const Scalar& value, double scale, int zero_point); using index_put_kernel_quantized_fn = void(*)(TensorIterator& iter, IntArrayRef ind...
3ebb5c4b9976f96f851bb5ab6bc2fdf67d3f345b5816db06b4872ce7e4083ee5
C/C++
581
21
#pragma once #include <c10/metal/common.h> template <unsigned N = c10::metal::max_ndim> struct IndexReduceParams { int32_t ndim; int32_t reduce_dim; ::c10::metal::array<uint32_t, N> self_strides; ::c10::metal::array<uint32_t, N> self_sizes; ::c10::metal::array<uint32_t, N> source_strides; ::c10::metal::arr...
134821f972bafc7773cbdcff50f302f986e34101e580725572e7d42764c6e45e
C/C++
582
12
/* limits for array sizes in KN format programs (386 versions)*/ /* <time>: 28-06-1994 19:25 */ /* pb 19-08-1993 14:23; new */ #define MAXCOND 1600 /* max. no. of conditions*/ #define MAXTRIALS 10000 /* largest no. of trials*/ #define MAXDATA 1000000 /* largest no. of trial data */ #define MAXDATAPERC...
f7104c6ea436a1ec052c4cce4fa6941d051e3be33d5a0d2d1773df2bcaf7db1a
C/C++
582
26
#ifndef UDP_CLIENT_H #define UDP_CLIENT_H #include <string> #include <arpa/inet.h> #include <stdexcept> #include <sys/socket.h> class UDPClient { public: UDPClient(const std::string& ip_address, int port = 0); // Constructor with IP and port ~UDPClient(); void whitelistPort(); int get_port() const;...
00330db5379db0a6871dcf64d8cba63d86900b5dd375117d84e2c47b1d403ca3
C/C++
584
35
/* randlcg.h prototypes for the minimal standard random number generator, Linear Congruential Method, the "minimal standard generator" Park & Miller, 1988, Comm of the ACM, 31(10), pp. 1192-1201 rcsid: @(#)randlcg.h 1.1 15:48:09 11/21/94 EFC */ #ifndef _RANDLCG_H_ #define _RANDLCG_H_ 1.1 #ifdef __cplus...
05e7aeb5b39bdce689ca09246df457c2e752219c155b2ab600acd58858dbf0b7
C/C++
585
15
/* Autogenerated v4-0-0 from https://github.com/scottprahl/iad */ void RT_Cone(int n, struct AD_slab_type *slab, int use_cone, double *UR1, double *UT1, double *URU, double *UTU); void ez_RT_Cone(int n, double nslab, double ntopslide, double nbottomslide, double a, double b, double g, double cos_cone_...
aa793ac89e9969c30e77feca4969d43da1463b24821eb352b7f9a4ff917582b4
C/C++
593
27
#ifndef DEVICE_STUBS_H #define DEVICE_STUBS_H #undef CUDA #undef _CUDA_ENABLED #undef HIP #undef _HIP_ENABLED using dim3 = int; using deviceStream_t = float; using deviceCustomAllocator = double; using cudaStream_t = float; using CudaCustomAllocator = double; #define cudaStreamPerThread 0 using hipStream_t = float;...
3498385df897155eb536f460a1a463b0309a616d2f4d819aa6b53e0b64cee849
C/C++
594
25
#ifndef STAR_CONVERTER_H #define STAR_CONVERTER_H #include <src/metadata_table.h> #include <src/image.h> class StarConverter { public: static void convert_3p0_particlesTo_3p1( const MetaDataTable& in, MetaDataTable& outParticles, MetaDataTable& outOptics, std::string tablename = "particles...
9c7b61e57ec1a408144ff3a38294746a3df21d4b567a5116a915b9193323bb24
C/C++
595
22
#pragma once #include <ATen/core/Tensor.h> #include <ATen/cuda/Exceptions.h> #include <ATen/cudnn/Handle.h> #include <ATen/cudnn/cudnn-wrapper.h> namespace at::native { // cuDNN has a buggy check for tensor being contiguous (that is, it does // not ignore stride for dimension that is equal to 0). This function // m...
bd7678f1ba58b98d3c07033ca3a109bdca4c23e21667bc3a8b0a060f96ed35f5
C/C++
595
32
#ifndef FILAMENT_MEMBRANE_TEMPLATE_H #define FILAMENT_MEMBRANE_TEMPLATE_H class MembraneTemplate { public: MembraneTemplate( double spacing, // inter-membrane spacing (25-35A, ~40A here) double inside_level, double inside_halo_level, double membrane_level, double centre_level, double ...
a20a184f9321e1c83e63d8d70bf84382b4e2b7a711ff52bdb662596c4b32c7b0
C/C++
596
25
#ifndef CLOSEST_SPLINE_PT_PROBLEM_H #define CLOSEST_SPLINE_PT_PROBLEM_H #include <src/jaz/gravis/t2Vector.h> #include <src/jaz/optimization/optimization.h> #include <src/jaz/math/spline.h> class ClosestSplinePointProblem : public Optimization { public: ClosestSplinePointProblem( const Spline<gravis::d2Vect...
1acb2e21adff35ba3bd29ae4a090b1a7c3bbffa5eab0d900a2cb13c668ee5e87
C/C++
599
27
#include <ATen/core/TensorBase.h> #include <algorithm> #include <vector> namespace at::native { inline int64_t ensure_nonempty_dim(int64_t dim) { return std::max<int64_t>(dim, 1); } inline int64_t ensure_nonempty_size(const TensorBase &t, int64_t dim) { return t.dim() == 0 ? 1 : t.size(dim); } inline int64_t en...
e780968fc1fbe54cd40975ca70841251bbc7e7a572ac751b0687ed9b9abd962c
C/C++
602
28
#ifndef ZERNIKE_H #define ZERNIKE_H #include <vector> class Zernike { public: static double Z(int m, int n, double rho, double phi); static double Z_cart(int m, int n, double x, double y); static double R(int m, int n, double rho); static void evenIndexToMN(int i, int& m, int& n); static int numberOf...
5293f92dd66fa612913d6492961d9cfeb92e688bb31551820be717af691698fd
C/C++
603
17
#ifndef __LIBGRAVIS_T_IMAGE_ALGORITHM_H__ #define __LIBGRAVIS_T_IMAGE_ALGORITHM_H__ /****************************************************************************** ** Title: tImageAlgorithm.h ** Description: Collection of standalone image algorithms. ** ** Author: Jean-Sebastien Pierrard, 2005 ** ...
be0a09e5b9b5836458533fa5434af5f7fa02f93c23475eb06614b279caf8b6a9
C/C++
606
22
#pragma once #include <ATen/core/dispatch/Dispatcher.h> // TODO: this can probably live in c10 namespace at::impl { class TORCH_API PythonOpRegistrationTrampoline final { static std::atomic<c10::impl::PyInterpreter*> interpreter_; public: // Returns true if you successfully registered yourself (that means ...
d2b0716e2c67ff4254b51731882435ffe8e12a27f44bea3c66d843aaa63298e5
C/C++
606
14
#import <ATen/native/metal/MetalConvParams.h> #import <ATen/native/metal/MetalNeuronType.h> #import <ATen/native/metal/mpscnn/MPSCNNConvOp.h> C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wdeprecated-declarations") #import <Foundation/Foundation.h> C10_DIAGNOSTIC_POP() API_AVAILABLE(ios(11.0), macos(10.13)) @interface ...
95c85bba9d9580f1ed384cc940d426b279b636dd393c990447eb1c29cf9db4c9
C/C++
615
28
#ifndef FOURIER_2D_DEFORMATION_H #define FOURIER_2D_DEFORMATION_H #include <src/jaz/gravis/t2Vector.h> #include "modular_alignment/Fourier_2D_deformation_model.h" #include "2D_deformation.h" class Fourier2DDeformation : public Deformation2D { public: Fourier2DDeformation(); Fourier2DDeformation( gravis:...
1135f8caa77800b739b11c7e6548f941e7acc431de31dac7cd55a6e0f536c6c5
C/C++
616
28
#pragma once #include <ATen/native/DispatchStub.h> #include <cstdint> namespace at { class TensorBase; } namespace at::native { enum class QUANTILE_INTERPOLATION_MODE : uint8_t { LINEAR, LOWER, HIGHER, MIDPOINT, NEAREST }; using sort_fn = void(*)(const TensorBase&, const TensorBase&, const TensorBase&, i...
294eebb4b19f0bf0d08a988daae5995e836824f0e9034ba55d73f1751172061e
C/C++
616
28
#ifndef SPLINE_2D_DEFORMATION_H #define SPLINE_2D_DEFORMATION_H #include <src/jaz/gravis/t2Vector.h> #include "modular_alignment/spline_2D_deformation_model.h" #include "2D_deformation.h" class Spline2DDeformation : public Deformation2D { public: Spline2DDeformation(); Spline2DDeformation( gravis::i2Vec...
04af0d2bc0aaff6ffa0125e016f271d70d0acdfc26f8af1bb447b3127867caf6
C/C++
617
28
#pragma once #include <ATen/native/DispatchStub.h> #include <ATen/core/ATen_fwd.h> namespace at { class Tensor; namespace native { using _amp_foreach_non_finite_check_and_unscale_cpu__fn = void (*)( TensorList, Tensor&, const Tensor&); using _amp_update_scale_cpu__fn = Tensor& (*)( Tensor&, Ten...
5906b811d4fc4610668afca45fbf7b4fc235ff8d7ba811a6f84ad2e131a62b07
C/C++
628
24
#include <c10/macros/Macros.h> C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wdeprecated-declarations") #import <Metal/Metal.h> #import <MetalPerformanceShaders/MetalPerformanceShaders.h> C10_DIAGNOSTIC_POP() @protocol MPSCNNOp<NSObject> @property(nonatomic, strong) MPSCNNKernel* kernel; - (void)encode:(id<MTLComman...
7050cfed3b1ca49bdc7a0f764cc8888ca3c3912dbbb53e310bd5abfd8cdbf346
C/C++
636
34
#ifndef LOCAL_SYMMETRY_MPI_H_ #define LOCAL_SYMMETRY_MPI_H_ #include "src/mpi.h" #include "src/local_symmetry.h" #include "src/parallel.h" //#define DEBUG #define MPITAG_LOCALSYM_SAMPLINGS_PACK 1 class local_symmetry_parameters_mpi: public local_symmetry_parameters { private: MpiNode *node; public: /** Destructo...
d76ab352568f5e33ec4bd6aa16df28dabd9b7e9e083cb9d96f4b01147f4079d2
C/C++
641
25
#pragma once namespace at { struct CUDAGeneratorImpl; struct TensorIteratorBase; class TensorBase; namespace native { void launch_poisson_cuda_kernel( const TensorBase &ret, const TensorBase &lambda, CUDAGeneratorImpl *gen); void launch_gamma_kernel( const TensorBase &ret, const TensorBase &alpha, CUDAGener...
138ea51d4e06cf846a0f037c7e22dd0e0cca9f4580ee6f4d2e4302d7ed344040
C/C++
650
17
#pragma once #include <c10/metal/common.h> // Byte geometry for one dispatch of the inner_contiguous_scatter kernel: a // CONTIGUOUS input copied into regularly-strided blocks of the output -- each // slice_bytes run is placed at off_bytes + k * out_stride_bytes. Backs the // contiguous cat fast path and (in future) s...
b463fc744dcf6da28b7e2a617369df459746fbd5860186cc6f3dedc7f1d411f8
C/C++
652
22
#pragma once #include <c10/core/SafePyObject.h> #include <c10/macros/Macros.h> #include <unordered_map> namespace at::impl { struct TORCH_API ThreadLocalPythonObjects { static void set(const std::string& key, std::shared_ptr<SafePyObject> value); static const std::shared_ptr<SafePyObject>& get(const std::string&...
dfb3f7847231d92a41c9041f3ac7b9453c89947df5b89366cb3feb40705778d0
C/C++
658
20
#pragma once #include <ATen/core/Tensor.h> #include <ATen/core/IListRef.h> namespace at::native { struct ResultTypeState { c10::ScalarType dimResult = ScalarType::Undefined; c10::ScalarType wrappedResult = ScalarType::Undefined; c10::ScalarType zeroResult = ScalarType::Undefined; }; TORCH_API ResultTypeState ...
cf53b44ad55ef33337d809ed67103d425790a7fe024a669543c8d8f35eb9982a
C/C++
660
25
#pragma once #include <c10/macros/Macros.h> // Marks a lambda as executable on both the host and device. The __host__ // attribute is important so that we can access static type information from // the host, even if the function is typically only executed on the device. #ifndef GPU_LAMBDA #define GPU_LAMBDA __host__ _...
1af726d8527f2469deeb86c684e45cc9376f9b3fef56d05633af67b8795a8700
C/C++
661
29
/* * Copyright (c) Facebook, Inc. and its affiliates. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <stddef.h> #include <stdint.h> #include <qnnpack/common.h> #include <qnnpack/...
88a5566746e33bb32640e2f57ee032828d5721ba25c66493dda35a433ef93f13
C/C++
662
24
#include <c10/macros/Macros.h> C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wdeprecated-declarations") #import <MetalPerformanceShaders/MetalPerformanceShaders.h> C10_DIAGNOSTIC_POP() @interface MPSCNNNeuronOp : NSObject + (MPSCNNNeuron*)hardSigmoid API_AVAILABLE(ios(11.0), macos(10.13)); + (MPSCNNNeuron*)relu; + (M...
203f5e5db2c79d119d6cbb18f9e8ec04a70a16669c9e2da7ddae2416ace996bd
C/C++
668
23
#pragma once #include <string> #include <unordered_map> #include <ATen/core/ivalue.h> #include <c10/macros/Export.h> namespace at::cpu { // Returns a map of CPU capabilities detected at runtime via cpuinfo. // Keys are capability names (e.g., "avx2", "neon"), values are bools // for ISA flags, integers for cache si...
5c71337aef38046a5f159b225aff02b13a217015a3307ba75e06fe60aee707e0
C/C++
676
33
/* * Copyright (c) Facebook, Inc. and its affiliates. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ // clang-format off #ifdef __ELF__ .macro BEGIN_FUNCTION name .text .align 2 ...
32af990f93e806df1ebbdeaca4842f9c0610718012741ce41a545417da9dacd1
C/C++
677
30
#ifndef DEVICE_STUBS_H #define DEVICE_STUBS_H #undef CUDA #undef _CUDA_ENABLED #undef HIP #undef _HIP_ENABLED #include <cstddef> #include "src/acc/sycl/sycl_virtual_dev.h" using dim3 = int; using deviceStream_t = virtualSYCL*; using deviceCustomAllocator = double; using cudaStream_t = virtualSYCL*; using CudaCustom...
d3266b25c40427a3021c9227424e533fdfea678b7b11f06ea0b389df822525de
C/C++
678
20
/* * This include file is provided for inclusion in Cython *.pyd files where * one would like to define the NPY_NO_DEPRECATED_API macro. It can be * included by * * cdef extern from "npy_no_deprecated_api.h": pass * */ #ifndef NPY_NO_DEPRECATED_API /* put this check here since there may be multiple includes in ...
3206381fd0446b202c358d95ec4ad171a145069fe2fc69462a21261c6caca03a
C/C++
679
25
#pragma once #include <ATen/OpMathType.h> #include <ATen/hip/HIPBlas.h> namespace at::native { template <typename Dtype> inline void gemm_internal_ck(CUDABLAS_GEMM_ARGTYPES(Dtype)) { static_assert(false&&sizeof(Dtype),"at::cuda::blas_gemm_internal_ck: not implemented"); } #if defined(USE_ROCM) && defined(USE_ROCM...
36d9807f8635fc187377b5b58c08f8c5020dfc4ccad066f2b03c75178a154923
C/C++
679
36
#pragma once #include <ATen/Utils.h> #include <c10/macros/Export.h> #include <c10/util/Exception.h> namespace c10 { class DynamicLibraryError : public Error { using Error::Error; }; } // namespace c10 namespace at { struct DynamicLibrary { AT_DISALLOW_COPY_AND_ASSIGN(DynamicLibrary); DynamicLibrary(DynamicL...
993be3d498629ef8f1708ddefa379a7f5e6c5f4d023e2831ccddcba103be3154
C/C++
681
27
#pragma once #include <c10/util/Exception.h> C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wswitch-default") namespace at::native { // Used as an interface between the different BLAS-like libraries enum class TransposeType { NoTranspose, Transpose, ConjTranspose, }; // Transforms TransposeType into the BLAS / ...
b47311672ddf2f043b69d30c59c50853dee34f192b99290cf8d57f65bc317451
C/C++
681
26
#ifndef TILT_GEOMETRY_H #define TILT_GEOMETRY_H #include <src/jaz/gravis/t4Matrix.h> #include <vector> class TiltGeometry { public: static gravis::d3Vector estimateTiltAxis( const std::vector<gravis::d4Matrix>& projections); /* returns a matrix with the following properties: - z axis (third row) point...
961d82799fb4f4579bae74d53eb852e726cca03837ea6711e61ab8e0c5b8e516
C/C++
682
32
#ifndef MetalContext_h #define MetalContext_h #include <atomic> #include <ATen/Tensor.h> namespace at::metal { struct MetalInterface { virtual ~MetalInterface() = default; virtual bool is_metal_available() const = 0; virtual at::Tensor& metal_copy_(at::Tensor& self, const at::Tensor& src) const = 0; }; ...
f1c40c1384a063e54810e348063c075bc78e07131bc37c6164da7511cec98b86
C/C++
682
32
#ifndef FILEUTILS_H #define FILEUTILS_H #define kAG_Creator 'AxG2' #define kAG_DocType 'AxGr' #define kAGX_Creator 'AxGX' #define kAGX_DocType 'axgx' #include "longdef.h" #if 0 typedef const int filehandle; #else #if !defined(_WINDOWS) || defined(__MINGW32__) #include <cstdio> typedef FIL...
7be6753b0b1d682018bb581f39d20c7984112593d4be708aad21cb3fd1c02b49
C/C++
684
22
/* * Copyright (C) 1994 Bernd Feige * This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING). */ /* * mfx.h * * * This header file is for general information dealing withe the Munster File eXchange format (MFX) */ /* *======================================================================...
4ce7ccd6fa8068b0236b4539c67a055f2873044365e89f1b5819bbeda228c8b1
C/C++
686
29
/* * Copyright (c) Facebook, Inc. and its affiliates. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <stddef.h> #include <stdint.h> #include <qnnpack/common.h> #include <qnnpack/...
b14829fd72ed430e2ced77b1930238d41a8ac31bd725066b02ad78935e3e1ed3
C/C++
686
29
/* * Copyright (c) Facebook, Inc. and its affiliates. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <stddef.h> #include <stdint.h> #include <qnnpack/common.h> #include <qnnpack/...
90df24409389f6dd35f2a581dc2c007008426b1b785b77fab46911fffcd6558c
C/C++
691
27
#pragma once #include <c10/util/intrusive_ptr.h> namespace c10 { /** * Inherit from OperatorKernel to implement a c10 kernel. * * Example: * > namespace { * > class my_kernel_cpu final : public c10::OperatorKernel { * > public: * > Tensor operator()(Tensor a, Tensor b) {...} * > }; * > } * * The ...
9d6535757f1660568cb3a7e0c3451853bd2110b8f5edef80ab25f758047fd3ce
C/C++
692
35
#pragma once #include <ATen/Tensor.h> namespace at::native::sparse::impl::mkl { void addmm_out_sparse_csr( const Tensor& mat1, const Tensor& mat2, const Scalar& beta, const Scalar& alpha, const Tensor& result); void addmv_out_sparse_csr( const Tensor& mat, const Tensor& vec, const Sc...
cd0bf795e73fcf284a3147d840a9653384e91e39767266a9a8c35586a18bff6c
C/C++
695
21
/* Autogenerated v4-0-0 from https://github.com/scottprahl/iad */ void U_Find_Ba(struct measure_type m, struct invert_type *r); void U_Find_Bs(struct measure_type m, struct invert_type *r); void U_Find_A(struct measure_type m, struct invert_type *r); void U_Find_B(struct measure_type m, struct invert_type *r); voi...
ca04e618e980e23244fdf3b208266d8c8964bfebe12141185539b313ab73aaa8
C/C++
696
28
#pragma once #include <ATen/core/Tensor.h> #include <ATen/native/DispatchStub.h> namespace at::native { enum class ADAM_MODE : uint8_t { ORIGINAL = 0, ADAMW = 1 }; using fused_adam_fn = void (*)( const at::Tensor& param, const at::Tensor& grad, const at::Tensor& exp_avg, const at::Tensor& exp_avg_sq,...
6d0cafe6603a3042fb7fa869d0b21061a1c1690562960b7f7eb994ccd083dbc7
C/C++
708
21
#pragma once #include <ATen/core/Tensor.h> namespace at { inline Tensor unsafeTensorFromTH(void * th_pointer, bool retain) { auto tensor_impl = c10::intrusive_ptr<TensorImpl, UndefinedTensorImpl>::reclaim(static_cast<TensorImpl*>(th_pointer)); if (retain && tensor_impl.get() != UndefinedTensorImpl::singleton()) {...
5365ee9ea926b576a729a70134ab89210b2f6d550dde9363326063a681c458ab
C/C++
711
25
#pragma once // ARM NEON uses 128-bit vector registers. #include <ATen/cpu/vec/intrinsics.h> #ifdef __aarch64__ #if !defined(CPU_CAPABILITY_SVE256) #include <ATen/cpu/vec/vec128/vec128_bfloat16_neon.h> #include <ATen/cpu/vec/vec128/vec128_double_neon.h> #include <ATen/cpu/vec/vec128/vec128_float_neon.h> #include <ATe...
e4c9a922efde9bec70cd91d0875ae69c1988e62579ca579d1427bb70e1ff2258
C/C++
716
49
/* * autopicker_mpi.h * * Created on: Sep 18, 2013 * Author: "Sjors H.W. Scheres" */ #ifndef AUTOPICKER_MPI_H_ #define AUTOPICKER_MPI_H_ #include "src/mpi.h" #include "src/autopicker.h" #include "src/parallel.h" class AutoPickerMpi: public AutoPicker { private: MpiNode *node; public: /** Destructor, ca...
b004871adde76ad836836323955fbcf964804653c8a3a60ce567d47f53437214
C/C++
718
35
/* * Copyright (c) Facebook, Inc. and its affiliates. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <stddef.h> #ifdef _MSC_VER #undef min #undef max #endif inline static size_t ...
f0519e2f717b1149398bf555b39487ba47c984042e5e2ed6b4de413575e10e5c
C/C++
719
31
#pragma once #include <c10/util/Exception.h> #include <ostream> #include <string> namespace at { enum class LinalgBackend : int8_t { Default, Cusolver, Magma }; inline std::string LinalgBackendToString(at::LinalgBackend backend) { switch (backend) { case LinalgBackend::Default: return "at::LinalgBacken...
ee29626d9397e113ed9719428b5883c1676723163653482799af1f27b24c6828
C/C++
720
20
#pragma once #include <ATen/native/DispatchStub.h> namespace at { class Tensor; namespace native { using pdist_forward_fn = void(*)(Tensor&, const Tensor&, const double p); using pdist_backward_fn = void(*)(Tensor&, const Tensor&, const Tensor&, const double p, const Tensor&); using cdist_fn = void(*)(Tensor&, cons...
f681764c423c10abb9c1cb1edc2cc0c91dde0f7bc06063a5ad3c99d45855efec
C/C++
722
32
#include <mutex> #include <string> #include <unordered_map> #include <vector> #include <ATen/core/symbol.h> #include <c10/util/Exception.h> namespace c10 { struct TORCH_API InternedStrings { InternedStrings(); Symbol symbol(const std::string& s); std::pair<const char*, const char*> string(Symbol sym); Symbol ...
cf4b150424799c48bb9b2f5eb2701beb17728afdc199d15a4c455668158c5fd5
C/C++
723
31
#pragma once #include <c10/util/Exception.h> #include <ostream> #include <string> namespace at { enum class ROCmFABackend : int8_t { Default, AOTriton, Ck }; inline std::string ROCmFABackendToString(at::ROCmFABackend backend) { switch (backend) { case ROCmFABackend::Default: return "at::ROCmFABackend::...
b30c96fe3626cccadcef99c84b00a276e3929e600e8d5a0fe3aaf2fa3f5c4cfa
C/C++
727
17
/* Autogenerated v4-0-0 from https://github.com/scottprahl/iad */ double Cos_Critical_Angle(double ni, double nt); double Cos_Snell(double n_i, double mu_i, double n_t); void Absorbing_Glass_RT(double n_i, double n_g, double n_t, double mu_i, double b, double *r, double *t); void Sp_mu_RT(double n_top, double n_sla...
0b8c4bc5ff4c6b1f4f33ee57e1c8b196ae6880bfc643e02d9a8067918b5dcb67
C/C++
741
49
/* * autopicker_mpi.h * * Created on: Sep 18, 2013 * Author: "Sjors H.W. Scheres" */ #ifndef AMYLOID_FINDER_MPI_H_ #define AMYLOID_FINDER_MPI_H_ #include "src/mpi.h" #include "src/amyloid_finder.h" #include "src/parallel.h" class AmyloidFinderMpi: public AmyloidFinder { private: MpiNode *node; public: ...
2b9cce468600f7ae4ff29e26b6b1019d35cdec7ccc035c7b28409532bbd33c6f
C/C++
744
28
#pragma once #include <typeindex> #include <memory> #include <c10/macros/Export.h> #include <c10/macros/Macros.h> #include <c10/util/Exception.h> namespace c10 { struct ClassType; using ClassTypePtr = std::shared_ptr<ClassType>; TORCH_API c10::ClassTypePtr getCustomClassTypeImpl(const std::type_index &tindex); te...
e238795a36b5269a790dfcb5083be655ef81a6d3b1c162cb0e8cc993caa9f02c
C/C++
745
16
#pragma once #include <ATen/core/Tensor.h> #include <ATen/native/DispatchStub.h> namespace at::native { using histogramdd_fn = void(*)(const Tensor&, const std::optional<Tensor>&, bool, Tensor&, const TensorList&); using histogramdd_linear_fn = void(*)(const Tensor&, const std::optional<Tensor>&, bool, Tensor&, cons...
e1a65be85e579c7dbb02ac7769e02244b5697af8462e0bf7c97268d8cde9877f
C/C++
746
30
/* Autogenerated v4-0-0 from https://github.com/scottprahl/iad */ double What_Is_B(struct AD_slab_type slab, double Tu); void Estimate_RT(struct measure_type m, struct invert_type r, double *rt, double *tt, double *rd, double *rc, double *td, double *tc); double a2acalc(double a); double acalc2a(double acalc); ...
af8845f33c747b8297166ac450676a32686a8bf5cbb6305771184b3892180e6f
C/C++
754
44
/* * Copyright (C) 2001,2002,2008,2014 Bernd Feige * This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING). */ #ifndef AVG_Q_CONFIG_H #define AVG_Q_CONFIG_H #if defined __x86_64__ && !defined __ILP32__ # define POINTER_SIZE 64 #else # define POINTER_SIZE 32 #endif #undef INTTYPES_OK #ifdef ...
521d8dab6af17d5815b502efe1bd94c5ccd960a650262b14a85ebd5ee6b61490
C/C++
755
28
// Copyright © 2022 Apple Inc. #pragma once #include <ATen/core/TensorBase.h> namespace at::detail { C10_EXPORT TensorBase empty_mps( IntArrayRef size, std::optional<ScalarType> dtype_opt, std::optional<Layout> layout_opt, std::optional<Device> device_opt, std::optional<bool> pin_memory_opt, ...
f04679bdb304dbb01527c02205b4fb8dcbf1cd60af1a54cd4bfd7631609d5cae
C/C++
756
36
#pragma once #include <string> namespace at { class Tensor; } // namespace at namespace c10 { struct IValue; namespace detail { // Determine the return type of `IValue::to() const &`. It's a const // reference when possible and a copy otherwise. It is in this // separate header so that List can use it as well. templ...
70ac24f7e957294957fad67e057b378bf46b8b58afb8a500622d219b159158d8
C/C++
762
24
/* * Copyright (C) 1994 Bernd Feige * This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING). */ /* *============================================================================== *============================================================================== * this section is the old channe...
72300be41ec5998e887e641d0af5e68ebc7f9570fff2c4c8bc48377840722f29
C/C++
776
25
#include <c10/macros/Macros.h> C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wdeprecated-declarations") #import <MetalPerformanceShaders/MetalPerformanceShaders.h> C10_DIAGNOSTIC_POP() @protocol PTMetalCommandBuffer<NSObject> @optional - (void)beginSynchronization; - (void)endSynchronization:(NSError*)error; @end @in...
630173077e826c717a10bb50839fd036ae78d4bf98353fc191a6d9c0572b9da2
C/C++
779
18
#pragma once #include <cstdint> namespace at { class TensorBase; namespace native { // NOTE: these functions require output tensors to be contiguous void launch_cummax_cuda_kernel(const TensorBase& self, const TensorBase& values, const TensorBase& indices, int64_t dim); void launch_cum...