sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
1cbc3cb3b30e954108facb668eca38d57c3aa1d097c5c056d7000e2cc6fe60d1 | C/C++ | 4,025 | 103 | // 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/functorch/Macros.h>
#include <ATen/Tensor.h>
#include <ATen/functorch/Interpret... |
d17dea6d552e50262667aa8bf4be836b861db83aca058907955b66d84b9f010c | C/C++ | 4,043 | 152 | #ifndef WAVG_GPU_KERNEL_H_
#define WAVG_GPU_KERNEL_H_
#include <vector>
#include <iostream>
#include <fstream>
#include <sycl/sycl.hpp>
#include "src/acc/acc_projector.h"
#include "src/acc/sycl/sycl_settings.h"
#include "src/acc/sycl/sycl_kernels/sycl_utils.h"
#include "src/acc/sycl/sycl_kernels/helper.h"
#include "s... |
a633a4f0842421e7436fb2cdd3caa83b1b231379e6d002ad3f250787c2140922 | C/C++ | 4,056 | 199 | #ifndef CENTERING_H
#define CENTERING_H
#include "raw_image.h"
#include "buffered_image.h"
class Centering
{
public:
template<class T>
static BufferedImage<T> humanFullToFftwFull(const RawImage<T>& img);
template<class T>
static BufferedImage<T> humanFullToFftwHalf(const RawImage<T>& img);
templat... |
e2ee08e9f3219dd989cb23c63da5c2d402e8398918f0ebd20aabfce0ebef7ed1 | C/C++ | 4,069 | 156 | #ifndef JAZ_SYMMETRY_H
#define JAZ_SYMMETRY_H
#include "buffered_image.h"
#include "interpolation.h"
#include <src/symmetries.h>
#include <src/jaz/optics/dual_contrast/dual_contrast_voxel.h>
#include <omp.h>
class Symmetry
{
public:
template <typename T>
static BufferedImage<T> symmetrise_FS_real(
const R... |
89be5141ff927b56b6898a6a0fcb4825f31015bb0a537c405a036036b4d16f67 | C/C++ | 4,070 | 106 | #pragma once
#include <ATen/native/cuda/cutlass_extensions/arch/mma.h>
#include <ATen/native/cuda/cutlass_extensions/interleaved_numeric_conversion.h>
namespace cutlass {
namespace gemm {
namespace threadblock {
////////////////////////////////////////////////////////////////////////////////
// We need to distinguis... |
257233c7a4c83e455415db1f55e7763c4783e499484a1ff5e8cec0ad7d9ff587 | C/C++ | 4,071 | 156 |
#if defined(CAMERA_MODEL_WROVER_KIT)
#define PWDN_GPIO_NUM -1
#define RESET_GPIO_NUM -1
#define XCLK_GPIO_NUM 21
#define SIOD_GPIO_NUM 26
#define SIOC_GPIO_NUM 27
#define Y9_GPIO_NUM 35
#define Y8_GPIO_NUM 34
#define Y7_GPIO_NUM 39
#define Y6_GPIO_NUM 36
#define Y5_GPIO_NUM 19
#... |
45b377eb36d167a6ac9df3ac1861f6a29356e841309319e7b51c9d086f6eb656 | C/C++ | 4,104 | 94 | // This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2009 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 can ob... |
a59932a12bab7f9a702b9b4dc0375c70bf20c354bf73f3142e1d3f457652266b | C/C++ | 4,111 | 100 | #pragma once
#include <c10/core/Allocator.h>
#include <c10/util/Registry.h>
namespace at {
enum class GraphCaptureMode : int8_t {
// Backend-defined default capture behavior.
Default = 0,
// Potentially unsafe API calls are prohibited. Errors may occur if capture in
// the current thread affects other threads... |
cc655956de50b302535af3ada758cc37180091a6aa26a9f4d2df64625e80f09e | C/C++ | 4,121 | 83 | /***************************************************************************
*
* 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... |
91de3793d7cd18deb50dae9bb99ae8e0683d7148e9f4f37f4897ece4717d9481 | C/C++ | 4,143 | 155 | #ifndef CUDA_SETTINGS_H_
#define CUDA_SETTINGS_H_
#include <signal.h>
#include <fstream>
#include <iostream>
#include <vector>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "src/macros.h"
#include "src/error.h"
#include <curand.h>
// Required compute capability
#define CUDA_CC_MAJOR 3
#define ... |
931b901e26d9422e4ce370af8be095698c77b01e55d30f081efcbcb13a3c1ad1 | C/C++ | 4,146 | 166 | #pragma once
#include <cstdlib>
#include <qnnpack/operator.h>
namespace qnnpack {
class PrePackConvWeights final {
public:
PrePackConvWeights(
const pytorch_qnnp_operator_t convolution,
const uint8_t* kernel_zero_points,
const uint8_t* kernel,
const int32_t* bias);
void* getPackedWeights... |
38608722a2832cfa2678c212cf69588e90a81adc1daef840289d8a1e735c0e24 | C/C++ | 4,158 | 115 | // This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2014 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 can ob... |
505cf58cc7e6684fa8c303eed48d34b38f574307486662f94fff7666da60f742 | C/C++ | 4,173 | 156 | /* Portions of this code are under:
Copyright (c) 2022 Advanced Micro Devices, Inc. All rights reserved.
*/
#ifndef HIP_WAVG_KERNEL_H_
#define HIP_WAVG_KERNEL_H_
#include <hip/hip_runtime.h>
#include <vector>
#include <iostream>
#include <fstream>
#include "src/acc/acc_projector.h"
#include "src/acc/acc_projectorke... |
5c9165b72dffbe88ba47a3962cc58b3665007ba57d45647e0b8d381e1ea7e6c7 | C/C++ | 4,183 | 91 | #define MAX_NUMBER_OF_CHANNELS 32
typedef struct //Struktur Filterparameter
{
char szName[30]; //Filterbezeichnung
float fCutoffFrequency; //Cutoff-Frequenz in Hz
char szReserve[64]; //Reserve-Bytes für spätere Änderungen
}DIG_FILTER;
// diese struct... |
b04961f19ed7e66ae16bbdf62ba951109e5b2eb8ffa2983a4ee04d2ba6811cb0 | C/C++ | 4,194 | 170 | #ifndef FOURIER_DEFORMATION_MODEL_H
#define FOURIER_DEFORMATION_MODEL_H
#include <src/jaz/gravis/t2Vector.h>
#include <src/jaz/image/raw_image.h>
#include <src/jaz/image/buffered_image.h>
#include <src/jaz/tomography/motion/2D_deformation.h>
class Fourier2DDeformationModel
{
public:
Fourier2DDeformationModel()... |
29752d0966a6630ab9184a78a01c9da72dd129d7d37f1d921fa3a3bcb621f5a1 | C/C++ | 4,205 | 133 | /***************************************************************************
*
* 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... |
04279acd8880996f5ef2a833642f3796bc11eba91ff94f644db92ac805ad5900 | C/C++ | 4,218 | 146 | #pragma once
/*
Provides templated descriptor wrappers of MKL Sparse BLAS sparse matrices:
MklSparseCsrDescriptor<scalar_t>(sparse_csr_tensor)
where scalar_t is double, float, c10::complex<double> or c10::complex<float>.
The descriptors are available in at::mkl::sparse namespace.
*/
#include <ATen/Tensor.... |
3cce6b623260db02124eb64ed1cf67bf764d84357af9656c6d630cc4c4a476c0 | C/C++ | 4,218 | 117 | // This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2009-2010 Gael Guennebaud <gael.guennebaud@inria.fr>
// Copyright (C) 2009-2010 Benoit Jacob <jacob.benoit.1@gmail.com>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0... |
6f1976a6b66fccd91f39c36a6414579a7e8cbe4bd06b8e0fa13f58cdd63897ab | C/C++ | 4,230 | 124 | /***************************************************************************
*
* Author: "Takanori Nakane"
* MRC Laboratory of Molecular Biology
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foun... |
2e5cab6486bfe6d775d417ea7cc0afd6161b886ebfff3c711afd4c463f2e215a | C/C++ | 4,243 | 196 | #ifndef NUMPY_CORE_INCLUDE_NUMPY_ARRAYSCALARS_H_
#define NUMPY_CORE_INCLUDE_NUMPY_ARRAYSCALARS_H_
#ifndef _MULTIARRAYMODULE
typedef struct {
PyObject_HEAD
npy_bool obval;
} PyBoolScalarObject;
#endif
typedef struct {
PyObject_HEAD
signed char obval;
} PyByteScalarObject;
typedef str... |
a069c36df804e36bba9f1f8ee9923021271b9d2b003a525de3df8d0411204c30 | C/C++ | 4,244 | 103 | // This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2014 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... |
2bc5a5a4c8b79206dede4db931b185ddd2fb0e19ac98d5f39712b149be51391c | C/C++ | 4,253 | 157 | /*
* 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 ... |
4247ee3590c6b062134335eb9059afc2ae447d4a49e6f5ec7d36714c1b899894 | C/C++ | 4,301 | 162 | // This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2008 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 can ob... |
6743d7ce5a8039f39083a8236bc4be3043bbf6b5c35b4a63ea663a5dfb17a267 | C/C++ | 4,310 | 137 | /***************************************************************************
*
* 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... |
c284bf3f908d5c91108bdbf8c658435240d8f49b318ae9af86604bb2bf43eba6 | C/C++ | 4,352 | 187 | #ifndef MKL_FFT_H_
#define MKL_FFT_H_
#include <vector>
#include <mutex>
#include <fftw3.h>
#include "src/complex.h"
extern std::mutex fft_mutex;
class MklFFT
{
bool planSet;
public:
AccPtr<XFLOAT> reals;
AccPtr<ACCCOMPLEX> fouriers;
int direction;
int dimension;
size_t xSize,ySize,zSize,xFSize,yFS... |
290d9bcca6b8914914bbeee73320e796f25b803028b7b8d62a365222c7621c59 | C/C++ | 4,359 | 193 | #ifndef ALIGNMENT_H
#define ALIGNMENT_H
#include <src/jaz/optimization/optimization.h>
#include <src/jaz/image/buffered_image.h>
#include <src/jaz/tomography/particle_set.h>
#include <src/jaz/mesh/mesh_builder.h>
#include <src/jaz/util/log.h>
#include "trajectory.h"
class CTF;
class MotionFit : public FastDifferenti... |
d1d37fc34bb310a453ad15642227d6ebce6f13631946d7b95eb40978c9e5b99a | C/C++ | 4,373 | 161 | #pragma once
#include <c10/util/ArrayRef.h>
#include <c10/util/Exception.h>
#include <c10/util/StringUtil.h>
#include <c10/util/irange.h>
#include <string>
namespace c10 {
// Represents a name of the form "foo.bar.baz"
struct QualifiedName {
QualifiedName() = default;
// `name` can be a dotted string, like "foo... |
08f44084dfb554d3eac1683bc7c9a9f21eada01b2aea3932973b2f1a010ff239 | C/C++ | 4,379 | 157 | /*
* 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/requantization.h>
enum pyto... |
36c1c326f4d973951f7bd93f3c0327d9af47dfa5a31ffba6b26489888b8b9a07 | C/C++ | 4,381 | 158 | /* Portions of this code are under:
Copyright (c) 2022 Advanced Micro Devices, Inc. All rights reserved.
*/
#ifndef HIP_SETTINGS_H_
#define HIP_SETTINGS_H_
#include <signal.h>
#include <fstream>
#include <iostream>
#include <vector>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "src/macros.h"... |
5dfd3cae19cdd885912516cfd9e86c81d48ca84e9b0c8320af21405d05d573f6 | C/C++ | 4,392 | 215 | #ifndef IMG_PADDING_H
#define IMG_PADDING_H
#include "raw_image.h"
#include "buffered_image.h"
class Padding
{
public:
template <class T>
static BufferedImage<T> padCorner2D_half(const RawImage<T> &img, int w, int h);
template <class T>
static BufferedImage<T> padCorner2D_full(const RawImage<T> &img, i... |
00cb273878f48e6dddcc0404915801440adaec2bf96dedabeb17608e500773f2 | C/C++ | 4,400 | 136 | // This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2008-2010 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... |
455d5c7a673d6e7b7d2d13b506b687083d1456b2a47a41a41d1019b1e3ecfbf5 | C/C++ | 4,401 | 140 | #pragma once
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <ATen/core/Tensor.h>
#include <ATen/core/dispatch/Dispatcher.h>
#include <ATen/core/ivalue.h>
#include <c10/core/CPUAllocator.h>
#include <c10/util/irange.h>
template <class... Inputs>
inline std::vector<c10::IValue> makeStack(Inputs&&... inputs... |
8ff3343c1b0228e8266792169e3990473a87f432f86fe9c00d093bf585bfe1fb | C/C++ | 4,440 | 105 | #pragma once
#include <ATen/core/Tensor.h>
#include <c10/core/SymBool.h>
#include <c10/util/irange.h>
#ifndef AT_PER_OPERATOR_HEADERS
#include <ATen/NativeFunctions.h>
#else
#include <ATen/ops/view_as_real_native.h>
#include <ATen/ops/view_as_complex_native.h>
#include <utility>
#endif
// WARNING: this header conta... |
fef9aceb20465b5fd429c4ccd528dd4bfa8b29bcc651ec199fb318bcd4e21e79 | C/C++ | 4,449 | 96 | /*
* 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/... |
ea95e206b99d0a2e029e057ecd5679b8727d9dadb5fe1b728eca536bd0427dee | C/C++ | 4,455 | 82 | /**
* @file epilogue_helpers.h
*
* This file includes types for the epilogues. The empty structs exist so we can signal to template
* code the type of epilogue we want to run, and let the underlying code specify the details such as
* element types, accumulator type and elements per vector access.
*
*/
#pragma o... |
09692daec731560865e665089e175fb93547efeadf398d2fc3a5a78a3cba6629 | C/C++ | 4,461 | 161 | /***************************************************************************
*
* 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... |
1a6ce4e98212e42bf000c3d7c3c748d553d492038f62c955cc175f18b25e37b5 | C/C++ | 4,462 | 183 | #ifndef CPU_HELPER_FUNCTIONS_H_
#define CPU_HELPER_FUNCTIONS_H_
#include "src/acc/cpu/cpu_ml_optimiser.h"
#include "src/acc/acc_projector.h"
#include "src/acc/cpu/cpu_benchmark_utils.h"
#include "src/acc/cpu/cpu_kernels/helper.h"
#include "src/acc/cpu/cpu_kernels/diff2.h"
#include "src/acc/cpu/cpu_kernels/wavg.h"
#inc... |
703c509dc5df7f2817e3cd4e123ae0fdd88bac90c66f839c5ad45c284692bb21 | C/C++ | 4,465 | 134 | // Header file for the stimfit namespace
// Routines for fitting functions to data
// last revision: 08-08-2006
// C. Schmidt-Hieber, christsc@gmx.de
// 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 Softwa... |
3ecd7bb83c88dc00a42366536b602ffe6e9743d9be13edb4586fe9d8451e7c09 | C/C++ | 4,467 | 144 | #pragma once
#include <ATen/core/IListRef.h>
#include <ATen/core/Tensor.h>
#include <c10/util/irange.h>
namespace at::native {
TORCH_API at::Tensor clone_preserve_strides(const at::Tensor& self);
inline bool cat_should_skip_tensor(const Tensor& t) {
return t.sym_numel() == 0 && t.dim() == 1;
}
// Check to see if ... |
9e9283b62014681676955fddb1344850499e4b27c129a81f53c5dd24c9ff3cbe | C/C++ | 4,515 | 131 | #pragma once
#include <c10/core/InferenceMode.h>
#include <c10/core/impl/LocalDispatchKeySet.h>
#include <c10/util/Exception.h>
#include <c10/util/ThreadLocalDebugInfo.h>
#include <ATen/FuncTorchTLS.h>
#include <ATen/NodeCreationHooks.h>
#include <ATen/PythonTorchFunctionTLS.h>
#include <ATen/SavedTensorHooks.h>
#inc... |
f19df8f6e6aae943f1b176402d8158488e2e5fe1d09290c18b4f7886239b8a8b | C/C++ | 4,526 | 216 | #ifndef IMG_NORMALIZATION_H
#define IMG_NORMALIZATION_H
#include "raw_image.h"
#include "stack_helper.h"
#include <src/jaz/util/zio.h>
class Normalization
{
public:
template <class T>
static BufferedImage<T> toUnitInterval(const RawImage<T> &img);
template <class T>
static BufferedImage<T> byNormalD... |
1551f156cb7cb5dc86e9222d938a93dca8314dce4a75f874f0b2cd2586324d89 | C/C++ | 4,561 | 177 | #ifndef ZERNIKE_HELPER_H
#define ZERNIKE_HELPER_H
#include "Zernike.h"
#include "tensor2x2.h"
#include <src/jaz/image/buffered_image.h>
#include <src/jaz/gravis/t2Matrix.h>
#include <src/jaz/optimization/optimization.h>
class CTF;
class ZernikeHelper
{
public:
static BufferedImage<double> computeEvenZernike... |
9fafca6fdf12cafb11fd7eecb62340e95b86a7f7395b57b87cc55c25d3b4c22b | C/C++ | 4,574 | 86 | /*
* Public exposure of the DType Classes. These are tricky to expose
* via the Python API, so they are exposed through this header for now.
*
* These definitions are only relevant for the public API and we reserve
* the slots 320-360 in the API table generation for this (currently).
*
* TODO: This file should ... |
718641af2d4ab453cf676f20aab78f8733b456b2b84c4ca2c94bc9a24cc0d26c | C/C++ | 4,578 | 162 | #pragma once
#include <set>
#include <string>
#include <unordered_set>
#include <vector>
#include <ATen/core/symbol.h>
#include <c10/util/Exception.h>
#include <c10/util/hash.h>
namespace c10 {
/**
* class AliasInfo
*
* Data structure to hold aliasing information for an `Argument`. They can be
* nested to represen... |
e8f64f4318964af73eb1e74d77cb2d33e27b8e12f51ed05820b0ac7d4e0c5d21 | C/C++ | 4,586 | 155 | #pragma once
#include <ATen/core/TensorBase.h>
#include <c10/core/WrapDimMinimal.h>
#include <utility>
namespace at {
// Return if the tensor geometry represented by `sizes` and `strides` is
// contiguous Although we cache is_contiguous in tensor now, this is till useful
// because it allows checking if a particular... |
be1db9016f873955382e6c053d506b9bb262d9c94326653725dc08670808d73f | C/C++ | 4,591 | 123 | /*
* Copyright (c) Facebook, Inc. and its affiliates.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <limits.h>
#include <immintrin.h>
/*
* The code below is adapted from Googl... |
60ed203ac878909e28381123005ac825757a69e0987bdf6c5731292ec4059c64 | C/C++ | 4,596 | 168 | /******************************************************************************
** Title: gravis/io/array.h
** Description: Implements reader/writer for different array file formats.
**
** Author: Sandro Schoenborn
** Computer Science Department, University Basel (CH)
**
********************... |
eec87e7b6dbc650277de01f7c7dd4430a8badb1c9c6ddccd3495afd05514b866 | C/C++ | 4,601 | 134 | #pragma once
#include <ATen/core/Tensor.h>
#include <ATen/core/ivalue.h>
#include <c10/util/Exception.h>
struct LinearPackedParamsBase : public torch::jit::CustomClassHolder {
virtual at::Tensor apply(
at::Tensor input,
double output_scale,
int64_t output_zero_point) = 0;
virtual at::Tensor appl... |
f967d99f8f0909ac5b915580a75669d95f97a5a2739f7e703a4b342b93d088fb | C/C++ | 4,631 | 153 | #pragma once
#include <ATen/core/Tensor.h>
#include <ATen/native/DispatchStub.h>
#include <c10/util/accumulate.h>
#include <c10/core/SymBool.h>
#include <c10/core/SymIntArrayRef.h>
#include <c10/util/StringUtil.h>
namespace at::native {
namespace {
C10_ALWAYS_INLINE void _check_rms_norm_inputs_symint(
const Te... |
1d83f675de4e54c46123c74523a7353e4bbeb7bc01975561e7b4160fbaee8417 | C/C++ | 4,637 | 198 | #pragma once
#include <ATen/Tensor.h>
#include <torch/custom_class.h>
namespace at::native::metal {
using SerializationTypeConv2dPrePack = std::tuple<
Tensor,
std::optional<Tensor>,
std::vector<int64_t>,
std::vector<int64_t>,
std::vector<int64_t>,
int64_t,
std::optional<Scalar>,
std::... |
03dcfc72b26d530cbbab565c92c2eeb90f011f6f3cc9c6ed81852a9e0a23fd0e | C/C++ | 4,672 | 114 | /////////////////////////////////////////////////////////////////////////////////
//
// Levenberg - Marquardt non-linear minimization algorithm
// Copyright (C) 2004 Manolis Lourakis (lourakis at ics forth gr)
// Institute of Computer Science, Foundation for Research & Technology - Hellas
// Heraklion, Crete, Gre... |
8c1ad15b47b899abaf1ace749a7610d91ceee4f606b7114bc56ac65d1c247ef7 | C/C++ | 4,674 | 151 | #pragma once
#include <algorithm>
#include <type_traits>
#include <utility>
#include <vector>
#include <c10/util/ArrayRef.h>
namespace c10 {
namespace detail {
// Prefer consuming an owned element when the callable accepts an rvalue.
// This covers callables taking T, T&&, or const T&. Fall back to T& for
// calla... |
5f5388327cf916e9104432b42537b16d5a864f1f74369c91bd3a3802cb40b2b6 | C/C++ | 4,692 | 166 | #pragma once
#include <ATen/core/TensorBase.h>
namespace at::detail {
inline void check_size_nonnegative(ArrayRef<int64_t> size) {
for (const auto& x : size) {
TORCH_CHECK(
x >= 0,
"Trying to create tensor with negative dimension ",
x,
": ",
size);
}
}
inline void chec... |
0142790aa960bad791dfe4742233ede6bca55adbef71c096b6dd06a6365b7b15 | C/C++ | 4,703 | 134 | /*
* This set (target) cpu specific macros:
* - Possible values:
* NPY_CPU_X86
* NPY_CPU_AMD64
* NPY_CPU_PPC
* NPY_CPU_PPC64
* NPY_CPU_PPC64LE
* NPY_CPU_SPARC
* NPY_CPU_S390
* NPY_CPU_IA64
* ... |
87517d6b0c19a235b36212fa6c9b9b61ce3ae600bc9fefef194636315875b2ac | C/C++ | 4,711 | 177 | /***************************************************************************
*
* 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... |
a7f89931d2f2d30063fb2f79cad84639e9f2b589e905c496f3abdb3801cfc676 | C/C++ | 4,714 | 130 | /***************************************************************************
*
* 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... |
64132b7031a272f274879871b985469689685273ca77fff2beb3c4d1401247cd | C/C++ | 4,718 | 151 | /***************************************************************************
*
* 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... |
cf7b1c52c85c0609d7af39de7c878ec66c85dab3f863a80b6222c6b1c224c395 | C/C++ | 4,718 | 138 | /***************************************************************************
*
* 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... |
1480ddc50b8d0c23ff02da3e35e4abd2b59cc6b5bcedd7af149029029b9d12eb | C/C++ | 4,737 | 150 | // This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2008-2015 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... |
6f90fd530e1708fa4b2f128a1fbd8f223806721708f58b96115bf123a421461a | C/C++ | 4,738 | 96 | #pragma once
// Bit-preserving casts between the 128-bit NEON Vectorized specializations.
#include <ATen/cpu/vec/intrinsics.h>
#include <ATen/cpu/vec/vec128/vec128_bfloat16_neon.h>
#include <ATen/cpu/vec/vec128/vec128_double_neon.h>
#include <ATen/cpu/vec/vec128/vec128_float_neon.h>
#include <ATen/cpu/vec/vec128/vec12... |
c37aa3c8766e76ae0e76ab8d6e7683678ce332ebe541f21cd950e97194a8476e | C/C++ | 4,753 | 122 | /****************************************************************************\
* *
* Written 1990 - 1996 by AXON Instruments Inc. *
* *
... |
bcdd01b9ff3cf4d77d6d26957ee7d1ab0bbd095553ed8dd8ad866a9aa36bcde1 | C/C++ | 4,760 | 157 | #pragma once
#include <ATen/cpu/vec/vec_base.h>
#include <ATen/cpu/vec/vec_n.h>
namespace at::vec {
inline namespace CPU_CAPABILITY {
template <
typename dst_t,
int dst_n,
typename src_t,
int src_n,
typename Enabled = void>
struct VecConvert {
static inline VectorizedN<dst_t, dst_n> apply(
... |
0ccb58c15a72afd2d11e79fee6590ebfb1ef7cc55546e6fdcd5587ba67ce2cbc | C/C++ | 4,766 | 160 | #ifndef _PYSTF_H
#define _PYSTF_H
#undef _DEBUG
#include <wx/wx.h>
#undef _DEBUG
#include <vector>
std::string get_versionstring( );
#ifdef WITH_PYTHON
PyObject* get_trace(int trace=-1, int channel=-1);
#endif
bool new_window( double* invec, int size );
bool new_window_matrix( double* inarr, int traces, int size )... |
000be23054ea07897d0ba21454020369102a62c4f0e414b3a5ca899e065fc582 | C/C++ | 4,775 | 160 | #pragma once
#include <ATen/Config.h>
#include <ATen/core/List.h>
#include <ATen/core/Tensor.h>
#include <c10/util/ArrayRef.h>
#include <c10/util/strides.h>
#include <unordered_map>
#if !defined(__s390x__) && !defined(__powerpc__)
#include <cpuinfo.h>
#endif
#include <vector>
#if AT_MKLDNN_ENABLED()
#include <ideep/t... |
16722b7d50dd0a5225491f475b9a0d1f964381dbc5777a3ed6df9a576256014b | C/C++ | 4,784 | 103 | #ifndef EIGEN_WARNINGS_DISABLED
#define EIGEN_WARNINGS_DISABLED
#ifdef _MSC_VER
// 4100 - unreferenced formal parameter (occurred e.g. in aligned_allocator::destroy(pointer p))
// 4101 - unreferenced local variable
// 4181 - qualifier applied to reference type ignored
// 4211 - nonstandard extension used : red... |
b2fae9f0d0daff483b89479523dca003b152805690a45be02f87078de44f48bc | C/C++ | 4,810 | 145 | /*
* Copyright (C) 1996,1997,2001,2002,2008,2016 Bernd Feige
* This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING).
*/
/*
* method.h contains the basic definitions and constructs for method-
* oriented programming, following Thomas G. Lane's JPEG software.
* Bernd Feige 7.12.1992
*/
#if... |
7f788f84ee02e51be63757b6294561cba929e51ec0d6da25ee92160868f83429 | C/C++ | 4,823 | 201 | #ifndef IMAGE_GRADIENT_H
#define IMAGE_GRADIENT_H
#include "buffered_image.h"
#include <src/jaz/gravis/t3Vector.h>
class Gradient
{
public:
template<typename T>
static inline gravis::t3Vector<T> sobelGrid3D(const RawImage<T>& img, int x, int y, int z);
template<typename T>
static inline gravis::t2Vec... |
02304e92e799421671cae821a932c8724cdffae02a9e1bf6b2a71b3e52f8655b | C/C++ | 4,850 | 156 | #pragma once
#include <ATen/core/IListRef.h>
#include <ATen/core/Tensor.h>
#include <c10/core/TensorImpl.h>
#include <c10/core/WrapDimMinimal.h>
#include <c10/util/irange.h>
namespace at {
// if dim_post_expr is 0 and wrap_scalar is true, then dim must be in the
// range [-1, 0]. This is a special case for scalar te... |
eec61bd5c8f349847f343ee6efc463b307b2392ffd4962d6d77d4615f5550329 | C/C++ | 4,852 | 126 | #pragma once
#include <c10/core/CachingDeviceAllocator.h>
#include <c10/core/DeviceCapability.h>
#include <c10/core/DeviceType.h>
#include <c10/macros/Macros.h>
#include <ATen/accelerator/Graph.h>
#include <ATen/core/Generator.h>
#include <optional>
namespace at::accelerator {
// Note [Accelerator Concept]
// This ... |
3ada62421934dcfe0cf42c6fee58a1c9ceec4cd904bdb8322520b21f3c21d5d0 | C/C++ | 4,857 | 111 | #pragma once
// The legacy mechanism for dispatching operators in ATen is a Type
// object, which is essentially a giant virtual dispatch table
// for every operation we support dynamically dispatching over.
//
// This has been deprecated in favor of ATenDispatch, and in the future,
// c10 dispatcher.
// TODO: Clean u... |
712b27aa286d91080a43662a252cf5398bc10f2a887bf1ae7ca3cd786f134469 | C/C++ | 4,863 | 226 | /***************************************************************************
*
* 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... |
91fb6505de661f415e539a66868b77762e43f6419a38674899a7124f177ea02f | C/C++ | 4,863 | 66 | #ifndef PARAMEST_H
#define PARAMEST_H
#include<RcppArmadillo.h>
// [[Rcpp::depends(RcppArmadillo)]]
// [[Rcpp::plugins(openmp)]]
arma::vec sigmaScoreREML_arma (const Rcpp::List& pvstar_i, const arma::vec& ystar,
const arma::mat& P, const arma::vec& curr_beta,
... |
9a7a789370c612782d69b31fb63739fc9dda47e8f2091380f6a98e099ce24a89 | C/C++ | 4,872 | 133 | #pragma once
#include <ATen/DimVector.h>
#include <c10/core/TensorOptions.h>
#include <c10/util/strides.h>
namespace at {
class Tensor;
namespace impl {
// Use this to define the prototype for a meta function. There are two
// versions; one that takes one argument (just the operator name), or FUNC2
// variant tha... |
01a5f3f2ea4b75f27ea85a048d11dca69de3fa9b3c8cd901812b55dd5d7d5fd0 | C/C++ | 4,900 | 123 | /*
* 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 <inttypes.h>
#include <stdarg.h>
#include <stdlib.h>
#define CLOG_NONE 0
#def... |
ed1a84af8ad6cc6185b5f71b2fb936b8b472b3694a6d2327bec283b931392cdf | C/C++ | 4,926 | 164 | /***************************************************************************
*
* Author: "Sjors H.W. Scheres", "Takanori Nakane"
* MRC Laboratory of Molecular Biology
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* ... |
354beb52dccc14077ceca0b7c3cd7c5eca45ef81b59a112a4f82f0e1f9db6bc9 | C/C++ | 4,953 | 199 | #ifndef SYCL_HELPER_FUNCTIONS_H_
#define SYCL_HELPER_FUNCTIONS_H_
#include <sys/time.h>
#include <signal.h>
#include <cstdio>
#include <ctime>
#include <cmath>
#include <ctime>
#include <iostream>
#include <fstream>
#include <limits>
#include <algorithm>
#include <numeric>
#include "src/complex.h"
#include "src/paral... |
10a6b75f910cad3db5b59f42aac3e299f7b1cd09b04e21a2fbd8e6dc02f2c388 | C/C++ | 4,954 | 157 | // This global header must not depend on native_functions.yaml or
// incremental builds will be next to useless
#pragma push_macro("TORCH_ASSERT_NO_OPERATORS")
#define TORCH_ASSERT_NO_OPERATORS
#include <cinttypes>
// This list of headers was generated using a script that finds
// high-impact headers and then manuall... |
409d0202b32c34f5d4854f00ece8348e99b562872479ea78749897f962cbda6c | C/C++ | 4,956 | 177 | /*
* 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 ... |
94bb564009922242d61d84d5402e2b7126d5d61f5b9cf427c3a3489603c27507 | C/C++ | 4,961 | 252 | #ifndef __LIBGRAVIS_T_GRAY_A_H__
#define __LIBGRAVIS_T_GRAY_A_H__
/******************************************************************************
** Title: tGray_A.h
** Description: Represents an RGB+Alpha color tupel.
**
** Author: Jean-Sebastien Pierrard, 2005
** Computer Science Departmen... |
711b299a5cec8b7a065153cd192fb23f4a51b83c0397bb107d05d1aed90cd198 | C/C++ | 4,981 | 151 | /***************************************************************************
*
* 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... |
44745615c8eb991c4c7ff1398662fed4ea761c10c7abe0cef2d68007f0a56c53 | C/C++ | 4,984 | 187 | #ifndef CTF_REFINE_PROGRAM_H
#define CTF_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 <src/jaz/optimization/optimizat... |
1a5b347dbe91ba9f4c5fcde0387bc8e9e1210c19d9d7001c05523805734e6068 | C/C++ | 4,988 | 164 | #pragma once
#include <ATen/Config.h>
#include <c10/macros/Macros.h>
#include <c10/util/safe_numerics.h>
#include <functional>
#include <string>
namespace at {
inline int64_t divup(int64_t x, int64_t y) {
int64_t n = 0;
// x + y - 1 overflows for large x or y, and silently rounds down
if (C10_UNLIKELY(c10::add_... |
e5f47a8239f4c8859b3ff46fcd660dcebff09d6cb8ef9c1cc24d3d7c6ead0e28 | C/C++ | 4,990 | 126 | // 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/VmapGeneratedPlumbing.h>
// This file contains templat... |
57b3f99be122f36ff6fb27f0678dd9c4b0bba4a8f456bc177fdea7ae0536dede | C/C++ | 4,992 | 175 | #pragma once
#include <ATen/Tensor.h>
#include <iostream>
#include <optional>
#include <ATen/core/grad_mode.h>
#include <c10/core/MemoryFormat.h>
#include <oneapi/dnnl/dnnl.hpp>
#include <oneapi/dnnl/dnnl_graph.hpp>
#include <oneapi/dnnl/dnnl_graph_sycl.hpp>
#include <oneapi/dnnl/dnnl_sycl.hpp>
#include <oneapi/dnnl/d... |
cde190cd3f5a43b76581b9048b2fa8edb3fb98c3590abff4471761adb49ca405 | C/C++ | 5,005 | 123 | #pragma once
#include <cutlass/arch/arch.h>
#include <cutlass/arch/mma.h>
#include <cutlass/bfloat16.h>
#include <cutlass/cutlass.h>
#include <cutlass/gemm/gemm.h>
#include <cutlass/layout/matrix.h>
#include <ATen/native/cuda/cutlass_extensions/arch/mma.h>
#include <ATen/native/cuda/cutlass_extensions/gemm/kernel/mix... |
c9d2026a1d8e287117b7b66da0db631a74e3e813b8a579900850c6532fe15f1b | C/C++ | 5,006 | 145 | #ifndef BP_IMPL_KERNELS_H_
#define BP_IMPL_KERNELS_H_
#include <vector>
#include <iostream>
#include <limits>
#include <chrono>
#include <cassert>
#include <sycl/sycl.hpp>
#include "src/acc/acc_backprojector.h"
#include "src/acc/sycl/sycl_dev.h"
#include "src/acc/sycl/sycl_kernels/sycl_utils.h"
#include "src/acc/syc... |
779101a5ccc62e7fca3fc16853650a7cfb102e6c1f40cd3031f6a68eb40660f9 | C/C++ | 5,032 | 189 | #pragma once
#include <ATen/core/Tensor.h>
#include <ATen/cudnn/Descriptors.h>
#include <ATen/cudnn/Types.h>
#include <ATen/cudnn/cudnn-wrapper.h>
#include <ATen/native/ConvUtils.h>
namespace at {
namespace native {
// ---------------------------------------------------------------------
//
// Helper classes
//
// -... |
3cb9a6e148e1146a0d59411f7624702de6b2f14a234802b49a1dbfc3685a251b | C/C++ | 5,038 | 131 | #pragma once
#include <ATen/cuda/ATenCUDAGeneral.h>
#include <cuda.h>
#include <nvrtc.h>
namespace at::cuda {
// NOTE [ USE OF NVRTC AND DRIVER API ]
//
// ATen does not directly link to either libnvrtc or libcuda because they
// require libcuda to be installed, yet we want our GPU build to work on CPU
// machines ... |
e7f262ab95b5aea21dbb8f09394ec39fa1f42d5b7f7710dced1a521a1ed7675a | C/C++ | 5,038 | 121 | /* --------------------------- rawdata.h --------------------------- */
/* <time> */
/* pb 17-08-1993 11:00; 386 version */
/* pb 11-05-1993 10:28; ndatbytes */
/* 03-05-1993 22:15; new structures and routines */
/* pb 26-03-1993 10:09; MAXdataperchannel */
#include <time.h>
#include <read_struct.h>
/* maximum sizes... |
1d30b07a39ed98179870a36d54de3ed71259d158710dda891488d2ea0f56e7aa | C/C++ | 5,051 | 133 | void Write_OutputFiles0(); /* print.c */
void Write_OutputFiles0(); /* print.c */
void Write_OutputFiles1(); /* print.c */
void Write_OutputFiles2(); /* print.c */
void Write_OutputFiles3(); /* print.c */
void Ttest_macro4(); /* ttest.c */
void Print_Behav5(); /* printbehav.c */
void Ttest_macro6(); /* ttest.c */... |
1b66a8d691406a3797dcd4b8afbe72b7ba9b468ae5f9f0148ee5afa34b37436f | C/C++ | 5,076 | 146 | /***************************************************************************
*
* 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... |
f6e8fb741172c2beb1c29e8e1cfa59af6e8a74fbd161e8f7103209dd222d6d7c | C/C++ | 5,085 | 101 | /***************************************************************************
*
* 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... |
968182f166d71b820b3651730cdd5c60253c26558b96c54259c2475f61a61373 | C/C++ | 5,097 | 145 | /***************************************************************************
*
* 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... |
69e89a3e1837ed317fc4745068beebfceced1fb07ea426f55773f75d1fac3002 | C/C++ | 5,118 | 170 | /***************************************************************************
*
* 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... |
eef50f7c003220b61b1165fb9f854b3c8ad41ccd9c06cc2a572066d0c5a0e866 | C/C++ | 5,125 | 126 | // This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>
// Copyright (C) 2009 Hauke Heibel <hauke.heibel@googlemail.com>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a ... |
0827f1a78970f5577d678671ae2895bdc084c5f0359a9de64e459e3bb77d3176 | C/C++ | 5,141 | 154 | /*
* Copyright (C) 1994-1996,1999,2004 Bernd Feige
* This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING).
*/
#ifndef ARRAY_H
#define ARRAY_H
#include <stddef.h> /* size_t etc */
#include <stdio.h> /* FILE * */
#include <method.h>
#ifdef SPLINE_GRIDDER
# ifdef DATATYPE
# undef DATATYPE
# en... |
880f09df45da3adece832b84ded523963a3f653e14141c3198778266028cf7fa | C/C++ | 5,174 | 153 | // Copyright © 2023 Apple Inc.
#pragma once
#include <ATen/mps/MPSStream.h>
#include <c10/util/intrusive_ptr.h>
#include <atomic>
#include <stack>
namespace at::mps {
// NOTE: don't create instances of this class directly.
// Use MPSEventPool to acquire instances of MPSEventPtr.
class MPSEvent {
public:
explici... |
c50bf6c926170531a794420dc4cdfed0b54725ab38f628ddbd09b61153e27a09 | C/C++ | 5,228 | 154 | #pragma once
#include <ATen/core/Tensor.h>
#include <ATen/Config.h>
#include <cstdint>
#ifdef USE_FBGEMM
#include <fbgemm/FbgemmEmbedding.h>
#endif
namespace at::native {
enum class EmbeddingBagMode {
SUM = 0,
MEAN = 1,
MAX = 2,
};
[[maybe_unused]] static bool operator==(int64_t op1, EmbeddingBagMode op2) {
... |
6923084d1e925359d79a7e0aae1859184130952d48bd754ca5cfce6d01c1a740 | C/C++ | 5,235 | 187 | /* mconf.h
*
* Common include file for math routines
*
*
*
* SYNOPSIS:
*
* #include "mconf.h"
*
*
*
* DESCRIPTION:
*
* This file contains definitions for error codes that are
* passed to the common error handling routine mtherr()
* (which see).
*
... |
2fafc61c1d4364e22c6984933c13bec91330d84758d613d5372700fb90f8b823 | C/C++ | 5,237 | 149 | #pragma once
#include <ATen/core/Tensor.h>
#include <ATen/TensorUtils.h>
#include <ATen/Utils.h>
#include <ATen/Parallel.h>
#include <ATen/native/cpu/utils.h>
#include <c10/util/irange.h>
#include <algorithm>
namespace at::native {
template <typename T>
static void im2col(
const T* data_im,
const int64_t ch... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.