sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
aff80f01571d60cbf28b86eaf4b258e7830fb3db1375199a49764b996ecb1f9b
C/C++
279
15
#ifndef IMAGE_FILE_HELPER_H #define IMAGE_FILE_HELPER_H #include <src/jaz/gravis/t3Vector.h> class ImageFileHelper { public: static gravis::t3Vector<long int> getSize(const std::string& filename); static double getSamplingRate(const std::string& filename); }; #endif
5c709adf72a557177da8e50b12c292096d01d4fc552e67f0fc6d5be453d29ee2
C/C++
282
16
#pragma once #include <algorithm> namespace at::native { // returns 2**floor(log2(n)) static int lastPow2(unsigned int n) { n |= (n >> 1); n |= (n >> 2); n |= (n >> 4); n |= (n >> 8); n |= (n >> 16); return std::max<int>(1, n - (n >> 1)); } } // namespace at::native
f8ff499d7d07d260f5bedae3bd25dc021ea7201cf2bb70c7e03941ccc5cde296
C/C++
286
14
#pragma once #include <ATen/native/DispatchStub.h> #include <cstdint> namespace at { class TensorBase; } namespace at::native { using channel_shuffle_fn = void(*)(TensorBase&, const TensorBase&, int64_t); DECLARE_DISPATCH(channel_shuffle_fn, channel_shuffle_kernel) } // at::native
153b90ba5691e813dccff7b15e5b736df8a88cd408331e006feb24b3a3d0b8dc
C/C++
288
19
#ifndef RECURSIVE_LINE_SEARCH_H #define RECURSIVE_LINE_SEARCH_H #include "optimization.h" class RecursiveLineSearch { public: static double optimize( const Optimization& opt, double x0, double x1, int steps, int recursions, bool verbose = false); }; #endif
a85081bb73a38b0aabe6547fbd0d052d251d5fd6c24b92ddb8bbe6b8f25e56f0
C/C++
292
15
#pragma once #include <c10/util/Exception.h> #define INTRA_OP_PARALLEL namespace at::internal { TORCH_API void invoke_parallel( const int64_t begin, const int64_t end, const int64_t grain_size, const std::function<void(int64_t, int64_t)>& f); } // namespace at::internal
ce401915cf3628e39afa57beafe401f200425a9062f36f28a9e0df4fc37b25f8
C/C++
292
14
#pragma once #include <ATen/ATen.h> #include <c10/core/SymIntArrayRef.h> namespace at::native { Tensor mkldnn_view(const Tensor& self, IntArrayRef size); Tensor mkldnn_view_symint(const Tensor& self, c10::SymIntArrayRef size); Tensor mkldnn_clone(const Tensor& self); } // namespace at
17b928ba88af714b87d919cc77cfc2719f3d2ae38eaedff3ff40469ccd5233ea
C/C++
299
13
#pragma once #include <ATen/core/ivalue.h> #include <c10/macros/Macros.h> #include <functional> namespace at { // Launches intra-op parallel task, returns a future TORCH_API c10::intrusive_ptr<c10::ivalue::Future> intraop_launch_future( const std::function<void()>& func); } // namespace at
987a4e73755da0d561002133c81a0f6ede9c3848ce72eac9cc759bab3f48858a
C/C++
299
17
#pragma once #include <ATen/native/DispatchStub.h> namespace c10 { class Scalar; } namespace at { struct TensorIterator; } namespace at::native { using addr_fn = void (*)(TensorIterator &, const Scalar& beta, const Scalar& alpha); DECLARE_DISPATCH(addr_fn, addr_stub) } // namespace at::native
5d8653c380b441fa692789fdc814dfb21f7d67aa3cb1b75eda4a019fa020e6d3
C/C++
303
13
#pragma once #include <ATen/core/Tensor.h> #include <ATen/SparseCsrTensorUtils.h> namespace at::sparse_csr { Tensor& _sparse_mm_mkl_( Tensor& self, const SparseCsrTensor& sparse_, const Tensor& dense, const Tensor& t, const Scalar& alpha, const Scalar& beta); } // namespace at
26dc01cb35b56db651f85b303132f4668b945901542642a82aa176eff251b661
C/C++
305
17
#ifndef FILAMENT_MAPPING_H #define FILAMENT_MAPPING_H #include <src/jaz/image/buffered_image.h> #include <string> class FilamentMapping { public: BufferedImage<float> index, signed_dist, mask; void write(std::string filename); static FilamentMapping read(std::string filename); }; #endif
a627f8b52b85dd8598f1dcb1a6581db5eae17c3bef68f42ce9b90459b1321f69
C/C++
306
12
#pragma once #include <ATen/core/Tensor.h> #include <ATen/native/DispatchStub.h> #include <ATen/core/IListRef.h> namespace at::native { using cat_serial_fn = void(*)(const Tensor &, const MaterializedITensorListRef&, int64_t); DECLARE_DISPATCH(cat_serial_fn, cat_serial_stub) } // namespace at::native
dde9ec8b89fd73c727b62ff63aa92cee50da2a6ac8cb19128945e2bed2e6a0a8
C/C++
306
14
#pragma once #include <ATen/native/DispatchStub.h> namespace at { class Tensor; namespace native { using max_unpooling_fn = void(*)(Tensor&, const Tensor&, const Tensor&); DECLARE_DISPATCH(max_unpooling_fn, max_unpool2d_kernel) DECLARE_DISPATCH(max_unpooling_fn, max_unpool3d_kernel) }} // at::native
565e42d528737c6350974471967db288d9a90771752e6b6ce863eaaac1de502f
C/C++
308
12
// Copyright 2004-present Facebook. All Rights Reserved. #pragma once #include <ATen/core/Tensor.h> #include <ATen/native/DispatchStub.h> namespace at::native { using stack_serial_fn = void(*)(Tensor &, TensorList, int64_t); DECLARE_DISPATCH(stack_serial_fn, stack_serial_stub) } // namespace at::native
4a40c35e4c59becba08e4b438170d02d086077dced8c998f57de4f07462bd3da
C/C++
310
14
#pragma once #include <ATen/Tensor.h> #include <ATen/cudnn/cudnn-wrapper.h> namespace at::native { TORCH_CUDA_CPP_API cudnnDataType_t getCudnnDataTypeFromScalarType(const at::ScalarType dtype); cudnnDataType_t getCudnnDataType(const at::Tensor& tensor); int64_t cudnn_version(); } // namespace at::native
63dae1beecb4acc6643f185594e04c71a33a42a14fcad8dc3e8c04067f080db5
C/C++
311
12
#ifndef FPGA_CONSTANTS_H #define FPGA_CONSTANTS_H #define UDP_PACKAGE_SIZE 1428 // Expected UDP packet size #define MAX_PKG_ID 1562500 #define FS 17361 #define NUM_CHANNELS 240 #define SIGNAL_READOUT_OFFSET 468 // this is where raw data of channel 0 starts #define TEMP_DATA_LEN 15 #endif // FPGA_CONSTANTS_H
e83b571d278d36d8e088e4a5e4bc49dee60bad158782321756f7271cf4d6721a
C/C++
312
14
#pragma once #include <ATen/native/TensorIterator.h> namespace at { struct TensorIteratorBase; namespace native { inline namespace CPU_CAPABILITY { void direct_copy_kernel(TensorIteratorBase &iter); void copy_kernel(TensorIterator& iter, bool /*non_blocking*/); }}} // namespace at::native::CPU_CAPABILITY
e7b6a0181e57f0d5a6c3b6214335abfc29369da6f07b5dd7d618ed907bcd96de
C/C++
316
19
#ifndef CATALOGUE_H #define CATALOGUE_H #include "dynamo_particle.h" class Catalogue { public: Catalogue(); Catalogue(std::string filename); std::vector<DynamoParticle> particles; std::vector<std::vector<DynamoParticle>> splitByTomogram(); void write(std::string fn); }; #endif
be89c455cda5d3fe81881b93f18770a895927b459ab4160a6719c18bce8f0a16
C/C++
317
11
#pragma once #include <mkl_types.h> namespace at::native { // Since size of MKL_LONG varies on different platforms (linux 64 bit, windows // 32 bit), we need to programmatically calculate the max. constexpr int64_t MKL_LONG_MAX = ((1LL << (sizeof(MKL_LONG) * 8 - 2)) - 1) * 2 + 1; } // namespace at::native
4dc07cb79d57ec2817b3469d74b7ae5cc0adfe3580ffb170af3ab48a85fe6a61
C/C++
319
7
/* * Copyright (C) 1995 Bernd Feige * This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING). */ void fix_typeheader(struct mfx_header_format_data *typeheader_p); void fix_fileheader(struct mfx_header_data001 *fileheader_p); void fix_channelheader(struct mfx_channel_data001 *channelheader_p);
c83b5fc105ca7bf4f2b972b0661a9bfef408d65f5673f27654fbe5d8cac72ff7
C/C++
319
13
#pragma once #include <c10/macros/Export.h> #include <cstdint> namespace at::cuda { // enqueues a kernel that spins for the specified number of cycles TORCH_CUDA_CU_API void sleep(int64_t cycles); // flushes instruction cache for ROCm; no-op for CUDA TORCH_CUDA_CU_API void flush_icache(); } // namespace at::cuda
01ac456d52965127b043e117e248f4eb3347153546f3b0b9cd8ee73f283bcba6
C/C++
320
14
#pragma once #include <ATen/native/DispatchStub.h> namespace at { class TensorBase; } namespace at::native { using pixel_shuffle_fn = void(*)(TensorBase&, const TensorBase&, int64_t); DECLARE_DISPATCH(pixel_shuffle_fn, pixel_shuffle_kernel) DECLARE_DISPATCH(pixel_shuffle_fn, pixel_unshuffle_kernel) } // at::native
06a566483ae25cd7c12c45b044e440b3ab8e842c8f5b323713e42bc27ef50335
C/C++
320
10
/* * Includes used by both read_kn.c and write_kn.c */ #include "transform.h" #include "bf.h" #include "rawlimit.h" #include "rawdatan.h" /* Function defined in read_kn.c and also used by write_kn.c */ void parse_trigform(transform_info_ptr tinfo, struct Rtrial *trialb, short **trigger_form, char const *trigform);
5a1c477225e060bbb7f84c310cc55c13d270f4a715a977e6e3ad1d7359687462
C/C++
320
14
#ifndef STRINGUTILS_H #define STRINGUTILS_H #include "longdef.h" typedef unsigned char axgchar; void PascalToCString( axgchar *string ); void CToPascalString( axgchar *string ); void UnicodeToCString( axgchar *string, const int stringBytes ); void CStringToUnicode( axgchar *string, const int stringBytes ); #endif
0b5998c6844d6d4d9fbe926450c4e2d13ed4cd6252b9166643cfaf4d2c9b5b46
C/C++
322
19
#ifndef DEFORMATION_2D_H #define DEFORMATION_2D_H #include <src/jaz/gravis/t2Vector.h> class Deformation2D { public: struct Parameters { int grid_width, grid_height; }; virtual gravis::d2Vector apply(const gravis::d2Vector pl) const = 0; virtual const double* getCoefficients() const = 0; }; #endi...
806f84ebf91f4b833a3c0c2238a5ec7fb70103b65bfc63a38a867795e013a5b2
C/C++
322
12
#pragma once #include <ATen/core/Tensor.h> #include <ATen/native/DispatchStub.h> namespace at::native { using sampled_addmm_sparse_csr_fn = void(*)(const Tensor&, const Tensor&, const Scalar&, const Scalar&, const Tensor&); DECLARE_DISPATCH(sampled_addmm_sparse_csr_fn, sampled_addmm_sparse_csr_stub) } // at::nativ...
a7b2aa5ef19ef68d00c94498d7655c0c4d82dbf74976d675457f76f739cd8c79
C/C++
322
15
#pragma once #include <type_traits> // Integer division rounding to -Infinity template <typename T> static inline T div_rtn(T x, T y) { static_assert( std::is_integral_v<T>, "div_rtn is only valid for integral types"); T q = x / y; T r = x % y; if ((r != 0) && ((r < 0) != (y < 0))) --q; return q; ...
af0d2efb49265ed4498a4fe05a12b557bdf1065f19eb0ac6899612489039d5cf
C/C++
323
11
#ifndef INFERENCE_H #define INFERENCE_H #include<RcppArmadillo.h> // [[Rcpp::depends(RcppArmadillo)]] arma::vec computeSE(const int& m, const int& c, const arma::mat& coeff_mat); arma::vec computeTScore(const arma::vec& curr_beta, const arma::vec& SE); arma::mat varCovar(const Rcpp::List& psvari, const int& c); #end...
8db8746d355e9e6f8c901921e4eb2d655503f624953379c64356873fefa6907a
C/C++
327
12
#pragma once #include <ATen/core/TensorBase.h> #include <optional> namespace at::cuda::detail { TORCH_API void bf16bf16_grouped_mm( at::Tensor mat_a, // bf16 at::Tensor mat_b, // bf16 std::optional<at::Tensor> offs, std::optional<at::Tensor> bias, // BF16 at::Tensor& out); } // namespace at::cuda::...
18aa1252a1b122422434e3b8d79139b4e14052bdf7bb1ae4fed2f5bd6a68e86e
C/C++
329
17
#pragma once #include <ATen/core/operator_name.h> #include <string> #include <unordered_set> namespace c10 { struct TORCH_API ObservedOperators { ObservedOperators() = delete; static bool isObserved(const OperatorName& name); static std::unordered_set<std::string>& getUnobservedOperatorList(); }; } // names...
0f5c909892ae17310da7e66ff9e82df56708264d1d6a8c769504e02a1871a8ef
C/C++
330
23
#ifndef FCC_PROGRAM_H #define FCC_PROGRAM_H #include <string> #include <src/jaz/math/t_complex.h> #include <src/jaz/image/buffered_image.h> #include <vector> #include "refinement.h" class FccProgram : public RefinementProgram { public: FccProgram(int argc, char *argv[]); void readParams(); void run(); };...
5a0d0e056207a9417b7fd978f6b748eb6ec2adc33320480ff1967d7153e0cc4d
C/C++
331
11
/* * Copyright (C) 1995,2012 Bernd Feige * This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING). */ #include <stdint.h> void Intel_int16(uint16_t *x); void Intel_int(unsigned int *x); void Intel_int32(uint32_t *x); void Intel_int64(uint64_t *x); void Intel_float(float *f); void Intel_double(d...
924c74fc15327dd4dbc1ba221aca341b030d246fca3310a38e26ec9478ade8cd
C/C++
333
13
#pragma once #include <c10/macros/Export.h> #include <cstdint> // A simple thread local enumeration, used to link forward and backward pass // ops and is used by autograd and observers framework namespace at::sequence_number { TORCH_API uint64_t peek(); TORCH_API uint64_t get_and_increment(); } // namespace at::seq...
6420d84b6fc39f09ef04ef013ecedceb4afc869d58900a5c2e04ec2a2d4cd31f
C/C++
335
8
/* FILE version.h */ #define MINIMUM_ISI 0.9 /* Else spike is glitch (5.5 ms)*/ /* was 0.9;chg'd 2015-03-31 to 4*/ /* changed back to 0.9 for harry*/ /* Loading options */ /* Mutually exclusive: */ #define NORMAL_UNIT_ENCODING 1 /* Straightforward 1/interval */ #define LISBERGER_UNIT_ENCODING 0 /* Delay...
1dd32b772442596b1ca6d7fd2cc7421ab80e8bcb612e9f1cae8e9c7498cf469b
C/C++
338
15
#pragma once #include <c10/core/ScalarType.h> #include <cstdint> namespace at { struct TensorIteratorBase; class TensorBase; } namespace at::native { /// @param maskPrefixSum[in,out] void launch_masked_scatter_kernel( const TensorBase &self, const TensorBase &mask, const TensorBase &maskPrefixSum, const Tenso...
ffd9258e8d852738e5edfe019edaea017ecca3211ec1c65c58fd916f4cc80a4c
C/C++
338
17
#pragma once #ifdef USE_RUY_QMATMUL #include <ruy/ruy.h> namespace at::native::ruy_utils { ruy::Context* get_ruy_context(); void quantize_multiplier(double scale, int* multiplier_fixedpoint, int* multiplier_exponent); } // namespace at::native::ruy_utils #endif /...
2cf3b3f857a74c9eac721e2ed9462c9847d71c30bea83be92c534257fc170ec8
C/C++
340
14
#include <ATen/core/Tensor.h> namespace at::native { std::tuple<Tensor, Tensor, Tensor> slow_conv3d_backward_cpu( const Tensor& grad_output, const Tensor& self, const Tensor& weight, IntArrayRef kernel_size, IntArrayRef stride, IntArrayRef padding, std::array<bool, 3> output_mask); } // n...
b062412f4f3927557fbe1092374780493b4391f0e581ceca3d386f47303e40fa
C/C++
342
23
#ifndef POWSPEC_PROGRAM_H #define POWSPEC_PROGRAM_H #include <string> #include <vector> #include <src/jaz/gravis/t4Matrix.h> #include <src/jaz/gravis/t2Vector.h> class PowspecProgram { public: PowspecProgram(){} int res, ratio; double pixSize; std::string stackFn, outFn; bool separate; voi...
fdebecf1a501d688a3ab3cddd863cea93edc68a9296840880f1f0f92a7cba4c8
C/C++
346
9
/* Autogenerated v4-0-0 from https://github.com/scottprahl/iad */ int Read_Header(FILE * fp, struct measure_type *m, int *params); void Write_Header(struct measure_type m, struct invert_type r, int params, char *cmd); int Read_Data_Line(FILE * fp, struct measure_type *m, struct invert_type *r, int params); int Colu...
20970b0e6ce57a719fd6dbf2c8b4bb6420a7679c9a03028a17eefbeaf6f03f6b
C/C++
349
12
#pragma once // Replacement values are computed per-dtype on the host (CUDA-style: the // posinf/neginf defaults are the input dtype's max/lowest) and ride at float, // which represents half/bfloat extrema exactly; the struct is always // instantiated at T = float. template <typename T> struct NanToNumParams { T nan...
e273ace7184e0c57773f376fd1ddcd45c17cb43752594c9bed970cec62f7d406
C/C++
352
21
#ifndef MAG_FIT_PROGRAM_H #define MAG_FIT_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 MagFitProgram : public RefinementProgram { public: MagFitProgram(int argc, char *argv[]); void readPar...
1e85deab9e459d6c0cc469d7909774f68cb77087c9e2d63baf019a453f7de75b
C/C++
353
20
#ifndef SPHERICAL_COORDINATES_H #define SPHERICAL_COORDINATES_H #include <src/jaz/gravis/t3Vector.h> class SphericalCoordinates { public: SphericalCoordinates(); SphericalCoordinates(double phi, double theta); SphericalCoordinates(const gravis::d3Vector& cartesian); double phi, theta; gravis::d3Vector...
9be5d3f7b3eced0524c3455cd360804de10ed6db7d31825eca3704d0176815e0
C/C++
354
12
#include <ATen/native/DispatchStub.h> #include <c10/core/Scalar.h> namespace at { struct TensorIterator; namespace native { DECLARE_DISPATCH(void(*)(TensorIterator&, const Scalar&, const Scalar&, const Scalar&), arange_stub) DECLARE_DISPATCH(void(*)(TensorIterator&, const Scalar&, const Scalar&, int64_t), linspace_s...
639708b96b44bbfc8db74c00cfe9be03c688fc6ee8f73ed5f123d03b77203725
C/C++
355
17
#include <c10/macros/Macros.h> C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wdeprecated-declarations") #import <MetalPerformanceShaders/MetalPerformanceShaders.h> C10_DIAGNOSTIC_POP() #include <vector> @interface MPSImage (Tensor) - (std::vector<int64_t>)sizes; - (int64_t)readCount; - (BOOL)isTemporaryImage; - (voi...
556e88d41cfde031000ec16424cff3094fabb7eeb4590f3283feb065c32338ca
C/C++
369
14
#pragma once #include <ATen/core/TensorBase.h> #include <optional> namespace at::cuda::detail { TORCH_API void f8f8bf16_rowwise( at::Tensor XQ, // FP8 at::Tensor WQ, // FP8 at::Tensor x_scale, // FP32 at::Tensor w_scale, // FP32 std::optional<at::Tensor> bias, // BF16 bool use_fast_accum, a...
13425b60357a6199b26756c98340b5cd9c1e27cfc4680868a8867a6da786739c
C/C++
370
28
#ifndef RELION_ALIGN_MPI_H #define RELION_ALIGN_MPI_H #include <src/mpi.h> #include "align.h" class AlignProgramMpi : public AlignProgram { private: MpiNode *node; public: AlignProgramMpi(int argc, char *argv[]); /** Destructor, calls MPI_Finalize */ ~AlignProgramMpi() { delete node; } int rank, nodeCou...
32068587189bbbeae00654f7774dbc948a8bc2a8afef09addfd2eb6b42bc6821
C/C++
370
24
#ifndef TOMO_CTF_PROGRAM_H #define TOMO_CTF_PROGRAM_H #include <string> #include <vector> #include <src/jaz/gravis/t4Matrix.h> #include <src/jaz/gravis/t2Vector.h> class TomoCtfProgram { public: TomoCtfProgram(){} int n_threads; int thickness; double pixSize, voltage, Cs; std::string stackF...
5869be4566442a0029cc7bcb6032c0b78e90eed9a19733bc9fc1371d50f23d6b
C/C++
372
15
#pragma once #include <ATen/core/Tensor.h> namespace at::native { Tensor& qembeddingbag_byte_prepack_out( Tensor& output, const Tensor& weight, const std::optional<Tensor>& rowwise_min_max_opt = std::nullopt); Tensor qembeddingbag_byte_prepack(const Tensor& weight); Tensor qembeddingbag_byte_prepack_met...
83b3083f81709db361484d34f969f24cf17d76c194640bc412bb6cc2b5fa19e2
C/C++
372
20
#pragma once #include <ATen/native/DispatchStub.h> namespace at { class Tensor; struct TensorIterator; class TensorBase; namespace native { using copy_fn = void (*)(TensorIterator&, bool non_blocking); DECLARE_DISPATCH(copy_fn, copy_stub) TORCH_API void copy_ignoring_overlaps(const TensorBase &dst, const TensorB...
155d3593647699456ce6cd87e815b3f41ca14fc93154f70dbb60c9400ea0c98a
C/C++
374
9
/* FILE ad.h */ /* ******************************************************************** */ /* One AD unit is 1/20 of a degree. There is a 2048 offset to ADs. */ #define DEGtoAD(deg) ((deg) * 20) /* Returns int */ #define ADtoDEG(ad) ((ad) / 20.) /* Returns float*/ /* *******************...
fd12a23210222f3debb87570782cba8d6c4eca564ab96804e89269cadfef5cd6
C/C++
380
24
#ifndef DARK_ERASE_PROGRAM_H #define DARK_ERASE_PROGRAM_H #include <string> #include <vector> #include <src/jaz/gravis/t4Matrix.h> #include <src/jaz/gravis/t2Vector.h> class DarkEraseProgram { public: DarkEraseProgram(){} int num_threads; double thresh, rad; std::string stackFn, projFn, outFn; ...
b135b4e21161ed118ce5191b5e840a2c37304cfe0ab3b18d0f24cbaf7b5025d6
C/C++
384
18
#include <ATen/Context.h> namespace at { /// Returns a detailed string describing the configuration PyTorch. TORCH_API std::string show_config(); TORCH_API std::string get_mkl_version(); TORCH_API std::string get_mkldnn_version(); TORCH_API std::string get_openmp_version(); TORCH_API std::string get_cxx_flags(); ...
cb1fb5cae2ce6b71451fa235275695b333e1f54dc6188661bff6a79ec7194742
C/C++
384
23
#pragma once template <typename T> struct ELUParams { T alpha; T scale; T input_scale; }; template <typename T> struct ELUBackwardParams { T alpha; T scale; T input_scale; bool is_result; }; // beta/threshold are kept at opmath (float) precision for every input dtype, // matching the CPU and CUDA kerne...
35536c6937808902f255e87e6968c25fee40c1b9d8d5407c4b3de934478f5fe3
C/C++
388
20
#pragma once #include <ATen/native/DispatchStub.h> #include <cstdint> namespace at { struct TensorIterator; namespace native { using _compute_linear_combination_fn = void(*)( TensorIterator& iter, int64_t in_stride, int64_t coeff_stride, int64_t num_summations ); DECLARE_DISPATCH(_compute_linear_combinatio...
cf69983de07e3c8513f7ed30c229a7687f794e247324587db0e2e3fa13570f59
C/C++
389
19
#pragma once #include <ATen/Tensor.h> #include <c10/core/ScalarType.h> #include <optional> namespace at { namespace hip { namespace detail { void group_gemm_ck( const at::Tensor& mat_a, const at::Tensor& mat_b, const std::optional<at::Tensor>& offs, const std::optional<at::Tensor>& bias, at::Tenso...
5f616896970569cbee8b9e12e6cf4240f050e60bdb1bc568179b07d63906b642
C/C++
391
17
#pragma once #include <ATen/Parallel.h> #include <c10/core/thread_pool.h> namespace at { class TORCH_API PTThreadPool : public c10::ThreadPool { public: explicit PTThreadPool(int pool_size, int numa_node_id = -1) : c10::ThreadPool(pool_size, numa_node_id, []() { c10::setThreadName("PTThreadPool");...
ab6bd2470403327577da997bf404addabe09a24fedddd4fd2b9303e31f00f3a6
C/C++
392
26
#ifndef RELION_SUBTOMO_MPI_H #define RELION_SUBTOMO_MPI_H #include <src/mpi.h> #include "subtomo.h" class SubtomoProgramMpi : public SubtomoProgram { private: MpiNode *node; public: /** Destructor, calls MPI_Finalize */ ~SubtomoProgramMpi() { delete node; } int rank, nodeCount, verb; void readParameters(...
57c53490c65c4967c92c75ce15c45e5b985316f3f19965b9976f796d83bb2467
C/C++
395
20
#ifndef SEGMENTATION_H #define SEGMENTATION_H #include <src/jaz/image/buffered_image.h> #include <src/jaz/math/tensor3x3.h> class PrimalDualTV { public: static BufferedImage<float> anisotropicTV( RawImage<float> regionalCost, RawImage<Tensor3x3<float>> diffusionTensor, int maxIterations = 100, f...
a4829ab185f893b55b5a162dade99c6557aec0f4b9836983c87c7dbae81b3d68
C/C++
396
21
// Functions that fill Tensors with constants. Implementations are in Fill.cpp. #pragma once #include <ATen/native/DispatchStub.h> namespace c10 { class Scalar; } namespace at { class Tensor; struct TensorIterator; namespace native { DECLARE_DISPATCH(void(*)(TensorIterator&, const c10::Scalar&), fill_stub) Tenso...
def800ab2d43e7213025b6b855e59e3d7aea9b0ed0b8a05039fe6cf5a7912794
C/C++
396
17
#pragma once #include <cstdint> namespace at { class TensorBase; } namespace at::native { void launch_kthvalue_kernel( const TensorBase &values, const TensorBase &indices, const TensorBase &self, int64_t dim, int64_t k); void launch_median_kernel( const TensorBase &vals, const TensorBase &inds, const...
851d32d85c43535224624b94c2559c53f2af8d8a5b3f609753533e489e7cc3ca
C/C++
397
16
#pragma once #include <ATen/native/DispatchStub.h> namespace at { class Tensor; } namespace at::native { using reduce_all_fn = void (*)(Tensor & result, const Tensor & self); using reduce_min_max_fn = void (*)(Tensor & max_result, Tensor & min_result, const Tensor & self); DECLARE_DISPATCH(reduce_all_fn, min_all_st...
9ab083b4253d276082cc3ec45b1be28ed1266c6c709f54b3affa42f3391099b2
C/C++
399
14
#pragma once namespace at::Reduction { // NB: Keep this in sync with Reduction class in torch/nn/_reduction.py // These constants control the reduction behavior of loss functions. // Ideally, this would be a scoped enum, but jit doesn't support that enum Reduction { None, // Do not reduce Mean, // (Possibly weigh...
641960005875eaac4ff2443d0e76f58f7d9aad96c227225bcf01237664aca2da
C/C++
400
10
#ifndef __LIBGRAVIS_OBJREADER_H__ #define __LIBGRAVIS_OBJREADER_H__ #include "io/mesh/OBJReader.h" #warning io has been restructured and bundled into gravis/io/ \ You should preferably use the <gravis/io/obj.h> header and included routines, \ unless you rely on some special use of OBJReader/OBJWriter. \ These are sti...
fb70e57405a9d8322be5035f328daa042144fe7ad6d09a8ee095a59a93f6352c
C/C++
400
10
#ifndef __LIBGRAVIS_OBJWRITER_H__ #define __LIBGRAVIS_OBJWRITER_H__ #include "io/mesh/OBJWriter.h" #warning io has been restructured and bundled into gravis/io/ \ You should preferably use the <gravis/io/obj.h> header and included routines, \ unless you rely on some special use of OBJReader/OBJWriter. \ These are sti...
4b6470ad091654aa2368d7e9c8b17a7b9a0ac26058babbdd3bdefea99ea3ba1d
C/C++
401
17
#pragma once #include <cstdint> #include <ATen/core/TensorBase.h> #include <ATen/native/cuda/SortStable.h> namespace at::native { inline bool should_use_small_sort(const TensorBase &self, int64_t dim) { return self.size(dim) <= 4096; } void sortKeyValueInplace( const TensorBase &key, const TensorBase &value, ...
f8db8efaf7367e970eddd2dac2fba84675d189b5fc5b4ab36315bedf5042406a
C/C++
401
18
#pragma once #include <ATen/core/Tensor.h> #include <ATen/miopen/miopen-wrapper.h> #include <ATen/miopen/Handle.h> namespace at { namespace native { // This function makes tensors which have zero stride contiguous, by // setting the strides to 1. inline Tensor contiguousIfZeroInStrides(const Tensor& t) { for (auto...
7e29c5d8ee4504af2ecb455fa9969e180a193e9f803d117a2727ab35501d514d
C/C++
403
19
#pragma once //! Describes the attributes of an annotation. #include <cstddef> #include "./core.h" class StfioDll Annotation { public: //! Constructor explicit Annotation(std::size_t onset, size_t duration); //! Destructor ~Annotation(); std::size_t GetAnnotationPosition(); std::size_t GetAnn...
73746571cda1aaa98d75e0cdc70c73666cdb8f747001d7e071682f52aeca64d8
C/C++
407
25
#ifndef FIND_FIDUCIALS_H #define FIND_FIDUCIALS_H #include <string> #include <src/jaz/tomography/optimisation_set.h> class FindFiducialsProgram { public: FindFiducialsProgram(int argc, char *argv[]); std::string outDir; double thresh, binning_out, binning_in, beadRadius_A, rel_spacing; int max_MG, num_...
a3db0e038f5c40c6f9584f183ed11785edd1d428fa5a5e1096f9e934d50c412c
C/C++
408
26
#ifndef BFACTOR_FIT_PROGRAM_H #define BFACTOR_FIT_PROGRAM_H #include <string> #include <src/jaz/math/t_complex.h> #include <src/jaz/image/buffered_image.h> #include <vector> #include "refinement.h" class BfactorFitProgram : public RefinementProgram { public: BfactorFitProgram(int argc, char *argv[]); int...
a96faf4b10a73379ba36a01afb48a122abc912e08b4d4515f731f85dc1b441b8
C/C++
409
16
#ifndef SPA_CLASS_HELPER_H #define SPA_CLASS_HELPER_H #include <src/metadata_table.h> #include <vector> class ClassHelper { public: static int countClasses(const MetaDataTable& particles_table); static std::vector<int> getClassSizes(const MetaDataTable& particles_table, int class_count = -1); static std::v...
4839508dd1175e72722a4f83ba8d1c57194f4b6cc01f544491c3de5cdd1c4c44
C/C++
411
17
#pragma once #include <mkl_types.h> static inline MKL_INT mkl_int_cast(int64_t value, const char* varname) { auto result = static_cast<MKL_INT>(value); TORCH_CHECK( static_cast<int64_t>(result) == value, "mkl_int_cast: The value of ", varname, "(", (long long)value, ") is too l...
df39dffa1f3eaced81a51e73ad7476b05d93abd4cdd1e5b1378c0ba4026d024f
C/C++
411
21
#ifndef TRAJECTORY_SET_H #define TRAJECTORY_SET_H #include <src/jaz/gravis/t3Vector.h> #include <vector> class TrajectorySet { public: TrajectorySet(); TrajectorySet(const std::vector<std::vector<gravis::d3Vector>>& shiftsInPix, double pixelSize); TrajectorySet(std::string filename); std::vector<st...
e83d638cd710fa88c107125765c84df3d871c636405e29e548084e757fd60fbe
C/C++
413
18
#pragma once #include <ATen/core/ATen_fwd.h> #include <ATen/native/DispatchStub.h> namespace at::native { enum class NESTED_DENSE_OP : uint8_t { ADD, MUL }; using nested_dense_elementwise_fn = void (*)( Tensor& result, const Tensor& self, const Tensor& other, const NESTED_DENSE_OP& op); DECLARE_DIS...
77893913ee871c91582c65a262b4cc5187146748a7e330a224c2eb77c47e53df
C/C++
414
11
#ifndef INVERTPSEUDOVAR_H #define INVERTPSEUDOVAR_H #include<RcppArmadillo.h> // [[Rcpp::depends(RcppArmadillo)]] arma::mat invertPseudoVar(const arma::mat& A, const arma::mat& B, const arma::mat& Z, const arma::mat& ZtA); arma::mat kRankOneUpdates(const arma::mat& Vinv, const arma::mat& B);...
f3c5472a6f5be7e63b1456cfab7a7182bbab4c1022e5b22b6b32f15290ee1e63
C/C++
414
15
#pragma once #include <ATen/core/TensorBase.h> #include <optional> namespace at::cuda::detail { TORCH_API void f8f8bf16_grouped_mm( at::Tensor mat_a, // FP8 at::Tensor mat_b, // FP8 at::Tensor scale_a, // FP32 at::Tensor scale_b, // FP32 std::optional<at::Tensor> offs, std::optional<at::Tensor>...
6a0596d287db4a3645109c8b6f9aee78b478a74fb84ba67e00df2daebbdc878d
C/C++
416
20
#pragma once #include <ATen/cuda/CUDAContext.h> namespace at::cuda { // Check if every tensor in a list of tensors matches the current // device. inline bool check_device(ArrayRef<Tensor> ts) { if (ts.empty()) { return true; } Device curDevice = Device(kCUDA, current_device()); for (const Tensor& t : ts)...
022fa7fc7f6a82808332da062b88f72607286e5314f4a9254ba63f6e91b01c6c
C/C++
417
25
#pragma once #include <c10/core/MemoryFormat.h> #include <c10/core/QScheme.h> #include <c10/core/Scalar.h> #include <c10/core/TensorOptions.h> #include <c10/macros/Export.h> #include <c10/util/ArrayRef.h> #include <c10/util/intrusive_ptr.h> namespace c10 { struct Storage; } namespace at { class Tensor; using Tensor...
2ecf4d89c8a6d64111fd31d42226baa532270e9c8108ee24ad0d87a71f30cbcc
C/C++
417
25
#ifndef MESH_H #define MESH_H #include "triangle.h" #include <src/jaz/gravis/t3Vector.h> #include <src/jaz/gravis/tRGB.h> #include <string> #include <vector> class Mesh { public: Mesh(); std::vector<gravis::d3Vector> vertices; std::vector<gravis::dRGB> vertexColors; std::vector<Triangle> triangles;...
bff9159c0a1e887ab47914e876b16a0d5f27b9d8c1397d66c2175e883ac946de
C/C++
418
25
#pragma once #include <cstdint> #include <iosfwd> namespace at { struct Range { Range(int64_t begin, int64_t end) : begin(begin) , end(end) {} int64_t size() const { return end - begin; } Range operator/(int64_t divisor) { return Range(begin / divisor, end / divisor); } int64_t begin; int6...
6ec084f249b3b4fc6d21351a6c2e273e6e75c5d946d9d75cc6d291cd51d9ec91
C/C++
419
18
#pragma once #include <cstdint> namespace at { class TensorBase; } namespace at::native { void launch_fused_mode_kernel( const TensorBase &values, const TensorBase &indices, const TensorBase &self, int64_t slice_size, int64_t slices); void launch_apply_mode_kernel( const TensorBase &values, const Tensor...
a7fd0f690bf0d8b900cbdc9149c90f4d88877439a6ff3a59aeeb36406388fceb
C/C++
420
21
#ifndef DELOCALISATION_HELPER_H #define DELOCALISATION_HELPER_H #include <src/ctf.h> class DelocalisationHelper { public: static void maskOutsideBox( const CTF& ctf, double radius, double angpix, int s_orig, MultidimArray<RFLOAT>& fftwCtfImg, double offsetx, double offsety); static Image<...
2d49999e747c2326817e23d5b003ddf663bd24ce11a26eac05c50aa5513042df
C/C++
424
24
#ifndef FIND_LATTICE_PROGRAM_H #define FIND_LATTICE_PROGRAM_H #include <string> #include <vector> #include <src/jaz/gravis/t4Matrix.h> #include <src/jaz/gravis/t2Vector.h> class FindLatticeProgram { public: FindLatticeProgram(){} int n_threads, overtones; double spacing_ang, filter_width, angpix, t...
c419f2735156ae65609c5ac84beb6fc07748370e6b79783b8f55bac001ec6bb7
C/C++
428
14
#pragma once #include <string> #include <c10/macros/Export.h> namespace at::cuda { TORCH_CUDA_CPP_API const std::string &get_traits_string(); TORCH_CUDA_CPP_API const std::string &get_cmath_string(); TORCH_CUDA_CPP_API const std::string &get_complex_body_string(); TORCH_CUDA_CPP_API const std::string &get_complex_ha...
23c4479c246699b0e9b7587372b94ca86a180664b01d574c3457b08396c64ca4
C/C++
435
11
/* Autogenerated v4-0-0 from https://github.com/scottprahl/iad */ double Get_Start_Depth(double mu, double d); void Choose_Method(struct AD_slab_type *slab, struct AD_method_type *method); void Choose_Cone_Method(struct AD_slab_type *slab, struct AD_method_type *method); void Init_Layer(struct AD_slab_type slab, st...
f1511e110b217e5c949da802feff5647aa4dfad0d0d101b4a0f89ed474e99c34
C/C++
438
28
#ifndef RELION_CTF_REFINEMENT_MPI_H #define RELION_CTF_REFINEMENT_MPI_H #include "ctf_refinement.h" #include <src/mpi.h> class CtfRefinementProgramMpi : public CtfRefinementProgram { private: MpiNode *node; public: CtfRefinementProgramMpi(int argc, char *argv[]); /** Destructor, calls MPI_Finalize */ ~CtfRefin...
14c199d88426c52e201731a6a3b145891e44f2376a0ed7e0f48e134465b1aacb
C/C++
439
18
#pragma once #include <c10/metal/common.h> // The group_norm kernel operates on blocks of 4 elements at a time in unrolled // loops. Other values were tested, and 4 gave the best performance. C10_METAL_CONSTEXPR uint32_t BLOCK_SIZE = 4; template <typename idx_T = uint32_t> struct GroupNormParams { idx_T HxW; idx...
1f06ecc1f9b2c76762280d430933ee91cdb8e859e6ee49ff30e55742656b543c
C/C++
439
15
#pragma once #include <c10/core/TensorOptions.h> namespace at { // Represents the initial TensorOptions, before the "defaults" are ever changed. // This is designed to be used in library code, where the explicit devices, // dtypes, etc. are known. NOTE: this is not a stable API. inline TensorOptions initialTensorOpt...
4373420cf1e39957ff408c4e455e86b3dd21b59ea3b22941d5bd1fe745114b54
C/C++
439
13
#ifndef UTILS_H #define UTILS_H #include<RcppArmadillo.h> // [[Rcpp::depends(RcppArmadillo)]] Rcpp::LogicalVector check_na_arma_numeric(arma::vec x); Rcpp::LogicalVector check_inf_arma_numeric(arma::vec X); Rcpp::LogicalVector check_zero_arma_numeric(arma::vec X); Rcpp::LogicalVector check_zero_arma_complex(arma::cx_...
5ab26c806742ab8bcb17cf86f45ee41e6504df2effefe06866844a402014f5a7
C/C++
439
17
#pragma once #include <ATen/core/TensorBase.h> #include <cstdint> namespace at::native { // Stable-sort self into values, and set indices to the // inverse-permutation from values back to self. // Output tensors must be pre-allocated and contiguous. void launch_stable_sort_kernel( const TensorBase& self, int6...
87b7ff845093c0921616a81c890babd79c5907f419789be722308b0045be8c21
C/C++
441
22
/* FILE trial.h */ /* Trial type structure */ static int CountTypes; static struct TRIAL_TYPE { /* All variables that can define a trial*/ int targ1; int targ2; int targ3; int head; int where; int veloc; int accel; int table; int stack; int cell; int col; /* 1 to cols */ int row; /* 1 to rows ...
fc1463115a6f87aadefe7a29b635ec40ebec0cebfda579ea56f13c506b01d0c3
C/C++
445
16
#pragma once #include <ATen/OpMathType.h> #include <ATen/hip/HIPBlas.h> namespace at::native { template <typename Dtype, typename C_Dtype = Dtype> inline void bgemm_internal_ck(CUDABLAS_BGEMM_ARGTYPES_AND_C_DTYPE(Dtype, C_Dtype)) { static_assert(false&&sizeof(Dtype),"at::cuda::blas_bgemm_internal_ck: not implement...
2549877f53a57ce57503a3f49c6f2d70e6572250ecf98e6261dac96caefb2aee
C/C++
447
26
#ifndef _TUCKER_H_INCLUDED #define _TUCKER_H_INCLUDED #include <stdint.h> struct tucker_header { uint32_t Version; uint16_t Year; uint16_t Month; uint16_t Day; uint16_t Hour; uint16_t Minute; uint16_t Sec; uint32_t MSec; uint16_t SampRate; uint16_t NChan; uint16_t Gain; uint16_t Bits; uint16_t Range; ui...
0581af9bd22369f3cf00acda906fc3721c120f401edf67bffac25fddaa0a8dd1
C/C++
455
25
#ifndef ABERRATION_FIT_PROGRAM_H #define ABERRATION_FIT_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 AberrationFitProgram : public RefinementProgram { public: AberrationFitProgram(int ar...
335c963ff88e06809d0757543a4ecd48969e10ba6665c21ff6b11a6c91d2c6a5
C/C++
455
20
c c standard colour indices c integer BLACK, RED, GREEN, YELLOW, BLUE, MAGENT, + CYAN, WHITE parameter(BLACK = 0, RED = 1, GREEN = 2, YELLOW = 3) parameter(BLUE = 4, MAGENT = 5, CYAN = 6, WHITE = 7) c c polygon modes c integer PYM_PO, PYM_LI, PYM_FI, PYM_HO parameter(PYM_PO = 0, PYM_LI = 0, PYM_FI = 1) p...
1384d510228ce1aafa887d6c08ac94c6a128118a873337a4ded737a4243f7665
C/C++
456
30
#ifndef FFT_BUFFER_H #define FFT_BUFFER_H #include "fft.h" class FloatFFTBuffer { public: FloatFFTBuffer(); FloatFFTBuffer(int w, int h, int d); BufferedImage<float> real; BufferedImage<fComplex> complex; FFT::FloatPlan plan; void FourierTransform(); void inverseFourierTransform(); }; class Floa...
4201ae494d8fde75f4e0b041b4d89896665ecb9313de6a29071e06af056c8cea
C/C++
457
10
/* FILE Functions2.h */ /* More functions for macros (e.g., -o70) */ /* event.c */ int AnyTargetEventExtract(int which, int occurrence); /* ps.c */ void space(int x0, int y0, int x1, int y1); /* input.c */ int Read_Trial(int number); /* ps.c */ void filledbox(int x0, int y0, int x1, int y1); /* coord.c */ v...
0a144e061c420e3c5d6a1e9b56d40468af4bfb71489fb449837b6571c736d7e5
C/C++
465
26
#ifndef TOPAZ_HELPER_H #define TOPAZ_HELPER_H #include <string> #include <vector> #include <map> #include <src/jaz/gravis/t2Vector.h> class TopazHelper { public: struct Particle { gravis::i2Vector coordinates; double score; }; static std::map<std::string, std::vector<Particle>> read( st...
b1bb9b4c86e3780ecfe7d07600cec0dc66a8dc2ec4677dcf5b65dd7692f00fbe
C/C++
467
11
//*********************************************************************************************** // // Copyright (c) 1993-1997 Axon Instruments. // All rights reserved. // Permission is granted to freely to use, modify and copy the code in this file. // //************************************************...
1d7ce7f928dfb6e2efe9b8798e596c3be74cff32fedb5fc0ba658f8283b6d307
C/C++
470
24
#ifndef DISCOVER_MOTIF_PROGRAM_H #define DISCOVER_MOTIF_PROGRAM_H #include <string> class DiscoverMotifProgram { public: DiscoverMotifProgram(){} int num_threads, dhBins, maxNcHist, neighborCount, motifCount; double spacingMin, spacingMax, maxDistHist, minSc, cloudBinning; std::string pointsFn, ou...
1eef3730dc67fbd3c7a5ffc615e85def52a784868fb538bab1cc8e438e859694
C/C++
470
19
#ifndef __LIBGRAVIS_T_VAR_MATRIX_BLAS_H__ #define __LIBGRAVIS_T_VAR_MATRIX_BLAS_H__ #include "tVarMatrix.h" namespace gravis { namespace matrix { // Single and double implementations #define __GRAVIS__MATRIX__BLAS__DATATYPE__SINGLE__ #include "tVarMatrix_blas.hxx" #undef __GRAVIS__MATRIX__BLAS__DATATYPE__SINGL...
d9274f684a917c461c930210fe485eb0238ae299eacc39d1f1b64e5edc2bc8f8
C/C++
470
13
/* Autogenerated v4-0-0 from https://github.com/scottprahl/iad */ void ez_RT_Cone(int n, double nslab, double ntopslide, double nbottomslide, double a, double b, double g, double cos_cone_angle, double *UR1, double *UT1, double *URU, double *UTU); void ez_RT_Oblique(int n, double nslab, double...