sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
5851ed4c021a7d733b5dc96b08e4aedf4e33fbec407546527ec9f5aae1b269fa
C++
2,181
60
#include "../libstfio/recording.h" #include <gtest/gtest.h> TEST(Recording_test, constructors) { Recording rec0; EXPECT_EQ( rec0.size(), 0 ); std::deque<Section> sec_list(16, Section(32768)); Channel ch(sec_list); Recording rec1(ch); EXPECT_EQ( rec1.size(), 1 ); EXPECT_EQ( rec1[0].size(),...
e1fefe654cceeab8f1624f2e1f82a8f5938682d1fbaa9971ea5570991bc7a495
C++
2,186
103
/* * 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. */ #include <cpuinfo.h> #include <gtest/gtest.h> #include <qnnpack/isa-checks.h> #include <qnnpack/scon...
19a34d0777240c4d23956542a0bed44fad2930b3d050b8adfb228e0979709489
C++
2,202
94
#include "GP_motion_model.h" #include <src/jaz/tomography/particle_set.h> #include <src/jaz/tomography/tomogram.h> #include <src/jaz/tomography/extraction.h> #include <src/jaz/tomography/prediction.h> #include <src/ctf.h> #include <src/jaz/image/centering.h> #include <src/jaz/math/Tait_Bryan_angles.h> #include <src/jaz...
71960d8b1d2b629f87636c4e2c6a2b2f6272898faaf035ad6412711ece2e6289
C++
2,208
64
#include <ATen/ATen.h> #include <ATen/FunctionalTensorWrapper.h> #include <torch/library.h> namespace at::native { static at::Tensor& shallow_copy_data_( at::Tensor& self, const at::Tensor& source) { // Delegate to set_data which enforces eager .data = invariants: // compatible type check, differentiable ...
124dfe3deea981127dfcc68f0760e6a58db4bd9c054f7b6ead0abeb2da976cfd
C++
2,214
75
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/Functions.h> #include <ATen/NativeFunctions.h> #else #include <ATen/ops/_backward_native.h> #include <ATen/ops/_fw_primal_native.h> #include <ATen/ops/_version_native.h> #include <ATen/ops/alias.h> #...
e0aec4af15a3b620466f1b39f628f48eedcb3519b3b46181419e0415b2b872ce
C++
2,215
76
#include <ATen/cpu/FlushDenormal.h> #include <ATen/cpu/vec/intrinsics.h> #if !defined(__s390x__) && !defined(__powerpc__) #include <cpuinfo.h> #endif namespace at::cpu { #if defined(__SSE__) || defined(_M_X64) || (defined(_M_IX86_FP) && _M_IX86_FP >= 1) static constexpr unsigned int DENORMALS_ZERO = 0x0040; static co...
37cf65aa9d5581a38537e7e934a278187082fe60fcec03003c9fed4fcc3c6d44
C++
2,243
80
/*************************************************************************** * * Author: "Sjors H.W. Scheres" * MRC Laboratory of Molecular Biology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software F...
fbf8375fe8e42f50fc347e65501fb947aa5196e5fe365f311e54065566b2f30e
C++
2,244
76
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #include <ATen/Config.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/NativeFunctions.h> #else #include <ATen/ops/sigmoid_native.h> // for mkldnn_sigmoid, mkldnn_... #include <ATen/ops/tanh_native.h> // for mkldnn_tanh, mkl...
afe347991043a41c318fc50dda7bb16071b5ee306348a7f7a9e5526acf23c95c
C++
2,248
84
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #include <ATen/native/DispatchStub.h> #include <ATen/native/FusedSGD.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/Functions.h> #include <ATen/NativeFunctions.h> #else #include <ATen/ops/_fused_sgd_native.h> #endif namespace at::native { ...
e870ef430eb0464465c6519f541c5633b44d179f825b1b9a4eeb7d224677dc28
C++
2,249
76
#include "../dep/laynii_lib.h" int show_help(void) { printf( "LN_SHORT_ME: Convert nifti datatype to SHORT. \n" " In order not to loose too much depth resolution for \n" " floating point values, the nii-header slope is scaled by 1000 \n" "\n" "Usage:\n" " LN_SHORT_ME -input data_fi...
d21b910ba827796e00bdf3976b6d5e6de0e6eb8c818c25c6075a7faca29ec160
C++
2,266
72
/*************************************************************************** * * Author: "Sjors H.W. Scheres" * MRC Laboratory of Molecular Biology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software F...
4a812b555bcbd5126a7b2efb389ed7be4af8a03b4933c1efde03951799c8ae2e
C++
2,268
78
// Ternary and higher-order pointwise operations #define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/native/PointwiseOps.h> #include <ATen/core/Tensor.h> #include <ATen/TensorMeta.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/NativeFunctions.h> #else #include <ATen/ops/addcdiv_native.h> #include <ATen/ops/a...
69c174f21655c64c59a811bbe283c487ce0e3177195632cf1ddc770abbe77b98
C++
2,295
74
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/native/ReduceAllOps.h> #include <ATen/native/Resize.h> #include <ATen/core/Tensor.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/Functions.h> #include <ATen/NativeFunctions.h> #else #include <ATen/ops/_aminmax_native.h> #include <ATen/ops/aminmax.h> #includ...
84ed62e093b3eece3278f84c342e4c98f14277da60d1c4b23f18fffd6d00131d
C++
2,297
72
/*************************************************************************** * * Author: "Jasenko Zivanov" * MRC Laboratory of Molecular Biology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foun...
ffd3d26850721cf1971a2dfcb0b0a84b30b6bca78d1e2344165873e6d2b216c3
C++
2,308
79
#include "../dep/laynii_lib.h" int show_help(void) { printf( "LN_INT_ME: Convert nifti datatype to INT16.\n" "\n" "Usage:\n" " LN_INT_ME -input data_file.nii \n" " LN_INT_ME -input data_file.nii -output output_filename.nii \n" " ../LN_INT_ME -input LN_INT_ME -input lo_BOLD_act.ni...
1fc911b56d7136516da6588a09b7dbc1b8b5fa3bcec041e7a1790a3db609cb57
C++
2,323
65
#define TORCH_ASSERT_NO_OPERATORS #include <ATen/native/sparse/SparseFactories.h> #include <ATen/Dispatch.h> #include <ATen/TensorIterator.h> #include <ATen/core/TensorBase.h> #include <ATen/native/cpu/Loops.h> #include <c10/core/ScalarType.h> #include <c10/util/Exception.h> namespace at::native { namespace { void _...
323df47d4e15bd6934d61aca5bdfe0a6631b4da31e771b1a6164c1c2800ef984
C++
2,334
82
/*************************************************************************** * * Author: "Sjors H.W. Scheres" * MRC Laboratory of Molecular Biology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software F...
1cc176836cf614a8554521f775fcc6a22e6f570d8d73f68e5836e015dd14b69f
C++
2,336
76
/*************************************************************************** * * Author: "Jasenko Zivanov" * MRC Laboratory of Molecular Biology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foun...
afd0297fa6faa693e5402fffefcb4456bf67e2c3262889af11ca5c12219681dc
C++
2,356
64
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #include <ATen/Config.h> #include <ATen/native/Activation.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/NativeFunctions.h> #else #include <ATen/ops/gelu_native.h> #include <ATen/ops/gelu_backward_native.h> #endif #if !AT_MKLDNN_ENABLED() na...
f21f519c4b3a915eba56d6f319201eafe11ca9d2f750402ee595fc21bc8ac117
C++
2,362
70
#include <pytorch_qnnpack.h> #include <qnnpack/log.h> #include <qnnpack/pack.h> #include <qnnpack_func.h> #include <cstdlib> #include <cstring> #include <cmath> namespace qnnpack { // For runtime quantization unpacking. void PackBMatrix::unpackWeights( const uint8_t* kernel_zero_points, int8_t* kernel ) const { ...
abe1dd8b07f74b9d0f98550f68acc3d6cedbb5de70a1bd8b6b069379b2b051b0
C++
2,368
69
#include <ATen/core/type_factory.h> #include <ATen/core/jit_type.h> namespace c10 { // Dtype constraints are not constrained in compilation. Therefore, we map // all tensor subclasses with different dtypes to a same underlying // Tensor. But, we give warning about possible dtype change whenever user // uses any of t...
ac28726fa599b32aea944308d33c79a36c50977f6d7d9dfdfac19ed4c62efaad
C++
2,368
90
#include <src/args.h> #include <src/jaz/util/log.h> #include <src/jaz/util/zio.h> #include <src/jaz/tomography/optimisation_set.h> #include <src/jaz/tomography/tomogram_set.h> #include <src/jaz/tomography/particle_set.h> int main(int argc, char *argv[]) { try { std::string outDir; OptimisationSet optimisation_...
7ff5bf97236b69279eb7bdeef3602479dd0335979464987ab15fa10caa53652c
C++
2,373
83
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #include <ATen/Dispatch.h> #include <ATen/Dispatch_v2.h> #include <ATen/cpu/vec/functional.h> #include <ATen/cpu/vec/vec.h> #include <ATen/native/cpu/CatKernel.h> #include <c10/util/irange.h> namespace at::native { namespace { struct InputMeta...
c0009093194a0c3a584a1e0bd9aa99614192486e38173c06b949bf00255ab562
C++
2,382
51
#include <src/args.h> #include <src/jaz/tomography/programs/discover_motif.h> int main(int argc, char *argv[]) { IOParser parser; DiscoverMotifProgram dmp; parser.setCommandLine(argc, argv); int gen_section = parser.addSection("General options"); dmp.pointsFn = parser.getOption("--p", "Point cloud (.csv)"...
56c34f8180547d7f0eea0c55acf0ce199387d34eb9a8c9a1c07de477191c190d
C++
2,384
54
// 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. #include <ATen/functorch/BatchRulesHelper.h> // NB: most activation functions fit pointwise unary or binary...
a1ca66fececbf4dd63e92181d08e1f33e274afb520b7536b15201ce9b79be3b0
C++
2,399
105
#include "mag_fit.h" #include <src/jaz/util/zio.h> #include <src/jaz/util/log.h> #include <src/jaz/tomography/particle_set.h> #include <src/jaz/tomography/extraction.h> #include <src/jaz/tomography/prediction.h> #include <src/jaz/tomography/tomo_ctf_helper.h> #include <src/jaz/math/Zernike_helper.h> #include <src/jaz/g...
af6276a230620d6fe3d27727268bd6842838f9cdeca26d284622fd97f945fc0a
C++
2,410
93
#include <torch/extension.h> #include <cuda.h> #include <cuda_runtime.h> #define CHECK_CUDA(x) AT_ASSERTM(x.type().is_cuda(), #x " must be a CUDA tensor") #define CHECK_CONTIGUOUS(x) AT_ASSERTM(x.is_contiguous(), #x " must be contiguous") #define CHECK_INPUT(x) CHECK_CUDA(x); CHECK_CONTIGUOUS(x) #define CHECK_ARRAY(x)...
5ae41400a0e75fbfca69bdb9724c47dcfaacc728e1efa0f3240ca64f76563689
C++
2,414
134
#include "Zernike.h" #include <src/error.h> #include <sstream> #include <cmath> std::vector<std::vector<std::vector<double>>> Zernike::R_coeffs = std::vector<std::vector<std::vector<double>>>(0); double Zernike::Z(int m, int n, double rho, double phi) { if (m >= 0) { return R(m, n, rho) * cos(m * phi); } else...
a98349e4636b9b9c63b3192988347cb10f01ce85175a7f159a39943216258fd0
C++
2,415
65
// 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. #include <torch/library.h> #include <ATen/core/dispatch/Dispatcher.h> // functorch's vmap has two Dispatch ...
427edbce2a2c35b9cd30110f50fe1d69c007981c55dc11da731c0e963be2254d
C++
2,425
69
// aten_interned_strings.h includes the names of all operators #undef TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/interned_strings.h> #include <ATen/core/interned_strings_class.h> #include <cstring> namespace c10 { namespace { // NOLINTBEGIN(cppcoreguidelines-avoid-const-or-ref-data-members) struct Entr...
08d8351e3bc8d9160d02d63baea2170708e40d708a6f80d65a2e2a091dae6478
C++
2,454
72
#include <ATen/core/TensorBase.h> #include <ATen/core/TensorBody.h> #include <c10/util/OptionalArrayRef.h> #include <c10/util/Exception.h> #ifdef AT_PER_OPERATOR_HEADERS #include <ATen/ops/_assert_tensor_metadata_native.h> #endif namespace at { class Tensor; namespace native { template<typename O, typename C> stat...
ec26244a7133e100342cf2e2d741b76c3574221f7b01120b6809eddfa80aca24
C++
2,454
148
#include "tomolist.h" #include <fstream> #include <sstream> #include <src/error.h> TomoList::TomoList() { } TomoList::TomoList(std::string filename) { std::vector<std::vector<std::string>> temp; std::vector<int> tempInd; std::ifstream ifs(filename); if (!ifs.is_open()) { REPORT_ERROR_STR("TomoList::TomoL...
2ef5f8c74339740e444788d8540f80ed133e4c7454d6ebdbdc385f2df19671e2
C++
2,456
86
#include<RcppArmadillo.h> #ifdef _OPENMP #include <omp.h> #endif // [[Rcpp::depends(RcppArmadillo)]] #include "invertPseudoVar.h" using namespace Rcpp; arma::mat invertPseudoVar(const arma::mat& A, const arma::mat& B, const arma::mat& Z, const arma::mat& ZtA){ int c = B.n_cols; int n ...
e17bfdee41c283fc99c8a2d522d9e5844730551279a508a8d672c9cbd4315d71
C++
2,456
98
//---------------------------------------------------------------------------------- // common.h // Downloaded from http://www.intantech.com/files/CLAMP_source_code_v1_0.zip // as of 2017-03-13 // // Original comment and license information for the header file common.h: // Intan Technologies // Common Source Fil...
e988c2d6c02d4a41dc47286833640769e70e36ad33b5e6879eb391522ade0bb4
C++
2,458
88
#include <ATen/cuda/CUDAContext.h> #include <c10/cuda/CUDACachingAllocator.h> #include <c10/util/CallOnce.h> #include <deque> #include <vector> namespace at::cuda { namespace { DeviceIndex num_gpus = -1; std::deque<c10::once_flag> device_flags; std::vector<cudaDeviceProp> device_properties; void initCUDAContextVec...
068c29c84541928ae91a3dfcc1bf81f02e1942f438ae011e9de1fe1ff7c328f9
C++
2,462
84
/*************************************************************************** * * Author: "Jasenko Zivanov" * MRC Laboratory of Molecular Biology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foun...
e6cc24e98fd496a2ffdd70abc87046683d6aadedb45093b57b8b30fc6fdb4372
C++
2,465
113
#include<RcppArmadillo.h> #include<Rcpp.h> // [[Rcpp::depends(RcppArmadillo)]] #include "utils.h" // utility functions Rcpp::LogicalVector check_na_arma_numeric(arma::vec X){ // don't being function names with '_' // input is an arma::vec const int& n = X.size(); Rcpp::LogicalVector _out(n); bool _...
e36c8e6f680fa426153cdb1a439382b7077c7030bf02e39e1c90def70353cadd
C++
2,478
71
#include <ATen/PythonTorchFunctionTLS.h> #include <utility> namespace at::impl { static thread_local PythonTorchFunctionTLS pythonTorchFunctionState; void PythonTorchFunctionTLS::push_onto_stack(std::shared_ptr<SafePyObject> mode) { pythonTorchFunctionState.stack_.push_back(std::move(mode)); } const std::shared_...
bc1caf66ee69c80c9dc443c41226823589ac2df522a6048667b6b324558929bf
C++
2,504
96
// Copyright (C) 1996,2026 Bernd Feige // This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING). #include "LinkedObject.hh" LinkedObject::LinkedObject() { previous_member=Empty; next_member=Empty; // printf("LinkedObject() called!\n"); } LinkedObject::~LinkedObject() { // printf("LinkedObject...
3659233afabbc205f1ab2227f7a882713a83c58bade08ca5ba1cb4e2d9811283
C++
2,505
102
#include <wx/wxprec.h> #ifndef WX_PRECOMP #include <wx/wx.h> #endif #include "./usrdlg.h" BEGIN_EVENT_TABLE( wxStfUsrDlg, wxDialog ) END_EVENT_TABLE() wxStfUsrDlg::wxStfUsrDlg( wxWindow* parent, const stf::UserInput& input_, int id, wxPoint pos, wxSize size, int style ...
31582b0cb0cf6d0a7b8dfb87aa1377e6d57de6e45a983361d69a00ca206a246c
C++
2,507
87
/*************************************************************************** * * Author: "Jasenko Zivanov" * MRC Laboratory of Molecular Biology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foun...
4af250c4e583ebd1911d5a78b43a5285fe4fd5e8ecb12d2f21b5f0097aa11188
C++
2,528
55
#include <vector> #include <algorithm> #include <mex.h> //========================================================================= // MatLab interface //========================================================================= void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) ...
41be96bb8f1c7dabb9e6bff8a7a235e56301b72ba00765b14d1bf46e7a82f342
C++
2,529
87
#include <limits> #define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #include <c10/core/Device.h> #include <c10/core/Scalar.h> #include <optional> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/Functions.h> #include <ATen/NativeFunctions.h> #else #include <ATen/ops/_functional_sym_constrain_range...
afc71fc3760d962474f1c7c674ae98af803f5a6b0fd14b711075948277148f4e
C++
2,532
107
/* * 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. */ #include <gtest/gtest.h> #include "clamp-operator-tester.h" TEST(CLAMP_OP, zero_batch) { ClampOpe...
7083cae3f5ef8005b729b2b359b9c7ddbd6a954436266e411d984c0983b862ee
C++
2,572
95
#include <ATen/Config.h> #if AT_PARALLEL_OPENMP || AT_PARALLEL_NATIVE #include <ATen/Parallel.h> #include <ATen/PTThreadPool.h> #include <ATen/ThreadLocalState.h> #include <atomic> namespace at { namespace { constexpr int NOT_SET = -1; constexpr int CONSUMED = -2; // Number of inter-op threads set by the user; // N...
44714fb41cbf4069d7d05e7c32b7a65207da4c4550bf2351ea35261ea058b0df
C++
2,577
76
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #include <ATen/Config.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/NativeFunctions.h> #else #include <ATen/ops/relu_native.h> // for mkldnn_relu, mkldnn_... #include <ATen/ops/threshold_backward_native.h> // for mkldnn_relu_b...
9d3f0669c1b8b87b929b6945f1615226f9874747f1962b5ca5b78108cf864d86
C++
2,579
65
#include <ATen/core/dispatch/DispatchKeyExtractor.h> #include <c10/util/irange.h> #include <algorithm> #include <sstream> #include <string> namespace c10 { void DispatchKeyExtractor::setOperatorHasFallthroughForKey(DispatchKey k, bool has_fallthrough) { // (1) update nonFallthroughKeys_ if (has_fallthrough) { ...
6fc72a580231e935b78d4eceb1e149727f76f9798d5be8c1c521a3da4ceaffb7
C++
2,597
105
// Copyright (C) 1996,1997,2026 Bernd Feige // This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING). #include "Points.hh" #ifndef IGNORE_RESULT /* Suppress -Wunused-result for functions declared with warn_unused_result * (gcc does not honour a plain (void) cast for these). */ #define IGNORE_R...
e279505e77f406b1c24bd87ed5608f67dd0e0daefe9554b52e424fe1ab9d9f5a
C++
2,597
119
#include "powspec.h" #include <src/jaz/tomography/tomo_stack.h> #include <src/jaz/tomography/projection/projection.h> #include <src/jaz/tomography/extraction.h> #include <src/jaz/optimization/nelder_mead.h> #include <src/jaz/optimization/lbfgs.h> #include <src/jaz/optimization/gradient_descent.h> #include <src/jaz/imag...
450d70712807ed55742b2f4b546e3f52ef06b4bf56ab327eaac310ac9386824e
C++
2,598
103
#include "delocalisation_helper.h" #include <src/jaz/gravis/t2Vector.h> using namespace gravis; void DelocalisationHelper::maskOutsideBox( const CTF &ctf, double radius, double angpix, int s_orig, MultidimArray<RFLOAT> &fftwCtfImg, double offsetx, double offsety) { const int s = fftwCtfImg.ydim; const int...
cbc6fca4fccd46f7834919362c1edc85670497439ec534db4c21741b22b93942
C++
2,620
83
#include <ATen/SavedTensorHooks.h> #include <c10/util/Exception.h> #include <stack> #include <utility> #include <c10/core/SafePyObject.h> namespace at { namespace { thread_local impl::SavedTensorDefaultHooksTLS tls; // This flag is set to true the first time default hooks are registered // and left at true for...
34dea04b33ed14b1262666a4331b78b1463a9222ec7eed6d4ab7c1768927f739
C++
2,625
75
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #include <ATen/MemoryOverlap.h> #include <ATen/Context.h> #include <c10/core/Storage.h> #include <ATen/EmptyTensor.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/Functions.h> #include <ATen/NativeFunctions.h> #include <ATen/CPUFunctions.h> #el...
4badbf6c8a8c778a0ffbe84e112217b348c188b6dbf1eb2480c785ebf1048bb9
C++
2,627
56
#include <ATen/core/boxing/KernelFunction.h> #include <ATen/core/dispatch/Dispatcher.h> #include <sstream> namespace c10 { // This a "fake" kernel which doesn't actually do anything. Instead, it is a // distinguished kernel which is special cased by the dispatch table to // be handled specially. Its semantics is t...
a1460b8e9cc67f88b0a1e3c9f6d7e75766f373086fb02fe40e1d2ad83cc2315d
C++
2,651
91
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #include <ATen/TensorOperators.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/Functions.h> #include <ATen/NativeFunctions.h> #else #include <ATen/ops/arange.h> #include <ATen/ops/cartesian_prod_native.h> #include <ATen/ops/combinations_native....
e5bd689126cf7d6806f07cf8ca60e25b9efacbb0cce78cff12dd651bfacdd953
C++
2,656
93
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #include <ATen/TensorSubclassLikeUtils.h> #include <ATen/core/grad_mode.h> #include <ATen/native/DispatchStub.h> #include <ATen/native/MaxPooling.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/Functions.h> #include <ATen/NativeFunctions.h> #el...
b2fafc9c040536411ff60ea7c973fc439243407529b14fcdc786eb7402dd3880
C++
2,659
77
#include <ATen/Context.h> #include <ATen/Dispatch.h> #include <ATen/Functions.h> #include <ATen/Utils.h> namespace at { int _crash_if_asan(int arg) { // NOLINTNEXTLINE(cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays) volatile char x[3]; x[arg] = 0; return x[0]; } namespace detail { template <typ...
6c714a3c52178b7c93eb9c09fa390b62c9101333b6abd1afd3e8a6e03c49f92b
C++
2,660
94
#include <unistd.h> #include <string.h> #include <fstream> #include <src/args.h> #include <src/image.h> #include <src/metadata_table.h> #include <src/ctf.h> #include <src/jaz/single_particle/img_proc/filter_helper.h> #include <src/jaz/single_particle/stack_helper.h> #include <src/jaz/single_particle/obs_model.h> #inc...
5181cae63729adcfa938cc052c2886fcde344da192a399f99f0d6517a331d79d
C++
2,661
80
/*************************************************************************** * * Author: "Sjors H.W. Scheres" * MRC Laboratory of Molecular Biology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software F...
73eb6ed2e22f9ce95c667ae5d439f16dcddaea0709f07361ffd9f425dccf9a5e
C++
2,674
107
#include <c10/util/Exception.h> #include <ATen/DynamicLibrary.h> #ifndef _WIN32 #include <dlfcn.h> #include <libgen.h> #else #include <c10/util/win32-headers.h> #include <c10/util/Unicode.h> #endif namespace at { #ifndef C10_MOBILE #ifndef _WIN32 // Unix static void* checkDL(void* x) { if (!x) { TORCH_CHECK...
2a5965a481d99b6b25eb3f6270abeffdb656293ebe4cbc0f97e1c5a2b7d95729
C++
2,687
73
#include <ATen/TensorIndexing.h> #include <c10/util/Exception.h> #include <c10/util/irange.h> namespace at { namespace indexing { const EllipsisIndexType Ellipsis = EllipsisIndexType(); std::ostream& operator<<(std::ostream& stream, const Slice& slice) { stream << slice.start() << ':' << slice.stop() << ':' << sl...
7a008f6cd837d71108eb8993960ebc46ab103eec7a677aa7df45cd918ef31ebd
C++
2,691
143
#include <stdexcept> #include <limits> #include "tilt_geometry.h" #include <src/jaz/util/index_sort.h> using namespace gravis; extern "C" { #include <src/jaz/single_particle/d3x3/dsyevh3.h> #include <src/jaz/single_particle/d3x3/dsyevc3.h> } d3Vector TiltGeometry::estimateTiltAxis(const std::vector<d4Matrix> &p...
8fd968bf9c90e5f9918afe49093d2e581d7f2e4616fc7a05a62b30e4022155b0
C++
2,714
84
/*************************************************************************** * * Author: "Jasenko Zivanov" * MRC Laboratory of Molecular Biology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foun...
9257ed524013966653fcf0495f717a0d4d814e5398cffe50342458ad1bd9f5bc
C++
2,714
72
#include <ATen/ATen.h> #include <ATen/NativeFunctions.h> #include <ATen/Config.h> #if !AT_MKLDNN_ENABLED() namespace at::native { Tensor mkldnn_prelu(const Tensor& input, const Tensor& weight) { TORCH_CHECK(false, "mkldnn_prelu: ATen not compiled with MKLDNN support"); } std::tuple<Tensor, Tensor> mkldnn_prelu_b...
31e44c42f74ab1006fa167adcd40b7cdf25eaac037b6185c2075ac990f54244a
C++
2,730
96
#include "inference.h" #include<RcppArmadillo.h> // [[Rcpp::depends(RcppArmadillo)]] // using namespace Rcpp; // All functions used for inference arma::vec computeSE(const int& m, const int& c, const arma::mat& coeff_mat) { // compute the fixed effect standard errors from the MME coefficient matrix const int&...
e95d27597105185bc12afe3519ef74342cfbc70c6471f8645e539d51dd23b5ff
C++
2,736
75
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #include <ATen/DTensorState.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/Functions.h> #include <ATen/NativeFunctions.h> #else #include <ATen/ops/aminmax.h> #include <ATen/ops/arange.h> #include <ATen/ops/empty.h> #include <ATen/ops/eq.h> #in...
2c401a355752b9a9cfa273bc283476a5b6e4ec2d89b45e7e98cfc1147e9e7a5c
C++
2,742
94
#include "../dep/laynii_lib.h" int show_help(void) { printf( "LN_FLOAT_ME: Convert nifti datatype to FLOAT32. \n" "\n" "Usage:\n" " LN_FLOAT_ME -input data_file.nii \n" " LN_FLOAT_ME -input data_file.nii -output output_filename.nii \n" " ../LN_FLOAT_ME -input lo_BOLD_intemp.nii \n...
5ebc8c570073d31a76b696d850296ac4289e41e6702240da0f6d969e19b8b234
C++
2,779
84
#include <algorithm> #include <vector> #include <numeric> #include <mex.h> /** Sort a set of elements based on a truth table for a binary operator. The input to this function is an n-by-n logical matrix where n is the number of elements in the set, and without loss of generality each of the matrix...
f4c65d341c1a5fa2b0b33721c246782348f81352cf15db9550f4899b39540e27
C++
2,782
80
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/native/cuda/IndexKernel.h> #include <ATen/native/TensorAdvancedIndexing.h> // For at::native::index_out #include <ATen/core/Tensor.h> #include <ATen/core/List.h> #include <ATen/ExpandUtils.h> #include <ATen/MemoryOverlap.h> #ifndef AT_PER_OPERATOR_HEADERS #inc...
5a1919833f14f55eb46f74974a215fa9d1c159682e32315c4d051e74b5ede0f6
C++
2,807
103
/*************************************************************************** * * Author: "Sjors H.W. Scheres" * MRC Laboratory of Molecular Biology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software F...
b065b06d43e8c6a62f1e11eb944f2404a899286b40eaa2a634f143903d567bb8
C++
2,810
79
/*************************************************************************** * * Author: "Sjors H.W. Scheres" * MRC Laboratory of Molecular Biology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software F...
9d8255516ea3fa9b14a1fd1791f8cc34323d2feb5d1440c6aab7f9b3aabbdd71
C++
2,816
85
#include <ATen/ATen.h> #include <iostream> #include <benchmark/benchmark.h> static void quantize_per_channel_4d_contiguous(benchmark::State& state) { const size_t batches = static_cast<size_t>(state.range(0)); const size_t channels = static_cast<size_t>(state.range(1)); const size_t height = static_cast<size_t>...
81140281122b80e7f6d4c6436a156c0d2799e9247e965855d0b13479a9e55f36
C++
2,820
90
/*************************************************************************** * * Author: "Sjors H.W. Scheres" * MRC Laboratory of Molecular Biology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software F...
ea02d2d8a27524188caa6b2a162ae4fc39b36ef94cda2e46dd2c85ca7aa87465
C++
2,820
130
#include "motif_alignment.h" #include <src/jaz/math/Euler_angles_dynamo.h> using namespace gravis; #define TX 0 #define TY 1 #define TZ 2 #define PHI 3 #define THETA 4 #define CHI 5 MotifAlignment::MotifAlignment( const std::vector<gravis::d3Vector> &motifPts, const std::vector<gravis::d3Vector> &targetPts, ...
6e78991fb7f7b0d58eed6f6c2c59f8b54b60ca2db00d3be83046055a380417e2
C++
2,832
80
#include <ATen/core/NestedIntSymNodeImpl.h> #include <c10/core/SymNodeImpl.h> #include <c10/util/Exception.h> namespace c10 { namespace { bool _eq(const char* op, c10::SymNodeImpl* lhs, c10::SymNodeImpl* rhs) { TORCH_INTERNAL_ASSERT(lhs->is_nested_int()); std::optional<int64_t> c = rhs->nested_int(); return ( ...
d7806da3edd347c9751fa5bd0cda16f6302b28b1654d406554c8270935b6e93a
C++
2,833
85
#ifdef USE_XNNPACK #include <ATen/ATen.h> #include <ATen/quantized/Quantizer.h> #include <ATen/native/quantized/cpu/XnnpackUtils.h> #include <c10/util/irange.h> namespace at::native::xnnp_utils { std::vector<size_t> get_mem_format_aware_shape(const at::Tensor& in) { const auto mem_format = in.suggest_memory_format...
e618bdbf6145c961871e1ef1d2028daa32ec933bc1195a63d04edd1f5aad7850
C++
2,836
81
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/native/Cross.h> #include <numeric> #include <iterator> #include <algorithm> #include <vector> #include <ATen/core/Tensor.h> #include <ATen/Dispatch.h> #include <ATen/Parallel.h> #include <ATen/TensorIterator.h> #include <c10/util/irange.h> namespace at::native...
ebbca23ff4737bc8cb7135e4b3243ebc702a25ee11e6fd4aeec9726ebaffc043
C++
2,866
94
// 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. #include <ATen/functorch/DynamicLayer.h> #include <ATen/functorch/BatchedTensorImpl.h> #include <ATen/functo...
9b7411f4cf4c58fdffefa1d115af78297d3027b6a991d58a22dacf69bd5f5e5b
C++
2,879
108
/*************************************************************************** * * Author: "Jasenko Zivanov" * MRC Laboratory of Molecular Biology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foun...
8c9b55ad142b0aba231ff0212b545db0c9e66aca4b70dd2b3f72fb9cd6c596cc
C++
2,897
112
// Copyright (C) 1996-1998 Bernd Feige // This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING). #include "TPoints.hh" TPoints::TPoints() : Points::Points() { mark_outside(); } TPoints::TPoints(float xx, float yy, float zz) { x=xx; y=yy; z=zz; mark_outside(); } TPoints::TPoints(FILE *infile)...
e0d9015c71fd4cd79fe0c10bc9bbc15bdf4f4eb548177f9693f7280b9ce0b908
C++
2,905
118
#include <stdlib.h> #include <string.h> /*#include <cmath>*/ #include <math.h> #include "mex.h" template <typename T> void interp1_lin( mwSize mY, mwSize mXI, mwSize nN, T *YI, const T *Y, const T *XI) { mwSize ix,n,m; T xi, dx, yi; T *YI_local = YI; const T *Y_local = Y; const T *XI_local = XI; for(n ...
c00eb88230dddd7fcbf698ef24142845222aef3a1f896a85a5bdd1134a63f8c4
C++
2,918
99
/* * 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. */ #include <algorithm> #include <cmath> #include <functional> #include <random> #include <vector> #inc...
6a01fca2ec3ab31a991520e9db6febab7f21bf3a24eb532910ae6f57be8f9f35
C++
2,921
98
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/native/LinearAlgebra.h> #include <ATen/core/Tensor.h> #include <ATen/Dispatch.h> #include <ATen/native/TensorIterator.h> #include <ATen/native/SharedReduceOps.h> #include <ATen/native/cpu/Reduce.h> #include <ATen/native/cpu/Loops.h> #include <c10/util/irange.h> ...
047b1d09112530c33b1e668436f624f11bf6a01ab4fc1e094f3b36245ec64281
C++
2,922
116
#include <ATen/Config.h> #include <ATen/core/jit_type.h> #if AT_PARALLEL_OPENMP #include <ATen/Parallel.h> #include <ATen/ParallelFuture.h> #include <atomic> #if AT_MKL_ENABLED() #include <mkl.h> #endif #if AT_MKLDNN_ENABLED() #include <ATen/native/mkldnn/IDeepRegistration.h> #endif #include <caffe2/utils/threadpoo...
1b225df5be80fa66329355156abbc48bd7353ae0acb4036f08a970e0780f3230
C++
2,924
92
#include <ATen/core/op_registration/infer_schema.h> #include <c10/util/irange.h> #include <fmt/format.h> namespace c10 { namespace detail::infer_schema { namespace { std::vector<Argument> createArgumentVector(c10::ArrayRef<ArgumentDef> args) { std::vector<Argument> result; result.reserve(args.size()); for (con...
1d9c92a7d28626cad8ff623304d78ec240412763f29c9b97a9ea7d0f33b751e8
C++
2,935
91
/*************************************************************************** * * Author: "Jasenko Zivanov" * MRC Laboratory of Molecular Biology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foun...
07b1606a24371e986cbc683caa23c0a26d30b93fb8810d217d0c2d6852a51b63
C++
2,943
73
/*************************************************************************** * * Author: "Sjors H.W. Scheres" * MRC Laboratory of Molecular Biology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software F...
edf58a66743f54082a9f6da62af12bfc6f4a13f1576815ed903eed472fd5cd85
C++
2,945
99
/* * 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. */ #include <algorithm> #include <cfloat> #include <chrono> #include <cmath> #include <functional> #incl...
4ad976240c45bcfcb588d6865098c6b3d64fa191cf87a687b86c8adec7ea4521
C++
2,951
102
// This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // This program is distributed in the hope that it will be use...
72d5628d0ebf520a847f021613e4905504c28c35936c9105ba7e19bb5d473414
C++
2,960
99
/* * 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. */ #include <algorithm> #include <cmath> #include <functional> #include <random> #include <vector> #inc...
74e5701273d0a964cd906dbe85bb80dff3fa409d0ad0cb363615b3cdf932ac8d
C++
2,979
123
#include "aberrations_cache.h" #include <src/jaz/math/Zernike.h> using namespace gravis; AberrationsCache::AberrationsCache(const MetaDataTable &opticsTable, const int size, const double pixelSize) : size(size), pixelSize(pixelSize) { const int s = size; const int sh = s/2 + 1; const int gc = opticsTable.numberOf...
b8f1f63e6e709c4f3a43959dd490073bb06f2c9aeb9c7423ce7efdeba0185a3b
C++
2,981
99
/* * 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. */ #include <algorithm> #include <cmath> #include <functional> #include <random> #include <vector> #inc...
5b6e3a878638a344c13f6622c11d827e4e000f0b98b706f872f8a621e8888651
C++
2,987
75
#define TORCH_ASSERT_NO_OPERATORS #include <ATen/Dispatch_v2.h> #include <ATen/Parallel.h> #include <ATen/cpu/vec/vec.h> #include <ATen/cpu/vec/functional.h> #include <ATen/native/TensorIterator.h> #include <ATen/native/cpu/Loops.h> #include <ATen/native/Fill.h> #include <c10/core/Scalar.h> namespace at::native { nam...
287aaec5f5c2537668780806ab2a550af618915e00d213b147f23746abf2bfc5
C++
3,000
103
/*************************************************************************** * * Author: "Jasenko Zivanov" * MRC Laboratory of Molecular Biology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foun...
6042c63d3524696f7f8773021d17a2a114e07410559573d35bf4e2c88ecfd005
C++
3,009
89
/*************************************************************************** * * Author: "Sjors H.W. Scheres" * MRC Laboratory of Molecular Biology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software F...
8b3279cedb1950243347ccd7e75e4cc06aeaafd75190bf3f03eb4c42a1332af1
C++
3,016
99
/* * 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. */ #include <algorithm> #include <cmath> #include <functional> #include <random> #include <vector> #inc...
0c8f881d16c9af3e9a25beda97831f642d9790afecac7afe7c56d7e65f3ba0bc
C++
3,020
67
#include <ATen/functorch/FunctionalizeInterpreter.h> #include <ATen/functorch/DynamicLayer.h> #include <ATen/FunctionalTensorWrapper.h> namespace at::functorch { static void sanityCheckNotFunctional(const c10::OperatorHandle& op, torch::jit::Stack* stack, size_t num_args) { foreachTensorInplace(*stack, static_cast<...
efce72add465ce7b61f30bb97ebc4c9d57628d96128734cf6a0674058d62bf16
C++
3,020
101
/* * 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. */ #include <algorithm> #include <cmath> #include <functional> #include <random> #include <vector> #inc...
fe4a0e55397d91eafe2d24d9b604046538eb3063e8aa0d657c7e992ded1ba98b
C++
3,042
123
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #include <ATen/cuda/CUDAConfig.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/Functions.h> #include <ATen/NativeFunctions.h> #else #include <ATen/ops/cudnn_affine_grid_generator_backward_native.h> #include <ATen/ops/cudnn_affine_grid_generator...
00074cf01e1b5c93cc68cf3fbe0680f4a4f370ce8e93e6f96ac8b25577add18b
C++
3,046
164
#include "diffusion_tensors.h" using namespace gravis; BufferedImage<Tensor3x3<float> > DiffusionTensors::plateDiffusion( const RawImage<Tensor3x3<float>>& J, double sigma, double alpha) { BufferedImage<Tensor3x3<float>> D(J.xdim, J.ydim, J.zdim); const int w = J.xdim; const int h = J.ydim; const int d = J.z...
468fc60fc6757ab267d19d02738dcc45186c06785c7b9543992fa39e3b3ada79
C++
3,069
104
// Adapted from interp.cpp from Caffe util by Pauline Luc // Originally developed by George Papandreou #define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #include <ATen/TensorMeta.h> #include <ATen/TensorUtils.h> #include <ATen/native/UpSample.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/Fu...