sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
5fb31db6cd05bba8806d274d04bab79ffa09a9170c0fb960d276972e412abafb
C++
821
33
#include <src/args.h> #include <src/jaz/tomography/tomogram.h> #include <src/jaz/tomography/projection/real_backprojection.h> #include <src/jaz/tomography/tomogram_set.h> #include <src/jaz/image/resampling.h> #include <src/jaz/image/filter.h> #include <src/jaz/image/detection.h> #include <src/jaz/image/similarity.h> #i...
bef0da37c9e80e5773726d912aeb76a5df6da4f43083076a84d6064cbaf26546
C++
840
24
#define TORCH_ASSERT_NO_OPERATORS #include <ATen/native/UnaryOps.h> #include <ATen/Dispatch.h> #include <ATen/native/Math.h> #include <ATen/native/TensorIterator.h> #include <ATen/native/cpu/Loops.h> namespace at::native { inline namespace CPU_CAPABILITY { static void spherical_bessel_j0_kernel(TensorIteratorBas...
1c16157780a09e1ca5fe717efa9a71390e19fa2a6b2df8b64e9da1d80281bc2b
C++
852
50
#include "catalogue.h" #include <fstream> Catalogue::Catalogue() { } Catalogue::Catalogue(std::string filename) { std::ifstream ifs(filename); const int maxlen = 4096; char buffer[maxlen]; while (ifs.getline(buffer, maxlen)) { particles.push_back(DynamoParticle(buffer)); } } std::vector<std::vector<Dynam...
5b47a8fd29cf42c3dcd21e24be96d87527747d35ce2f985f88b78daa712f8be5
C++
853
39
#include <hip/hip_runtime.h> #include "test00.h" #include "kernels/add.h" #include <iostream> void HipTest00 :: run() { int N = 1<<20; // 1M elements // Allocate Unified Memory -- accessible from CPU or GPU float *x, *y; hipMallocManaged(&x, N*sizeof(float)); hipMallocManaged(&y, N*sizeof(float)); // ini...
f5268f4d0cb71e10cffabf9192e23cc5a6455e8074073185fe7bd8a60854cc1a
C++
853
29
#include <ATen/detail/PrivateUse1HooksInterface.h> namespace at { static PrivateUse1HooksInterface* privateuse1_hooks = nullptr; static std::mutex _hooks_mutex_lock; TORCH_API void RegisterPrivateUse1HooksInterface(at::PrivateUse1HooksInterface* hook_) { std::lock_guard<std::mutex> lock(_hooks_mutex_lock); TORCH...
7d918dbe2f9663ae93449c6b7bb0dde32cf27e21a3b9c4ba13e893b003b3fb16
C++
861
29
#include <ATen/Config.h> #if AT_MKL_ENABLED() #ifdef USE_MIMALLOC_ON_MKL #include <c10/core/impl/alloc_cpu.h> #include <mkl.h> #if INTEL_MKL_VERSION > 20230000L /* MKL have a method to register memory allocation APIs via i_malloc.h, High performance memory allocation APIs will help improve MKL performance. Please chec...
a1ed13ad0e2e9aa1d42ff686a5328dbe178ae268ca404bfee95dc74cff00cff5
C++
862
40
#include "Fourier_2D_deformation_model.h" Fourier2DDeformationModel::Fourier2DDeformationModel() { } Fourier2DDeformationModel::Fourier2DDeformationModel( const Deformation2D::Parameters& parameters, const gravis::i2Vector& imageSize) : imageSize(imageSize), gridSize(parameters.grid_width, parameters.gri...
af63e0ef4e02d8cee297b58f86c113701dc4c310f428b9f8483d38954ba96d90
C++
871
41
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/native/UnfoldBackward.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/Functions.h> #include <ATen/NativeFunctions.h> #else #include <ATen/ops/unfold_backward_native.h> #include <ATen/ops/zeros.h> #endif namespace at::native { DEFINE_DISPATCH(unfold_backward...
3bf129d56ae8123c55dc00f1c2364131c01933539c572f2aa1906a9255a0bb51
C++
877
24
#define TORCH_ASSERT_NO_OPERATORS #include <ATen/native/UnaryOps.h> #include <ATen/Dispatch.h> #include <ATen/native/Math.h> #include <ATen/native/TensorIterator.h> #include <ATen/native/cpu/Loops.h> namespace at::native { inline namespace CPU_CAPABILITY { static void scaled_modified_bessel_k1_kernel(TensorItera...
bb7167135f7923a1729d518ae0df48f549f02dede0e96428ddd237756d46acba
C++
877
24
#define TORCH_ASSERT_NO_OPERATORS #include <ATen/native/UnaryOps.h> #include <ATen/Dispatch.h> #include <ATen/native/Math.h> #include <ATen/native/TensorIterator.h> #include <ATen/native/cpu/Loops.h> namespace at::native { inline namespace CPU_CAPABILITY { static void scaled_modified_bessel_k0_kernel(TensorItera...
17dc02d78421a885d70ae2fb281dbd25c94948693dff45fb67b8c1bf29bd67ae
C++
883
30
#include <src/args.h> #include <src/jaz/tomography/programs/powspec.h> int main(int argc, char *argv[]) { IOParser parser; PowspecProgram pp; parser.setCommandLine(argc, argv); int gen_section = parser.addSection("General options"); pp.stackFn = parser.getOption("--ts", "Tilt stack(s) (e.g. 'a.mrc,b.mrc')");...
5df20fe03b4cceeabfc82a7ee2543700a796c2bdba906799e10db495ddf9a074
C++
886
41
#include <unistd.h> #include <string.h> #include <fstream> #include <src/args.h> #include <src/image.h> #include <src/fftw.h> #include <src/complex.h> #include <src/metadata_table.h> #include <src/jaz/single_particle/slice_helper.h> #include <src/jaz/single_particle/img_proc/filter_helper.h> #include <src/jaz/single_...
a05de4e580166bbaa2f34d2808de9147116464c1474b40abeb5f877accad1630
C++
887
33
#include <ATen/core/CachingHostAllocator.h> #include <array> namespace at { namespace { std::array<HostAllocator*, at::COMPILE_TIME_MAX_DEVICE_TYPES> allocator_array{}; std::array<uint8_t, at::COMPILE_TIME_MAX_DEVICE_TYPES> allocator_priority{}; } // anonymous namespace void setHostAllocator( at::Devi...
16754f831c724b80e6080743cc1dd63ae66b2d42cae417c240e990e97977a56c
C++
890
19
#include <gtest/gtest.h> #include <ATen/core/op_registration/op_allowlist.h> namespace allowlist_contains_test { static_assert(c10::impl::allowlist_contains("", ""), ""); static_assert(!c10::impl::allowlist_contains("", "a"), ""); static_assert(!c10::impl::allowlist_contains("a", ""), ""); static_assert(!c10::...
c0a316e826e0819862f1bb6b87941b3ef4e233353d980c517f99a59c2abedd17
C++
897
32
/* Portions of this code are under: Copyright (c) 2022 Advanced Micro Devices, Inc. All rights reserved. */ #undef ALTCPU #include <hip/hip_runtime.h> #include "src/ml_optimiser.h" #include "src/acc/acc_ptr.h" #include "src/acc/acc_projector.h" #include "src/acc/acc_projector_plan.h" #include "src/acc/acc_backprojec...
a5b2d8e580735882b3f3bf554fd8721f9c70f7905ee97030592cee54ddcf2f22
C++
899
40
#include "filament_model.h" #include "coordinate_conventions.h" #include <omp.h> using namespace gravis; void DummyFilamentModel::apply( const std::vector<double>& params, const std::vector<std::vector<float>>& encodedCoords, std::vector<std::vector<float>>& signedDist_out, int num_threads) const { const...
0ff520e89d00e2bf59f1f06a83a969242e1bb1059778fa851f3dc9d9df05f785
C++
903
49
#include "recursive_line_search.h" #include <limits> #include <iostream> double RecursiveLineSearch::optimize( const Optimization &opt, double x0, double x1, int steps, int recursions, bool verbose) { double bestX = x0; double minCost = std::numeric_limits<double>::max(); const double step = (x1 - x0) / (steps...
a130ab2ad83a2f33fe4f9823fa206ef95dc662c68cb40b8897eff56a29466f35
C++
929
20
/*************************************************************************** * * 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...
ca3f1a783db90b71c0fe56d8a816da205a8f613935da90b3ad9107ccc45eb3a8
C++
941
21
#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_omp_probe:usage", "gcm...
559c399f26de7847cceb54732846c111e2d2acb3e3a64de4f8b88f9206a3f142
C++
948
34
#include <src/args.h> #include <src/jaz/tomography/programs/tomo_ctf.h> int main(int argc, char *argv[]) { IOParser parser; TomoCtfProgram tcp; parser.setCommandLine(argc, argv); int gen_section = parser.addSection("General options"); tcp.stackFn = parser.getOption("--ts", "Tilt sequence image stack (e.g. ...
33919eccc284861bd1796b4fd2a9f6f8073e360977b1bd3800f99c8d5c76ae31
C++
953
37
#include <ATen/ThreadLocalPythonObjects.h> #include <c10/util/Exception.h> #include <utility> namespace at::impl { static thread_local ThreadLocalPythonObjects py_objects; void ThreadLocalPythonObjects::set(const std::string& key, std::shared_ptr<SafePyObject> value) { py_objects.obj_dict_[key] = std::move(value...
f444dd0c45e1bd94277c8d4e51a09662951c3231ad6b6939309d592fd80d7528
C++
954
22
/*************************************************************************** * * 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...
fecbe03590c5b4329e26366a337ead06ce9a794d31b736b955542d1da7160a8a
C++
955
32
#include <ATen/core/Generator.h> #include <ATen/core/Tensor.h> #include <c10/util/Exception.h> namespace at { void Generator::set_state(const at::Tensor& new_state) { TORCH_CHECK(new_state.defined(), "Undefined tensor is not allowed"); this->impl_->set_state(*new_state.unsafeGetTensorImpl()); } at::Tensor Genera...
13644d92d7f508261245ded145b69f3347bdcd86c57e173c7afbf76d29fba7c6
C++
957
38
#include <ATen/cudnn/Types.h> #include <c10/util/Exception.h> namespace at::native { cudnnDataType_t getCudnnDataTypeFromScalarType(const at::ScalarType dtype) { if (dtype == c10::kQInt8 || dtype == at::kChar) { return CUDNN_DATA_INT8; } else if (dtype == at::kFloat) { return CUDNN_DATA_FLOAT; } else ...
e1c05840a96542dbd6a637bfc9ee11a07ffc815000cd68247ccd5c530217122f
C++
962
43
// Copyright (C) 1996,2018,2026 Bernd Feige // This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING). #include "LinkedObject.hh" #include "Point.hh" #include "Points.hh" #include "TPoints.hh" #include "Triangle.hh" #include "Triangls.hh" #include "ConvexMesh.hh" extern "C" { #include "bf.h" #in...
844d94c661dcfcd460885e127c50f0b638a96b832f0492fbb1a8c25cfc303602
C++
967
21
/*************************************************************************** * * 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...
d838f54dbc9013ee194421a6d215d893c03277cffe2f6b52612fc4076e69d474
C++
967
21
/*************************************************************************** * * 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...
702abe02a0ff8f5316653a7d6204ee38bfd2ab45f76dc54a501f07f0b706010a
C++
970
36
#include "gcmi_kernels.hpp" #include <cstddef> #include <exception> #include <string> extern "C" void gcmi_info_cc_slice_bridge( const double* x, std::size_t ntrl, std::size_t xdim, std::size_t npage, const double* y, std::size_t ydim, std::size_t threads, double* output, const cha...
da67ce2f6d550d20d02d112ba29b05384f6fe37a7156fd4b1f9788b05d8d1ba3
C++
970
37
#include "structure_tensor.h" #include <src/jaz/segmentation/diffusion.h> #include <src/jaz/segmentation/diffusion_tensors.h> BufferedImage<Tensor3x3<float>> StructureTensor :: computeNonLinear( const RawImage<float>& src, double rho, double sigma0, double taper, int diffusion_iterations, int outer_iterations...
3748c8da20b7b80d52e970aee7164694e84cfa5084c86af77044930ba56dc931
C++
976
41
// Copyright (C) 1996 Bernd Feige // This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING). #include "Array.hh" Array::Array(int nr_of_vectors, int nr_of_elements, int element_skip) { thisarray.nr_of_vectors=nr_of_vectors; thisarray.nr_of_elements=nr_of_elements; thisarray.element_skip=eleme...
34781871abdbccbfab9b083fa359ac08c6d5636d2088c5dadebd0b220229f1c4
C++
987
37
#include <ATen/cuda/CUDAContext.h> #include <ATen/detail/CUDAHooksInterface.h> #include <ATen/native/cuda/ScaledBlasDeviceUtils.h> #include <string> #include <vector> namespace at::native::scaled { #ifdef USE_ROCM // On ROCm, sm90_only/sm100_only are ignored. bool scaled_mm_arch_allowed(bool /*sm90_only*/, bool /*sm...
c345ca600d61a41336639f53c5496e5576115a3132524bf528310b3cc81f2706
C++
1,003
25
#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() != 2 || outputs.size() > 1) { fail("copnorm_slice_cpp:us...
5e7754689df6cb1df681dead17196f55eacc4ffc6dd3a79735bb901984581a99
C++
1,011
33
#include <src/args.h> #include <src/jaz/tomography/programs/substack.h> int main(int argc, char *argv[]) { IOParser parser; SubstackProgram sp; parser.setCommandLine(argc, argv); int gen_section = parser.addSection("General options"); sp.particlesFn = parser.getOption("--i", "Input particle set"); sp.tomoLis...
0f942c3cf218e6cde136008f79edee4e166a7e71f657355c7a438ef8df6cf71f
C++
1,013
27
#include <ATen/core/dispatch/Dispatcher.h> #include <c10/core/impl/PyInterpreter.h> #include <torch/library.h> namespace at::impl { static void metaFallback( const c10::OperatorHandle& op, c10::DispatchKeySet dispatch_keys, torch::jit::Stack* stack) { c10::Dispatcher::singleton().throwIfHasPythonModule(...
adf40bdb8fedf14950d610e2989d9e8a0a60f16a44ee01895e914bbed98b0431
C++
1,016
34
#include <src/args.h> #include <src/jaz/tomography/programs/dark_erase.h> int main(int argc, char *argv[]) { IOParser parser; DarkEraseProgram dep; parser.setCommandLine(argc, argv); int gen_section = parser.addSection("General options"); dep.stackFn = parser.getOption("--ts", "Tilt sequence image stack (e...
af09c32f833a1a170043f22f79b22d2140ea8992b6251aaa63371d055ee19561
C++
1,023
33
#ifdef USE_RUY_QMATMUL #include <ATen/ATen.h> #include <ATen/native/quantized/cpu/RuyUtils.h> namespace at::native::ruy_utils { static thread_local ruy::Context context; ruy::Context* get_ruy_context() { return &context; } // Adopted from Ruy: // https://github.com/google/ruy/blob/2d950b3bfa7ebfbe7a97ecb44b1cc4d...
32a05b35e3a555f066bd25a12d18f1f26045b0cf39a56e1a8fda06de56848ae6
C++
1,028
38
#include <ATen/TensorGeometry.h> #include <c10/util/overflows.h> namespace at { // See TensorGeometry.h on why this is useful now that we cache is_contiguous. template <typename T> static bool _geometry_is_contiguous(ArrayRef<T> sizes, ArrayRef<T> strides) { assert(!overflows<std::int64_t>(sizes.size())); auto di...
214baa609742365c275daed8f2a6c06717bf1e488eba2cf90cb683f9a01a6643
C++
1,037
23
/*************************************************************************** * * 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...
346c94433c7868bd94eaccf9bdd00f3c0b2ee6a2949f4bb59e1458ee683adce5
C++
1,044
24
/*************************************************************************** * * 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...
748eba2c786039f6d83ac77aab8e5287b6a54e78e85418419dd22e45b30605e8
C++
1,046
63
#include "topaz_helper.h" #include <src/macros.h> using namespace gravis; std::map<std::string, std::vector<TopazHelper::Particle>> TopazHelper::read( std::string fileName, double minScore) { std::ifstream file(fileName); if (!file) { REPORT_ERROR("Unable to read: " + fileName); } std::map< std::st...
f38219a1d7880b298f833ffc950a784029434d0e552ebf54473cd1b068cddfaa
C++
1,066
44
#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/jaz/tomography/reconstruction.h> #include <src/args.h> #include <src/jaz/gravis/t4Matrix.h> #include <omp.h> using namespace grav...
3eccd27a9e67ff0f7bbbc202233a56ae08554f5e7f8b0073270d209c54dde49b
C++
1,070
53
#include "motif_detection.h" #include <src/jaz/math/Euler_angles_dynamo.h> using namespace gravis; MotifDetection::MotifDetection() { } MotifDetection::MotifDetection(d4Matrix alignment, int centerIndex, int tomoIndex, double score) : alignment(alignment), centerIndex(centerIndex), tomoIndex(tomoIndex), score(sc...
75e3d74b6848e3aaf2e46296742a1ebdcf8db2352f077fb0ef6cfa3e44f5815b
C++
1,074
54
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #include <ATen/Config.h> #include <ATen/Parallel.h> #include <ATen/cpu/vec/functional.h> #include <ATen/cpu/vec/vec.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/NativeFunctions.h> #else #include <ATen/ops/zero_native.h> #endif #if !AT_MKLDN...
e2f6526acd7b040496e80c3c92e674aefa7177df5c61824de5faecd88fd0232d
C++
1,088
49
#include <src/args.h> #include <src/jaz/tomography/tomolist.h> #include <src/jaz/tomography/tomogram.h> #include <src/jaz/mesh/mesh_builder.h> #include <src/jaz/util/zio.h> #include <src/jaz/util/log.h> #include <src/jaz/tomography/tomogram_set.h> #include <src/jaz/tomography/particle_set.h> #include <src/jaz/tomograph...
1c3de877bd6555aee92780f97d32fe48359642730b966575e73f5227048e743c
C++
1,109
34
#include <ATen/core/DeprecatedTypePropertiesRegistry.h> #include <ATen/core/DeprecatedTypeProperties.h> #include <c10/util/irange.h> namespace at { void DeprecatedTypePropertiesDeleter::operator()(DeprecatedTypeProperties * ptr) { delete ptr; } DeprecatedTypePropertiesRegistry::DeprecatedTypePropertiesRegistry() ...
7ea555696f34bec38c1c395d8c4178e9af326bbc58413b6e3b831ec0bca320ab
C++
1,135
58
#include <src/args.h> #include <src/metadata_table.h> #include <src/jaz/single_particle/stack_helper.h> using namespace gravis; int main(int argc, char *argv[]) { IOParser parser; std::string starFn; parser.setCommandLine(argc, argv); parser.addSection("General options"); starFn = parser.getOption("--i", "Inpu...
5a3eb9f3fa0d766736bd96488b7795393bf8279ba9211677652b7002ace9a4f1
C++
1,138
51
#include "tomo_ctf.h" #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 <src/jaz/tomography/tomo_ctf_find.h> #include <omp.h>...
b8ba79264c8773d9413a831cbfb38973d1d157095e8a8f392e2f055afd70e6aa
C++
1,153
36
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/Dispatch.h> #include <ATen/OpMathType.h> #include <ATen/native/TensorFactories.h> #include <ATen/native/TensorIterator.h> #include <ATen/native/cpu/Loops.h> namespace at::native { namespace { void complex_kernel(TensorIterator& iter) { AT_DISPATCH_FLOATING_T...
52bf6c4898e28c5f10cd8a2a63f964a53fecd55b01a16f9f8ec267e2994619d8
C++
1,154
47
#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/copy_native.h> #endif #if !AT_MKLDNN_ENABLED() namespace at::native { Tensor& copy_mkldnn_(Tensor& self, const Tensor& src, bo...
f94b892e5d86924d474039e22a09a652a88ae9b569188255b15b969f42a077d8
C++
1,157
53
#include "class_helper.h" #include <src/jaz/util/index_sort.h> int ClassHelper::countClasses(const MetaDataTable &particles_table) { int max_class = -1; for (long int p = 0; p < particles_table.numberOfObjects(); p++) { const int class_id = particles_table.getIntMinusOne(EMDL_PARTICLE_CLASS, p); if (class_id...
b4649dbd20629135ee2a7b365230b1161078b790b18c4a9c58e62c1c9df0fe52
C++
1,160
49
#include "stack_helper.h" void NewStackHelper::FourierTransformStack_fast( const RawImage<float>& stack, RawImage<fComplex>& stackOut, bool center, int num_threads, FFT::Normalization normalization) { const int w = stack.xdim; const int h = stack.ydim; const int fc = stack.zdim; const int wh = w/...
fdc4330b8bc4b8bd1ecd1cd57b81b32b154f6ed6e5e3a5db5280c1ae5d421416
C++
1,161
45
/* * 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 <qnnpack/x8lut.h> #include "lut-microkernel-tester.h" TEST(X8LUT...
a54c9f1fd19d39d8490c2d1c59d77ee013c53e61ed8e53613e7eecb02a6e6894
C++
1,174
38
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/native/AmpKernels.h> #include <ATen/core/Tensor.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/Functions.h> #include <ATen/NativeFunctions.h> #else #include <ATen/ops/_amp_foreach_non_finite_check_and_unscale_native.h> #include <ATen/ops/_amp_update_scale_na...
e81497db971e6fb040f0061aea9bd94651c59f795e7b52a260ea41f28c624e9d
C++
1,177
25
//****************************************************************************************************************************************************** // Nlx2MatEV.cpp // Author: Kevin Iamiceli // Created March 15, 2003 // Version 3.00 //********************************************************************************...
bbf466f6e9dd5df1b77326d41defdc8da509f1276dee4f519409756dceb139ed
C++
1,178
25
//****************************************************************************************************************************************************** // Nlx2MatCSC.cpp // Author: Kevin Iamiceli // Created March 15, 2003 // Version 3.00 //*******************************************************************************...
ee463f48c55b602aa823dc3be45430a59ef70f65022e4259d8978a9320f90f58
C++
1,179
39
/*************************************************************************** * * 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...
0d1933fb8c10fa75e5d50477cbbc74f5e47b208ca24653562882f478afbb3efe
C++
1,195
38
#define TORCH_ASSERT_NO_OPERATORS #include <ATen/native/Normalization.h> #include <ATen/TensorIterator.h> #include <ATen/native/cpu/Loops.h> #include <ATen/cpu/vec/vec.h> #include <ATen/Dispatch.h> namespace at::native { namespace { void renorm_scale_factor_impl(TensorIteratorBase& iter, double maxnorm) { AT_DISP...
20e69fed4f603dc34c6803f22d2a21e849bd921bf497cc4c9ef8c99f484c04db
C++
1,196
40
/*************************************************************************** * * 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...
3f20c0b323ead886007c52eccab172e41e3cb9c72df749769fc5d4c531f6086b
C++
1,196
24
//****************************************************************************************************************************************************** // Nlx2MatSpike.cpp // Author: Kevin Iamiceli // Modified March 9, 2003 // Version 3.00 //*****************************************************************************...
fdccd6207cc7089d518c72097201983d162d4273eb26d1de0fa987737fe35064
C++
1,202
25
//****************************************************************************************************************************************************** // Nlx2MatEV.cpp // Author: Kevin Iamiceli // Created March 15, 2003 // Version 3.00 //***************************************************************************...
c2a56dd0ff629280c2b016cf659a2394b885b97c8b9cea2203376a348809751e
C++
1,203
25
//****************************************************************************************************************************************************** // Nlx2MatCSC.cpp // Author: Kevin Iamiceli // Created March 15, 2003 // Version 3.00 //**************************************************************************...
9069936c8321364f94abfa7b195db68e595bf5dad639fec1fbbcf74c4a1aaeb6
C++
1,207
40
/*************************************************************************** * * 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...
7e74444fe5ee420c54367bc2b67d8ce871b77ed077801b46d5ac49bf36374783
C++
1,210
40
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/native/TensorIterator.h> #include <ATen/native/cpu/Loops.h> #include <ATen/core/Tensor.h> #include <ATen/Dispatch.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/Functions.h> #else #include <ATen/ops/_empty_affine_quantized.h> #include <ATen/ops/_make_per_ten...
59895015c652be54ecbe707fc7298b82f8d16f696bb05812f241006e50817c7d
C++
1,211
36
#ifndef __AXI_DMA_PKG_PKG__ #define __AXI_DMA_PKG_PKG__ #include "stdio.h" #include "string.h" #include "cstdint" #include "inttypes.h" #include <cmath> namespace axi_parameters { // static const uint8_t BURST_SIZE = 61; // static const uint32_t BURST_VALUE_MASK = (uint32_t) ((uint32_t) (std::pow(2, BURST_SIZE)...
86d1d87c5346c476d385a5a385542720d845e2a6b3404725d93713c7363356b8
C++
1,211
60
#include "stringUtils.h" // In place string converstion functions void PascalToCString( axgchar *string ) { // First byte of pascal string contains string length short stringLength = string[0]; // Shift string left for ( short i = 0; i < stringLength; i++ ) string[i] = string[i+1]; // Append null byte st...
bf9e3e7f029d669b9f3cd9ca46864ba76fadc4a8c08e404b4ac0d221b5ecaf70
C++
1,211
40
/*************************************************************************** * * 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...
a44056450d3fbd8740618dcf6d6db9da30faccaa53fc63dc1d3f5a1c2366ec19
C++
1,216
41
/*************************************************************************** * * 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...
c73006d06973648109a99ab68378b8a22a1d459c265fbba7a8b1b1a6a5417067
C++
1,216
43
#include <ATen/native/mkldnn/OpContext.h> #if AT_MKLDNN_ENABLED() #include <ATen/native/mkldnn/ConvPrepack.h> namespace at::native::mkldnn { c10::intrusive_ptr<ConvOpContext> MkldnnConvOpContext::create_context( at::Tensor&& weight, std::optional<at::Tensor>&& bias, std::vector<int64_t>&& padding, st...
22ad228a03fcd196b5d384918160ea0f83442be258cb2e8e7dda689c160af505
C++
1,217
47
/*************************************************************************** * * 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...
7359246fc0cdf73f122d4c00d75f702977ae6010e4f45b8afd1fb93e0c4c8b4f
C++
1,217
41
/*************************************************************************** * * 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...
6651889b650ed8b43386753f74a79ed947d3fc75566850242071fccc675cbf09
C++
1,219
49
#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/_softmax_native.h> // for mkldnn_softmax #endif #if !AT_MKLDNN_ENABLED() namespace at::native { Tensor mkldnn_softmax(...
f833b666917c81122055e51cd1d31c2b3bd1c49cea3883e22d0d0b3fc6cb609d
C++
1,219
58
#include "symmetry.h" std::vector<gravis::d4Matrix> Symmetry::getPointGroupMatrices( std::string symmGroup) { SymList SL; SL.read_sym_file(symmGroup); const int sc = SL.SymsNo(); std::vector<gravis::d4Matrix> R(sc); for (int isym = 0; isym < sc; isym++) { Matrix2D<RFLOAT> L0, R0; SL.get_matrices(is...
03f74d9351df40e5b388395f1f224508bae9a7e9b037a021aeedc2881a2be1b3
C++
1,220
42
/*************************************************************************** * * 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...
fd3ea1586e135574b8ce2ea6df22dbbe19ba0a5d9435d7cfb8465e50af0dd423
C++
1,220
24
//****************************************************************************************************************************************************** // Nlx2MatSpike.cpp // Author: Kevin Iamiceli // Modified March 9, 2003 // Version 3.00 //************************************************************************...
105c87905718bd7d6c33f6e3749a6c4e2495246e1372fa7bf6f2e7b92329dbaf
C++
1,221
62
#include "closest_spline_point_problem.h" using namespace gravis; ClosestSplinePointProblem::ClosestSplinePointProblem( const Spline<d2Vector,double> &spline2D, d2Vector pos ) : spline2D(spline2D), pos(pos) {} double ClosestSplinePointProblem::f(const std::vector<double> &x, void *tempStorage) const { return ...
61ad95ba9b8303a78c9cee2279c0e903dc384a266a5b779002936d1c916599a5
C++
1,223
41
/*************************************************************************** * * 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...
28db6a255076ac7f17c7fb58d9936689640de94d015ddcbebabb90a6add5ddb4
C++
1,225
43
/*************************************************************************** * * 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 ...
100cd3b48bf36832c6318ad12d6e0e040872befe8b7574454108192024c20f56
C++
1,226
29
//****************************************************************************************************************************************************** // Nlx2MatVT.cpp // Author: Kevin Iamiceli // Created Sept 15, 2003 // Version 2.00 //*********************************************************************************...
44192fb8034f225167acc9afe27cb4d022d6e66687ce6b9122c4a59486d3c093
C++
1,231
43
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/EmptyTensor.h> #include <ATen/core/Tensor.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/NativeFunctions.h> #else #include <ATen/ops/empty_native.h> #include <ATen/ops/empty_strided_native.h> #endif namespace at::native { Tensor empty_meta_symint( SymInt...
f3c80e61a5c1d1b81169f084b2635b3f24e5871d7e6880ff5494af28283edf2f
C++
1,234
41
/*************************************************************************** * * 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...
3e7faea6d224636552b3915206ca80833d9501070f7e2ee836a01c1d00d008e7
C++
1,240
40
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/NativeFunctions.h> #include <ATen/CUDAFunctions.h> #else #include <ATen/ops/eq_cuda_dispatch.h> #include <ATen/ops/equal_native.h> #endif namespace at::native { bool cuda_equal(const Tensor& self, ...
30e7f5a26ed4c1e7be92f6a652ea712999596c3b808d15017eed8cd45524faeb
C++
1,249
42
/*************************************************************************** * * 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 * ...
b5034a76365068e5012353bd9205898b8c293399539faa6c034d834b92a26ff8
C++
1,250
45
/*************************************************************************** * * 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...
ca13e4503dfd298d9695507a90240569bedc84c629aa1c3b3734ed777d0e97d2
C++
1,255
29
//****************************************************************************************************************************************************** // Nlx2MatVT.cpp // Author: Kevin Iamiceli // Created Sept 15, 2003 // Version 2.00 //****************************************************************************...
a62b58d49a2bc2b1d7a784edce405f7dfa5d0a49bede3a309b828af06f77ef20
C++
1,261
45
/*************************************************************************** * * 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 * ...
a643038f8e03069d284bd8ccaef12d2a546e1f834cc31070a6316853c09ad65b
C++
1,261
42
/*************************************************************************** * * 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...
7e50e3edcca2ad37a6ca8c407eb3f36258a7302ddfc07799e1385585990602f3
C++
1,272
59
#include "membrane_template.h" #include <src/jaz/image/interpolation.h> MembraneTemplate::MembraneTemplate( double spacing, double inside_level, double inside_halo_level, double membrane_level, double centre_level, double outside_halo_level, double outside_level ) : d(spacing/2.0), spacing(spacin...
275f572c4dda8ed448a09c1f2b2829caeb8f0ba1f10fcc61cb8e2ca4804d9548
C++
1,285
36
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #include <ATen/core/ivalue.h> #include <torch/library.h> #include <ATen/native/quantized/cpu/QuantizedOps.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/Functions.h> #else #include <ATen/ops/_empty_affine_quantized.h> #endif namespace at::nat...
fd1ec924bd305256bc6f2c2b1d85adda95be34afedc2c1968cee60047e12eebc
C++
1,285
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...
333ba7c765c27f2f3609f6535571e11d153a56a40ae708f9d69e253d2afe5ac8
C++
1,293
48
/* * 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 <qnnpack/u8lut32norm.h> #include "lut-norm-microkernel-tester.h" ...
c0867d1adbfc7b0924c6ddea929b888a78836927c5fc5be116a6a2bee57a7101
C++
1,295
70
#include "zs_axi_dma_lib.hpp" #include <vector> #include "stdio.h" #define TEST_SIZE 1023 #define NUM_TESTS 1 #define NUMCONV 64 #define KERNEL_SIZE 7 int file2array(const char * filename, int32_t * kernel_weights); int file2array(const char * filename, int32_t * kernel_weights) { FILE* file = fopen(filename, "r...
aacd852ae0341a1408a7dbed5643819837c4627727ce70a609dcb0a7d378bb37
C++
1,305
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...
53b0b4f16723ab06bb7cda18284737b209651fd336f94f2b3e68c83c1d8b1d7d
C++
1,309
36
#include <src/args.h> #include <src/jaz/tomography/programs/find_lattice.h> int main(int argc, char *argv[]) { IOParser parser; FindLatticeProgram flp; parser.setCommandLine(argc, argv); int gen_section = parser.addSection("General options"); flp.tomoFn = parser.getOption("--t", "Tomogram"); flp.spacing_ang...
d630cfe2b1655e444c8d0c1d176149c3b1875642f52afbad75e51fd965208cc9
C++
1,311
32
#include "gcmi_mex_adapter_utils.hpp" #include <vector> class MexFunction : public gcmi::MexAdapterBase { public: void operator()(matlab::mex::ArgumentList outputs, matlab::mex::ArgumentList inputs) override { if (inputs.size() != 1 || outputs.size() > 1) { fail("gcmi_cpp_blas_probe:usage", "g...
e9c90bc83cdcd8cf413b6747fe587a8b68d6aee97d5166019426defc422f365e
C++
1,311
45
/*************************************************************************** * * 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...
fd9a7bb7ad57c01c9678e8a382b8307c79fd69216439c1850aed55ee0416991f
C++
1,323
42
#include "../libstfio/channel.h" #include <gtest/gtest.h> TEST(Channel_test, constructors) { Channel ch0; EXPECT_EQ( ch0.size(), 0 ); Section sec(32768); Channel ch1(sec); EXPECT_EQ( ch1.size(), 1 ); EXPECT_EQ( ch1[0].size(), 32768 ); std::deque<Section> sec_list(16, Section(32768)); ...
bded598128f4f4b609a8ee8089ec4337252d4f1f7c70a3dee7986586a17bb922
C++
1,330
51
/*************************************************************************** * * 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...
a6012d5b75059fba8cd7d561a04d3139ef131a644a4f9813effa95b0fbf82b23
C++
1,348
47
/*************************************************************************** * * 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 * ...
d85740fef45d59930e530025fe7e97b8c1707f3f6a4a5420b041422ea926c3fd
C++
1,348
29
#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() != 6 || outputs.size() > 1) { fail("info_cd_slice_cpp:us...
7640b631ce242f354c8ceb4e90863e516a5a507c44cd4f3329a02707bd122ff6
C++
1,351
53
/*************************************************************************** * * 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...