sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
5d378aa74b95c99f59d0faaff1a27a7d382a97fdb41174cfdebd21b9f505b415
C/C++
1,077
36
#pragma once #if !defined(_MSC_VER) && __cplusplus < 202002L #error C++20 or later compatible compiler is required to use ATen. #endif #include <ATen/Context.h> #include <ATen/Device.h> #include <ATen/DeviceGuard.h> #include <ATen/DimVector.h> #include <ATen/Dispatch.h> #include <ATen/Formatting.h> #include <ATen/Fun...
92a0a3181022444f269ad35a058bb920697b9d5ad5ab3d5fbc482b59784a74b6
C/C++
1,081
39
#pragma once #include <ATen/core/Generator.h> #include <c10/util/intrusive_ptr.h> namespace at { using GeneratorFuncType = std::function<at::Generator(c10::DeviceIndex)>; TORCH_API std::optional<GeneratorFuncType>& GetGeneratorPrivate(); class TORCH_API _GeneratorRegister { public: explicit _GeneratorRegister(c...
16c13d2aaebba262ef31e822349cfabef3da0506b09b6b79d8c51e968979eaf7
C/C++
1,083
57
#ifndef MESH_BUILDER_H #define MESH_BUILDER_H #include "mesh.h" class MeshBuilder { public: static Mesh makeBar( gravis::d3Vector p0, gravis::d3Vector p1, double rad, int segments); static void addBar( gravis::d3Vector p0, gravis::d3Vector p1, double rad, ...
7bcade57513c72b04a7fbdd1e2336c993a7d01fe306a564d4ffc35c0a3fa8dbb
C/C++
1,084
28
/*************************************************************************** * * 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...
72336a1a7c5667b5718283163057a429b87d1e90228912042cb7e6f9e39713df
C/C++
1,085
47
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2019 Rasmus Munk Larsen <rmlarsen@google.com> // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You can obta...
20c6513bb29907d52af897f54fec692a7422eb95e9dc213c50e0fcf712656ac0
C/C++
1,090
44
/* * 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<pytorch_qnnpack.h> #include <qnnpack/...
5ce0ecae6bbd8c6208eac57c107e170fe34601ab88481b3eaa60e9ef3eabc5a0
C/C++
1,092
43
#pragma once #include <ATen/Config.h> #include <ATen/core/Tensor.h> #if AT_KLEIDIAI_ENABLED() namespace at::native::kleidiai { /** * @brief Rearranges the quantized weight to support kleidiai inference * @param bl Groupsize for quantization should be multiple of 32 */ void kai_pack_int4_rhs( const Tensor& weig...
874c0eb046721fb63390d59ff33b9d79267074442e4a905499e35b634cdbfd52
C/C++
1,094
35
#pragma once #include <ATen/core/TorchDispatchUtils.h> namespace at::impl { struct TORCH_API RestorePythonTLSSnapshot { RestorePythonTLSSnapshot(); RestorePythonTLSSnapshot(RestorePythonTLSSnapshot&& other) = delete; RestorePythonTLSSnapshot(const RestorePythonTLSSnapshot&) = delete; RestorePythonTLSSnapshot...
d8f7b2d30aa62815f50af133797d45fd61e2acf52b6a371d6c1e0bb9d4c1b99f
C/C++
1,096
59
#ifndef PROTO_POLISH_PROGRAM_H #define PROTO_POLISH_PROGRAM_H #include <string> #include <src/jaz/math/t_complex.h> #include <src/jaz/image/buffered_image.h> #include <src/jaz/gravis/t4Matrix.h> #include <vector> #include "refinement.h" class CTF; class AberrationsCache; class FrameAlignmentProgram : public Refine...
9db58e8654951f93e9d7b365b3094a9a9034d53766e758877acc74b72eb16c29
C/C++
1,097
49
#pragma once #include <ATen/Tensor.h> #include <ATen/native/mps/MetalShaderLibrary.h> #include <ATen/native/mps/kernels/Convolution.h> #include <cstdint> #include <string> namespace at::native::mps { struct Conv3dMppTile { int output_channels; int output_width; int output_height; int simdgroups; float co...
63163a6e51229c2144eedb04e2c94dad176294b10db5498b6c8f090b043d4da2
C/C++
1,105
38
#pragma once #include <ATen/core/Tensor.h> #include <ATen/native/DispatchStub.h> namespace at::native { using weight_to_int4pack_fn = void (*)(const Tensor&, const Tensor&); using int4pack_mm_fn = void (*)(const Tensor&, const Tensor&, const Tensor&, int, const Tensor&); using int8pack_mm_fn = void (*)(const...
bf304b0a3db46d310bf46de2f1ab5ba5099d978ec59c4b7cec47042a5b4de2ad
C/C++
1,115
52
#ifndef TOMOLIST_H #define TOMOLIST_H #include <string> #include <vector> /* will contain: - tomo name - original tilt series - projections file - ctf file - dose file - fiducial-erased tilt series (optional, can be generated) - file with fiducial positions in 3D (optional) */ class TomoList { public: ...
e2769c44d919775956c28e3b251bf900bd815af4b9fba69bc9a78cac6c1f22cb
C/C++
1,120
27
#pragma once #include <ATen/native/DispatchStub.h> #include <c10/macros/Macros.h> #include <c10/util/BFloat16.h> #include <c10/util/Half.h> namespace at::native { #if !defined(C10_MOBILE) using fp16_gemv_fn = void(*)(int, int, float, const Half*, int, const Half*, int, float, Half*, int); DECLARE_DISPATCH(fp16_gemv_f...
20e8018587e6f6cecb29f3e8677b565362c635e81c5825032a2955a1a2bf875a
C/C++
1,121
47
/* * Copyright (C) 1995-1997 Bernd Feige * This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING). */ #define FREIBURG_HEADER_LENGTH 64 /* This is just one header fragment as seen in some averaged files. * Seems that the structure approach is not quite usable for this * `soft' format... */ t...
8c552eea209e1b256e75d3b59676b86c2c5613dac4809b3a92a32c483eb333d8
C/C++
1,129
33
// 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...
39df7d55e660ead18a98bb73efe13b61350766d235d2b99520fa503d8ee91e5f
C/C++
1,134
48
#pragma once // A fixed-size array type usable from both host and // device code. #include <c10/macros/Macros.h> #include <c10/util/irange.h> namespace at::detail { template <typename T, int size_> struct Array { // NOLINTNEXTLINE(*c-array*) T data[size_]; C10_HOST_DEVICE T operator[](int i) const { retu...
f39c2216d0f76400a8c08955ba62cea975e85409bc6c31784b263fb92a2ec102
C/C++
1,139
40
#pragma once #include <c10/core/Scalar.h> namespace at::native { enum class ReductionType {MAX, MEAN, MIN, SUM, PROD}; inline ReductionType get_reduction_enum(const std::string_view& reduce) { if (reduce == "max" || reduce == "amax") { return ReductionType::MAX; } else if (reduce == "mean") { return Red...
8e62648996fa568eeff419109289e4baef27593ea2088a7da67f855945e7c145
C/C++
1,140
37
/* * 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/params.h> #ifdef __cplusplu...
7388c33cf81efd235b5f53aff113b3a99351ccddfc4b45f8faf7845bab763c3c
C/C++
1,142
32
#ifndef _psplot_defines_ #define _psplot_defines_ 1 #include <stdarg.h> #include <stdio.h> int deviceID (va_list *args); int openplID (void); int closeplID (void); int flushplID (void); int spaceID (int x0, int y0, int x1, int y1); int colorID (int red, int green, int ...
c4ca9e63d99a4f6a4926a5d91534d5cc8ba15b3fbc3d3695ca20411ba9fa7540
C/C++
1,145
31
#pragma once #include <array> #include <cstdint> namespace at { class TensorBase; } namespace at::native { void launch_grid_sampler_2d_forward_kernel( const TensorBase &output, const TensorBase &input, const TensorBase &grid, int64_t interpolation_mode, int64_t padding_mode, bool align_corners); void launch...
841d15bba53e664d2ab38848b25cc15d500c4faa0b7be566975c357460df756b
C/C++
1,151
24
// ---------------------------------------------------------------------------- // Numerical diagonalization of 3x3 matrcies // Copyright (C) 2006 Joachim Kopp // ---------------------------------------------------------------------------- // This library is free software; you can redistribute it and/or // modify it u...
e3019db344486bdbb2519d0a01768fb8fb27000d3fb3b931f739c72877a9679c
C/C++
1,154
44
#ifndef FILAMENT_MODEL_H #define FILAMENT_MODEL_H #include <src/jaz/image/buffered_image.h> class FilamentModel { public: // constructs a displacement field from a set of parameters virtual void apply( const std::vector<double>& params, const std::vector<std::vector<float>>& encodedCoords, std:...
bab1b280c6e132aa790bfc9f49d18606b021bef8e2102295a765db460674b6f0
C/C++
1,157
54
#ifndef TOMO_TEMPLATEPICKER_PROGRAM_H #define TOMO_TEMPLATEPICKER_PROGRAM_H #include <string> #include <src/jaz/image/buffered_image.h> #include <src/jaz/tomography/optimisation_set.h> #include <src/jaz/tomography/tomogram_set.h> class Tomogram; class ParticleSet; class AberrationsCache; class ParticleIndex; class ...
40b4062afcec0739e445e50772ccb555eb4efa5c3c7e84175bfba1cfdac9d86b
C/C++
1,165
41
#pragma once #include <ATen/core/IListRef.h> #include <ATen/core/Tensor.h> #include <c10/core/DeviceGuard.h> #include <c10/core/ScalarType.h> // TensorList whyyyyy namespace at { // Are you here because you're wondering why DeviceGuard(tensor) no // longer works? For code organization reasons, we have temporarily(?...
07aab7a92c35a83434081200f5d150b66326c3e3c10f939c954387fc43dfdc36
C/C++
1,167
24
// ---------------------------------------------------------------------------- // Numerical diagonalization of 3x3 matrcies // Copyright (C) 2006 Joachim Kopp // ---------------------------------------------------------------------------- // This library is free software; you can redistribute it and/or // modify it u...
90a796893433f6fd672f4a90bfb07fb09e61d5c7074d45b8f132b48aad57bf2b
C/C++
1,167
24
// ---------------------------------------------------------------------------- // Numerical diagonalization of 3x3 matrcies // Copyright (C) 2006 Joachim Kopp // ---------------------------------------------------------------------------- // This library is free software; you can redistribute it and/or // modify it u...
a6d319fe8f4ec179dfb12d19b80a0f669accbf479361a9d3297f40ee2a61487b
C/C++
1,167
24
// ---------------------------------------------------------------------------- // Numerical diagonalization of 3x3 matrcies // Copyright (C) 2006 Joachim Kopp // ---------------------------------------------------------------------------- // This library is free software; you can redistribute it and/or // modify it u...
c47e6c675bc80baed8d3540cc52bd2099a80800ac413add4f397a6915b5d0d8a
C/C++
1,167
24
// ---------------------------------------------------------------------------- // Numerical diagonalization of 3x3 matrcies // Copyright (C) 2006 Joachim Kopp // ---------------------------------------------------------------------------- // This library is free software; you can redistribute it and/or // modify it u...
deb927b16d9a6f3d4afe59175258a9afcdf73007990fc1392204c1387fbab00f
C/C++
1,167
24
// ---------------------------------------------------------------------------- // Numerical diagonalization of 3x3 matrcies // Copyright (C) 2006 Joachim Kopp // ---------------------------------------------------------------------------- // This library is free software; you can redistribute it and/or // modify it u...
24ac273476b31ad3cc06766bd26ff0f53c50044c06169215a425a2d128cc9938
C/C++
1,168
26
#define CP_FILE_OPEN_ERROR 10000 #define CP_FILE_CLOSE_ERROR 10001 #define CP_FILE_EOF_ERROR 10002 #define CP_FILE_READ_ERROR 10003 #define CP_FILE_WRITE_ERROR 10004 #define CP_FILE_POS_ERROR 10005 #define CP_FILE_REF FILE* #if ( __WORDSIZE == 64 ) || defined (__APPLE__) #define IGORLONG int #else ...
0eea50009d42844a1e5233ca60db2356a4a76d84f8e4bdba2508d12c01fcce13
C/C++
1,177
48
#ifndef CTF_EQUIPHASE_FIT_H #define CTF_EQUIPHASE_FIT_H #include <src/jaz/optimization/optimization.h> #include <src/jaz/image/buffered_image.h> #include <src/ctf.h> class CtfEquiphaseFit : public Optimization { public: CtfEquiphaseFit( const BufferedImage<float>& spectrum, double pixelSize, double volt...
80fdd3f0d3de12dd5628ad5a3e4e0b3a4ffb85c270f738d398bcb2556376af6e
C/C++
1,177
48
/* * Copyright (C) 1996,2000,2008 Bernd Feige * This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING). */ typedef struct { char version[8]; char patient[80]; char recording[80]; char startdate[8]; char starttime[8]; char bytes_in_header[8]; char data_format_version[44]; char nr_of_reco...
75510cfc94050cbba19ad813bd4dfb5bbeb577874beeabea5d13e5b6d28d2f0e
C/C++
1,181
24
// ---------------------------------------------------------------------------- // Numerical diagonalization of 3x3 matrcies // Copyright (C) 2006 Joachim Kopp // ---------------------------------------------------------------------------- // This library is free software; you can redistribute it and/or // modify it u...
c0c3689921f70df8f4abbf0fae32d5b45b4df853e8ed4278a3489f0943bee84b
C/C++
1,185
37
#ifndef NUMPY_CORE_INCLUDE_NUMPY_UTILS_H_ #define NUMPY_CORE_INCLUDE_NUMPY_UTILS_H_ #ifndef __COMP_NPY_UNUSED #if defined(__GNUC__) #define __COMP_NPY_UNUSED __attribute__ ((__unused__)) #elif defined(__ICC) #define __COMP_NPY_UNUSED __attribute__ ((__unused__)) #elif defined(__clang__) ...
1b2537bf34f3d420c6e55a253e95565cbd1fd2fb37917b753c0b7103e8829599
C/C++
1,187
44
// DON'T include this except from Binary*.cu files. It should not leak into // headers. #pragma once #define TORCH_ASSERT_NO_OPERATORS #include <ATen/AccumulateType.h> #include <ATen/Dispatch.h> #include <ATen/native/BinaryOps.h> #include <ATen/native/DispatchStub.h> #include <ATen/native/TensorIterator.h> #include <c1...
76b0f56204569227457a2c3d9485373ecf12ff80d279e8490b421e66d8e6a527
C/C++
1,191
34
/*************************************************************************** * * 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...
10982e595d999d5826a1e08cb3a080f08664687be1fa77b0dd599601838dba32
C/C++
1,193
62
#ifndef POLISH_PROGRAM_H #define POLISH_PROGRAM_H #include <string> #include <src/jaz/math/t_complex.h> #include <src/jaz/image/buffered_image.h> #include <src/jaz/gravis/t4Matrix.h> #include <src/jaz/tomography/motion/motion_fit.h> #include <vector> #include "refinement.h" class CTF; class AberrationsCache; class ...
7daf00ecef8e304b9b3188d01dbf6e98475155338152a6de197560760d8eaae6
C/C++
1,194
47
#ifndef SHIFT_ALIGNMENT_H #define SHIFT_ALIGNMENT_H #include <vector> #include <src/jaz/gravis/t2Vector.h> #include <src/jaz/tomography/tomogram.h> #include <src/jaz/tomography/reference_map.h> #include <src/jaz/optics/aberrations_cache.h> class ShiftAlignment { public: static std::vector<gravis::d2Vector> align...
fde5e0d90fe09225478d677e652f822cc6f3f3e081e33dd01886c4f7d3eed050
C/C++
1,195
38
/* * 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 <qnnpack/common.h> #include <qnnpack/params.h> #ifdef __...
c11a7c47aac2229f4160514736b656caec7db107f46e848a23548920ff9f5bf9
C/C++
1,206
44
#pragma once #include <ATen/core/TensorBase.h> namespace at::detail { TORCH_CUDA_CPP_API TensorBase empty_cuda( IntArrayRef size, ScalarType dtype, std::optional<Device> device_opt, std::optional<c10::MemoryFormat> memory_format_opt); TORCH_CUDA_CPP_API TensorBase empty_cuda( IntArrayRef size, ...
faaf0c3f43d9b15bae792602fb9f99ce8a10c900bf44a3fa6f7c7c2817c30d86
C/C++
1,208
41
#pragma once #include <c10/util/intrusive_ptr.h> #include <ATen/core/jit_type_base.h> namespace c10 { struct Type; using worker_id_t = int16_t; // This abstract class contains only user-facing APIs, and will be shared // between jit and distributed to implement TorchScript support. class C10_EXPORT RRefInterface : ...
db1da7ecf0b6b73c50c79808a7e1b691ee53f1dd6edc843ddd62877d609409b1
C/C++
1,209
53
#pragma once #include <ATen/BlasBackend.h> #include <ATen/core/Tensor.h> #include <optional> #if !defined(USE_ROCM) #include <cuda.h> #endif namespace at::native { #if !defined(USE_ROCM) && defined(CUDA_VERSION) && CUDA_VERSION >= 13030 struct cublasGroupedArgs { cublasGroupedArgs( const Tensor& mat1, ...
59bdffb328b0d6971269f2b3493bebb1817103d1f906736191f4ddf539dcf49b
C/C++
1,212
33
#pragma once #if defined(__clang__) && (defined(__x86_64__) || defined(__i386__)) /* Clang-compatible compiler, targeting x86/x86-64 */ #include <x86intrin.h> #elif defined(_MSC_VER) /* Microsoft C/C++-compatible compiler */ #include <intrin.h> #if _MSC_VER <= 1900 #define _mm256_extract_epi64(X, Y) (((uint64_t*)&X)[Y...
4ec79a624152ad5f12acf28804a561e0077135780ea6f18566b0e3001bce2aea
C/C++
1,215
34
/*************************************************************************** * * 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...
ce8edeb12b20dc77cab76d846c12fe30a92f0f99632869a0b561e00d63065355
C/C++
1,216
41
#pragma once #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 { struct TORCH_API MAIAHooksInterface : AcceleratorHooksInterface { // This should never actually be implemen...
8ede519bd1aaafdc7347fac1533cca66eb22a10d912c7070a7e12bf1f9f90949
C/C++
1,222
25
// ---------------------------------------------------------------------------- // Numerical diagonalization of 3x3 matrcies // Copyright (C) 2006 Joachim Kopp // ---------------------------------------------------------------------------- // This library is free software; you can redistribute it and/or // modify it u...
d092006b5c60c8cd219c7dc01ff9d744da99d19e80579d91d3dfaee994b8cde8
C/C++
1,222
43
#include <ATen/Tensor.h> #include <c10/util/ArrayRef.h> namespace at::native::metal { class MPSImageWrapper; class MetalTensorImplStorage final { class Impl; public: MetalTensorImplStorage() = default; MetalTensorImplStorage(const std::vector<int64_t>& sizes); MetalTensorImplStorage( const std::vector...
33884d696c7132b90d2fc24fffc91985b8b197d3b4b834072040b5117c99d0c9
C/C++
1,226
35
/*************************************************************************** * * 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...
f28b0c1ad28db094e004589fc3e4b7b37f8663190e65940502a0bf7b723264ea
C/C++
1,226
28
#include <stdio.h> #include <iostream> #include <limits> #include <cmath> #include <tuple> #include <cstdint> // ============================================================================ // Command-line log messages // ============================================================================ void ida_log_welcom...
22296966de6f88e9c76fc15a4aec0f22fc755c48ef00453ec67d8b0489c0b47b
C/C++
1,229
54
#pragma once #include <memory> #include <type_traits> #include <c10/util/Exception.h> #include <c10/util/MaybeOwned.h> namespace c10 { // Compatibility wrapper around a raw pointer so that existing code // written to deal with a shared_ptr can keep working. template <typename T> class SingletonTypePtr { public: ...
295a4db62c3b043412e6a1d014b2547040815cddfd8239e9974c050813aaf7c3
C/C++
1,236
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...
92ba26f9c76c8cb5c735a392b1eb522f4f27f90be6d02bc901174d69574f1420
C/C++
1,242
45
#ifndef MPSImageWrapper_h #define MPSImageWrapper_h #import <ATen/native/metal/MetalCommandBuffer.h> C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wdeprecated-declarations") #import <MetalPerformanceShaders/MetalPerformanceShaders.h> C10_DIAGNOSTIC_POP() #include <c10/util/ArrayRef.h> namespace at { namespace native {...
b1798fe948bdc6128a489183238eff1f5a39045203468041f7cc1afd0ba3eb77
C/C++
1,246
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...
011c0e43efb02f4db6b66445db4f50335c06355d2faba155ac71b3e69ddbc24c
C/C++
1,253
40
/* * 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/...
8b0b3d9e01a7f4fea210781a9a9ee026f5783c657330a0f10dd2f61611697dba
C/C++
1,254
28
/* * Copyright (C) 1998,2017 Bernd Feige * This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING). */ typedef struct { int (*Vbackb)(void); /* Set drawing in back buffer */ int (*Vchar)(int c); /* Draw a hardware character */ int (*Vcheckkey)(void); /* Ckeck if a key was hit */ int (*Vc...
86542c83fefe464bd2decf0e33c297cbdf71c7225b0a6f96d4061571d9ced5cc
C/C++
1,256
42
#ifndef NUMPY_CORE_INCLUDE_NUMPY_NPY_OS_H_ #define NUMPY_CORE_INCLUDE_NUMPY_NPY_OS_H_ #if defined(linux) || defined(__linux) || defined(__linux__) #define NPY_OS_LINUX #elif defined(__FreeBSD__) || defined(__NetBSD__) || \ defined(__OpenBSD__) || defined(__DragonFly__) #define NPY_OS_BSD #ifdef...
673fa06f4220788a481294285cb54690c7805530c04c65d6ddc7be4ec7ccfa80
C/C++
1,261
37
#pragma once #include <c10/core/Device.h> #include <c10/cuda/PeerToPeerAccess.h> #include <c10/macros/Macros.h> #include <cstdint> namespace at::cuda { namespace detail { /// Initialize the peer-to-peer and fabric access caches. /// Forwards to c10::cuda::detail::init_p2p_access_cache. /// @param num_devices The n...
b4abb6d38de2767414e8ffc8ef1cc3ad1e82dcaa20393829ef46fac9683ad875
C/C++
1,262
49
#ifndef MetalConvParams_h #define MetalConvParams_h #include <c10/util/ArrayRef.h> namespace at::native::metal { struct Conv2DParams final { Conv2DParams() = default; Conv2DParams( c10::IntArrayRef inputSizes, c10::IntArrayRef weightSizes, c10::IntArrayRef padding, c10::IntArrayRef stride...
09d1427898b262b1f71c4f60b6a918feaccc898c6d1607a9ffaf6c5ef0681215
C/C++
1,264
35
/*************************************************************************** * * 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...
06043dbc1200bb751f07c4b7c24045e7738d16b55709ba31b3943a53f8d9c2e9
C/C++
1,265
50
#pragma once #include <ATen/native/DispatchStub.h> #include <ATen/native/ReductionType.h> #include <c10/core/Scalar.h> #include <optional> namespace at { class Tensor; namespace native { using segment_reduce_lengths_fn = Tensor (*)( ReductionType, const Tensor&, const Tensor&, int64_t, const std...
3f4494bdca374960196206e150e6621f7a023944f977b2cb634414942addae13
C/C++
1,265
42
#pragma once // Shared cubic interpolation helpers used by both GridSampler and UpSample // kernels. Based on the Catmull-Rom spline with A=-0.75. // See // https://en.wikipedia.org/wiki/Bicubic_interpolation#Bicubic_convolution_algorithm template <typename accscalar_t> accscalar_t cubic_convolution1(accscalar_t x, a...
3d7e6cc46ad76a8a52cb62611c3b3900e3712a75b337663e09594144bcad6c29
C/C++
1,269
61
#ifndef BACKPROJECT_2D_H #define BACKPROJECT_2D_H #include <string> #include <src/metadata_table.h> #include <src/jaz/image/buffered_image.h> #include <src/jaz/single_particle/obs_model.h> #include <src/jaz/optics/dual_contrast/dual_contrast_voxel.h> class Backproject2D { public: Backproject2D() { } std::s...
bdf9c332880799e46f88c2a4e485b483fcca2afc6534dd54a16c08fe1ee5c26b
C/C++
1,275
49
#pragma once #include <ATen/Tensor.h> #include <ATen/Config.h> #if AT_MKLDNN_ENABLED() namespace at::native { TORCH_API Tensor mkldnn_linear_pointwise( const Tensor& input_t, const Tensor& weight_t, const std::optional<Tensor>& bias_opt, std::string_view attr, c10::List<std::optional<at::Scalar>>...
3653287f387938984ddeea12c51ba76eb13e9d5ec1afd81fea078af5b31a52b1
C/C++
1,281
46
/*************************************************************************** * * 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...
547137c59ba1f88da28c1953069b155080147cca4edd741e6a3309eedd08f9aa
C/C++
1,283
54
#pragma once #include <algorithm> #include <atomic> #include <cstddef> #include <exception> #ifdef _OPENMP #define INTRA_OP_PARALLEL #include <omp.h> #endif #ifdef _OPENMP namespace at::internal { template <typename F> inline void invoke_parallel( int64_t begin, int64_t end, int64_t grain_size, cons...
2be04569bc8f61e71cc22f8e7161d7f9acae47ee16e35b3e27382b0efae5807c
C/C++
1,284
32
/* * 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 <cpuinfo.h> #define TEST_REQUIRES_X86_SSE2 \ d...
4da2da7ad832f836d51b080898bf6c4582a86cce459c42635ab8a92af85cab23
C/C++
1,285
46
#pragma once #include <c10/core/Allocator.h> #include <c10/cuda/CUDACachingAllocator.h> #include <memory> namespace at::cuda { // Keep BC only using c10::CaptureId_t; using c10::MempoolId_t; // MemPool represents a pool of memory in a caching allocator. Currently, // it's just the ID of the pool object maintained ...
8e7357edb9ab0948f035f82c12d2fabbfb071bf145162418eb9d8f5b60538331
C/C++
1,286
41
// 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...
54c220b568c1e1d51039140bd00c039d53bb281566198a904da1a1112292e453
C/C++
1,287
42
#pragma once #include <c10/macros/Export.h> namespace c10 { struct TensorImpl; } namespace at { class TensorBase; // MemOverlap: Whether or not there is memory overlap // // No: Absolutely no memory overlap // Yes: Absolutely yes memory overlap // TooHard: There might be memory overlap, but it was too expensive to ...
c3fc017e729fbd661e497eb081ff5fc40348ff06d9217e320515f0b9faff0e51
C/C++
1,287
32
// ---------------------------------------------------------------------------- // Numerical diagonalization of 3x3 matrcies // Copyright (C) 2006 Joachim Kopp // ---------------------------------------------------------------------------- // This library is free software; you can redistribute it and/or // modify it u...
6d12b2777518ee1c98aab8bb8fa8b980341bab8f4696285c5b467b4767f52bee
C/C++
1,300
44
#pragma once #include <ATen/detail/AcceleratorHooksInterface.h> #include <c10/core/Allocator.h> #include <c10/util/Exception.h> #include <c10/util/Registry.h> namespace at { struct TORCH_API IPUHooksInterface : AcceleratorHooksInterface { ~IPUHooksInterface() override = default; void init() const override { ...
a8c932af1f65a131001d7dff766d089946ef44c49c6bb516e86a83b46aa102ea
C/C++
1,301
60
#ifndef ABERRATION_ESTIMATOR_H #define ABERRATION_ESTIMATOR_H #include <src/image.h> class IOParser; class ReferenceMap; class ObservationModel; class AberrationEstimator { public: AberrationEstimator(); void read(IOParser& parser, int argc, char *argv[]); void init( int verb, int nr_omp_threads, ...
62a8a5682ed9ddb35c6bc8e673c1971da7465dfd73108fe7909aa9efaab4dc2c
C/C++
1,302
51
#ifndef MetalTensorImpl_h #define MetalTensorImpl_h #include <ATen/OpaqueTensorImpl.h> #include <ATen/WrapDimUtils.h> #import <ATen/native/metal/MetalTensorImplStorage.h> #import <ATen/native/metal/mpscnn/MPSImageWrapper.h> namespace at { template <typename OpaqueHandle> struct TORCH_API MetalTensorImpl : public Opaq...
01d5d82954321c4e5b95c16b027200ecc3770b0b6825fb139fa49b7a6dfb9270
C/C++
1,303
33
#pragma once #include <c10/metal/common.h> C10_METAL_CONSTEXPR uint32_t scaled_mm_tile = 32; C10_METAL_CONSTEXPR uint32_t scaled_mm_simdgroups = 4; C10_METAL_CONSTEXPR uint32_t scaled_mm_threads = scaled_mm_simdgroups * c10::metal::simdgroup_size; // K, N, storage offsets and leading strides must be multiples of t...
494e11db9abfa50853b3d03f53ad3098f27a606de12d02258324c319916a0caa
C/C++
1,304
39
/* * 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/...
c143e000545bdab49837e3a5976d09c85fe27ff6a981b2706a7d2c56c3a98147
C/C++
1,307
42
#ifndef ACC_SETTINGS_H_ #define ACC_SETTINGS_H_ #include "src/macros.h" #ifdef ACC_DOUBLE_PRECISION #define XFLOAT double #if !defined(_CUDA_ENABLED) && !defined(_HIP_ENABLED) typedef struct{ XFLOAT x; XFLOAT y;} double2; #endif #define ACCCOMPLEX double2 #else #define XFLOAT float #if !defined(_CUDA_ENABLED)...
d985b61b3b535877c4e3ddd55b13e1b490ef1e91310adc0597af594f093f3b33
C/C++
1,308
49
#pragma once #include <c10/core/Storage.h> #include <c10/core/StorageImpl.h> #include <c10/util/intrusive_ptr.h> namespace at { class TensorBase; // Here we define a series of utils to create/manipulate ATen backed // c10 storage implementations. /** * Create a new shared memory storage impl managed by file descr...
40a4667a50435414617b0dae227e6f20bdc1bb6c98cae395fe2c0292004e5691
C/C++
1,315
52
#pragma once #include <c10/util/Exception.h> #include <ostream> #include <string> namespace at { enum class BlasBackend : int8_t { Default, Cublas, Cublaslt, Ck }; inline std::string BlasBackendToString(at::BlasBackend backend) { switch (backend) { case BlasBackend::Default: return "at::BlasBackend::De...
3d0b447de06e9b23a3d08e31c7e031e7c6519e34d59a6291c0aaa1a7eafc24e2
C/C++
1,317
60
#ifndef TRANSLATION_H #define TRANSLATION_H #include "raw_image.h" class Translation { public: template <typename T> static void shiftInFourierSpace2D(RawImage<tComplex<T>>& img, double dx, double dy); template <typename T> static void shiftByHalf(RawImage<tComplex<T>>& img); }; template <typename T>...
b84e8aad890c59cd6768bfb96e93e18cc730660575e8c97aa8c686f8ea46a29c
C/C++
1,319
55
#ifndef CONVERT_PROJECTIONS_PROGRAM_H #define CONVERT_PROJECTIONS_PROGRAM_H #include <string> #include <vector> #include <src/jaz/gravis/t4Matrix.h> #include <src/jaz/gravis/t2Vector.h> class ConvertProjectionsProgram { public: ConvertProjectionsProgram(){} int n_threads; std::string newstComFn, tltCom...
c6171b163a587e94972590349b5ecaa32bab6f3c7adba5a8c06cde990dd430ec
C/C++
1,323
41
#pragma once #include <c10/hip/HIPStream.h> // Use of c10::hip namespace here makes hipification easier, because // I don't have to also fix namespaces. Sorry! namespace c10 { namespace hip { // See Note [Masquerading as CUDA] for motivation class HIPStreamMasqueradingAsCUDA final : public c10::cuda::CUDAStream { ...
fb1ff8eda1233a9d19f8ede83b915946179f5879dd4716f62e057e3f87d65f04
C/C++
1,328
38
#pragma once #include <c10/core/CompileTimeFunctionPointer.h> namespace c10::impl { namespace detail { template <class FuncPtr, class ReturnType, class ParameterList> class WrapFunctionIntoFunctor_ {}; template <class FuncPtr, class ReturnType, class... Parameters> class WrapFunctionIntoFunctor_< FuncPtr, Ret...
21176a8152aa27ac90c8785e3795600468aad8b61e5076c4fcb8eeda3231aa02
C/C++
1,342
26
#ifndef COMPUTEMATRICES_H #define COMPUTEMATRICES_H #include<RcppArmadillo.h> // [[Rcpp::depends(RcppArmadillo)]] arma::vec computeYStar (arma::mat X, arma::vec curr_beta, arma::mat Z, arma::mat Dinv, arma::vec curr_u, arma::vec y, arma::vec offsets); arma::mat computeVmu (arma::vec mu, double...
8c8b419844d04a78694ee6bcc8f13f097627e610facef0b5cd3e8de1d44e0cde
C/C++
1,349
37
/*************************************************************************** * * 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...
31d14af9ca9601d4eb0865f88505ed137c93d19d4419bb7003ea80192945dd99
C/C++
1,352
33
/* FILE termdef */ /* Terminal (vt100, Xwindow) instructions */ /* Stderr: user interface; stdout: graphics */ #include <stdio.h> /* ************************ VT100 (TEXT) *************************** */ /* Erasing */ #define Erase_ToBottom fputs("\033\1330J", stderr) #define Erase_FromTop fputs("\033\133...
462990cb14552b001e309020f3d84f8d1de4815e7b0488a4122c08db87d27abe
C/C++
1,352
22
#pragma once #include <ATen/core/Tensor.h> #include <ATen/native/DispatchStub.h> #include <ATen/native/ReductionType.h> namespace at::native { using spmm_reduce_fn = void(*)(const Tensor&, const Tensor&, const Tensor&, const Tensor&, const Tensor&, ReductionType op); using spmm_reduce_arg_fn = void(*)(const Tensor&,...
53a50512a27f34da1fc6e939207ef0767949dec34df24c7c8cfa0540f8fd56d3
C/C++
1,369
49
#pragma once #include <c10/metal/common.h> #ifdef __METAL__ enum class EmbeddingBagMode { SUM = 0, MEAN, MAX }; #else #include <ATen/native/EmbeddingBag.h> using at::native::EmbeddingBagMode; #endif template <typename idx_type_t = uint32_t> struct EmbeddingBagParams { ::c10::metal::array<idx_type_t, 2> weight_strid...
1387650b6bb4bcac8315583f93130072d263aadf5ffdf27092e5edba45760a15
C/C++
1,377
57
/* Autogenerated v4-0-0 from https://github.com/scottprahl/iad */ #define MAX_QUAD_PTS 128 #define DEFAULT_QUAD_PTS 4 \ #define ISOTROPIC 0 #define HENYEY_GREENSTEIN 1 \ #define DIAMOND 0 #define INFINITESIMAL_GENERATOR 1 \ #define MARTIN_HAMMER 1 \ #define CONE 1 #define OBLIQUE 0 \ typedef struct AD_slab_type {...
ffab2d0101b0824ce21dba265b3c5c689c8c1dfc341f39bfe70f243470552edc
C/C++
1,382
55
#pragma once #include <c10/metal/common.h> template <typename index_t = int64_t> struct NLLLossBackwardParams { index_t n_classes; index_t map_size; index_t batch_stride; index_t class_stride; index_t grad_input_offset; index_t grad_output_offset; index_t target_offset; index_t weight_offset; index_t...
13935d38b00e148d9501a6d8e7a85ba40e6a31cb25eefec216e1e5eea9d435f6
C/C++
1,396
36
/* * Copyright (C) 1992,1993,1998,2000,2003,2013 Bernd Feige * This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING). */ /* * mfx_data_format.h * * * This header file is for data information dealing with the Munster File eXchange format (MFX) * * NOTE : * * This header file MU...
12dd534a3d45e9b41cca76d02b18bc980c8acffab42734332ce4b5a87a0fba16
C/C++
1,398
40
#pragma once #include <ATen/core/Tensor.h> namespace at::native::preprocessing { /** * This function will take nested query, key, and value * and will preprocess it in order to run with either * the flash-attention or efficient-attention kernels. * @return A tuple containing all the necessary data for running the...
d4c662c293120b34b54aca392b6bbf2632d979eaaa069184e47c9f281c003bd1
C/C++
1,398
56
#ifndef _pl_h #define _pl_h #include <stdarg.h> #include <stdio.h> int devicePL (va_list *args); int openplPL (void); int closeplPL (void); int flushplPL (void); int spacePL (int x0, int y0, int x1, int y1); int colorPL (int red, int green, int blue); int bkgndPL ...
3f0c09770037e7a5a0dd45b9c270ade6ee5997559d1acd98ff2e7fd449efa413
C/C++
1,405
56
/* * Copyright (C) 2020 Bernd Feige * This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING). */ /* Header definition for the sigma PLpro format * Helpful information obtained from biosig4c++ http://biosig.sf.net/ * -- Bernd Feige 14.08.2020 */ #include "transform.h" typedef struct { cha...
ec34c9bae2ede43cfa14c0676e302e6aa540d240dbf299d4ef927e7a687a60a6
C/C++
1,408
41
#pragma once #include <ATen/core/Tensor.h> namespace at::native { inline ScalarType first_type() { return ScalarType::Undefined; } template <typename... Args> inline ScalarType first_type(const Tensor& arg, const Args&... parameters) { return arg.defined() ? arg.scalar_type() : first_type(parameters...); } tem...
4e122c22703253ae5d6ae333cb5190cf4f824eb2efe314c76bf2d74d5e73c16b
C/C++
1,416
43
//******************************************************************************************************************** // Processor.h //******************************************************************************************************************** #include "FileDataBucket.h" #include "GeneralOperations.h" const i...
17700c2ac1ccb20df02c88c21ab88733c384bfafab342bf4eb2609cb3e93d74c
C/C++
1,425
38
#pragma once #include <ATen/core/Tensor.h> #include <ATen/native/DispatchStub.h> namespace at::native { using batch_norm_fn = void (*)(Tensor&, const Tensor&, const Tensor&, const Tensor&, const Tensor&, const Tensor&, const Tensor&, const Tensor&, bool, double); using batch_norm_collect_stats_fn = void (*)(Tens...
20ec40861a9395f216da822abd8e578b6f1bdff9ca425e976c714cf37f143d01
C/C++
1,432
41
#pragma once #include <c10/util/TypeTraits.h> namespace c10::impl { namespace detail { template <class FuncType, class ReturnType, class ParameterList> class WrapFunctionIntoRuntimeFunctor_ {}; template <class FuncType, class ReturnType, class... Parameters> class WrapFunctionIntoRuntimeFunctor_< FuncType, R...
0ca24382c12411151a134e8eb895b3d085f9a9ec7668a2ac65366735fc4908fd
C/C++
1,439
67
#ifndef IMOD_IMPORT_H #define IMOD_IMPORT_H #include <string> #include <vector> #include <src/jaz/gravis/t4Matrix.h> #include <src/jaz/gravis/t2Vector.h> class ImodImport { public: class Mapping { public: std::vector<gravis::d4Matrix> projections; int w, h, d; bool framesMissing; std::...
659f3802127baa847a30017962a7e9bfc85d48ba4022143b14212cc794515adb
C/C++
1,443
43
#pragma once #include <detail/oneDNN.h> // // This header file provides utility functions for constructing and managing // oneDNN attributes used in fusion operations on XPU devices. These utilities // include functions for creating unary and binary post-operations attributes, // as well as mapping string representati...
f7745b317c0ff6160c8d94273d7d03d9782354453443703ee18b34a84161cd55
C/C++
1,443
63
#ifndef REFINEMENT_PROGRAM_H #define REFINEMENT_PROGRAM_H #include <string> #include <src/jaz/math/t_complex.h> #include <src/jaz/image/buffered_image.h> #include <src/jaz/gravis/t4Matrix.h> #include <vector> #include <src/jaz/tomography/tomogram.h> #include <src/jaz/tomography/tomogram_set.h> #include <src/jaz/tomogr...