sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
aa69b1f1972fee34ed4380223a452073394fa589a07cadee4fa3cb5ea1f45f4c
C/C++
1,444
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...
ace153743ea286603c7f3371ff31cb49ef83ca9d1ec36ae600af0d5f6ceb1a3b
C/C++
1,450
47
//******************************************************************************************************************** // Processor.h //******************************************************************************************************************** #include "FileDataBucket.h" #include "GeneralOperations.h" const ...
221719c9cc7fbc82b3062968c508ff94335b53c22d5f3db668caa85cdcd020fd
C/C++
1,454
42
/* * Copyright (c) Facebook, Inc. and its affiliates. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <stddef.h> #include <stdint.h> #include <qnnpack/common.h> #include <qnnpack/...
fdbfa46e66253ef86f5226fab53e35e63ae9c7958b68ec2b40fce306befa621e
C/C++
1,454
57
#pragma once #include <ATen/core/Generator.h> #include <ATen/detail/AcceleratorHooksInterface.h> #include <c10/core/Allocator.h> #include <c10/core/Device.h> #include <c10/util/Registry.h> namespace at { struct TORCH_API HPUHooksInterface : AcceleratorHooksInterface { ~HPUHooksInterface() override = default; v...
de7c538add64122944e5f5c3a491289b04964b14f7d61473918ffac42a6db1d2
C/C++
1,457
62
/*************************************************************************** * * 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...
990ed26d375b986f01bd6071176ba44f92e3eac9c19e48ec983e3a03621d6041
C/C++
1,459
43
//******************************************************************************************************************** // Processor.h //******************************************************************************************************************** #include "FileDataBucket.h" #include "GeneralOperations.h" c...
98294279dae51d2e2c6fc5724ea2455c4b18acfb4afa2226c093589ac28ed20f
C/C++
1,461
46
#pragma once #include <ATen/native/DispatchStub.h> #include <ATen/OpMathType.h> #include <ATen/TensorIterator.h> #include <c10/core/Scalar.h> namespace at::native { template <typename scalar_t> C10_HOST_DEVICE C10_ALWAYS_INLINE bool is_lerp_weight_small(scalar_t weight) { return std::abs(weight) < scalar_t(0.5); }...
a71a4d836c61d7032da96b115ec66a09812745a5f919fbe38cc0601c6ebac1bf
C/C++
1,462
49
/*************************************************************************** * * 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...
ee8bae9e090e9269df56a5a91bd7552626c8f177e7c174701de963f06534c48c
C/C++
1,467
52
/*************************************************************************** * * 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...
49351c6fbf2b9172176c7af330db65e8278ee68c0ef7b383258df481cae87811
C/C++
1,468
42
/*************************************************************************** * * 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...
a47aabb20f98b6f016136d663ad487d25078ace7fc26938a83153674fe743642
C/C++
1,469
63
#ifndef MPSCNNTests_h #define MPSCNNTests_h bool test_synchronization(); bool test_copy_nchw_to_metal(); bool test_conv2d(); bool test_depthwiseConv(); bool test_max_pool2d(); bool test_max_pool2d_ceil(); bool test_max_pool2d_padding(); bool test_relu(); bool test_addmm(); bool test_add(); bool test_add_broadcast(); b...
8ef6026afe38cc305a6b059a88184ef0be8a661a6a0fc22efaaf2357e321b8e4
C/C++
1,485
58
// 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...
9508e489c852fb48545bc5d36ceb934e4b81853d9456e3d1585bb51036e3ebd0
C/C++
1,488
39
/*************************************************************************** * * 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...
9227c5ed2a91261b3a5c1685e385d70ec3d37affc8bdedd26bedd0fd65ad6c66
C/C++
1,492
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...
85d88b02f2896e04a68afb779d67327e7b52e28d4fbd4e098baa12759a0de59d
C/C++
1,493
45
#pragma once #include <c10/macros/Export.h> #include <c10/core/ScalarType.h> namespace at::native { // Quantize a float value into a uint value given scale and zero_point template <typename T> TORCH_API T quantize_val(double scale, int64_t zero_point, float value); // TODO combine this with quantize_val once the nume...
0785583937907607bb496ccead753891eef06923c3a7f934dc1268bd9f0d77a4
C/C++
1,496
43
#pragma once #include <c10/core/SafePyObject.h> #include <c10/macros/Macros.h> namespace at::impl { enum TorchFunctionDisabledState { ENABLED, SUBCLASSES_DISABLED, ALL_DISABLED }; struct TORCH_API PythonTorchFunctionTLS { static void set_disabled_state(TorchFunctionDisabledState disabled_state_); static TorchFu...
63c08082ffc7cd6a9727ec2fd1c09d60422a969b931265ff397427c80b573dc2
C/C++
1,497
47
//******************************************************************************************************************** // Processor.h //******************************************************************************************************************** #include "FileDataBucket.h" #include "GeneralOperations.h" ...
5fc7c5a05c3f2c0c2ceff1f0e64d403e54afbeed376a1059846610fd0a5fbe2f
C/C++
1,506
38
#pragma once #include <c10/macros/Macros.h> #include <string> #define JITERATOR_HOST_DEVICE C10_HOST_DEVICE #if defined(_MSC_VER) && defined(__CUDACC__) // NVRTC on Windows errors if __host__ __device__ attribute is // present on kernel. // error: attribute "__host__" does not apply here // error: attribute "__device_...
2e8d1cca6dd483cb75d3c73964ff4412f4d8173291b6a2123abe480dadaf77fd
C/C++
1,518
56
#pragma once #include <ATen/native/DispatchStub.h> namespace c10 { class Scalar; } namespace at { class Tensor; struct TensorIterator; struct TensorIteratorBase; } // namespace at namespace at::native { using reduce_minmax_fn = void (*)(Tensor&, Tensor&, const Tensor&, int64_t, bool); using structured_reduce_m...
d68be6c8fb439279c90ff7587fb438242d0e75f839baea189a9f05e2ba57b14b
C/C++
1,523
49
/*************************************************************************** * * 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...
ee876b3442205dff8dec0409984f1db1882b34abdd89a4da5b791740520c890a
C/C++
1,527
49
#pragma once #include <ATen/core/Generator.h> #include <ATen/core/MT19937RNGEngine.h> #include <c10/core/GeneratorImpl.h> #include <optional> namespace at { struct TORCH_API CPUGeneratorImpl : public c10::GeneratorImpl { // Constructors CPUGeneratorImpl(uint64_t seed_in = default_rng_seed_val); ~CPUGeneratorIm...
c4d23af4847d296ac10e5ce9e6ef1c388944b9cc619383f845e6c0fdd4ee1494
C/C++
1,532
34
/* * Copyright (C) 1993 Bernd Feige * This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING). */ /* * optimize.h defines memory structures that should be able to contain * whatever is necessary to optimize (find zeros, min values...) an * n-dimensional function without interfering with possi...
b23d1650a0ab7e367705298784ccf55d10af25f443e9c8ab442c2919533c6339
C/C++
1,535
37
#pragma once #include <limits> #include <c10/util/Exception.h> namespace at::cuda::detail { // CUDA: grid stride looping // // int64_t _i_n_d_e_x specifically prevents overflow in the loop increment. // If input.numel() < INT_MAX, _i_n_d_e_x < INT_MAX, except after the final // iteration of the loop where _i_n_d_e_x...
8282770d71926334551c5d89cf4046b9f87e953ea1359d4ce2d4f4839895d129
C/C++
1,549
68
/* * Copyright (c) Facebook, Inc. and its affiliates. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <algorithm> #include <cassert> #include <cstddef> #include <cstdlib> #include ...
14f9ddec4b3ede2e9d9bed4112c53610b50cdf10b654374c230a2847bc7d843b
C/C++
1,551
48
//****************************************************************************************************************************************************** // Processor.h // Author: Kevin Iamiceli // Modified March 9, 2003 // Version 3.00 //**********************************************************************************...
b12664f15967ad54097d6a77650f71a357b40eb8b857ffa5b2b5ca8c288747a5
C/C++
1,555
37
// 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...
d5fc15f81da296f685c4f979f9e840dce30c553cb3fe74c12c6c508eccff2fe7
C/C++
1,557
54
#pragma once #include <ATen/Config.h> #include <ATen/Tensor.h> #include <ATen/core/List.h> #if AT_MKLDNN_ENABLED() namespace at::native::xpu { C10_API Tensor convolution_pointwise( const Tensor& input_t, const Tensor& weight_t, const std::optional<Tensor>& bias_opt, IntArrayRef padding, IntArrayR...
fb6f6324b3863b241bde8100f530b954426283e20d060262600a21d46a54597d
C/C++
1,560
38
#pragma once #include <ATen/functorch/Interpreter.h> namespace at::functorch { // These are the interpreters for our AD transforms // (grad, vjp and jvp). // See NOTE: [functorch interpreter stack] for more details. struct TORCH_API GradInterpreterPtr { explicit GradInterpreterPtr(const Interpreter* base): base_(b...
441469c2b1525f607f0faebea18788fbaa0c8c2d650f78c30985e69942c3d4b1
C/C++
1,562
61
// Copyright © 2022 Apple Inc. #pragma once #include <ATen/core/Generator.h> #include <ATen/core/PhiloxRNGEngine.h> #include <c10/core/GeneratorImpl.h> #include <optional> namespace at { namespace mps::detail { constexpr uint32_t PHILOX_STATE_N = 7; struct rng_data_pod { std::array<uint32_t, PHILOX_STATE_N> stat...
43084be3fb89dcd9da4ef5dca010e96be5c2c277aff48558cc6177c96936478f
C/C++
1,569
54
#ifndef RELION_H_ #define RELION_H_ //This is a main header - it includes everything else. #include <external/Healpix_2.15a/arr.h> #include <external/Healpix_2.15a/cxxutils.h> #include <external/Healpix_2.15a/datatypes.h> #include <external/Healpix_2.15a/geom_utils.h> #include <external/Healpix_2.15a/healpix_base.h> ...
4468345acf2b3c53b5af43921ec887e40e44178ed9c288dadd91e6206c0f181d
C/C++
1,573
57
//******************************************************************************************************************** // Nlx2MatSpikeInclude.h //******************************************************************************************************************** //#include "mex.h" //#include <afx.h> //#include <vector>...
1458c00aeac3362cc94147d76ce1de35d0afed56e9a8f1a577ea27fb95398808
C/C++
1,577
52
#ifndef LEGACY_OBS_MODEL_H #define LEGACY_OBS_MODEL_H #include <src/image.h> #include <src/fftw.h> #include <src/complex.h> #include <src/metadata_table.h> #include <src/projector.h> class BackProjector; class LegacyObservationModel { public: LegacyObservationModel(); LegacyObservationModel(doub...
d65759b56d6f7a4329d13cdb560f003cefe7ef73c054ecc1428e8e8ca6f4a1cd
C/C++
1,584
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...
eed7f28f11c357eaf509773248ff28545eb66c35dac50c9b3b4390026322a7f7
C/C++
1,587
62
#ifndef TILE_CTF_COST_H #define TILE_CTF_COST_H #include <src/jaz/image/buffered_image.h> #include "spectral_ctf_cost.h" class TileCtfCost : public DifferentiableOptimization { public: /*typedef enum { PerFrame = 0, PerTile = 1 } Mode; typedef enum { Defocus = 0, Astigmati...
0bb2db863d322a64978b2b3b588363a8a2e4595947f316b7a1440635127e541e
C/C++
1,595
75
/* * Copyright (c) Meta Platforms, Inc. and 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. */ // work around CK assuming only a single FP8 interpretation at a time #if defined(__gfx942__) && __...
2c08b8ecf6e924652fa12dd339b340cc0de6ce429b442b3c980d175ae4cf2413
C/C++
1,595
53
#pragma once #include <ATen/Tensor.h> #include <c10/core/Scalar.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/Functions.h> #else #include <ATen/ops/scalar_tensor.h> #endif namespace at::detail { // When filling a number to 1-element CPU tensor, we want to skip // everything but manipulate data ptr directly. // I...
486788aeb0870df6fc1c4268fddf65af9e849edce73d05996436603f88889194
C/C++
1,599
48
//****************************************************************************************************************************************************** // Processor.h // Author: Kevin Iamiceli // Modified March 9, 2003 // Version 3.00 //*****************************************************************************...
dd180012e85ccd751a54bd57dd481b33162231f237fc1a93a4d17be3d90184c7
C/C++
1,607
50
#ifndef BP_KERNELS_H_ #define BP_KERNELS_H_ #include "src/acc/acc_backprojector.h" namespace syclKernels { template <bool CTF_PREMULTIPLIED, bool SGD> #ifndef __INTEL_COMPILER __attribute__((always_inline)) #endif inline void backproject2D( unsigned long imageCount, int block_size, AccProjectorKernel &projector,...
20e1859f25bc05064195751f9d5762bf5f4ea5decafbede6537532c6e9631f2a
C/C++
1,617
67
#ifndef COLOR_HELPER_H #define COLOR_HELPER_H #include <src/jaz/gravis/tRGB.h> #include <src/image.h> #include "raw_image.h" class ColorHelper { public: static gravis::dRGB signedToRedBlue(double d, double scale = 1.0, double rbFract = 0.333); static void writeAngleToPNG(const Image<RFLOAT>& img, std::stri...
488087cd0c41a84fb62b01eb7fdcfa3447a5ce9198d8700751d36f67f102864c
C/C++
1,619
46
// 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 useful, ...
c830d87eb01f295f012ff08c7b5626384339970401f6e1c2a82e61cd80a5f792
C/C++
1,630
57
//******************************************************************************************************************** // Nlx2MatSpikeInclude.h //******************************************************************************************************************** //#include "mex.h" //#include <afx.h> //#include <ve...
ef8a80b6a5feb2c9920b8574cde521dd611c456bba29f15db33261d61231ebf0
C/C++
1,631
58
//******************************************************************************************************************** // Nlx2MatSpikeInclude.h //******************************************************************************************************************** #include "mex.h" #include <vector> #include "Nlx_Error.h...
9eb78cc3bf7466c7f259ef274721da18f738ea2bb66b786d2c4df8e9b806f7d6
C/C++
1,641
49
#pragma once #include <ATen/miopen/miopen-wrapper.h> #include <string> #include <stdexcept> #include <sstream> namespace at { namespace native { class miopen_exception : public std::runtime_error { public: miopenStatus_t status; miopen_exception(miopenStatus_t status, const char* msg) : std::runtime_error(...
0508b6acb26eb7aab7a5a77700715233ff0b14c21fc0964e9bd285cfac4808fd
C/C++
1,649
69
#pragma once #include <ATen/native/DispatchStub.h> namespace c10 { class Scalar; } namespace at { struct TensorIterator; struct TensorIteratorBase; namespace native { #if defined(__CUDACC__) || defined(__HIPCC__) #define HOST_DEVICE __host__ __device__ #else #define HOST_DEVICE #endif // integral power in pytorc...
0eb83b268743acd109dc61aacd256b0be20b7acd28879ca9fe3380d966c374f6
C/C++
1,650
52
#pragma once #include <ATen/core/Tensor.h> #include <ATen/TensorOperators.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/Functions.h> #else #include <ATen/ops/empty.h> #include <ATen/ops/empty_like.h> #endif namespace at::native { template < typename index_t, void compute(const index_t*, const int64_t*, ...
eac742626497d09602aaafbc9fd8df367b773e40c39821a416263afea43ce7dd
C/C++
1,650
91
#ifndef IMG_CUTTING_H #define IMG_CUTTING_H #include "buffered_image.h" class Cutting { public: template <class T> static void extract2D( const RawImage<T>& src, BufferedImage<T>& dest, long int x0, long int y0, long int w, long int h); template <class T> static BufferedImage<T> extra...
f991e2a6f74787286176fbf929ec2bfaf7293f0e6e810c1a6c3229655bd2ea04
C/C++
1,652
86
// Original TunableOp is from onnxruntime. // https://github.com/microsoft/onnxruntime/blob/main/onnxruntime/core/framework/tunable.h // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. // // Adapting TunableOp into PyTorch // Copyright (c) Advanced Micro Devices, Inc. // #pragma once #include <...
f22d20bb9dc18aadb77363d2431bec66b6f8a2b0dc162dbf1553ec4c341e9f9b
C/C++
1,656
42
#pragma once #include <ATen/core/operator_name.h> #include <c10/macros/Export.h> namespace at::impl { // C++-side copy of the Python decomp/meta/prims/op_impl registries // these are updated at Python registration sites // // The tables are kept in sync by hooks at the Python registration sites, which // call fakeDi...
163da2c128eb1566f0913c7c53330be56d8ffa95a37e6aeb7e1bcc65f1a6e762
C/C++
1,658
46
#pragma once #include <c10/metal/common.h> #ifndef __METAL_VERSION__ #include <ATen/native/UpSample.h> #include <initializer_list> #include <optional> #endif template <unsigned N = 5> struct UpsampleParams { ::c10::metal::array<int64_t, N> input_strides; ::c10::metal::array<int64_t, N> input_sizes; ::c10::metal...
58a7bfce67986dee113fe3cf146fb0521243789530374ef6d2aa4706ee65e2d6
C/C++
1,658
56
/*************************************************************************** * * 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...
8f5dbe3fc4270e6b51ce315c851ec466a2ddfeb79fa7b58ab785bbcc4b54a911
C/C++
1,658
47
// 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...
4d6741e9c5f14774fb20bdae6eafb164bb0eab94eb27842a44b61dd07670ed31
C/C++
1,663
57
#pragma once #include <ATen/EmptyTensor.h> #include <ATen/native/ResizeCommon.h> #include <c10/cuda/CUDAGuard.h> namespace at::native { TORCH_CUDA_CPP_API void resize_bytes_cuda(StorageImpl* storage, size_t size_bytes); TORCH_CUDA_CPP_API void resize_bytes_cuda_with_addr( StorageImpl* storage, size_t size_b...
e1419ad39a1a3721c4a82e104ee76fed9ae96e8f22015d95ce8836e7c63d7824
C/C++
1,667
64
#pragma once #if defined(CPU_CAPABILITY_AVX512) #include <ATen/cpu/vec/vec512/vec512.h> #else #include <ATen/cpu/vec/vec128/vec128.h> #include <ATen/cpu/vec/vec256/vec256.h> #endif #if ( \ defined(CPU_CAPABILITY_AVX512) || defined(CPU_CAPABILITY_AVX2...
395ed25d5a9ae6e071ea1fdbbc35c19ba628be49ec1faff8669e4c6ccdfd37b1
C/C++
1,671
52
#ifndef PYTORCH_MOBILE_METAL_DEVICE_H_ #define PYTORCH_MOBILE_METAL_DEVICE_H_ #include <c10/macros/Macros.h> C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wdeprecated-declarations") #import <Metal/Metal.h> C10_DIAGNOSTIC_POP() #include <string> namespace at::native::metal { struct MetalDeviceInfo { std::string na...
fbf777360fe791f6b8edd1a1f88e49602cc9d2e853e86374d1e27d17a8d2705d
C/C++
1,681
47
/*************************************************************************** * * 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...
46a726a2739d2ce575d11cec39614f60dcc59228deba34be388be5c4093ea936
C/C++
1,682
51
#pragma once #include <ATen/Tensor.h> #include <ATen/Config.h> namespace at::native { class QLinearOnednn final { public: TORCH_API static Tensor run_pointwise_tensor( Tensor act, // int8 CPU tensor, not QTensor Tensor act_scale, Tensor act_zero_point, Tensor onednn_weight, // int8 tensor f...
56bfda86345b8707066de467850c2e7e0b07dc2a0cdefb796d0046dd1c385dbb
C/C++
1,686
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. */ #pragma once #include <stddef.h> #include <stdint.h> #include <qnnpack/common.h> #include <qnnpack/...
d351f4f3d3cd4352df6f541e8f3d0bf493edb001c631785b9b4a19b718fe1287
C/C++
1,689
58
//******************************************************************************************************************** // Nlx2MatSpikeInclude.h //******************************************************************************************************************** #include "mex.h" #include <vector> #include "Nlx_E...
58ebd88ec68b858f9bec6f5a26969b21065f3c4537ce003ec37a5043f1df6ab8
C/C++
1,691
59
#ifndef LOCAL_PARTICLE_REFINEMENT_H #define LOCAL_PARTICLE_REFINEMENT_H #include <src/jaz/optimization/optimization.h> #include <src/jaz/tomography/particle_set.h> #include <src/jaz/tomography/tomogram.h> #include <src/jaz/tomography/reference_map.h> #include <src/jaz/optics/aberrations_cache.h> class LocalParticleR...
038711093aea40b9d086f8674178d82589b7464a0565cfd7d2b1d69277f0e1fb
C/C++
1,703
41
#pragma once #include <ATen/native/DispatchStub.h> #include <c10/util/ArrayRef.h> namespace at { class Tensor; class TensorBase; struct TensorIterator; struct TensorIteratorBase; } namespace c10 { class Scalar; } namespace at::native { using index_fn = void(*)(TensorIteratorBase &, IntArrayRef indexed_sizes, IntArr...
c7b93372cd8cfbc7538d73b2fd351034b000213ec0093affda1b8fb9b2deb88b
C/C++
1,717
49
/*************************************************************************** * * 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...
1400d26f599b9c1f2dbe642cbc4b9208ea47b76df6bd3ea401152cc8dc89185f
C/C++
1,719
49
/*************************************************************************** * * 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...
321773781f78eb0d937f4f968ee8bcdfddbc9be305067f1d56acbda4054006ff
C/C++
1,726
69
#pragma once #include <ATen/cpu/vec/intrinsics.h> #include <ATen/cpu/vec/vec_base.h> #include <ATen/cpu/vec/vec_mask.h> namespace at::vec { inline namespace CPU_CAPABILITY { #if defined(CPU_CAPABILITY_VSX) template <int N> struct VecMaskCast<int, N, float, N> { static inline VecMask<int, N> apply(const VecMask<fl...
1239c45a7268b4dcdf5b2ac53090455c4c6ce1f8111d7158f1da5877f7472ccd
C/C++
1,730
51
#pragma once #include <ATen/core/Tensor.h> #include <ATen/native/TensorFactories.h> #include <c10/util/irange.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/NativeFunctions.h> #else #include <ATen/ops/empty.h> #endif namespace at::native { template <typename T> inline T storage_size_for(ArrayRef<T> size, ArrayRe...
616cf93664f0746b4d681987ac6420b5f67643b5566356c76c53ca31bc13b23b
C/C++
1,733
49
/* * Copyright (C) 1996-2000,2003,2007,2013,2022 Bernd Feige * This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING). */ #ifndef _GROWING_BUF_H #define _GROWING_BUF_H #ifndef Bool #define Bool int #endif #ifndef TRUE #define TRUE 1 #endif #ifndef FALSE #define FALSE 0 #endif typedef struct {...
6c3f9f9a5cfbfd0237d6128d4df441eaa1648b3f5ce5d5232467e0bc927cd4c8
C/C++
1,736
79
#ifndef NO_DEFORMATION_MODEL_H #define NO_DEFORMATION_MODEL_H #include <src/jaz/gravis/t2Vector.h> class No2DDeformationModel { public: inline int getParameterCount() const; inline void computeShiftAndGradient( const gravis::d2Vector& pl, const double* parameters, gravis::d2Vector& def, gravi...
faaabe548d41c15f6657273da7e98de7834549dc0541e35c8e72450626511db4
C/C++
1,737
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. */ #pragma once #include <limits.h> #include <stdint.h> /* * The code below is adapted from Google's ...
f7f8fdeb61d025ba565617ea9db70f9980f73d8915e31625cf69d51853ae4a75
C/C++
1,742
47
// 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...
ea7610a5d4e62cf651e5e0628ba4ed76b38027148dae96f5cb38b2d4b913b8b6
C/C++
1,745
69
/****************************************************************************** ** Title: Raw array in and output ** Description: Input/Output for tArrays. ** ** Author: Brian Amberg, 2006 ** Computer Science Department, University Basel (CH) ** ***************************************...
1c2720891e0e481a7d63263351b31afaee67e9ffcd0cb9f009b07fbaeadc3173
C/C++
1,748
60
/*************************************************************************** * * 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...
4f2c9c411c3c2df9fd0ff91abc2e66288a1ee0466c67fea6d7ddef4c7ff07a02
C/C++
1,753
72
#ifndef FILAMENT_H #define FILAMENT_H #include <src/jaz/math/spline.h> #include <src/jaz/gravis/t3Vector.h> #include <src/jaz/gravis/t4Matrix.h> #include <src/jaz/image/buffered_image.h> #include <map> #include <vector> #include "filament_mapping.h" class Filament { public: static void computeArcLength( ...
3c43fa19331ecda1e62bc58d3ac7738744d64f74f22307bbbe9bc9933e04fec1
C/C++
1,756
57
c c valuator values c integer MOUSEX, MOUSEY parameter(MOUSEX = 1, MOUSEY = 2) c c keyboard and mouse buttons c integer AKEY, BKEY, CKEY, DKEY, EKEY, FKEY, GKEY, HKEY integer IKEY, JKEY, KKEY, LKEY, MKEY, NKEY, OKEY, PKEY integer QKEY, RKEY, SKEY, TKEY, UKEY, VKEY, WKEY, XKEY integer YKEY, ZKEY integer ZEROKE...
d0681b1b10191536275c593ba0d555b6e739e94c48f6fb092f8a92f60331c6bc
C/C++
1,761
48
// 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...
7d9b1660dac4c17d2fdd7fd00d434c2f09e70e58b45f0fada99e333f179735d0
C/C++
1,764
104
/* * devices */ #ifndef VOGL #define VOGL #endif /* * valuator values */ #define MOUSEX 1 #define MOUSEY 2 /* * keyboard */ #define AKEY 'A' #define BKEY 'B' #define CKEY 'C' #define DKEY 'D' #define EKEY 'E' #define FKEY 'F' #define GKEY 'G' #define HKEY 'H' #define IKEY 'I' #define JKEY 'J' #defi...
e91756071e147717cf71233cde20ca3693070858bfeaa58c4b955975c1a13a31
C/C++
1,764
49
/*************************************************************************** * * 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...
b9831b28f397eb6f0007f5822660699169caf41b15fc70ca0e344d0e04f23049
C/C++
1,766
54
/* FILE graph.h */ /* Variables used for graphing. See also _tek library */ #include "defs.h" #include "_plot/plot.h" /* ******************************************************************** */ int Set_LineType(int type); void GraphPrintf(char *format, ...); int Get_x_offset(void); void Set_x_offset(int x); flo...
068e92690194247cded582c6160a9f55b081d08b666ab1e7985dfabe60b8ecfa
C/C++
1,776
79
#pragma once #include <c10/core/ScalarType.h> #include <c10/util/BFloat16.h> #include <c10/util/Exception.h> #include <c10/util/Float8_e4m3fn.h> #include <c10/util/Float8_e4m3fnuz.h> #include <c10/util/Float8_e5m2.h> #include <c10/util/Float8_e5m2fnuz.h> #include <c10/util/Half.h> #include <torch/headeronly/core/Dispa...
2882f63ac619127d39d24ca19eee5fefa1e55a066ff790a0a8c82f98c741d8ef
C/C++
1,781
64
#pragma once #include <ATen/core/GraphImplInterface.h> namespace at::accelerator { struct TORCH_API Graph { Graph(bool keep_graph = false); ~Graph() = default; C10_DISABLE_COPY_AND_ASSIGN(Graph); // Begin graph capture on the current device and stream. Different accelerator // backends may support differe...
3cbf51a83854694cec64c6d4eb833923668f99a5841268bf11836aa61ec5c607
C/C++
1,787
67
#pragma once #include <ATen/core/Tensor.h> #include <ATen/Dispatch.h> #include <ATen/native/DispatchStub.h> namespace at { struct TensorIterator; namespace native { using fake_quant_tensor_cachemask_fn = void (*)( Tensor& output, Tensor& mask, const Tensor& input, float sc, int64_t z_point, ...
19b351784170a76d0d7278cfff0c90b781ab0df598281ffea37a5b36bcf12cc5
C/C++
1,792
63
#ifndef SPIKE_COLLECTOR_H #define SPIKE_COLLECTOR_H #include <vector> #include <string> #include <thread> #include <atomic> #include <zmq.hpp> #include <sys/socket.h> #include <sys/un.h> #include <poll.h> #include <iostream> #include <cstring> #include <unistd.h> #include <fcntl.h> #include <chrono> #include <thread> ...
46eba24512835bef1ad76671253720239e4c9124767e0497ab00e6e0e095bdda
C/C++
1,807
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...
e339970b63fef8770acac68b0bcd8e28703128bc054dee333b97c569bfb0f0ed
C/C++
1,810
52
#pragma once #include <ATen/detail/FunctionTraits.h> #include <ATen/native/TensorIterator.h> #include <c10/core/ScalarType.h> #include <complex> #include <type_traits> // This file includes utilities for dynamic_casting done by TensorIterator, see // CUDALoops.cuh and Loops.h. // dynamic_casting handles when the typ...
d9c427bb4ff91db9806b302cd168b8b3b18ccf0712176e7abe0d3aa636422f74
C/C++
1,814
58
#pragma once #include <ATen/FunctionalStorageImpl.h> namespace at::functionalization { // `ViewMeta` implementation for `resize_` operation. struct TORCH_API resize__ViewMeta : public ViewMeta { FUNCTIONALIZATION_VIEWMETA_NAME(resize__ViewMeta) FUNCTIONALIZATION_VIEWMETA_SERIALIZABLE_TUPLE( bool /* reapply...
d5187f4a5d2bd1438ca70cdc97afcfd461095c1800b481ab6bac44e6dfc1ebda
C/C++
1,816
46
#pragma once #include <c10/macros/Macros.h> #include <memory> namespace at::functorch { // NOTE [functorch TLS in pytorch/pytorch] // // functorch lives out-of-tree. However, it has some TLS that needs to be // propagated. The solution for that is we store a pointer to the TLS // inside pytorch/pytorch and extend Fu...
68d692f85ffcc0d3fb842341540e03f2ff7906678820bb2bd4d1644cf143baf4
C/C++
1,827
43
/* * Copyright (C) 1993,1994 Bernd Feige * This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING). */ #ifndef _BIOMAG_H #define _BIOMAG_H #include <transform.h> #include <array.h> #include <optimize.h> #define SENSOR_CURVATURE 12.0 /* Curvature of sensor array in cm; used only as starting valu...
b8da8cea8ffac6fdf1f0463de36c1688f1d20c795d18474ea7f3aac3db0cfda7
C/C++
1,827
67
#pragma once #include <ATen/core/Tensor.h> #include <c10/util/irange.h> namespace at::native { // input tensors are non-zero dim and non-empty template <typename T1, typename T2, typename Function> void tensor_dim_apply3( const Tensor& self, Tensor& values, Tensor& indices, int64_t dim, Function f...
731cd9051ba3b6a9fc32a53ca07b71a95bbd67de2dafd8cb0f77fc61094850db
C/C++
1,835
55
/// This file contains some tensor-agnostic operations to be used in the /// core functions of the `SobolEngine` #include <ATen/core/Tensor.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/Functions.h> #else #include <ATen/ops/arange.h> #include <ATen/ops/mul.h> #include <ATen/ops/pow.h> #endif namespace at::native:...
689302574d49b570cb22ba5f0879c1e34e07fbeb3c29ca4e44c4f52a06acfebc
C/C++
1,837
58
/************************************************************************************************ ** ** Copyright (c) 1994-1997 Axon Instruments. ** All rights reserved. ** ************************************************************************************************* ** HEADER: ADCDAC.H ** PURPOSE: Con...
0b858ec05e3b6c11a7063aa0078e8839227f86a296c89e74f72dbeb4e6a47ea4
C/C++
1,845
92
#ifndef TOMO_REFERENCE_MAP_H #define TOMO_REFERENCE_MAP_H #include <src/jaz/image/buffered_image.h> #include <vector> class OptimisationSet; class TomoReferenceMap { public: static void presharpen(BufferedImage<float>& map_RS, double padding); TomoReferenceMap(); void read(IOParser& parser); void read...
954394bc20a7b15c0e1387087a4edd4234b4577dce285d6e7fa804a05d4be6af
C/C++
1,850
55
/* Autogenerated v4-0-0 from https://github.com/scottprahl/iad */ double Gain(int sphere, struct measure_type m, double uru_sample, double uru_third); double Gain_11(struct measure_type m, double URU, double URU_t, double tdiffuse); double Gain_22(struct measure_type m, double URU, double URU_t, double tdiffuse); d...
05cd6f7375f714f03fb45473037f2d72e2b73fd92078b75418409ead84e2b383
C/C++
1,854
58
#pragma once #include <ATen/native/DispatchStub.h> #include <c10/util/ArrayRef.h> #include <optional> namespace c10 { class Scalar; } namespace at { struct TensorIterator; class Tensor; } namespace at::native { using reduce_fn = void(*)(TensorIterator &); DECLARE_DISPATCH(reduce_fn, sum_stub) DECLARE_DISPATCH(red...
b3e1f0fe5e564702ad62fb22220845d1b83e980fc28169f314539854527eab89
C/C++
1,857
90
#ifndef NUMPY_CORE_INCLUDE_NUMPY__NEIGHBORHOOD_IMP_H_ #error You should not include this header directly #endif /* * Private API (here for inline) */ static inline int _PyArrayNeighborhoodIter_IncrCoord(PyArrayNeighborhoodIterObject* iter); /* * Update to next item of the iterator * * Note: this simply increment ...
1ade4186400ca7bd01cddffab7f82e8591362cdbca9f29049ca5a5a0de4d99f0
C/C++
1,864
60
#ifndef SPECTRAL_CTF_FIT_H #define SPECTRAL_CTF_FIT_H #include <src/jaz/optimization/optimization.h> #include <src/jaz/image/buffered_image.h> #include <src/ctf.h> /* TODO: add class SpectralTiltCtfFit that shuffles parameters to individual SpectralCtfCost instances, allowing for: - (k, B) and gamma per tile o...
b4b1ef7093a85498be8dd6802987a5055acd8d11cce9fa9005aaeac67a47800e
C/C++
1,872
58
/* * Copyright (c) 2020-2023, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
6db831abab15f7edfb89d8bf5bafe42b7f17565408ae05ef47450dba9d5a2c35
C/C++
1,880
49
///////////////////////////////////////////////////////////////////////////////// // // Levenberg - Marquardt non-linear minimization algorithm // Copyright (C) 2004 Manolis Lourakis (lourakis at ics forth gr) // Institute of Computer Science, Foundation for Research & Technology - Hellas // Heraklion, Crete, Gre...
658223c5fbd6d6af441be20ae3ca00be55ad2c13d151c0e270d151c2fa9e4aa6
C/C++
1,890
65
#pragma once #include <c10/core/Allocator.h> #include <c10/util/Exception.h> #include <c10/util/Registry.h> #include <ATen/detail/AcceleratorHooksInterface.h> // NB: Class must live in `at` due to limitations of Registry.h. namespace at { // The HIPHooksInterface is an omnibus interface for any HIP functionality //...
312b2152b86c38e8d85e890b58a614bf084f950e2e3755e6f58550dcdeb10bb4
C/C++
1,892
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 useful, ...
c3ad41a5c7f99152ea3f5f401a3dd7785bb9025a68ba21462b2b7b62df8b8d96
C/C++
1,892
50
#pragma once #include <ATen/Config.h> #include <ATen/native/TransposeType.h> #include <c10/util/complex.h> #include <c10/core/ScalarType.h> #if !AT_MKL_ENABLED() #define MKL_INT int #else #include <mkl.h> #endif namespace at::native { void mkl_gemm_batched( TransposeType trans_A, TransposeType trans_B, MKL_I...
6bdf31af224c15c7b2817ae14bd1900282461b5a66ff89eee9ed092c413ceeba
C/C++
1,894
97
#ifndef SKELETONIZATION_H #define SKELETONIZATION_H #include <src/jaz/image/buffered_image.h> #include <src/jaz/gravis/t3Vector.h> #include <src/jaz/image/structure_tensor.h> #include <src/jaz/util/zio.h> #include <omp.h> class Skeletonization { public: typedef enum { Point = 0, Curve = 1, Surface = ...
effa300c18e16791c6fc21bad33ff357aff8338f7e04025758d2e9c55c113fc8
C/C++
1,895
52
//**************************************************************************************** // // Copyright (c) 1993-1997 Axon Instruments. // All rights reserved. // //**************************************************************************************** // HEADER: COLORS.H // PURPOSE: Contains RGB defi...