sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
41f3672f746157a079d47e3237d6bf0f1b99021fcc1550fdbf051141474c8639
C/C++
3,207
115
// v = v+M*x inline static void addmult(tVectorView<__GMBD_REAL> &v, const tConstMatrixView<__GMBD_REAL> &M, const tConstVectorView<__GMBD_REAL> &x) { GRAVIS_CHECK( v.size() == M.h, "v and M are incompatible"); GRAVIS_CHECK( x.size() == M.w, "M and x are incompatible"); for (size_t j=0; j<M.w; ++j) for (siz...
ed68e23a82be9cc3ae1298c39a8bf7c7477e185fb875441639cd86467195b696
C/C++
3,216
81
#pragma once #include <ATen/Tensor.h> #include <ATen/TensorUtils.h> #include <ATen/core/List.h> #include <c10/core/TensorOptions.h> /* * [Note: hacky wrapper removal for optional tensor] * * The kernel implementation takes an optional tensor marked in the schema as * Tensor? but the C++ function takes Tensor inst...
456c3afb68ecb0ccbfdf369ecdf33a41d9aaed50ebb81c1b8061a889a33b0ef1
C/C++
3,230
88
#pragma once #include <ATen/core/List.h> #include <ATen/core/Tensor.h> #include <c10/core/impl/TorchDispatchModeTLS.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/Functions.h> #else #include <ATen/ops/equal.h> #endif namespace at { // Note [Tensor-subclass-like Tensors] // Tensor-subclass-like is defined as: // -...
a963794d6c65b1cf86a4862e7409819637a28aea89aac598b3cb5279f12f83a7
C/C++
3,239
107
#pragma once #include <ATen/cuda/CUDAConfig.h> #include <optional> #if AT_MAGMA_ENABLED() #include <magma_types.h> #include <magma_v2.h> #endif namespace at { namespace native { #if AT_MAGMA_ENABLED() // RAII for a MAGMA Queue struct MAGMAQueue { // Default constructor without a device will cause // destroying...
23f0ad671e6fac17f6933a1359098a717d28f54e16fc3189129bac7052734961
C/C++
3,242
90
#pragma once #include <ATen/Tensor.h> #include <c10/core/QScheme.h> #ifdef USE_PYTORCH_QNNPACK // TODO: Refacto QnnpackUtils.h so as to separate code // needed for quantized op from the generic qnnpack specific // quantization utilities. #include <ATen/native/ao_sparse/quantized/cpu/packed_params.h> #include <ATen/na...
6bd1366fa13a96f863bda34ae51d729b873a6d977edee463de5853b78607b1b9
C/C++
3,247
108
#pragma once #include <type_traits> #include <unordered_map> #include <ATen/core/dynamic_type.h> #include <ATen/core/jit_type_base.h> #include <c10/macros/Macros.h> namespace c10 { template <typename T> struct TORCH_API TypeFactoryBase {}; template <> struct TORCH_API TypeFactoryBase<c10::DynamicType> { template...
cfc9a27c22c54bff32e6d70fbf8c8c7abec3feb93ff7bb1f524e5359f8e4e517
C/C++
3,247
84
#pragma once #include <ATen/ATen.h> #include <ATen/Tensor.h> #include <ATen/dlpack.h> // this converter will: // 1) take a Tensor object and wrap it in the DLPack tensor // 2) take a dlpack tensor and convert it to the ATen Tensor namespace at { TORCH_API ScalarType toScalarType(const DLDataType& dtype); TORCH_API ...
2c8e66675981160e4816d2707490ecf7c71df2d58eba722e1a2951beb697a36c
C/C++
3,252
144
#ifndef LINEAR_2D_DEFORMATION_MODEL_H #define LINEAR_2D_DEFORMATION_MODEL_H #include <src/jaz/gravis/t2Vector.h> #include <src/jaz/tomography/motion/2D_deformation.h> class Linear2DDeformationModel { public: Linear2DDeformationModel(); Linear2DDeformationModel( const Deformation2D::Parameters& para...
36dc68d3837a547b7add21c50e5041691d4efbb0237fbbe985c1e5832adb71b2
C/C++
3,258
177
#ifndef ACC_DATA_TYPES_H_ #define ACC_DATA_TYPES_H_ #include "src/acc/acc_ptr.h" #include "src/multidim_array.h" namespace AccDataTypes { template <typename T> class Image : public AccPtr<T> { private: int x,y,z; bool fourier; //Is this a Fourier space data array public: /*======================================...
e872602c2b7c1ac5790eeeecf4a6d7782f391ec9da079d0441d193d0520ea2b8
C/C++
3,261
118
/*************************************************************************** * * 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...
db11d61ee5eeb407018801533bacad642f0bf76b304acbf730a675d1b7c21b08
C/C++
3,268
97
#pragma once #include <ATen/core/Tensor.h> #include <ATen/Parallel.h> #include <ATen/native/DispatchStub.h> #include <ATen/native/Pool.h> namespace at::native { inline void check_max_pool1d( const Tensor& self, IntArrayRef kernel_size, IntArrayRef stride, IntArrayRef padding, IntArrayRef dilation...
cd401404539e5a3c0fefbf7e91f220e7c283a0210e8fa746ecc991b0bf701c51
C/C++
3,280
107
/*************************************************************************** * * 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...
dd80d70449499973c8376d5e998187b873b9c0000f6ab6982067c388e70e9bee
C/C++
3,292
98
#pragma once #include <c10/metal/common.h> #ifdef __METAL_VERSION__ // Must match at::native::detail::GridSamplerInterpolation enum class GridSamplerInterpolation : int32_t { Bilinear = 0, Nearest = 1, Bicubic = 2, }; // Must match at::native::detail::GridSamplerPadding enum class GridSamplerPadding : int32_t {...
153b34636498ac93a9e0b5e8c4fab1c65972b46da0f923b8500d8965586c7310
C/C++
3,293
84
#pragma once #include <string> #include <stdexcept> #include <sstream> #include <c10/core/ScalarType.h> #include <c10/util/ArrayRef.h> #include <c10/util/Exception.h> #include <ATen/native/DispatchStub.h> #include <ATen/core/TensorBase.h> namespace at::native { // Normalization types used in _fft_with_size enum clas...
51037a7607de92b5261071b64cd45a974370231f1650dce9c8b266dbca84ba55
C/C++
3,307
129
#ifndef ACC_PROJECTOR_PLAN_H_ #define ACC_PROJECTOR_PLAN_H_ #include <vector> #include "src/acc/acc_ptr.h" #include "src/healpix_sampling.h" #include <iostream> #include <fstream> #ifdef _SYCL_ENABLED #include "src/acc/sycl/sycl_virtual_dev.h" using deviceStream_t = virtualSYCL*; #endif class AccProjectorPlan { publi...
a511fcc5478457d35546cb2a132ad973b4ddabbe44cc22f568c773c109127b16
C/C++
3,310
109
// 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, ...
dbc743d0397d2b11039cff911229d5df50c96cfedd6e81e295e03a09bb7ae86e
C/C++
3,321
146
#ifndef CUDA_ML_OPTIMISER_H_ #define CUDA_ML_OPTIMISER_H_ #include "src/mpi.h" #include "src/ml_optimiser.h" #include "src/acc/cuda/cuda_mem_utils.h" #include "src/acc/acc_projector_plan.h" #include "src/acc/acc_projector.h" #include "src/acc/acc_backprojector.h" #include "src/acc/cuda/cuda_fft.h" #include "src/acc/cu...
60607e9b765092c128f5a0746ab060f52cf373e74d4d560dab4b60ac68649af2
C/C++
3,340
154
/*************************************************************************** * * 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...
b416ecdfa3780c8aec54effd0d8f632be08b894b179357653b030552cb303f9d
C/C++
3,342
150
/****************************************************************************** ** Title: tRefCPtr.h ** Description: Smart pointer implementation using reference counting. ** ** Author: Jean-Sebastien Pierrard, 2005 ** Computer Science Department, University Basel (CH) ** *******************...
308542a8da1c21241557e8d34e97839212466bc1c4e77d1d7d5db7e75b6c0cc8
C/C++
3,380
133
/* * ANSI C implementation of vector operations. * * Copyright (c) 2007-2010 Naoaki Okazaki * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restr...
c1fa5ca81e8145fafcf212e0ed97d4e7ba5a02315c55ed0233eafd9a3c9594ba
C/C++
3,382
119
/*************************************************************************** * * 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...
a0cb7b8b3e109ccfe4c4e03a0e8f97611d77ceb4cbdaef561360180dffc4960a
C/C++
3,390
144
#ifndef __LIBGRAVIS_NTUPLE_H__ #define __LIBGRAVIS_NTUPLE_H__ /****************************************************************************** ** Title: NNTuple.h ** Description: N-NTuples (templated) ** ** Author: Brian Amberg 2006 ** Computer Science Department, University Basel (CH) ...
36f092edc9f72ace3919c753965875a30ff4b2de65aae2484f0b3787e671edcb
C/C++
3,397
101
// 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...
036e2b7cc545a7228bc1523e30c4d8d15b3690e6dadfbf31654861de0edb9f13
C/C++
3,399
135
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2015 Benoit Steiner <benoit.steiner.goog@gmail.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 ca...
7013b8f60f149184b35888e5f6071b3e626d5eff0fb5fd9d4272ae693795b9f2
C/C++
3,401
119
#ifndef __GRAVIS__IO__MESH__ABSOLUTE_PATHS__ #define __GRAVIS__IO__MESH__ABSOLUTE_PATHS__ #define BOOST_FILESYSTEM_VERSION 3 #include <boost/filesystem/convenience.hpp> #include <boost/filesystem/operations.hpp> #include "../../tMesh.h" #include "../../Mesh.h" namespace gravis { namespace io { namespace mesh_...
1aed389fd7b17d60398f1ca7d22441e5a0536258e5b20d137082d6207b717815
C/C++
3,414
112
/* * This file is part of Healpix_cxx. * * Healpix_cxx 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. * * Healpix_cxx is...
f8bab060ad3d150c3a98872b03adf247d591d0053f6c77b27069e813414dd2aa
C/C++
3,431
115
/* * This file is part of Healpix_cxx. * * Healpix_cxx 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. * * Healpix_cxx is...
ce7c62cbe2acd90d4564c38062f155855704f187a9e350bba02de6241fc216a9
C/C++
3,432
116
/*************************************************************************** * * 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...
11d14c352d4a9fbe88fd2df3d9cfcb9c1e709ae942140b7b44686502c32deca4
C/C++
3,438
82
#ifndef _SYCL_VIRTUAL_DEVICE_RELION_H #define _SYCL_VIRTUAL_DEVICE_RELION_H #include <cstdint> #include <string> #include "src/acc/settings.h" enum class syclMallocType {device, host}; enum class syclBackendType {openCL, levelZero, CUDA, HIP, host}; enum class syclDeviceType {gpu, cpu, fpga, host}; enum class syclDev...
6d57edb248bb71dcd59b55e87297ac082d3598aa6ec35d012bb7ff3035255775
C/C++
3,439
81
// 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 <ATen/ATen.h> #include <ATen/core/op_registration/op_registration.h> #include <torch/l...
6f021c8275e0422b8bfed1223ad06ab65a5bb3158e18b8ca567175131f21d579
C/C++
3,442
150
/* Portions of this code are under: Copyright (c) 2022 Advanced Micro Devices, Inc. All rights reserved. */ #ifndef HIP_ML_OPTIMISER_H_ #define HIP_ML_OPTIMISER_H_ #include "src/mpi.h" #include "src/ml_optimiser.h" #include "src/acc/hip/hip_mem_utils.h" #include "src/acc/acc_projector_plan.h" #include "src/acc/acc_...
ea81d7cb34250eb90dec2aae846399ad66914244f4f7b51bba0f99daed790b67
C/C++
3,445
110
#pragma once namespace c10 { inline BoxedKernel::BoxedKernel() : boxed_kernel_func_(nullptr) {} inline BoxedKernel::BoxedKernel( std::unique_ptr<OperatorKernel> functor, InternalBoxedKernelFunction* boxed_kernel_func) : functor_(std::move(functor)), boxed_kernel_func_(boxed_kernel_func) {} template <Box...
ef80eafdf284e133eff1cd2dfd8d851f1f2a020cc25bdb6f4c2fae77f29b266c
C/C++
3,449
117
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2014-2019 Gael Guennebaud <gael.guennebaud@inria.fr> // // 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 c...
219d37148a6acccc67d82c4a67b7d41c73e1f888d8dd0de064b54ed1c99d1db8
C/C++
3,452
98
/*************************************************************************** * * 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...
5a3ded388ec6a7a0b4dcbab74b6bff19970dd218bf4d3dc84d965fc6e12d0462
C/C++
3,454
33
#pragma once #include <ATen/OpMathType.h> #include <ATen/hip/HIPBlas.h> namespace at::native { void bgemm_kernel_bf16bf16bf16_256_256x256x32_32x32_4x4_8x32x1_8x32x1_1x16x1x16_4_Intrawave_v4(CUDABLAS_BGEMM_ARGTYPES(at::BFloat16)); void bgemm_kernel_bf16bf16bf16_256_256x256x32_32x32_4x4_16x16x1_16x16x1_1x16x1x16_4_Intr...
dddf5fc982e7d25f9ba38fe1ebd6645fb8851485f25fd5e975822ae90828635a
C/C++
3,459
98
#pragma once #include <ATen/core/TensorAccessor.h> #include <ATen/NumericUtils.h> namespace at::native { #ifdef CPU_CAPABILITY inline namespace CPU_CAPABILITY { #else inline namespace DEFAULT { #endif // Core topk loop, shared between CPU and QuantizedCPU template <typename scalar_t, typename accscalar_t> void topk_...
80537464461e73c706714420debeb1ab48757c2f5ef96596dfca5592266fab06
C/C++
3,474
101
#ifndef TOMO_BP_PROGRAM_H #define TOMO_BP_PROGRAM_H #include <string> #include <vector> #include <src/filename.h> #include <src/time.h> #include <src/jaz/gravis/t4Matrix.h> #include <src/jaz/gravis/t2Vector.h> #include <src/jaz/optics/damage.h> #include <src/jaz/optimization/optimization.h> #include <src/jaz/tomograph...
35a5fa6c1b78738d819707096c22845dfed04bc9a07d78e50f3bf49c2754960a
C/C++
3,485
113
#ifndef _multi_plot_h #define _multi_plot_h #ifdef __cplusplus extern "C" { #endif /* * Multiple Device Plot Library * * This is a plot(4) API compliant library that allows a single * program to switch between output devices. It does so by use of a * single extension function device() (see below). */ #include...
df780133faf598f3412c999bc18e8e3fed122daf3f2fec6b133fe4bea60fb528
C/C++
3,485
126
/*************************************************************************** * * 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...
429ee10110145e2648554680969d2ff0e19ad496eb370b5cdf37a747495c2187
C/C++
3,494
118
#pragma once #include <ATen/cpu/vec/intrinsics.h> #include <c10/util/Exception.h> #include <torch/headeronly/cpu/vec/vec_half.h> namespace at::vec { // See Note [CPU_CAPABILITY namespace] inline namespace CPU_CAPABILITY { // Transpose a [2, 32] matrix to [32, 2] // Note: the output leading dimension should be 2, //...
e7cad08f4a1a9affe0cc2bd8997f2c6b1c7715c876a67e0a0e992e53a3dc92b7
C/C++
3,505
88
/****************************************************************************** ** Title: tImage/traits.h ** Description: tImage traits neccessary for nice implementation of stuff ** like convolution ** ** Author: Brian Amberg ** Computer Science Department, University Basel (C...
fe3c3bf70a40e88d9f380636ee5f9bb7c045c6cbc601aea875c02e631c4f4862
C/C++
3,508
125
#ifndef _VITAPORT_H_INCLUDED #define _VITAPORT_H_INCLUDED enum vitaport_filetypes { VITAPORT1_FILE=0, VITAPORT2_FILE, VITAPORT2RFILE }; /* These are guesses, I've seen that 4 is also unsigned */ enum VITAPORT_DATYPES { VP_DATYPE_SIGNED=0, VP_DATYPE_UNSIGNED=5, VP_DATYPE_MARKER=130 }; enum VITAPORT_DASIZES { VP_...
5c99226798f8c51bd1695d03c30e2585bc581d22ea77964ae96843c8f9187b70
C/C++
3,509
145
#ifndef SPA_EXTRACTION_H #define SPA_EXTRACTION_H #include <src/metadata_table.h> #include <src/image.h> #include <src/jaz/image/raw_image.h> #include <src/jaz/gravis/t2Vector.h> #include <src/jaz/single_particle/parallel_ft.h> #include <src/jaz/single_particle/img_proc/filter_helper.h> #include <vector> class SpaEx...
f2225edb3574d7b7b7348de412eb50251b3abf4276f5f289a0558d07fe036542
C/C++
3,510
114
#pragma once #include <ATen/core/function_schema.h> #include <ATen/core/ivalue.h> #include <ATen/core/qualified_name.h> #include <c10/util/Exception.h> #include <c10/util/FunctionRef.h> namespace c10 { struct FunctionSchema; } namespace at { TORCH_API void launch(std::function<void()> func); } namespace torch::jit ...
6b0869b352a7f14f700dd69503d35eabaeba65a2a931bb6792ca5c2da56cffc8
C/C++
3,515
73
#pragma once #include <ATen/native/DispatchStub.h> #include <ATen/native/Gelu.h> #include <c10/util/Exception.h> namespace c10 { class Scalar; } namespace at { struct TensorIterator; struct TensorIteratorBase; class TensorBase; } namespace at::native { using structured_activation_fn = void (*)(TensorIteratorBase&)...
6228078d6da8ec1cee1d8884c0a4a181848ed2681387ede1bdb8a3eb90e0d6e9
C/C++
3,517
87
//*********************************************************************************************** // // Written 1990 - 1996 by AXON Instruments Inc. // ...
97ee6a0a1f00d4e9015090077517ff7923a32d7cf6ea78995b44020094fce7e8
C/C++
3,517
88
/*************************************************************************** * * 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...
ee57e1e04f4acd2e0f07dbe3b18441975e690fd25d18f71ab0d6e0838e53f894
C/C++
3,517
119
/* * 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 <assert.h> #include <limits.h> #include <stdbool.h> #include <stdint.h> #incl...
470e961d725b9f2b04800f5fd5cc0fe725a891723a90af476b0fa2dade6862ec
C/C++
3,529
67
// dear imgui: Renderer Backend for modern OpenGL with shaders / programmatic pipeline // - Desktop GL: 2.x 3.x 4.x // - Embedded GL: ES 2.0 (WebGL 1.0), ES 3.0 (WebGL 2.0) // This needs to be used along with a Platform Backend (e.g. GLFW, SDL, Win32, custom..) // Implemented features: // [X] Renderer: User texture b...
e7e4d4478a2f1a31f67184751519a516db37f73bdc7ae006961b644b27bb30d4
C/C++
3,529
125
/*************************************************************************** * Author: "Jasenko Zivanov" * * Derived from Sjors' SpaBackproject: * * * 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 term...
6c4f1c02f16f0cfb37d008de963bdccd3364bf4e85d197a17f50d8a34c9bfa28
C/C++
3,530
110
/*************************************************************************** * * 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...
f879ce607074fd792327696185abdad8ee1e136f435517743d55bc7c542a7b02
C/C++
3,544
108
// 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...
42a266f904bacc372b5e0c04508eb85e8c56e56e6b764638ebfdd643493f0b01
C/C++
3,563
100
#pragma once #include <ATen/Tensor.h> #include <ATen/Config.h> namespace at { namespace native { class QConvoneDNN final { public: TORCH_API static at::Tensor run_pointwise( at::Tensor act, // contains quantized values but not QTensor double act_scale, int64_t act_zero_point, at::Tensor we...
2ca1246140e04a91adb29e552175c2e1b9a7af6a22429df11c1c6377af2ffdce
C/C++
3,572
138
#pragma once #include <ATen/EmptyTensor.h> #include <ATen/Formatting.h> #include <ATen/core/ATenGeneral.h> #include <ATen/core/Generator.h> #include <c10/core/ScalarType.h> #include <c10/core/StorageImpl.h> #include <c10/core/UndefinedTensorImpl.h> #include <c10/util/ArrayRef.h> #include <c10/util/Exception.h> #includ...
0c599f35ff9e84b0acf51ee6121c235a9a23366c560b991e50ac5b4b6312aae6
C/C++
3,579
111
#pragma once #include <ATen/Config.h> #include <ATen/Tensor.h> namespace at::native::xpu { class QConvoneDNNXPU final { public: C10_API static at::Tensor run_pointwise( at::Tensor act, double act_scale, int64_t act_zero_point, at::Tensor weight, at::Tensor weight_scales, at::Ten...
55716c62376ac3b6983e010d68674e8c0cdd4fdedf55bf5c1e44d5f221f272c6
C/C++
3,619
82
/* * 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/...
7aa13c253679278e2a70e8831c67832a1fe8b5b0e74e4c37576406e511037c48
C/C++
3,623
168
#ifndef PROTO_ALIGNMENT_H #define PROTO_ALIGNMENT_H #include <src/jaz/optimization/optimization.h> #include <src/jaz/tomography/particle_set.h> #include <src/jaz/image/buffered_image.h> class CTF; class ProtoAlignment : public DifferentiableOptimization { public: ProtoAlignment( const std::vector<BufferedI...
0a295a25b9163814e0b2ecc0a25b9d1ddb4492482dbe5d496ca29853410c72e6
C/C++
3,628
106
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2014 Pedro Gonnet (pedro.gonnet@gmail.com) // Copyright (C) 2016 Gael Guennebaud <gael.guennebaud@inria.fr> // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy ...
e37843c68112e571a81017cfce9a296e18b423ab8e0e052cafccdff2c3f89aa9
C/C++
3,628
120
#ifndef __LIBGRAVIS_T_QUATERNION_H__ #define __LIBGRAVIS_T_QUATERNION_H__ /****************************************************************************** ** Title: tQuaternion.h ** Description: Represents a quaternion useful for rotation and scaling ** ** Author: Reinhard Knothe ** Bria...
93ac2f9145c9902c1d5fa76f391f398cde31b9d62ad3b439dc14413dcb78830c
C/C++
3,634
140
/*************************************************************************** * * 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...
54cd0c7ad21ef27db6179402f647d4debb67cb7109ecdf79683e1cc38da04d58
C/C++
3,635
111
/* This file implements some utility functions Hongzhi Wang 07/19/2010 */ #include "itkImage.h" #include "itkImageFileReader.h" #include "itkImageFileWriter.h" #include "itkRescaleIntensityImageFilter.h" #include "itkConstNeighborhoodIterator.h" #include "itkImageRegionIterator.h" #include "itkImageIterator.h" #includ...
f0fae2fde78741ce9beb0b857accfe18a6a902e46174e101c9265882b31fab5b
C/C++
3,664
133
/*************************************************************************** * * 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...
79ee3f0307cc0b2250d70038ddb1cad814682785ca8f6d3ac7c17d1e96dbeff9
C/C++
3,684
117
#pragma once #include <c10/metal/common.h> template <unsigned N = c10::metal::max_ndim> struct OrgqrParams { int32_t num_batch_dims; uint32_t m; uint32_t m2; uint32_t n; uint32_t k; ::c10::metal::array<uint32_t, N> A_strides; ::c10::metal::array<uint32_t, N> tau_strides; ::c10::metal::array<uint32_t,...
365f969cbae85827b61b4e8eac3072cb588499385b0766428529fa6ade275040
C/C++
3,686
122
/*************************************************************************** * * 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...
d07f1ab542e2863d7b2dbdb40583a3199961995cd97ff9e05a46e5d470ffa177
C/C++
3,688
147
#pragma once #include <c10/core/Allocator.h> #include <string_view> namespace at { enum MappedAllocatorModes { ALLOCATOR_MAPPED_SHARED = 1, ALLOCATOR_MAPPED_SHAREDMEM = 2, ALLOCATOR_MAPPED_EXCLUSIVE = 4, ALLOCATOR_MAPPED_NOCREATE = 8, ALLOCATOR_MAPPED_KEEPFD = 16, ALLOCATOR_MAPPED_FROMFD = 32, ALLOCATO...
81e2f432daf8af052b28cbdcee4bfb1bd32faa2b2c563c942f72c5c6df9bba91
C/C++
3,689
129
/*************************************************************************** * * 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...
66ea1181d7c7a8a00019e835722a76146e0d334a5a9ef5310c33a151c7171624
C/C++
3,694
115
/*************************************************************************** * * 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...
c30d0e20c8cc02147878958b13f4abf6f0454c823a69a8a1e3fae63db334b50b
C/C++
3,698
104
#pragma once #include <ATen/native/TensorIterator.h> #include <c10/util/irange.h> namespace at::native { inline bool is_constant_index(int ntensor, const int64_t* strides) { AT_ASSERT(ntensor >= 3); for (const auto arg : c10::irange(2, ntensor)) { if (strides[arg] != 0) { return false; } } retur...
e5b2f5e973d4af1a0a3909babcdeed60feb46d48803d36cb43db77762922c609
C/C++
3,702
82
#include <c10/macros/Macros.h> C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wdeprecated-declarations") #import <Metal/Metal.h> #import <MetalPerformanceShaders/MetalPerformanceShaders.h> C10_DIAGNOSTIC_POP() #include <string> // This is a utility macro that can be used to throw an exception when a Metal // API functi...
5ec25e78294c8c70399d9280c938b1dac0b5e5528583609f2fe375624781193f
C/C++
3,715
128
#pragma once #include <ATen/core/Tensor.h> #include <ATen/Dispatch.h> #include <ATen/native/DispatchStub.h> #include <ATen/native/quantized/AffineQuantizerBase.h> namespace at::native { TORCH_API Tensor& quantize_tensor_per_tensor_affine( const Tensor& rtensor, Tensor& qtensor, double scale, int64_t ...
0004a59bad1278ae8b88063a4ed7a83bae9715a0cbfa44c19addbf8ed0775831
C/C++
3,718
65
#pragma once namespace at { // views and their in-place version ops #define TORCH_VIEW_FNS(m) \ m.impl("as_strided_", torch::CppFunction::makeFallthrough()); \ m.impl("detach", torch::CppFunction::makeFallthrough()); \ m.impl("detach_", torch::CppFunction::makeFallthrough()); \ m.impl("diagonal", torch::CppFun...
38386da0b783c1435c55a8006614e3d06a5038b57267dfb4838a9d7efe6595e3
C/C++
3,736
128
#pragma once #include <vector> #include <ATen/core/Tensor.h> #include <ATen/native/ReduceOpsUtils.h> #include <c10/util/irange.h> namespace at::native { namespace { // checks whether index.dtype == int64 // and self.dtype == src.dtype if src is a Tensor inline void scatter_gather_dtype_check( const std::string& m...
f7490670d6813e04f914902b07f30f816db8fcca65e5171f511dd8d2b441e41c
C/C++
3,746
112
#ifndef NPY_DEPRECATED_INCLUDES #error "Should never include npy_*_*_deprecated_api directly." #endif #ifndef NUMPY_CORE_INCLUDE_NUMPY_NPY_1_7_DEPRECATED_API_H_ #define NUMPY_CORE_INCLUDE_NUMPY_NPY_1_7_DEPRECATED_API_H_ /* Emit a warning if the user did not specifically request the old API */ #ifndef NPY_NO_DEPRECATE...
df1e4aaea7d93926faec8b8a5f7e6469b9888c2e25ed42e2bef1a824e090784d
C/C++
3,758
86
#pragma once #include <ATen/core/Tensor.h> #include <c10/macros/Export.h> #include <c10/util/intrusive_ptr.h> // A little explanation about why this file exists at all. We have // a few methods on Tensor class which require access to reified access to // AutogradMeta. In open source, this isn't a big deal: we just ...
be9c18a6781072348934c6b6429572f251a500046ef53ef62c801234ae98024b
C/C++
3,762
93
#pragma once #include <cstdint> #include <c10/core/ScalarType.h> #include <ATen/cuda/CUDAConfig.h> // NOTE: These templates are intentionally not defined in this header, // which avoids re-compiling them for each translation unit. If you get // a link error, you need to add an explicit instantiation for your // types ...
085474b30615754d126f12e012ff395a7a635d5cacdad6057c19358928550aa8
C/C++
3,767
69
#include <cstdint> #include <ATen/native/TensorIterator.h> #include <ATen/native/cuda/MemoryAccess.cuh> namespace at::native { struct ScatterAddOp; struct ScatterMinOp; struct ScatterMaxOp; template<int alignment> inline bool fast_gather_kernel_eligible(const TensorIterator& iter, char * const out_ptr, char * const...
270992921f1d2a6fc8d99c23947aff4908d0df0dc8c37ed16d6ce3ec3a9f3e4c
C/C++
3,770
113
//---------------------------------------------------------------------------------- // streams.h // Downloaded from http://www.intantech.com/files/CLAMP_source_code_v1_0.zip // as of 2017-03-13 // // Copyright information added according to license directory in the original // source code package: // // Intan ...
b1d9f4beb3560b5c2e375ff0e835d4406812ab66a9bf604a77073395d225164c
C/C++
3,802
89
/* This file exists so that we use the same weight layout for MoE grouped gemm and regular gemm when the weight is quantized. The preprocessing code reads this template to know how to organize the quantized weight matrices to be consumed by CUTLASS. Note that for int4, ThreadBlockK MUST be 64. */ #pragma on...
f92f87ac867bf12f6c988db4021619fdc50dbda8a17d3c9f67a6daebac4de7bf
C/C++
3,818
85
#pragma once #include <ATen/hip/HIPConfig.h> #include <c10/hip/HIPGuard.h> #include <ATen/hip/impl/HIPCachingAllocatorMasqueradingAsCUDA.h> #include <ATen/hip/impl/HIPStreamMasqueradingAsCUDA.h> // Use of c10::hip namespace here makes hipification easier, because // I don't have to also fix namespaces. Sorry! namesp...
b58b963340b79559c63860cdba6af2e9b55c6c53f54595eaea160d644c450c4e
C/C++
3,836
95
#ifndef RELION_TOMO_PARTICLE_SET_H #define RELION_TOMO_PARTICLE_SET_H #include <src/metadata_table.h> #include <src/jaz/gravis/t2Vector.h> #include <src/jaz/gravis/t3Matrix.h> #include <src/jaz/gravis/t4Matrix.h> #include "motion/trajectory.h" #include "motion/trajectory_set.h" class TomogramSet; class ParticleIndex...
77df870eb7aca3f36ae3b7be3e26a8a80bce74b5f29cc8d2124b4276ef2d8f9a
C/C++
3,845
144
// 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, ...
a5ccd1144c9dc48bd8aa4168f5befdd7726effcf2929d622d3e5ce5a988d0706
C/C++
3,851
117
// 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...
bcb30016366811869c4c97869a3bc022b8b835967a173b15b570e4a92bf5ba75
C/C++
3,864
88
// Copyright © 2023 Apple Inc. #pragma once #include <ATen/core/ATen_fwd.h> #include <c10/core/Allocator.h> #include <c10/core/CachingDeviceAllocator.h> #include <c10/core/Storage.h> #include <c10/util/Registry.h> #define MB(x) (x * 1048576UL) namespace at::mps { // this is a public interface to access MPSAllocat...
325c92439b0018442b8e36bf85548478c4ac82443f705905bcbb2f613fee1636
C/C++
3,865
122
#ifndef INKUBE_PACKAGE_H #define INKUBE_PACKAGE_H #include <array> #include <cstdint> #include <vector> #include <cstring> // For memset #include <iostream> #include "fpga_constants.h" #define CHUNKED_CHANNELS 60 #define NUM_CHANNEL_CHUNKS 4 #define PKG_SEND_OUT 4// 17 #define SEND_ENV 10 #define RAW_SOCKET_BASE_...
b0ffef6866f74de3a32d7103bb4a6a470785507fcda34cf89248666215d20f62
C/C++
3,872
135
/****************************************************************************** ** Title: ** Description: ******************************************************************************/ #ifndef _OBJWriter_H_ #define _OBJWriter_H_ #include <string> #include <map> #include "../../Mesh.h" #include "../../tMesh.h...
03a71a1524c8defaba0d1054e07a982a4495599b2c2fd59ee4c9fcdfa3b3ca7d
C/C++
3,873
129
// Copyright © 2022 Apple Inc. #pragma once #include <ATen/detail/AcceleratorHooksInterface.h> #include <c10/core/Allocator.h> #include <c10/util/Exception.h> #include <c10/util/Registry.h> #include <cstddef> namespace at { struct TORCH_API MPSHooksInterface : AcceleratorHooksInterface { // this fails the impl...
7bd055342bcd5aec031e6b1ffec2e6282f212e89ba46b065a6daf0b7745398d4
C/C++
3,875
162
/*************************************************************************** * * 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...
0821d818c88a8886362d1ef15651d8ac8ced04316b2b2d13d2461757529dd174
C/C++
3,879
139
#pragma once #include <c10/core/Backend.h> #include <c10/core/ScalarType.h> #include <c10/core/Layout.h> #include <c10/core/TensorOptions.h> #include <c10/core/Storage.h> #include <ATen/core/DeprecatedTypePropertiesRegistry.h> #include <ATen/core/Generator.h> namespace at { class Tensor; // This class specifies a ...
90c2ea6b6a4aec7fdf4eaa5b0fd9e90b2467e7babc6b4586ffbdb9be8888f7ca
C/C++
3,900
126
// 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...
ba81cbc94513fc2592704a26d74c0e04030c315afa10a2a74cd631d05cde8e7c
C/C++
3,921
145
#ifndef POINT_INSERTION_H #define POINT_INSERTION_H #include <src/jaz/gravis/t3Vector.h> #include <src/complex.h> #include <src/jaz/image/raw_image.h> #include <src/jaz/optics/dual_contrast/dual_contrast_voxel.h> template <typename SrcType, typename DestType> class ClippedPointInsertion { public: inline void i...
f4c67085c123752bc40927e9dddad9d1a5cd8f2f62e79aae1b451c9384c8369f
C/C++
3,928
128
#pragma once #include <ATen/DimVector.h> #include <c10/core/ScalarType.h> #include <c10/core/SymIntArrayRef.h> #include <c10/util/DimVector.h> #include <c10/util/Exception.h> #include <optional> #include <sstream> #include <vector> namespace at { // Infers the size of a dim with size -1, if it exists. Also checks th...
dbdc0842274ae43d5753db3bac8d9795461235af992d30fdc838a25d598d67a1
C/C++
3,943
191
/* Autogenerated v4-0-0 from https://github.com/scottprahl/iad */ #define FIND_A 0 #define FIND_B 1 #define FIND_AB 2 #define FIND_AG 3 #define FIND_AUTO 4 #define FIND_BG 5 #define FIND_BaG 6 #define FIND_BsG 7 #define FIND_Ba 8 #define FIND_Bs 9 #define FIND_G 10 #define FIND_B_WITH_NO_ABSORPTION 11 #define FIND_B_W...
788e7a2b45028f9880c5ebcf9bd80c5ae8b6eb148c449270fee3304ecb45a5b7
C/C++
3,951
146
/****************************************************************************** ** Title: gravis/io/mesh/obj.h ** Description: Implements reader/writer for different mesh file formats. ** ** Author: Brian Amberg ** Computer Science Department, University Basel (CH) ** ***********************...
b3900d43fa8062b9f1a7153308500407a9020a31fa3836f7df83a704fd62ec3d
C/C++
3,954
87
/*************************************************************************** * * Author: "Jasenko Zivanov" * MRC Laboratory of Molecular Biology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foun...
de072cfe7bbc717ac64eede44ce6e87d88856c458176ed0fc3d9fabad2b86c16
C/C++
3,961
134
#ifndef DYN_EULER_ANGLES_H #define DYN_EULER_ANGLES_H #include <stdexcept> #include <limits> #include <src/jaz/gravis/t4Matrix.h> class EulerDynamo { public: inline static gravis::d4Matrix anglesToMatrix4(double phi, double theta, double chi); inline static gravis::d3Matrix anglesToMatrix3(double phi, double t...
5881b3af1ac4bca42cfd6ba1114186414c3d4fe06ed1329f6630dc893a958e7e
C/C++
3,975
117
/* * Copyright (C) 1992-1994,1997,2003,2013 Bernd Feige * This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING). */ /* * mfx_file.h definitions for implementation and use of mfx_file.c * Bernd Feige 23.11.1992 */ #ifndef MFX_FILE_H #define MFX_FILE_H #include <stdio.h> #include <stdint.h>...
1cc13d8f2cc1817d49119b5a4b6d8b76ad80c35102d2fe674179cd180ef177b3
C/C++
3,990
86
#pragma once #include <ATen/Context.h> #include <ATen/core/Tensor.h> #include <ATen/cuda/CUDAContext.h> #include <c10/cuda/CUDACachingAllocator.h> #include <ATen/native/TransposeType.h> #include <ATen/native/cuda/MiscUtils.h> #define USE_LINALG_SOLVER // From cuSOLVER doc: Jacobi method has quadratic convergence, s...
2cc812581cf44ba188a95cb2ee204257bc26d1dc0f37118fb9f354a018257a07
C/C++
3,991
149
#pragma once #include <c10/util/FunctionRef.h> #include <fbjni/fbjni.h> #include <torch/csrc/api/include/torch/types.h> #include "caffe2/serialize/read_adapter_interface.h" #include "cmake_macros.h" #ifdef __ANDROID__ #include <android/log.h> #define ALOGI(...) \ __android_log_print(ANDROID_LOG_INFO, "pytorch-jni"...
4761b3c940d9498acae29677aabb6f16feca6e38cfc6241243a4db470ce373b3
C/C++
3,993
125
/* * This file is part of Healpix_cxx. * * Healpix_cxx 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. * * Healpix_cxx is...
11e02a1d9d6aacb3ac5ffda8a9528a8a9f7af82fb5d8da4cb3200d9d8d472181
C/C++
4,024
115
#ifndef __LIBGRAVIS_NMESH_H__ #define __LIBGRAVIS_NMESH_H__ /****************************************************************************** ** Title: NMesh.h ** Description: N-Sided Mesh representation. ** ** Author: Jean-Sebastien Pierrard, 2005 ** Brian Amberg ** Computer Sci...