sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
5cac036f5093d04cfcf17355c276fc6f4a4509e7850765b8f320aab453b5f797
C++
1,354
46
/*************************************************************************** * * 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...
4b1b6b724249730b24fe951463ea4687eb6753efb1d61baedffcc84f408d52aa
C++
1,366
48
/*************************************************************************** * * 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...
73ac8c1f540e68c67950f5c6bb7d1f884ca240f286aea2410ea1be0e856da759
C++
1,372
44
/*************************************************************************** * * 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...
62a9580b30515c1cc8d884e55c6afb35dac3a601b0579d68e70353b86641d68b
C++
1,378
43
#include <ATen/core/GeneratorForPrivateuseone.h> #include <mutex> namespace at { static std::mutex _generator_mutex_lock; std::optional<GeneratorFuncType>& GetGeneratorPrivate() { static std::optional<GeneratorFuncType> generator_privateuse1 = std::nullopt; return generator_privateuse1; } _GeneratorRegister::_...
c18aa8b6cb145e41e34213f4cdb695230344ee597e89086399c338c3ebcd0ac8
C++
1,379
35
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #include <ATen/native/mkldnn/MKLDNNCommon.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/NativeFunctions.h> #else #include <ATen/ops/empty_native.h> #endif namespace at::native { #if AT_MKLDNN_ENABLED() Tensor empty_mkldnn(IntArrayRef sizes...
8f07b6667e77f7a67660e838af21d9efcf9eec32f541199b1ee62a14838dbb5a
C++
1,411
27
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <torch/library.h> #include <torch/custom_class.h> #include <ATen/native/ao_sparse/quantized/cpu/packed_params.h> #include <ATen/native/ao_sparse/quantized/cpu/fbgemm_utils.h> // Register operators TORCH_LIBRARY(sparse, m) { ao::sparse::register_linear_params(); ...
7a7ecf94f353afe058f756174e7c951b8ded77a14e9455e509a420a6cea757d9
C++
1,419
52
/*************************************************************************** * * 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...
59297da5e4b0104e57c2295f3cef0cf059b87d445bdc15f9dbb99140813b720f
C++
1,425
38
#include <ATen/core/dispatch/CppSignature.h> #include <gtest/gtest.h> #include <string> using c10::impl::CppSignature; namespace { TEST(CppSignatureTest, given_equalSignature_then_areEqual) { EXPECT_EQ(CppSignature::make<void()>(), CppSignature::make<void()>()); EXPECT_EQ(CppSignature::make<int64_t(std::stri...
bb0fefcb7302cacdc9721cedce1b8898520424234928396eabfacdd3aade995d
C++
1,426
55
/*************************************************************************** * * 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...
fbfb99a5b270ffc068644f5e52b8f15eb67dd5770af682fc9289ebc785367bef
C++
1,429
56
/*************************************************************************** * * Authors: "Jasenko Zivanov & 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 * ...
021514261306dd7022dcb207949fe8185722572102755590e762382fd10e7acc
C++
1,430
47
/*************************************************************************** * * Author: "Liyi Dong & Sjors H.W. Scheres" * MRC Laboratory of Molecular Biology * * The Haralick feature code was adapted from code written by Antonio Augusto Abello * as hosted on: https://github.com/Abello966 * * The LBP code was ...
eafdb3db99363e52938aa785ccf119af916e4141ba36e38c898761a5d0d97c34
C++
1,434
50
/*************************************************************************** * * 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...
7e2b1082a2fece794e5ef7ad8757bcea7aaf5d8b86a282ba610aefeae84260a7
C++
1,435
46
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/NativeFunctions.h> #else #include <ATen/ops/is_nonzero_native.h> #include <ATen/ops/_foobar_native.h> #include <ATen/ops/_test_functorch_fallback_native.h> #endif namespace at::native { bool is_non...
5a3f1fac8487042deb55ed7b88089a6e494e6be142056251071cd2a6fd5fa2a7
C++
1,448
34
// Copyright 2004-present Facebook. All Rights Reserved. #define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/native/UpSample.h> #include <c10/util/irange.h> #include <c10/util/TypeCast.h> namespace at::native::upsample { TORCH_API c10::SmallVector<int64_t, 3> compute_output_size( c10::IntArrayRef input_siz...
3cb116286d929aca8cbc74060c51893c039177a9c2a2cffe1b4ceebc2115e76b
C++
1,472
59
/*************************************************************************** * * 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...
b3209a683396fae30e4deb39e41f7909f950611da15fcb0f20f8ebb1dda2cade
C++
1,473
41
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #include <ATen/cuda/CUDAContext.h> #include <ATen/native/Resize.h> #include <ATen/native/cuda/Resize.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/NativeFunctions.h> #else #include <ATen/ops/set_native.h> #endif namespace at::native { // th...
c3984237a1558a4679d9da18b3f7575d690e0a3a8e5fbaf2183aece2cf7866b8
C++
1,483
55
/*************************************************************************** * * 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...
0a4faa6cb79964544c06e14efe9288ef2f9196a21099f3bb33cc3240a55d63a3
C++
1,487
90
#include "skeletonization.h" using namespace gravis; BufferedImage<Tensor3x3<float>> Skeletonization :: getKernel( const RawImage<Tensor3x3<float>>& J, Mode mode, float tol) { BufferedImage<Tensor3x3<float>> out(J.xdim, J.ydim, J.zdim); const int w = J.xdim; const int h = J.ydim; const int d = J.zdim; cons...
d3797bea30ab23603a38be480b0b318d603e5df01ffa4fe9c6402b1496d2f9e8
C++
1,496
51
/*************************************************************************** * * Author: "Takanori Nakane" * 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...
e2342feec4e22a7950b63838daf290563a8bf1143eada262c351761244769084
C++
1,497
50
/*************************************************************************** * * 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...
098a349c026c2d8b99302ec66895497cebb45d9c9663a1683d12b4199388184f
C++
1,500
33
#include "gcmi_mex_adapter_utils.hpp" #include "gcmi_kernels.hpp" class MexFunction : public gcmi::MexAdapterBase { public: void operator()(matlab::mex::ArgumentList outputs, matlab::mex::ArgumentList inputs) override { if (inputs.size() != 5 || outputs.size() > 1) { fail("info_cc_slice_cpp:us...
c13663630fc13f9dd570182b4323eb9a514ec0e919c214edf5032d5ecb15511d
C++
1,512
40
//******************************************************************************************************************** // TSBuf.cpp: implementation of the TSBuf class. //******************************************************************************************************************** #include "TimeBuf.h" #ifdef _DEB...
b60c24b3fa12478ac71990108d0762379061e9e214a3d07f8b0db61fcd634e71
C++
1,531
34
#include "gcmi_mex_adapter_utils.hpp" #include <omp.h> class MexFunction : public gcmi::MexAdapterBase { public: void operator()(matlab::mex::ArgumentList outputs, matlab::mex::ArgumentList inputs) override { if (inputs.size() != 2 || outputs.size() > 1) { fail("gcmi_cpp_runtime_probe:usage", ...
0559d44d7cccc978ebc353b14f569e6e29ee5a70b7c50fb15d6800fedb28415d
C++
1,539
48
#include <ATen/CachedTensorUtils.h> #include <atomic> #include <c10/util/flat_hash_map.h> namespace at::caching { using weakref_type = c10::weak_intrusive_ptr<TensorImpl, UndefinedTensorImpl>; static std::atomic<bool> cached_tensorimpls_enabled{false}; // Like `cached_casts` in autocast_mode, we hash on the Tens...
e01bdd11f5fe262ae1aa598882874f06e347f8341db8d603fd6589eb67dc51b7
C++
1,552
40
//******************************************************************************************************************** // TSBuf.cpp: implementation of the TSBuf class. //******************************************************************************************************************** #include "TimeBuf.h" #ifdef...
f11e248b30dfd5a7b0cda5e294083ab6f8996f5290b7f65be26dffc9635ab3c3
C++
1,556
54
/*************************************************************************** * * 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...
f10b867b26db7704e20c104cfe3f4e4fd6a35af89dbb000f1ecc115a90ed4d4f
C++
1,564
36
/*************************************************************************** * * 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...
9f33b7591e950604020a0e6a5594f56167802825f2e4d8abad16a3e0f9477354
C++
1,574
39
//******************************************************************************************************************** // TimeMClustTSBuf.cpp: implementation of the TimeMClustTSBuf class. //******************************************************************************************************************** #include "Tim...
d61a62e973d102fba5d1d779d8b9f87d7d137c4fca9157406f15cfc4054b336d
C++
1,594
48
/*************************************************************************** * * Author: "Takanori Nakane" * * 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...
970455ab2b6fbaa5bb8a81f9959c3f0930ae187b30ec76f79eadbc2c9245ca1c
C++
1,609
57
/*************************************************************************** * * 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...
90e511fb05ce25038b0074914e989d7808d4fbf6a9701a51ad1ea86e3c3c100b
C++
1,613
39
//******************************************************************************************************************** // TimeMClustTSBuf.cpp: implementation of the TimeMClustTSBuf class. //******************************************************************************************************************** #include "...
3a5c6709dcaa0249c9707f17d607eba9c9441ee278ee44a2ceedb197b076b382
C++
1,622
64
#include "fileUtils.h" #if defined(_WINDOWS) && !defined(__MINGW32__) #include <sstream> #include <string> typedef std::wstring wxString; #endif // Mac-specific file access functions // On other platforms, replace the following with equivalent functions /* GetApplicationDirectory returns the volume refere...
b56ed21b676e38f31ac33e77bc761ec14c6a33d539df4d6c76918371e1471f65
C++
1,622
71
#include "ctf_refinement_mpi.h" #include <src/jaz/tomography/tomolist.h> #include <src/jaz/tomography/particle_set.h> #include <src/jaz/tomography/prediction.h> #include <src/jaz/util/zio.h> #include <src/jaz/util/log.h> #define TIMING 0 using namespace gravis; using namespace aberration; CtfRefinementProgramMpi::C...
8cf29a811c678afb87544e76bd07c28449eb10fa51ee0be2763040e17c6d212e
C++
1,628
61
#include <src/jaz/tomography/projection/projection.h> #include <src/jaz/tomography/extraction.h> #include <src/jaz/image/normalization.h> #include <src/jaz/image/centering.h> #include <src/args.h> #include <src/jaz/gravis/t4Matrix.h> #include <omp.h> using namespace gravis; int main(int argc, char *argv[]) { IOPar...
f2b039b89282d33716d85dd7bb832abcb48d163b18b605a8523ff7990a282b13
C++
1,637
46
#include <ATen/cuda/CUDAContext.h> #include <ATen/cuda/detail/DeviceThreadHandles.h> namespace at::cuda { namespace { void createCusparseHandle(cusparseHandle_t *handle) { TORCH_CUDASPARSE_CHECK(cusparseCreate(handle)); } void destroyCusparseHandle(cusparseHandle_t handle) { // this is because of something dumb in...
0b8ebbe0d84a2a6ceab4645eec2eebc98bfeb072d20ea36370134aea4125f929
C++
1,641
31
#include <ATen/AccumulateType.h> namespace at { c10::ScalarType toAccumulateType(c10::ScalarType type, c10::DeviceType device) { switch (type) { #define DEFINE_CASE(scalar_t, TypeNum) \ case ScalarType::TypeNum: ...
8dd4ae50e7796e7cc975aaf1e408b385ce40a2cce805982de154f5c122045b68
C++
1,653
51
#include <ATen/cuda/detail/DeviceThreadHandles.h> #if defined(USE_CUDSS) namespace at::cuda { namespace { void createCudssHandle(cudssHandle_t *handle) { TORCH_CUDSS_CHECK(cudssCreate(handle)); } void destroyCudssHandle(cudssHandle_t handle) { // this is because of something dumb in the ordering of // destruction...
511b9bcea1089857b89deeb44b77207791e25d26376be9990a3748c1fe78857c
C++
1,655
54
/*************************************************************************** * * 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...
374a0acdf949c116fa9080caf01c675cda3fb0f24f1a65ea9eb3926cf3f99326
C++
1,668
56
/*************************************************************************** * * 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...
cab77a0b15a33222ae55280b267788359b26ea308c9aa61947bc0e97e68f7a25
C++
1,676
57
#define TORCH_ASSERT_NO_OPERATORS #include <ATen/native/FunctionOfAMatrixUtils.h> #include <ATen/Dispatch.h> #include <ATen/TensorIterator.h> #include <c10/util/irange.h> #if (defined(_WIN32) || defined(_WIN64)) #define RESTRICT __restrict #else #define RESTRICT __restrict__ #endif namespace at::native { namespace ...
d396dc6c9fa448a60c03f1ce3523efb392cbc4c7ae95398c98f1d356d56788c0
C++
1,695
59
#include <ATen/native/mkldnn/xpu/detail/Utils.h> #include <ATen/native/mkldnn/xpu/detail/oneDNNContext.h> #include <c10/xpu/XPUCachingAllocator.h> #include <oneapi/dnnl/dnnl_graph.hpp> #include <oneapi/dnnl/dnnl_graph_sycl.hpp> /* * * Do NOT put any kernels or call any device binaries here! * Only maintain oneDNN ru...
5d5b0617a0121039c1c2c063ea9e13259353d9b2184fd42c9a86bdce05764fed
C++
1,705
52
/*************************************************************************** * * 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...
35c4512454adf82470010317cd6a9c6d3a800871836fe1c0fce5c5a49fc01e48
C++
1,712
43
/*************************************************************************** * * 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...
14762975f764814695a13255e0b365a1749e4eecbb5dfde109f59c03066806c3
C++
1,718
45
//******************************************************************************************************************** // SEBuf.cpp: implementation of the SEBuf class. //******************************************************************************************************************** #include "TimeBuf.h" #ifdef _DEB...
8aab01738691426fa0ae4cf8109997e10dead7838cbfa33884118855d54216a8
C++
1,718
45
//******************************************************************************************************************** // STBuf.cpp: implementation of the STBuf class. //******************************************************************************************************************** #include "TimeBuf.h" #ifdef _DEB...
116fea83beca881c1d360af575d696edc07e2f59357702f02deeb8bde16be188
C++
1,720
47
//******************************************************************************************************************** // TTBuf.cpp: implementation of the TTBuf class. //******************************************************************************************************************** #include "TimeBuf.h" #ifdef _DEB...
7e062919a1f26447032652b15a1cbe0bf376fe50836f41f18c4704ee24ae096d
C++
1,722
45
//******************************************************************************************************************** // CSCBuf.cpp: implementation of the CSCBuf class. //******************************************************************************************************************** #include "TimeBuf.h" #ifdef _D...
affea9880b5e5f287b0b61559460eced455af062297d446fd37db2941c0e37ae
C++
1,733
74
#include "mesh.h" #include <fstream> using namespace gravis; Mesh::Mesh() : vertices(0), vertexColors(0), triangles(0) {} void Mesh::writeObj(std::string filename) { std::ofstream ofs(filename); for (int i = 0; i < vertices.size(); i++) { const d3Vector v = vertices[i]; ofs << "v " << v.x << " " << v.y << ...
aa40eb26207a591d5ad4810d34d31994b51d18f600af136425059619bdf47d9e
C++
1,734
61
#include <ATen/ATen.h> #include <ATen/CPUApplyUtils.h> #include <ATen/ExpandUtils.h> #include <ATen/NativeFunctions.h> #include <ATen/native/ReduceOpsUtils.h> #include <ATen/native/TensorCompare.h> #include <c10/util/Exception.h> namespace at::native { Tensor max_quantized_cpu(const Tensor& self) { return std::get...
833c8ae88a03f68529dca51ce6ece86fcba80bc2ea82396f7d07b7dba89547c9
C++
1,737
58
#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 packing. PackBMatrix::PackBMatrix( const size_t input_channels, const size_t output_channels, cons...
acada0318c978a0f26ca5d91086bc47c68b9a80e5c788d31612d271f4c91603f
C++
1,746
45
//******************************************************************************************************************** // VideoBuf.cpp: implementation of the VideoBuf class. //******************************************************************************************************************** #include "TimeBuf.h" #ifde...
6cb0609284233f426cb6f356c3141b9027eb8df825febae9e82ec501083d2686
C++
1,754
44
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #include <ATen/Context.h> #include <torch/custom_class.h> #include <ATen/native/ao_sparse/quantized/cpu/fbgemm_utils.h> #include <ATen/native/ao_sparse/quantized/cpu/packed_params.h> #include <ATen/native/ao_sparse/quantized/cpu/qnnpack_utils.h>...
07d9710e101ad500d9aa7808a9fd48d58927e81585c64595c050084c2a3eec34
C++
1,762
59
/*************************************************************************** * * 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...
9f44f223a7d0d772782e13c8f712b1c4ffc29de50ccd3fadb8bf75fd950fffeb
C++
1,763
45
//******************************************************************************************************************** // SEBuf.cpp: implementation of the SEBuf class. //******************************************************************************************************************** #include "TimeBuf.h" #ifdef...
f7f3617b2b3a9a2cdf5ac45041ccef47ba30db4aa97770af067f92773c6fa853
C++
1,763
45
//******************************************************************************************************************** // STBuf.cpp: implementation of the STBuf class. //******************************************************************************************************************** #include "TimeBuf.h" #ifdef...
a133bc4d20045e0219aaa244161a0026e374874a55b1167a2591988ebfbfc75f
C++
1,765
38
// Copyright 2006, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions ...
488d959c1c2629c3d097a019445b74d1d4e0507cbb2832c9248216bcd43aaa5f
C++
1,767
47
//******************************************************************************************************************** // TTBuf.cpp: implementation of the TTBuf class. //******************************************************************************************************************** #include "TimeBuf.h" #ifdef...
5dc5496e7398e2845a720cf99ab837504bdcc16607fa1bdf816d425e4d10166a
C++
1,767
45
//******************************************************************************************************************** // CSCBuf.cpp: implementation of the CSCBuf class. //******************************************************************************************************************** #include "TimeBuf.h" #ifd...
d7cc33d575f031f4f53edab68f3c3302f1ff1d06b7ea0501c2796a43720992c1
C++
1,775
62
#include <c10/core/impl/DeviceGuardImplInterface.h> #include <c10/macros/Macros.h> namespace at::detail { struct MetalGuardImpl final : public c10::impl::DeviceGuardImplInterface { MetalGuardImpl() = default; explicit MetalGuardImpl(DeviceType t) { TORCH_INTERNAL_ASSERT(t == DeviceType::Metal); } Device...
6cd2381461b97dd8c810fe9d2cbb9509afef83c3d1cebd4c94a4c894c72b0f2f
C++
1,782
91
#include <vector> #include <src/strings.h> #include <src/filename.h> #include <src/jaz/single_particle/distribution_helper.h> #include <src/jaz/gravis/t2Vector.h> using namespace gravis; int main(int argc, char *argv[]) { const int w = 200; const int n = 100; const double mu = 25; const double sigR = 5; const do...
c60042d7394e66321ebf08dab6c35af831ab4fe71c5b216395d738d01cfbadfd
C++
1,783
50
#include <src/args.h> #include <src/jaz/tomography/programs/convert_projections.h> int main(int argc, char *argv[]) { IOParser parser; ConvertProjectionsProgram cpp; parser.setCommandLine(argc, argv); int gen_section = parser.addSection("General options"); cpp.newstComFn = parser.getOption("--nc", "Input ...
c32612aad389cfcff7e29a420ef0ec7fa8a37e1f902ff861ac7a12390a4e4371
C++
1,784
57
#include <ATen/cuda/detail/DeviceThreadHandles.h> #include <ATen/cudnn/Handle.h> #include <c10/cuda/CUDAStream.h> #include <ATen/cuda/Exceptions.h> namespace at::native { namespace { void createCuDNNHandle(cudnnHandle_t* handle) { AT_CUDNN_CHECK(cudnnCreate(handle)); } void destroyCuDNNHandle(cudnnHandle_t /*hand...
0427f975cb038ae5edd2d9d73198a3dc10f225aed7f49e6ff9e7ac199b57d75d
C++
1,791
45
//******************************************************************************************************************** // VideoBuf.cpp: implementation of the VideoBuf class. //******************************************************************************************************************** #include "TimeBuf.h" ...
02b61a06967a372a9582002e0120473f5ec6b418f6ce2e37998e040deb618384
C++
1,794
72
#include <src/metadata_table.h> #include <src/jaz/single_particle/io/star_converter.h> #include <src/jaz/single_particle/obs_model.h> int main(int argc, char *argv[]) { if (argc < 4) { std::cerr << "usage: relion_merge_particles <input1> <input2> ... <inputN> <output>\n"; return RELION_EXIT_FAILURE; } const ...
68bdf040402377f61c62bda7023658514571eeb26f45e7353839eabd72873e9a
C++
1,813
54
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #include <ATen/ceil_div.h> #include <ATen/Dispatch.h> #include <ATen/native/TensorIterator.h> #include <ATen/native/cpu/Loops.h> #include <ATen/native/DispatchStub.h> #include <c10/util/irange.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/Fun...
d0df155fc7160f64a43ea4cc8a7ec6b5765951d60ba5c4ece45b5b9c1b106698
C++
1,823
58
#include <ATen/hip/detail/DeviceThreadHandles.h> #include <ATen/miopen/Handle.h> #include <c10/hip/HIPStream.h> #include <ATen/hip/Exceptions.h> #include <ATen/miopen/Exceptions.h> namespace at::native { namespace { void createMIOpenHandle(miopenHandle_t *handle) { MIOPEN_CHECK(miopenCreate(handle)); } void destr...
9f9bf512f3583ef06dfd3a24e8e873547dbcecc6fab41e64b14e43a1b20d7499
C++
1,834
71
/* * 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/u8rm...
9e1cc1fc0622073bd612d12875fba0a6a51d03fd0aa1a03429d945c3f62f0511
C++
1,838
56
#include <ATen/Functions.h> #include <ATen/MapAllocator.h> #include <ATen/StorageUtils.h> #include <c10/core/TensorOptions.h> namespace at { C10_EXPORT c10::intrusive_ptr<c10::StorageImpl> new_shm_fd_storage( size_t size) { int flags = ALLOCATOR_MAPPED_SHAREDMEM | ALLOCATOR_MAPPED_EXCLUSIVE | ALLOCATOR_MA...
d3e3ee4649ae66b09542851cb80f0195b2795bf2d06dca44e71796214a01a8e1
C++
1,843
64
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/Dispatch.h> #include <ATen/Parallel.h> #include <ATen/core/Tensor.h> #include <ATen/cpu/vec/vec.h> #include <ATen/native/MaxPooling.h> #include <c10/util/irange.h> namespace at::native { namespace { template <typename scalar_t> inline void max_pool1d_kernel( ...
7c3024a639a6cc601a39071d340c4ff4c6909f3e46d3291c4feb1d0ef4cfe76a
C++
1,851
60
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/Dispatch_v2.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/Functions.h> #include <ATen/NativeFunctions.h> #else #include <ATen/ops/_local_scalar_dense.h> #include <ATen/ops/_local_scalar_dense_native.h> #include <ATen/ops/item_native.h> #endif namespace at:...
3a8ef55390f0ace9c260f4ba5ddad2db4ee0f0ce24d03102912ad013a4faa766
C++
1,863
39
#include <ATen/ATen.h> #include <ATen/native/quantized/AffineQuantizer.h> #include <ATen/native/quantized/Copy.h> #include <c10/core/MemoryFormat.h> #include <c10/util/irange.h> namespace at::native { // Copying from float to QInt, used for assigning float value to QTensor // The second exception condition `self.is_...
190a4606d57f815daef8eccf7bc44c4084ab371ad0967520f563606ed726af0b
C++
1,880
84
#include "primal_dual_TV.h" #include <src/jaz/image/gradient.h> #include <src/jaz/image/divergence.h> #include <src/jaz/gravis/t3Vector.h> using namespace gravis; BufferedImage<float> PrimalDualTV::anisotropicTV( RawImage<float> regionalCost, RawImage<Tensor3x3<float>> diffusionTensor, int maxIterations, float s...
156113259a1f93fe2e7e499be56f0dfabb72360d7a8177d60f13f2f49e1d45cd
C++
1,883
53
#include <ATen/cuda/CUDAContext.h> #include <ATen/cuda/detail/DeviceThreadHandles.h> #include <c10/macros/Export.h> namespace at::cuda { namespace { void createCusolverDnHandle(cusolverDnHandle_t *handle) { TORCH_CUSOLVER_CHECK(cusolverDnCreate(handle)); } void destroyCusolverDnHandle(cusolverDnHandle_t handle) { ...
095c1ae222363bb3504de82b7390886cde02fe2a8e83a9648f37ba1fd7714a02
C++
1,898
49
//******************************************************************************************************************** // EventBuf.cpp: implementation of the EventBuf class. //******************************************************************************************************************** #include "TimeBuf.h" #ifde...
5c85a5e4ab902029b15bc6123154da0b8ef7547395fd4bd1cf793677110b8a92
C++
1,899
69
#include <ATen/FakeTensorDispatchTables.h> #include <c10/util/Exception.h> #include <c10/util/LeftRight.h> #include <unordered_set> namespace at::impl { namespace { struct FakeDispatchTables { std::unordered_set<c10::OperatorName> decomp; std::unordered_set<c10::OperatorName> meta; std::unordered_set<c10::Ope...
aea61bb685d2cc39a2ad3357d162397c23b609f2c44ff588eb96fbe71babd9e4
C++
1,911
66
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #include <ATen/WrapDimUtils.h> #include <ATen/native/SortingUtils.h> #include <ATen/native/quantized/cpu/QuantizedOps.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/Functions.h> #include <ATen/NativeFunctions.h> #else #include <ATen/ops/_empty...
bd6e02f143706344dd172dbcd6a95f82479743282d5ef2646a67dd9fc84a0b4b
C++
1,917
64
#include <ATen/ATen.h> #include <ATen/autocast_mode.h> #include <ATen/cuda/CUDAConfig.h> #include <torch/library.h> namespace at { namespace autocast { /********************************************************************** Autocast wrapper for MIOpen RNNs *************************************************************...
b39ffa197f8169467e036d63d9ce254dc67caeede77faa862dee4857067228d7
C++
1,924
75
/*************************************************************************** * * 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...
30e6418136b9f1bcd807999e15076eac8d5bbf19a17f6a09a600f5a6bd811345
C++
1,932
100
#include "Gaussian_process.h" #include <src/Eigen/Dense> #include <src/Eigen/SVD> using namespace Eigen; Matrix2D<double> GaussianProcess::computeCovariance( const std::vector<gravis::d3Vector> &points, GpKernel *kernel) { const int pc = points.size(); Matrix2D<double> A(pc,pc); for (int i = 0; i < pc...
647b88a3334428eb5c858beae9202431583fdce399755945c3cf4977293c9555
C++
1,947
59
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/native/Lerp.h> #include <ATen/core/Tensor.h> #include <ATen/TensorIterator.h> #include <ATen/TensorMeta.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/NativeFunctions.h> #else #include <ATen/ops/lerp_native.h> #endif namespace at::meta { TORCH_META_FUNC(le...
e7d06833f74d564a3d3214c5cb8b1ae39918f26618ddb8087897d267f335090e
C++
1,947
49
//******************************************************************************************************************** // EventBuf.cpp: implementation of the EventBuf class. //******************************************************************************************************************** #include "TimeBuf.h" ...
6d5cacd6fa88bc690628f384a029e2ae08f2c3fc1b244cf96c0f3911132f1cb5
C++
1,996
50
/*************************************************************************** * * 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...
109baffd12721f4912123e9d408c2ba56e3aba912957ec58a331639ad9c9ac00
C++
2,002
75
#include <src/args.h> #include <mpi.h> #include <src/ctf.h> #include <src/jaz/tomography/tomogram.h> #include <src/jaz/tomography/motion/motion_fit.h> #include <src/jaz/tomography/motion/proto_alignment.h> #include <src/jaz/tomography/motion/trajectory_set.h> #include <src/jaz/tomography/projection_IO.h> #include <src/...
4bdc0303dc09a21483f979f9c5f42b2c45cb20b2866e1a49dd375596f547287a
C++
2,011
70
#include <ATen/cuda/MemPool.h> namespace at::cuda { // uid_ is incremented when a user creates a MemPool, // for example: using graph_pool_handle() or c10::cuda::MemPool(). // // uuid_ is incremented when CUDAGraph creates a MemPool // as a result of a user not providing a pool. // // MempoolId_t of {0, 0} is used to...
861096cdeb90f0f8b2c24920381758c5105d256f214431e8ed0ce30ca7f46b75
C++
2,011
98
#include "dynamo_data_set.h" #include <fstream> using namespace gravis; DynamoDataSet::DynamoDataSet() {} DynamoDataSet::DynamoDataSet(std::string filename) { std::ifstream ifs(filename); const int maxlen = 4096; char buffer[maxlen]; while (ifs.getline(buffer, maxlen)) { particles.push_back(DynamoParticl...
9935ada7cb8e8abba8bcdb0d518696b0df5af1cacf34820aee5960fecfddb861
C++
2,013
46
#include <ATen/detail/CUDAHooksInterface.h> namespace at { namespace detail { // NB: We purposely leak the CUDA hooks object. This is because under some // situations, we may need to reference the CUDA hooks while running destructors // of objects which were constructed *prior* to the first invocation of // getCUDAH...
ec0f9fc0f45700de47b1e04a81a1a27ce2a93dbd5c8f773117c94f0a2b4187fa
C++
2,023
57
#include "./idalib.h" // ==================================================================================================================== // Utility functions // ==================================================================================================================== std::tuple<uint64_t, uint64_t, uint...
e0d5323b0d11dbdbe5045034c81c6de051f4d87e81c447b23e44bd366b3b3d27
C++
2,050
53
/* * 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 <clog.h> CLOG_DEFINE_LOG_DEBUG(named_log_debug, "Unit Test", CLOG...
a43e2e125e8b02f9fb22b29fa323f01977b56d7b5276ae9479ed0a99fc931775
C++
2,067
86
// ****************************************************************************************** // Graph Document Routines // Copyright © 1996 Dr. John Clements. All rights reserved. // ****************************************************************************************** #include "byteswap.h" void ByteSwapShor...
fe9a077bb20c68cbca65644bb1221ba3f7f74b86389fd26928503be763802ca1
C++
2,075
70
// Original TunableOp is from onnxruntime. // https://github.com/microsoft/onnxruntime/blob/main/onnxruntime/core/framework/tunable.h // https://github.com/microsoft/onnxruntime/tree/main/onnxruntime/core/providers/cuda/tunable // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. // // Adapting Tu...
f2ac113eedd3a35b46ec382951c81cf9930ebff83b33060fe501841c1cbb8b6f
C++
2,086
82
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #include <ATen/native/DispatchStub.h> #include <ATen/native/FusedAdagrad.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/Functions.h> #include <ATen/NativeFunctions.h> #else #include <ATen/ops/_fused_adagrad_native.h> #endif namespace at::nati...
605c990f3e54be369274e85d35938af16c65b172b0c001d276e309928a098005
C++
2,111
55
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/Dispatch_v2.h> #include <ATen/EmptyTensor.h> #include <ATen/ScalarOps.h> namespace at { namespace { template <typename scalar_t> inline void fill_inplace(Tensor& self, const Scalar& value_scalar) { scalar_t value{}; if constexpr (std::is_same_v<scalar_t, a...
ebc6d43edbfd2179190ca3aed089ccaa8ed2ac52c49bc3889f9d1cf6d4624a5a
C++
2,115
106
#include "trajectory_set.h" #include <src/metadata_table.h> #include <src/jaz/util/zio.h> #include <fstream> using namespace gravis; TrajectorySet::TrajectorySet() { } TrajectorySet::TrajectorySet(const std::vector<std::vector<d3Vector>>& shiftsInPix, double pixelSize) { const int pc = shiftsInPix.size(); shift...
467fd4cd55ad14b07c08761c38b23020e75300e26bbd31bc01b2138db139b428
C++
2,118
86
#include <src/jaz/tomography/dynamo/catalogue.h> #include <src/jaz/tomography/projection/projection.h> #include <src/jaz/tomography/reconstruction.h> #include <src/jaz/tomography/tomolist.h> #include <src/jaz/image/centering.h> #include <src/jaz/tomography/tomo_ctf_helper.h> #include <src/jaz/image/power_spectrum.h> #i...
9753396883450c5ab821bd72688b285b94e2f23c4057d8a86845e84f10baacb4
C++
2,143
50
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/native/MathBitsFallback.h> #include <ATen/native/MathBitFallThroughLists.h> namespace at::native { struct NegFallback : MathOpFallback { NegFallback() : MathOpFallback(DispatchKey::Negative, "negation") {} bool is_bit_set(const Tensor& tensor) override { ...
b2d9f05bc0a1d9d544dd798f5a4ba4a00a3e96f4ba2b6e71d1a786252ad8c20a
C++
2,147
66
/*************************************************************************** * * Author: "Jasenko Zivanov & 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 * t...
cb9bd631bf90054efaef204e58d1f04bb80ab576a969dc04d46215d2c59b02c5
C++
2,153
69
// 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...
eedc6c03dca08a35058b73fd3ea2d55220ecaf205929b9192c161f41406bfbec
C++
2,155
48
#include <limits> #include <algorithm> #include <mex.h> //========================================================================= // MatLab interface //========================================================================= void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) ...
450aa947f9c56b59c196e2854709378013954799d0e2a392de45043a082504bd
C++
2,168
126
#include "point_cloud.h" #include <src/jaz/mesh/mesh_builder.h> #include <src/error.h> #include <fstream> #include <string.h> using namespace gravis; PointCloud::PointCloud() {} void PointCloud::readCsv(std::string fn) { std::ifstream ifs(fn); if (!ifs.is_open()) { REPORT_ERROR("Unable to read: " + fn); } ...
b776a8a1345712b57b419ccda44466db6063d8cfb333817b659cb0cde63c90ab
C++
2,170
97
#include <src/jaz/image/centering.h> #include <src/jaz/tomography/tomo_ctf_helper.h> #include <src/jaz/image/power_spectrum.h> #include <src/jaz/tomography/reconstruction.h> #include <iostream> using namespace gravis; int main(int argc, char *argv[]) { IOParser parser; int n_threads; double SNR, taperWidth; ...