sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
04957fa83781609d7863c23f1c2a73ca4b81e6af576b15d5f0921accc5469769
C/C++
2,489
94
/* * 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 #if defined(__GNUC__) #if defined(__clang__) || (__GNUC__ > 4 || __GNUC__ == 4 && __GNU...
f81deb5f0ecb82e7842b2a9ff7a8c60c2729c74f5fd50d89ac15b699629e55c2
C/C++
2,490
76
//*********************************************************************************************** // // Copyright (c) 1993-1999 Axon Instruments. // All rights reserved. // Permission is granted to freely to use, modify and copy the code in this file. // //************************************************...
8e3f9eadb9b29fff95b75dabade02e4695c6d6243e53aab02d2b32d9cf50f4c7
C/C++
2,491
51
#pragma once #include <ATen/core/Tensor.h> #include <c10/core/Scalar.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/Functions.h> #else #include <ATen/ops/empty_like.h> #endif namespace at { #define AT_FORALL_BINARY_OPS(_) \ _(+, x.add(y), y.add(x)) ...
c403400e3c6066b1c698829490561557808037523a8d4f5cc8b4019b2128bee6
C/C++
2,492
106
/* * 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 <cstddef> #include <limits> #include <stdlib.h> template <typename T, size_t...
53c5acefcf990777a19ea7093afab89b84adad7d6de449e12f7106e272fbd750
C/C++
2,506
59
// Created 2/6/01 Steve Franks // avoid duplicate definitions #ifndef _NLX_OBJNAME_H #define _NLX_OBJNAME_H // Class Names so all can use them #define NLX_DummyClassName "Dummy" #define NLX_DCDCB_AcqClassName "DCDCB_Acq" #define NLX_Demo_AcqClassName "Demo_Acq" #define NLX_Demo_LicClassName ...
7ea78c2a09d419c14395c2c6bdaeb8ae97775e7174442303aa2a1ad2f8182ebd
C/C++
2,514
102
#ifndef PREDICTION_H #define PREDICTION_H #include <src/jaz/image/buffered_image.h> #include <src/jaz/gravis/t4Matrix.h> #include <src/jaz/optics/aberrations_cache.h> #include <src/jaz/tomography/particle_set.h> #include "reference_map.h" class CTF; class Tomogram; class Prediction { public: enum HalfSet {...
d91567b669d4858ffe48513368e52da85c2db57eae2cfe636beaab078892dfd4
C/C++
2,531
87
// 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...
93353faef3fac316e2198b1163a932283b980fa799c405c75bfbe0b4d92ca3b2
C/C++
2,540
100
// For the SYCL version, this is essentially a mix of // cuda_ml_optimiser.h and cpu_ml_optimiser.h. // Note the the SYCL implementation defines the floating point precision used // for XFLOAT using ACC_DOUBLE_PRECISION (ACC_DOUBLE_PRECISION is also used // for the equivalent purpose throughout the code) #ifndef SYCL_M...
22c2e3196efd5ecb786aa35a90937ba359794b89a028a68fbe4e5891cd56d349
C/C++
2,543
92
/* * Copyright (C) 2022 Bernd Feige * This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING). */ /* * Header for Nihon Kohden 2110/1100 formats */ #ifndef _NKFORMAT_H_INCLUDED #define NKE_DESCRIPTION_LENGTH 20 #define NKE_TIMESTAMP_LENGTH 25 struct nke_file_header { char signature1[16]; cha...
33b6cbe9287cffa1b157865d1c60b525475779032242aaff14f651d125d4f3af
C/C++
2,547
81
/*=================================================================== Program: ASHS (Automatic Segmentation of Hippocampal Subfields) Module: $Id$ Language: C++ program Copyright (c) 2012 Paul A. Yushkevich, University of Pennsylvania This file is part of ASHS ASHS is free software: you can redis...
302f5d3aac0ddff7cd8d0decaf987c61b490eaeda1d5686fecc7a044b9362060
C/C++
2,559
78
#import <ATen/Tensor.h> #import <ATen/native/metal/MetalCommandBuffer.h> #import <ATen/native/metal/MetalTensorImpl.h> #import <ATen/native/metal/MetalTensorUtils.h> C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wdeprecated-declarations") #import <MetalPerformanceShaders/MetalPerformanceShaders.h> C10_DIAGNOSTIC_POP() ...
61c15b1f58fe964c537301ebe6daecc25dd6244653a7c55c5bab1fb26d75fe80
C/C++
2,560
94
#include <c10/util/Exception.h> #include <utility> namespace at { /* [collapse dims] Updates sizes, and strides to reflect a "collapse" of the info, possibly excluding the optional excludeDim. A "collapsed" version of the info is the fewest dims that order the tensor's elements in the same way as the original info. I...
28e3375a190f628038ab2f3af327f85b3b22c37cb418328847fc800790892e0a
C/C++
2,562
61
#pragma once #include <torch/headeronly/core/TensorAccessor.h> #include <c10/macros/Macros.h> #include <c10/util/ArrayRef.h> #include <c10/util/Deprecated.h> #include <c10/util/Exception.h> #include <c10/util/irange.h> #include <cstddef> #include <cstdint> #include <type_traits> namespace at { using torch::headeronl...
7cc0c25a108540b0e1e91ad0f7e250590041760b97e4c626ca3dc12a71f60859
C/C++
2,565
59
// Created 2/6/01 Steve Franks // avoid duplicate definitions #ifndef _NLX_OBJNAME_H #define _NLX_OBJNAME_H // Class Names so all can use them #define NLX_DummyClassName "Dummy" #define NLX_DCDCB_AcqClassName "DCDCB_Acq" #define NLX_Demo_AcqClassName "Demo_Acq" #define NLX_Demo_LicC...
6f148e11ebee36c8cdc61dacf900a6c0cefdd143864b5f8dc271ff47e3e81bb5
C/C++
2,567
96
/* * 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...
18649309d7d18d90a75138512d7af8b4b32d2d4f3bbfabc2c4b5c182390324d3
C/C++
2,570
82
// 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...
d5bd42f56058b4cc66f02b2c2e539e402d12c4e00f44c1d01bfeb8e6b7ba4970
C/C++
2,575
61
/*************************************************************************************************** * Copyright (c) 2017 - 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * * Redistribution and use in source and binary forms, with or without * modification, are p...
99217bcbc46ceea935556750ec80bdab19457ccb8b424eab4a7b97b5356f189d
C/C++
2,579
64
/*************************************************************************** * * 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...
020b804194f3c4d04e1ddec7bd453ada99f54df5c2b4bbcab4b9b65ce6a774da
C/C++
2,580
99
/* * 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 ...
98a420fcd11eccead4f66eb819c0636dba1d5e37a7e83d0267f72770644468e3
C/C++
2,581
87
#ifndef SYCL_SETTINGS_H_ #define SYCL_SETTINGS_H_ #include "src/acc/settings.h" // TODO: Need to optimized for specific SYCL device // GENERAL ----------------------------- #define MAX_RESOL_SHARED_MEM 32 #define BLOCK_SIZE 128 // ------------------------------------- // COARSE DIFF -------------------------...
ce4ff75add8e93cec6b3d6e5d63b187a649c6bf5b9428ac50a0c6a795ec54331
C/C++
2,584
124
#ifndef LOCAL_EXTREMA_H #define LOCAL_EXTREMA_H #include "raw_image.h" #include "buffered_image.h" class LocalExtrema { public: template <typename T> static BufferedImage<T> boxMaxima(const RawImage<T>& img, int dist); template <typename T> static BufferedImage<T> boxMinima(const RawImage<T>& img, int ...
019e446443e923807fe8b9c593c6946c578f4a7212152e31cd4f7cfe5a866975
C/C++
2,598
55
#pragma once #include <c10/hip/HIPCachingAllocator.h> #include <c10/macros/Macros.h> #include <ATen/hip/impl/HIPStreamMasqueradingAsCUDA.h> namespace c10 { // forward declaration class DataPtr; namespace hip { namespace HIPCachingAllocatorMasqueradingAsCUDA { TORCH_CUDA_CPP_API c10::cuda::CUDACachingAllocator::CUDAA...
1129b2e3cf4e849ee7296cc2d080ac886ad0ec4041b1ff1da152c04725d77b87
C/C++
2,602
114
#ifndef DYN_TAIT_BRYAN_ANGLES_H #define DYN_TAIT_BRYAN_ANGLES_H #include <src/jaz/gravis/t4Matrix.h> #include <src/error.h> class TaitBryan { public: inline static gravis::d4Matrix anglesToMatrix4(double phi, double theta, double chi); inline static gravis::d3Matrix anglesToMatrix3(double phi, double theta, ...
560d1c32a3e8bb4b9898e7b77ac21cd06addfed5d2e628d064a94849d677e97e
C/C++
2,608
147
#ifndef RADIAL_AVG_H #define RADIAL_AVG_H #include <vector> #include <src/image.h> class RadialAvg { public: template<typename T> static std::vector<std::pair<T,T>> radialAverageAndStdDevFFTW_2D(const Image<T>& map) { const int w = map.data.xdim; const int h = map.data.ydim; const int b = w; ...
031129f0b3fec85bcbcc023b62eb06f18e1f65b87b1a5f8a2cece14f942a421c
C/C++
2,641
77
// 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...
1815c4fc2d300e41893aba83b4a620e1747331da6ac353d4e0fd62cc5869b87d
C/C++
2,644
84
#ifndef DIFF2_KERNELS_H_ #define DIFF2_KERNELS_H_ #include "src/acc/sycl/sycl_virtual_dev.h" class AccProjectorKernel; namespace syclKernels { template<bool REF3D, bool DATA3D, int block_sz, int eulers_per_block, int prefetch_fraction> #ifdef __INTEL_COMPILER inline #else __attribute__((always_inline)) inline #en...
f99318d77055c661359088972eb5c610522fadb2b941ffc7984482a087daab2d
C/C++
2,645
102
#ifndef _xplot_h #define _xplot_h #include <stdarg.h> #include <stdio.h> #include <stdlib.h> /* Added 10-2012 */ #include <Xlib.h> #include <Xutil.h> #include <Xos.h> #include <Xatom.h> /* #include "/usr/include/X11/Xlib.h" #include "/usr/include/X11/Xutil.h" #include "/usr/include/X11/Xos.h" #include "/usr/include/...
c768d639cc094d78822e19a08afd8d2a5f649e9dfda3b494582edc9b6757dc5f
C/C++
2,647
107
// For the Alternate CPU version, this is essentially a copy of // cuda_ml_optimiser.h. What is different is that device bundles are not // needed, both as a separate class and referenced in MlOptimiserCpu, // which has a few different data members and methods from MlOptimiserCuda to // support the different implement...
9495b56b492cda758df9af288a432064728779c5b272b8496fb6057a4b1426b2
C/C++
2,652
93
#pragma once #include <c10/core/Device.h> #include <c10/util/Exception.h> #include <c10/util/Registry.h> #include <ATen/detail/AcceleratorHooksInterface.h> namespace at { namespace xpu { // Forward-declares at::xpu::LevelZero struct LevelZero; } // namespace xpu struct TORCH_API XPUHooksInterface : AcceleratorHo...
2c143cff1d0b1be269ef44a1d2d435396cbf7ad136b318c011b9a668cc838236
C/C++
2,663
56
/* FILE config.h */ /* User configurable constants: map #define CAPS to CAPS() */ /* SPECIAL_FIGURE no longer used -- slot can be reused for another variable! */ #define SHOW_ANALOG function_SHOW_ANALOG() #define SINGLE_ANALOG function_SINGLE_ANALOG() #define FAST_FIGURE function_FAST_FIGURE() #define SEM...
5b2da92766bc9f40a80ed655116460b429223e68f1ffee1da5128f7ad9bbdcc9
C/C++
2,671
108
/* * 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 <cstddef> #include <cstdlib> #include <algorithm> #include <cfloat> #include ...
8b7ae587d5e6626d839e50e6bdbaaf7778f29bab25a57b9866ccec713ec6ce15
C/C++
2,672
88
#pragma once #include <ATen/NumericUtils.h> #include <ATen/native/Resize.h> #include <c10/util/irange.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/Functions.h> #else #include <ATen/ops/empty.h> #endif namespace at::native { // ensure we get good values and indices for kthvalue, mode // this will always be with...
e7b50f9b9ca972b648aaca7aee84727af22641477d99e686ae621ff0fef3b96b
C/C++
2,687
84
#pragma once #include <c10/core/ScalarType.h> #include <c10/core/QScheme.h> #include <c10/util/intrusive_ptr.h> namespace at { class Tensor; struct QTensorImpl; struct Quantizer; using ConstQuantizerPtr = const c10::intrusive_ptr<Quantizer>&; using QuantizerPtr = c10::intrusive_ptr<Quantizer>; /** * Quantizer is t...
c1ed2929096de7fffade5a07625cffd637481aa5b5c420b58157ed1facff63ef
C/C++
2,688
110
#ifndef FILAMENT_FIT_H #define FILAMENT_FIT_H #include <src/jaz/gravis/t3Vector.h> #include <src/jaz/gravis/t4Matrix.h> #include <src/jaz/optimization/optimization.h> #include <map> #include <src/jaz/math/spline.h> #include <src/jaz/image/buffered_image.h> #include "filament_model.h" #include "filament_mapping.h" #...
19c05a3e015f8f9b2f9110b5be89ce1ba5bb1adbbeaa848874d3f572899710a2
C/C++
2,718
95
/*************************************************************************** * * 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...
3cfaa529bd9bd90e9ad9915c47b0101f0acd72a4ff1e384b1137d607f0a93327
C/C++
2,718
79
#pragma once #include <ATen/core/ATen_fwd.h> #include <ATen/NestedTensorImpl.h> #include <c10/macros/Macros.h> namespace at::native { TORCH_API Tensor NestedTensor_to_padded_tensor_generic( const Tensor& t, double padding, OptionalIntArrayRef output_size); template <typename Func> Tensor map_nt(const Te...
57e65a15a8e13cca6efb893c87a1d68df808728b1001945622c5453719a4366c
C/C++
2,741
73
#pragma once #include <cstdint> #include <ATen/core/ivalue.h> #include <c10/util/Exception.h> namespace ao::sparse { // <Weight, bias, out_features_block_size, in_features_block_size> using LinearPackedSerializationType = std::tuple<at::Tensor, std::optional<at::Tensor>, std::vector<int64_t>>; #define SPARSE_L...
91e77f444ef51ff17c12d3393e6ddc727aa1ebaab4fd314a66d22a606382efe7
C/C++
2,755
88
//---------------------------------------------------------------------------------- // common.h // Downloaded from http://www.intantech.com/files/CLAMP_source_code_v1_0.zip // as of 2017-03-13 // // Original comment and license information: // Intan Technologies // Common Header File // Version 2.0 (25 August ...
571203ae52d4c7a7f90d66af009662d5da2a4872881cf44a261a8b288f54e8cb
C/C++
2,763
103
#ifndef DIFF_CTF_OPTIMISATION #define DIFF_CTF_OPTIMISATION #include <src/jaz/optimization/optimization.h> #include <src/image.h> #include <src/jaz/gravis/t2Matrix.h> #include <src/jaz/single_particle/obs_model.h> #include <vector> class ModularCtfOptimisation : public DifferentiableOptimization { public: typed...
779d3cd6afdf3028d5872e1bc46895cc4f13887c404209252fb2a033e75df53a
C/C++
2,768
65
/*************************************************************************** * * 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...
69059775e6d640c321deaeedf20d088e976595087bd608299334ca25a461eb02
C/C++
2,770
66
/*************************************************************************** * * 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...
b28e7e8755f6e2d56621e5ab3fed0f90b2923b1c4f5af2c928fd48befdf39c1a
C/C++
2,773
109
#pragma once #include <ATen/Config.h> #include <ATen/core/Tensor.h> #include <ATen/ops/empty.h> #include <torch/library.h> #if AT_KLEIDIAI_ENABLED() namespace at::native::kleidiai { template <typename T> void kai_pack_rhs_groupwise_int4( T& kernel, const Tensor& weight_packed, const Tensor& weight, co...
b4a0cb0ff34dc789d3708f70ee3090701471f38b444b28ff0b2067200e690e78
C/C++
2,778
76
/*************************************************************************** * * 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...
ba1e9167a3c23239b91f1d53b982c621c38bf1352dd1e9a149a85e3886a6c42c
C/C++
2,778
68
// 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...
13a122e05c5ada6c46656b27e17c4319e5a360e47493563499796a67a0e1c669
C/C++
2,793
95
#pragma once #include <ATen/Config.h> #include <c10/core/Device.h> #include <c10/util/flat_hash_map.h> #include <c10/xpu/XPUFunctions.h> #include <c10/xpu/XPUStream.h> #include <oneapi/dnnl/dnnl.hpp> #include <oneapi/dnnl/dnnl_sycl.hpp> #include <vector> namespace at::native::onednn { dnnl::memory make_onednn_memo...
5574c6007151c46f48b149c80fcbc4036800afa011989887807e18668f8e9a37
C/C++
2,796
104
#pragma once #include <torch/headeronly/util/NumericUtils.h> // complex_math.h declares ::exp/log/log1p/tan for c10::complex at global // scope. The templates below call ::exp(x) etc., which as a qualified name is // bound at definition, so those overloads must be visible here for // at::exp(c10::complex<T>) to work....
caef4a0731d6302bf6c881aa7bde770ae5b81212a73cd8c6bb26fea65801b7ec
C/C++
2,810
91
#pragma once #include <ATen/Config.h> #include <ATen/Tensor.h> #include <ATen/core/List.h> namespace at::native::xpu { class QLinearOnednnXPU final { public: C10_API static Tensor q_linear_pointwise( Tensor act, double act_scale, int64_t act_zero_point, Tensor weight, Tensor weight_s...
1dc2e530aee7199f6af1d4ffceb865a9096932b3662156ad1404b24214172540
C/C++
2,833
57
//****************************************************************************************************************************************************** // GeneralOperations.h // Author: Kevin Iamiceli // Modified March 9, 2003 // Version 3.00 //**************************************************************************...
bef2bb6653add2f82a4d5ac8caf896ce8c50cfbd12f81bdf952e19fe4e97e571
C/C++
2,834
78
#ifndef NUMPY_CORE_INCLUDE_NUMPY_NPY_ENDIAN_H_ #define NUMPY_CORE_INCLUDE_NUMPY_NPY_ENDIAN_H_ /* * NPY_BYTE_ORDER is set to the same value as BYTE_ORDER set by glibc in * endian.h */ #if defined(NPY_HAVE_ENDIAN_H) || defined(NPY_HAVE_SYS_ENDIAN_H) /* Use endian.h if available */ #if defined(NPY_HAVE_ENDIA...
825e3ce857885bbd78b291a29e0b627fc49b86134ccaceca951196774e185b5d
C/C++
2,838
103
/** * Transformer-specific NestedTensor utility functions. * * Not co-located with NestedTensor core code yet because they only * support specific cases needed in transformers. */ #pragma once #include <vector> #include <c10/macros/Macros.h> #include <optional> namespace c10 { class Scalar; } // namespace c10 ...
7794733e85e4877871c5b386ef776625b474743f82aa21ce51528daf36d91d51
C/C++
2,839
46
// dear imgui: Platform Backend for SDL2 // This needs to be used along with a Renderer (e.g. DirectX11, OpenGL3, Vulkan..) // (Info: SDL2 is a cross-platform general purpose library for handling windows, inputs, graphics context creation, etc.) // Implemented features: // [X] Platform: Clipboard support. // [X] Pla...
7b59463bd57dfd60d11dfa9ea1cb0f53aa5534b8b935708c5a6906a76d76a53d
C/C++
2,845
70
/*************************************************************************** * * 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...
6e2832fa21a6113cc3efc6a11088405a9aba0faebb9eaf33599398ede58c7d6b
C/C++
2,854
63
// 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/Tensor.h> #include <ATen/functorch/BatchedTensorImpl.h> #include <ATen/functorch/...
6c3200a720556fc1c01d579f20f1d2a23fa9a9ba68b8d64a8343a2b3c49797eb
C/C++
2,866
74
#pragma once // On Windows, math.h needs to be included with _USE_MATH_DEFINES defined to // access constants such as M_SQRT2 and M_2_SQRTPI. #ifdef _WIN32 #define _USE_MATH_DEFINES #include <cmath> #endif // _WIN32 #include <ATen/cpu/vec/vec.h> #include <c10/util/BFloat16.h> // For c10::is_reduced_floating_point_v. ...
1c9c9c2937080fd14a74c562834898d54813141c27de324b4808114a3278cc2f
C/C++
2,876
26
#pragma once #include <ATen/core/Tensor.h> #include <c10/util/irange.h> #include <ATen/core/IListRef.h> namespace at::native { // This file contains non-symbolic signatures for ops that we have sym-intified the signature of. // However, in certain cases (such as static runtime), we call the native versions of the ops ...
33588f9c55cbf0965ae65961a3155616ca59e0bd4c3ede018a6cb139be73d4ed
C/C++
2,877
60
#pragma once #include <ATen/core/Tensor.h> #include <ATen/native/DispatchStub.h> namespace at::native { using lstm_fn = void(*)(Tensor&, Tensor&, Tensor&, const Tensor&, TensorList, TensorList, bool, int64_t, double, bool, bool, bool); using rnn_fn = void(*)(Tensor&, Tensor&, const Tensor&, const Tensor&, TensorList...
6789dc41ba21403064034f1bb58613048edabfaa1591d762718a5d56c0371e3e
C/C++
2,883
102
#ifndef __LIBGRAVIS_EXCEPTION_H__ #define __LIBGRAVIS_EXCEPTION_H__ /****************************************************************************** ** Title: Exception.h ** Description: Base class for exceptions in libgravis. ** ** Author: Jean-Sebastien Pierrard, 2005 ** Computer Science Department, University B...
04606c26f720e9b07e14ef5e64f4f4c2ad525205b834cd340654f00d8b4d6a67
C/C++
2,890
57
//****************************************************************************************************************************************************** // GeneralOperations.h // Author: Kevin Iamiceli // Modified March 9, 2003 // Version 3.00 //*********************************************************************...
1e98a7673a884734388b705b0e03198ce7bda84430a4e0031b33a193167bd52e
C/C++
2,897
102
#pragma once // Indexing tensors by tensors #include <ATen/core/List.h> #include <ATen/core/Tensor.h> #include <ATen/native/DispatchStub.h> #include <ATen/native/ReductionType.h> namespace at { struct TensorIterator; } namespace at::native { using index_put_with_sort_fn = void (*)( Tensor&, const c10::List...
61e91d9cae44ae69b232691206d603241aee7960135811f44637f5fed510fea3
C/C++
2,906
113
/****************************************************************************** ** Title: tArrayIO.h ** Description: Input/Output for tArrays. ** ** Author: Reinhard Knothe / Michael Keller, 2006 ** Brian Amberg, 2007 ** Computer Science Department, University Basel (CH) ...
0c5ed130a96c0e90e39aa9c85848dfe3b7537525b2b5916604c9a5aefb0dde1f
C/C++
2,920
82
/*************************************************************************** * * 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...
96f8fb8d14772436c39d46baa8e30b308ca9455ed8108ac3e168d7b54ee3fc26
C/C++
2,926
104
#ifndef CPU_SETTINGS_H_ #define CPU_SETTINGS_H_ #include "src/acc/settings.h" // GENERAL ----------------------------- #define MAX_RESOL_SHARED_MEM 32 #define BLOCK_SIZE 128 // ------------------------------------- // COARSE DIFF ------------------------- #define PREFETCH_FRACTION_3D 4 //4 #define PREFETCH...
385314ae11e7be94e15cd43f00a7d9245de1c81ebfbcd82d0cd2a6e3235f7efa
C/C++
2,927
93
#pragma once #include <ATen/core/Generator.h> #include <c10/core/Allocator.h> #include <c10/core/Device.h> #include <c10/core/Stream.h> namespace at { // AcceleratorHooksInterface is a shared interface provided by all // accelerators to allow generic code. // This interface is hook-based as it corresponds to all t...
12740d9cd7593b8d13b56cca75bcd203208d92be4e00cc1ae8c2f0c58e106551
C/C++
2,929
104
#pragma once #include <ATen/core/ivalue.h> #include <utility> namespace c10 { struct EnumType; using EnumTypePtr = std::shared_ptr<EnumType>; using EnumNameValue = std::pair<std::string, IValue>; struct TORCH_API EnumType : public NamedType { friend struct Type; static const TypeKind Kind = TypeKind::EnumType; ...
509ba4b442770d0018dd92cc0a550c39cb9bcda158eed5aaa2e008550501ef2f
C/C++
2,939
105
#pragma once #include <c10/core/ScalarType.h> #include <cuda.h> #include <library_types.h> namespace at::cuda { template <typename scalar_t> cudaDataType getCudaDataType() { static_assert(false && sizeof(scalar_t), "Cannot convert type to cudaDataType."); return {}; } template<> inline cudaDataType getCudaData...
09f518fa0cdb414e75132bf864af2d3fe8bdf7fe9e7b176e125159b61df6b7ff
C/C++
2,948
100
/* FILE defs.h */ /* Globals: NONE is only system dependent one */ /* See also array.h */ #include <math.h> #include <stdlib.h> #include <unistd.h> #include <string.h> /* ******************************************************************** */ #define MAX_EVENTS 200 /* Should be >= MAX_EVENTS of vorte...
0e219af861cc94de3b6cc8e7e750aa0626baa4db3860cb50b6b5dbb386451f85
C/C++
2,963
75
#ifndef TOMOGRAM_SET_H #define TOMOGRAM_SET_H #include <string> #include <vector> #include <src/metadata_table.h> #include <src/filename.h> #include <src/jaz/tomography/tomogram.h> #include <src/jaz/gravis/t4Matrix.h> #include <src/ctf.h> #include <src/transformations.h> class TomogramSet { public: MetaData...
bfe791fea4869da91ad835aee4f589e8ea728d5d9543933327229598047ff46e
C/C++
2,964
91
/* * Copyright (C) 1992-1994 Bernd Feige * This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING). */ /* * mfx_header_format.h * * * This header file is for header information dealing withe the Munster File eXchange format (MFX) * * NOTE : * * This header file MUST be c-compatible f...
19ac5aaae7109edae8cebda2aa9572bce6231585f963a5dda1a62f9a4e04159e
C/C++
2,976
148
#ifndef DYN_LOG_H #define DYN_LOG_H #include <string> #include <sys/time.h> class Logger; class IOParser; class Log { public: static void print(std::string s); static void extend(std::string s); static void warn(std::string s); static void printBinaryChoice( std::string start, bool condition, ...
5fc3780eaab20b64af7b8ee9ee5b946de61c9af5557a058042619ab38b74235d
C/C++
2,979
97
#ifndef DYN_TOMOGRAM_H #define DYN_TOMOGRAM_H #include <src/jaz/image/buffered_image.h> #include <vector> #include <src/jaz/gravis/t4Matrix.h> #include <src/jaz/optics/optics_data.h> #include <src/ctf.h> #include "motion/2D_deformation.h" #include <memory> class ParticleIndex; class ParticleSet; class Tomogram { pu...
aa5d551bade43bc091f7e7b91683349ac8774e6052128ccc78e03b4148635c03
C/C++
2,980
97
#pragma once #include <ATen/Tensor.h> #include <c10/core/QScheme.h> #ifdef USE_FBGEMM C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wextra-semi") #include <fbgemm/Fbgemm.h> #include <fbgemm/FbgemmSparse.h> #include <ATen/native/ao_sparse/quantized/cpu/packed_params.h> C10_DIAGNOSTIC_POP() namespace ao::sparse { str...
ff615273b108701901ea645a80934598cf0db3bf50c535d6a82ef43fc6591af8
C/C++
2,985
109
#ifndef DEFOCUS_REFINE_PROGRAM_H #define DEFOCUS_REFINE_PROGRAM_H #include <string> #include <src/jaz/math/t_complex.h> #include <src/jaz/image/buffered_image.h> #include <src/jaz/optics/aberration_fit.h> #include <src/jaz/tomography/particle_set.h> #include <src/jaz/gravis/t4Matrix.h> #include <vector> #include "ref...
cdf48d8187d8f314b4f5ed888826dabbb5e80035f3a59606b8681445e5b71cf4
C/C++
2,989
74
/* * 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> #include <pthread...
8f0ba515a6b4708f4df5962614eb08147844315a43b05835048b08c2ec65bc04
C/C++
2,995
108
#ifndef DAMAGE_H #define DAMAGE_H #include <string> #include <src/jaz/gravis/t4Matrix.h> #include <src/jaz/gravis/t2Vector.h> #include <src/jaz/image/buffered_image.h> #include <vector> class Damage { public: static void applyWeight( RawImage<float>& stack, double pixelSize, const std::vector<doub...
818a1a739e65a4fd5b3f145b27bded870c7325e57be8e335eddc2ec447fee614
C/C++
2,996
99
#ifndef CUDA_AUTOPICKER_H_ #define CUDA_AUTOPICKER_H_ #include "src/mpi.h" #include "src/autopicker.h" #include "src/autopicker_mpi.h" #include "src/projector.h" #include "src/complex.h" #include "src/image.h" #include "src/acc/cuda/cuda_mem_utils.h" #include "src/acc/acc_projector.h" #include "src/acc/cuda/cuda_sett...
f8d2925a707810acdedb8d04050c2bbe00cd6a79c9febe614725895830d211b7
C/C++
3,003
118
/* * 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 ...
b263a9308cbff9dc86aa236ea07900b9e8977fd5f33c573bf3582c1a6de94e53
C/C++
3,006
109
#pragma once #include <ATen/Utils.h> #include <c10/util/ArrayRef.h> namespace at { /// MatrixRef - Like an ArrayRef, but with an extra recorded strides so that /// we can easily view it as a multidimensional array. /// /// Like ArrayRef, this class does not own the underlying data, it is expected /// to be used in sit...
b41cde7de9a3c696457360f92b9ad80136bd389522c4fc195852a47ce75be515
C/C++
3,015
87
/* * Copyright (C) 2008 Bernd Feige * This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING). */ #ifndef _ASCFILE_H #define _ASCFILE_H #if 0 {{{ Description This header file contains common definitions for the 'asc' file format, which is a format to store epochs of data including channel n...
ee478fec13c7df7b2f65c78902b25546537549f452a864c1ba4cf981aa9bb881
C/C++
3,030
70
#pragma once #include <ATen/core/CachingHostAllocator.h> #include <c10/core/Allocator.h> #include <c10/cuda/CUDAStream.h> #include <c10/util/Deprecated.h> namespace at::cuda { // // A caching allocator for CUDA host allocations (pinned memory). // // This provides a drop-in replacement for THCudaHostAllocator, which...
6aca51ae45b50a2fcba514c9140a79f6a681aac834830a4e6f455e3cf9992960
C/C++
3,040
141
#ifndef Z_IO_TOOLS_H #define Z_IO_TOOLS_H #include <vector> #include <string> #include <fstream> #include <iostream> #include <string> #include <sstream> #include <src/error.h> class ZIO { public: template <typename T> static void writeDat( const std::vector<T>& vec, std::string fn, long int begin =...
5e4a23fca289085fbe8bd646b86377357d745735bf42a99c4f8771d42ac1c725
C/C++
3,042
132
#ifndef SUBTOMO_PROGRAM_H #define SUBTOMO_PROGRAM_H #include <string> #include <vector> #include <src/jaz/gravis/t4Matrix.h> #include <src/jaz/gravis/t2Vector.h> #include <src/jaz/image/buffered_image.h> #include <src/jaz/tomography/optimisation_set.h> #include <src/backprojector.h> class ParticleSet; class Particl...
d5ced6bdfec6934a7960b5fa086237fe33e3496edd1fb74461d86b33ef7c8bb9
C/C++
3,046
90
/*************************************************************************** * * 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...
68d875e3ebf56f52db2fdcc424393ffcaa04dec99788618d48bde60c642d5745
C/C++
3,056
122
#ifndef _ZNZLIB_H_ #define _ZNZLIB_H_ /* znzlib.h (zipped or non-zipped library) ***** This code is released to the public domain. ***** ***** Author: Mark Jenkinson, FMRIB Centre, University of Oxford ***** ***** Date: September 2004 ***** ...
1b9e2230038a36ae64aa1325714dd3aa428e0fee1c9914a844c320a0b7f19976
C/C++
3,062
103
#pragma once #include <cstddef> #include <tuple> // Modified from https://stackoverflow.com/questions/7943525/is-it-possible-to-figure-out-the-parameter-type-and-return-type-of-a-lambda // Fallback, anything with an operator() template <typename T> struct function_traits : public function_traits<decltype(&T::operato...
9e5149701565e3f333988ba907b3ecc90b42e0a83e3d737a9ad24b57d6536eec
C/C++
3,081
102
/* Portions of this code are under: Copyright (c) 2022 Advanced Micro Devices, Inc. All rights reserved. */ #ifndef HIP_AUTOPICKER_H_ #define HIP_AUTOPICKER_H_ #include "src/mpi.h" #include "src/autopicker.h" #include "src/autopicker_mpi.h" #include "src/projector.h" #include "src/complex.h" #include "src/image.h" ...
1b0aafcf110a565ee044cfc511cc51f28ff384843723b8ad3686656942873b8f
C/C++
3,087
71
#pragma once #include <c10/metal/common.h> #define MAX_THREADGROUP_SIZE static_cast<uint32_t>(1024) C10_METAL_CONSTEXPR uint32_t SUM_NCHAINS = 8; // Threadgroup size the host dispatches the innermost / innermost_chunk // reduction kernels with; both carve the threadgroup into whole simdgroups. C10_METAL_CONSTEXPR uin...
362daa08357837e1720e35933a804f5f7c31b731a9044e0773dc81b2abf86742
C/C++
3,088
97
#pragma once #include <mutex> #include <atomic> #include <cstddef> #include <utility> #include <list> #include <map> #include <sycl/sycl.hpp> using memoryStorage = std::byte*; using memoryAllocMap = std::map<memoryStorage,memoryStorage>; using memoryFreeMap = std::map<memoryStorage,memoryStorage>; using memoryFreeSiz...
53d7edd709504a6c4fac1b4430edbf5d83d2dfd1db9bfdcbe53993b76df4a75f
C/C++
3,089
74
#pragma once #include <ATen/detail/CUDAHooksInterface.h> #include <ATen/Generator.h> // TODO: No need to have this whole header, we can just put it all in // the cpp file namespace at::cuda::detail { // Set the callback to initialize Magma, which is set by // torch_cuda_cu. This indirection is required so magma_in...
e5ce608778b2af5f579cc6d5ca6e97562dfd07f2745f1d2a2b3f94999bff7e98
C/C++
3,093
86
#ifndef WAVG_IMPL_KERNEL_H_ #define WAVG_IMPL_KERNEL_H_ #include <vector> #include <algorithm> #include <iostream> #include <limits> #include <chrono> #include <cassert> #include <sycl/sycl.hpp> #include "src/acc/acc_projectorkernel_impl.h" #include "src/acc/sycl/sycl_dev.h" #include "src/acc/sycl/sycl_kernels/sycl_u...
ef6cdd983b8981c2e8ca1dab9b9ae78c4390847c54e3153a41b5c5a21c4b70fa
C/C++
3,093
110
#pragma once #include <ATen/core/Tensor.h> #include <ATen/TensorIterator.h> #include <ATen/native/DispatchStub.h> #include <ATen/native/NonEmptyUtils.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/Functions.h> #else #include <ATen/ops/arange.h> #endif namespace at::native { using unfold_backward_fn = void (*)( ...
56a46565ed0ffd775f632433378cecdcede9df408e6b3682dea1f622d1796c20
C/C++
3,099
121
/****************************************************************************** ** Title: OBJReader.h ** Description: Class to import a .obj file info a Mesh. ** ** Author: Jean-Sebastien Pierrard, 2005 ** Computer Science Department, University Basel (CH) ** ********************************...
5fbc9b67e5b711f56a961342ee3398502bbf718de0747fc3f92eea011989142a
C/C++
3,104
83
#pragma once // On Windows, math.h needs to be included with _USE_MATH_DEFINES defined to // access constants such as M_SQRT2 and M_2_SQRTPI. #ifdef _WIN32 #define _USE_MATH_DEFINES #include <cmath> #include <math.h> #endif // _WIN32 #include <ATen/cpu/vec/vec.h> #include <c10/util/BFloat16.h> // For c10::is_reduced_...
a29504d7345de77a05b382d7a287b384821c466fdfea25c0cd28b36d6645dc6b
C/C++
3,110
93
/* FILE anal.h */ /* Analysis specific constants: non-user changable */ /* (deffs.h: identical to reach's copy. Deffs for grab go here */ /* #define VERSION 7293 Defined in Makefile (different) */ /* #define MAX_FRAMES 16000 Already in deffs.h */ /* #define MAX_SPIKES 3000 Already in deffs.h */ #defin...
bfb41cd4826811cd77a8eedb050d57375f4fa6ae8a4ca9a6fcdb60c0a7e7963a
C/C++
3,111
99
#pragma once #include <c10/macros/Macros.h> #include <c10/util/Exception.h> #include <cstring> #include <optional> #include <ostream> #include <string> #include <string_view> #include <utility> namespace c10 { // TODO: consider storing namespace separately too struct OperatorName final { std::string name; std::...
8ccc776de52e278b5b40035a45900ff786fa5787fcd13ee6fdb7f1d003644481
C/C++
3,150
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...
d72d906a5f66a96c8812eee8c0b71a291ae5361029b913c11e899838c80204d0
C/C++
3,160
89
#ifndef DYN_ANSI_CODES_H #define DYN_ANSI_CODES_H #include <string> #define ANSI_BLACK "\033[30m" #define ANSI_RED "\033[31m" #define ANSI_GREEN "\033[32m" #define ANSI_YELLOW "\033[33m" #define ANSI_BLUE "\033[34m" #define ANSI_MAGENTA "\033[35m" #define ANSI_CYAN "\033[36m" #define ANSI_WHITE...
11a892c1c6424b3a58145141d31b1a7bb4742410897bfb2cb79e8bf2276709c0
C/C++
3,175
80
#pragma once #include <ATen/cpu/vec/intrinsics.h> #include <ATen/cpu/vec/vec_base.h> #if defined(CPU_CAPABILITY_SVE256) // Define the data type of VLS(vector-length specific). typedef svbool_t vls_pred_t __attribute__((arm_sve_vector_bits(VECTOR_WIDTH * 8))); typedef svint8_t vls_int8_t __attribute__((arm_s...
de9ce9c05191ca85cd2defef1550c695bd44cf7db2a625ad68a6e1e37ef214e8
C/C++
3,179
117
// Copyright © 2022 Apple Inc. #pragma once #include <ATen/Device.h> #include <c10/core/Allocator.h> #include <c10/macros/Macros.h> #include <c10/util/Exception.h> #ifdef __OBJC__ // Metal.h pulls in Foundation.h, which transitively includes CarbonCore // headers that emit a flood of -Wdeprecated-declarations on rec...
abdde5852a44c8ea362ec3565e9162d7d179e15f35a6d21ef67a2d2924f814ee
C/C++
3,181
139
#ifndef DRAWING_TOOLS_H #define DRAWING_TOOLS_H #include <vector> #include <string> #include <src/jaz/image/buffered_image.h> class Drawing { public: template <typename T> static void drawCross( gravis::i2Vector location, T value, int size, RawImage<T>& target); template <typename T> st...
5205c23f8c5a52e16156e8cd97a0e35a06c8d08f44363eeb77c6fd8cc3529822
C/C++
3,184
76
/*************************************************************************************************** * Copyright (c) 2017 - 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * * Redistribution and use in source and binary forms, with or without * modification, are p...