sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
7d68b9bdd807bcf70fa2e9ab522708bcd07da621905cbaa4d695989af1c6f768 | C++ | 206 | 9 | #define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/native/Unfold2d.h>
namespace at::native {
DEFINE_DISPATCH(unfolded2d_copy_stub);
DEFINE_DISPATCH(unfolded2d_acc_stub);
} // namespace at::native
|
04737feb37888942d1aadf954b3bfba5edaaa1c0cef75af37fa014200233cc60 | C++ | 207 | 7 | /* Portions of this code are under:
Copyright (c) 2022 Advanced Micro Devices, Inc. All rights reserved.
*/
#include "src/acc/acc_projector.h"
#include <signal.h>
#include "src/acc/acc_projector_impl.h"
|
5d9d856e0fb9fcaba9f620c232387a96b1ad210e66b4e2e13093c9e8380f3fc3 | C++ | 210 | 10 | #include "rigid_alignment.h"
using namespace gravis;
RigidAlignment::RigidAlignment(gravis::d3Vector position, double rot, double tilt, double psi)
:
position(position),
rot(rot), tilt(tilt), psi(psi)
{
}
|
e737a4fd5c5f6d2a4c57cd9aadfe24e28a87e1ba12bd65b5c0dc215659c0aff9 | C++ | 215 | 8 | #include <c10/core/impl/DeviceGuardImplInterface.h>
#include <c10/macros/Macros.h>
namespace at::detail {
C10_REGISTER_GUARD_IMPL(Meta, c10::impl::NoOpDeviceGuardImpl<DeviceType::Meta>)
} // namespace at::detail
|
63ce092d72b09fd892ec8629aac74df922df98e59c87a96eb78ef6f83eb2e570 | C++ | 228 | 12 | #include <ATen/cuda/nvrtc_stub/ATenNVRTC.h>
namespace at::cuda {
NVRTC* load_nvrtc() {
auto self = new NVRTC();
#define CREATE_ASSIGN(name) self->name = name;
AT_FORALL_NVRTC(CREATE_ASSIGN)
return self;
}
} // at::cuda
|
cf5f04e8adea69c707633edd5e50168bd71365d0451825110790bd228ff92fa9 | C++ | 230 | 12 | #include <ATen/core/Range.h>
#include <ostream>
namespace at {
std::ostream& operator<<(std::ostream& out, const Range& range) {
out << "Range[" << range.begin << ", " << range.end << ']';
return out;
}
} // namespace at
|
0c98c7be64b63cf94b77f9ad2a3a0b031981ee6cb263a28368ba589b8e5013a2 | C++ | 234 | 14 | #include <src/args.h>
#include <src/jaz/tomography/programs/template_picker.h>
#include <src/jaz/util/log.h>
int main(int argc, char *argv[])
{
TemplatePickerProgram tpp;
tpp.readParameters(argc, argv);
tpp.run();
return 0;
}
|
550a8a7de9bc69ea7b8fee4969c7ce9280ee78204070913168afb4a990f8e3cb | C++ | 262 | 12 | #include "radial_avg.h"
double RadialAvg::get1DIndex(
double x, double y, double z,
int w, int h, int d)
{
const double xx = x;
const double yy = (y >= h/2)? y - h: y;
const double zz = (z >= d/2)? z - d: z;
return sqrt(xx * xx + yy * yy + zz * zz);
}
|
71a4a76dec7485a72e3759c5ea4bc8fa6666e68361a3c61ff9206acf6e5063b6 | C++ | 264 | 18 | #include <src/args.h>
#include <src/jaz/tomography/programs/mag_fit.h>
int main(int argc, char *argv[])
{
try
{
MagFitProgram program(argc, argv);
program.run();
}
catch (RelionError e)
{
return RELION_EXIT_FAILURE;
}
return RELION_EXIT_SUCCESS;
}
|
8e75b9737687f57e792a6a91690f986b5f07e60188af2e287589b095f6ff2063 | C++ | 269 | 10 | #include "./zoom.h"
YZoom YZoom::operator*( double factor ) {
return YZoom( long(startPosY*(double)factor), yZoom*factor, isLogScaleY );
}
XZoom XZoom::operator*( double factor ) {
return XZoom( long(startPosX*(double)factor), xZoom*factor, isLogScaleX );
}
|
023f4cbc0c08a61d8ad28e1d928a210138c1359814fc67d0997a9d2f8137af55 | C++ | 271 | 19 | #include <src/args.h>
#include <src/jaz/tomography/programs/fcc_computation.h>
int main(int argc, char *argv[])
{
try
{
FccProgram program(argc, argv);
program.run();
}
catch (RelionError XE)
{
return RELION_EXIT_FAILURE;
}
return RELION_EXIT_SUCCESS;
}
|
b1c7daf337821a4367a2f03636cd82f09f97e9f3a9b3f872fe3246776ab4db63 | C++ | 273 | 17 | #include <ATen/SequenceNumber.h>
namespace at::sequence_number {
namespace {
thread_local uint64_t sequence_nr_ = 0;
} // namespace
uint64_t peek() {
return sequence_nr_;
}
uint64_t get_and_increment() {
return sequence_nr_++;
}
} // namespace at::sequence_number
|
d9a32a104a3b64b92e3cc5cd8935f53e6d34b86e5341a5cfe946c21e700398c9 | C++ | 274 | 19 | #include <src/args.h>
#include <src/jaz/tomography/programs/bfactor_fit.h>
int main(int argc, char *argv[])
{
try
{
BfactorFitProgram program(argc, argv);
program.run();
}
catch (RelionError XE)
{
return RELION_EXIT_FAILURE;
}
return RELION_EXIT_SUCCESS;
}
|
20111bb3c70895b3c04b7b20a6fea48819bcd9d06f8862b2c1e4a8e734ed3d7f | C++ | 284 | 21 | #include <src/args.h>
#include <src/jaz/tomography/programs/align.h>
int main(int argc, char *argv[])
{
AlignProgram ap(argc, argv);
try
{
ap.run();
}
catch (RelionError e)
{
std::cerr << e << std::endl;
return RELION_EXIT_FAILURE;
}
return RELION_EXIT_SUCCESS;
}
|
0aa0cbc7fd66541c1f3158efa463d7466bf260e3b5dcabfd3b46f10533502889 | C++ | 292 | 18 | #include <src/args.h>
#include <src/jaz/tomography/programs/local_particle_refine.h>
int main(int argc, char *argv[])
{
try
{
LocalParticleRefineProgram program(argc, argv);
program.run();
}
catch (RelionError XE)
{
return RELION_EXIT_FAILURE;
}
return RELION_EXIT_SUCCESS;
}
|
bad5582c5eb3b19286a010859c3294671b80bf1c1f26a61803af2432ad944a70 | C++ | 293 | 14 | #include <ATen/ATen.h>
namespace at::native {
// alias for to_padded_tensor in nested namespace
Tensor nested_to_padded_tensor(
const Tensor& t,
double padding,
OptionalIntArrayRef output_size) {
return t.to_padded_tensor(padding, output_size);
}
} // namespace at::native
|
7756266700576d3f6bdc1750aa4e0c9efe5f4407ee255e43cfdc49135be22758 | C++ | 306 | 15 | #include "resampling.h"
gravis::i2Vector Resampling::getFourierCroppedSize2D(int w, int h, double factor, bool keepSizeEven)
{
int w_out = (int)(w / factor);
int h_out = (int)(h / factor);
if (keepSizeEven)
{
w_out -= w_out % 2;
h_out -= h_out % 2;
}
return gravis::i2Vector(w_out, h_out);
}
|
0290e9e4c4eb9ce85b6d75d514ab2ee44eae46cc51c6154a391bb39bf9e6215a | C++ | 310 | 21 | #include <src/args.h>
#include <src/jaz/tomography/programs/ctf_refinement.h>
int main(int argc, char *argv[])
{
CtfRefinementProgram program(argc, argv);
try
{
program.run();
}
catch (RelionError e)
{
std::cerr << e << std::endl;
return RELION_EXIT_FAILURE;
}
return RELION_EXIT_SUCCESS;
}
|
639451449689f008457ed10e85b82a862f27ed9de2e49aa02f70686e8dea854b | C++ | 316 | 13 | #include "linear_2D_deformation_model.h"
Linear2DDeformationModel::Linear2DDeformationModel()
{
}
Linear2DDeformationModel::Linear2DDeformationModel(
const Deformation2D::Parameters& parameters,
const gravis::i2Vector& imageSize)
: imageSize(imageSize),
imageCentre(0.5 * imageSize.x, 0.5 * imageSize.y)
{
}
|
de4631fd065ec326df77630576b83291088fe058a38947bc84a2d99d4dad6d60 | C++ | 317 | 10 | /* Portions of this code are under:
Copyright (c) 2022 Advanced Micro Devices, Inc. All rights reserved.
*/
#include <signal.h>
#include <hip/hip_runtime.h>
#include "src/acc/hip/hip_settings.h"
#include "src/acc/acc_backprojector.h"
#include "src/acc/acc_projector.h"
#include "src/acc/acc_backprojector_impl.h"
|
cbc9d1e515ae7bdfe122d015490b11375f571fa429c36a41575c5a00e1d618a7 | C++ | 321 | 20 | #include "annotation.h"
Annotation::Annotation(std::size_t onset, size_t duration) :
position(onset), duration(duration)
{
}
Annotation::~Annotation()
{
}
std::size_t Annotation::GetAnnotationPosition()
{
return this->position;
}
std::size_t Annotation::GetAnnotationDuration()
{
return this->duration;
}... |
a5002c8e2c0868aa03e97f514b03de778af09696d03e22f08990bb6d6c7d7ce7 | C++ | 334 | 23 | #include <src/args.h>
#include <src/jaz/tomography/programs/subtomo.h>
#include <src/jaz/util/log.h>
int main(int argc, char *argv[])
{
try
{
SubtomoProgram program;
program.readParameters(argc, argv);
program.run();
}
catch (RelionError e)
{
return RELION_EXIT_FAILURE;
}
return RELION_EXIT_SUCCESS;
... |
64b5daef2c0e66f7aadef249444c2bcbb1b74dc17bbafd22b3feb4ea242331ba | C++ | 340 | 13 | #include "axi_dma_lib.hpp"
#define AXIDMA_DEVICE_DEFINE 0x40400000
#define DESTINATION_ADDR_OFFSET_DEFINE 0x0F000000
#define SOURCE_ADDR_OFFSET_DEFINE 0x0E000000
int main()
{
Axidma_pool axidma(AXIDMA_DEVICE_DEFINE, SOURCE_ADDR_OFFSET_DEFINE, DESTINATION_ADDR_OFFSET_DEFINE);
axidma.print_mm2s_status();
axidma.pri... |
4554d41b0d0321e2a363b1cdd0737014ea92a43fe1c16475f8d7b11b9cee2ab3 | C++ | 344 | 17 | #include <ATen/DTensorState.h>
namespace at {
namespace {
thread_local bool kDTensorAllowImplicitReplication = false;
}
bool get_dtensor_allow_implicit_replication() {
return kDTensorAllowImplicitReplication;
}
void set_dtensor_allow_implicit_replication(bool enabled) {
kDTensorAllowImplicitReplication = enable... |
f9049ba66ffe645a2b57873d96ccf7e68464607dcd8b044df25adb0b7da534dd | C++ | 347 | 21 | #include <src/args.h>
#include <src/jaz/tomography/programs/reconstruct_particle.h>
#include <src/jaz/util/log.h>
int main(int argc, char *argv[])
{
try
{
ReconstructParticleProgram program;
program.readParameters(argc, argv);
program.run();
}
catch (RelionError e)
{
return RELION_EXIT_FAILURE;
}
ret... |
b95adc31f96135f448a9c6dc83dcc2ea6b86c51124b06c2e76c59cb12247b7cf | C++ | 357 | 10 | #include <catch2/catch.hpp>
#include "src/ctf.h"
//Actually test the getCTF function. You may wish to test the CTF constructor and setters/getters separately.
TEST_CASE( "Test getCTF", "[ctf]" ) {
CTF ctf;
ctf.setValues(10000.0, 12000.0, 90.0, 300.0, 2.7, 0.1, 0.0, 1.0, 0.0);
float val = ctf.getCTF(10.0, 10.0);
... |
0f1e766cca7e7d545fb5202a8c21e77b7a369b636355c50ee65ba051b5205fd9 | C++ | 366 | 22 | #include "src/local_symmetry_mpi.h"
int main(int argc, char *argv[])
{
local_symmetry_parameters_mpi prm;
try
{
prm.read(argc, argv);
prm.run();
}
catch (RelionError XE)
{
if (prm.verb > 0)
prm.usage();
std::cerr << XE;
MPI_Abort(MPI_COMM_WORLD, RELION_EXIT_FAILURE);
}
MPI_Barrier(MP... |
62d51e352d9bb3829a6259591b24a70c8b6237a4ea4784b7a6524ac9fa15b226 | C++ | 373 | 15 | #include <ATen/Dispatch.h>
#if defined ENABLE_RECORD_KERNEL_FUNCTION_DTYPE
#include <ATen/record_function.h>
namespace at::detail {
void record_kernel_function_dtype(std::string name) {
RECORD_FUNCTION_WITH_SCOPE(
at::RecordScope::KERNEL_FUNCTION_DTYPE,
std::move(name),
c10::ArrayRef<const c... |
8f9851823fbe867b3accdbdb676a9262498589133ddd146add50417e5b83fb29 | C++ | 374 | 22 | #include <src/args.h>
#include <src/jaz/tomography/programs/reconstruct_tomogram.h>
int main(int argc, char *argv[])
{
try
{
TomoBackprojectProgram program;
program.readParameters(argc, argv);
program.initialise();
program.run();
program.writeOutput();
}
catch (RelionError e)
{
return RE... |
0f1e3cd68d70ee51ca54b3e9d8f53ce7fd54bc4098af8aac0bd8b995d6b34262 | C++ | 394 | 19 | #include <ATen/core/operator_name.h>
namespace c10 {
std::string toString(const OperatorName& opName) {
std::ostringstream oss;
oss << opName;
return std::move(oss).str();
}
std::ostream& operator<<(std::ostream& os, const OperatorName& opName) {
os << opName.name;
if (!opName.overload_name.empty()) {
... |
c2e6589cde08aad4397ceae5e0a4f9aa5c01571ae9300d2d80495996c9058006 | C++ | 407 | 18 | #ifdef USE_PYTORCH_QNNPACK
#include <ATen/native/quantized/cpu/init_qnnpack.h>
#include <c10/util/Exception.h>
#include <pytorch_qnnpack.h>
namespace at::native {
void initQNNPACK() {
static enum pytorch_qnnp_status qnnpackStatus = pytorch_qnnp_initialize();
TORCH_CHECK(
qnnpackStatus == pytorch_qnnp_statu... |
9aac60f04b31ca200758750fe2e1dfc077f919a71095124e71c6e4d6d0a61808 | C++ | 411 | 21 | /*
* axichanneltimeoutexcep.cpp
*
* Created on: Nov 23, 2016
* Author: hyo
*/
#ifndef __AXIDMA_TIMEOUT_EXCEPTION__
#define __AXIDMA_TIMEOUT_EXCEPTION__
#include <exception>
/** \brief AXIDMA_timeout_exception class.
*/
class AXIDMA_timeout_exception: public std::exception {
public:
virtual const char* wha... |
eef990c161dbda0665f41a8c8f5316ed6350c888459c12793a1c971adecd0f41 | C++ | 415 | 25 | #include <src/args.h>
#include <mpi.h>
#include <src/jaz/tomography/programs/subtomo_mpi.h>
#include <src/jaz/util/log.h>
int main(int argc, char *argv[])
{
SubtomoProgramMpi prm;
try
{
prm.readParameters(argc, argv);
prm.run();
}
catch (RelionError XE)
{
MPI_Abort(MPI_COMM_WORLD, RELION_EXIT_FAILURE);
... |
e83624dcdeee44c3af847f662972f7bafd92aafc1d9c0a06bf638ce065e1c758 | C++ | 423 | 17 | // For compilers that support precompilation, includes "wx/wx.h".
#include <wx/wxprec.h>
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#include "./app.h"
wxAppConsole *wxCreateApp() {
wxAppConsole::CheckBuildOptions(WX_BUILD_OPTIONS_SIGNATURE, "your program");
return new wxStfApp;
}
wxAppInitializer wxTheAp... |
49f3a7c5d78d585ce48e7135496db492a57b796014759e99e9bda8ad04654943 | C++ | 437 | 20 | #include <ATen/core/VariableHooksInterface.h>
namespace at::impl {
namespace {
VariableHooksInterface* hooks = nullptr;
}
void SetVariableHooks(VariableHooksInterface* h) {
hooks = h;
}
VariableHooksInterface* GetVariableHooks() {
TORCH_CHECK(hooks, "Support for autograd has not been loaded; have you linked agai... |
57b1a49d5d086be3e7f8d5ce7be3f74b26ec800dbc753f65011529f408c84829 | C++ | 440 | 25 | #include <src/args.h>
#include <mpi.h>
#include <src/jaz/tomography/programs/reconstruct_particle_mpi.h>
#include <src/jaz/util/log.h>
int main(int argc, char *argv[])
{
ReconstructParticleProgramMpi prm;
try
{
prm.readParameters(argc, argv);
prm.run();
}
catch (RelionError XE)
{
MPI_Abort(MPI_COMM_WORLD... |
dac11d881f513e7501493a62b8fda323ae019c8bdc5388c1a39150f88e729589 | C++ | 447 | 18 | /* Portions of this code are under:
Copyright (c) 2022 Advanced Micro Devices, Inc. All rights reserved.
*/
#include "src/acc/acc_projector_plan.h"
#include "src/time.h"
#include <hip/hip_runtime.h>
#ifdef _HIP_ENABLED
#ifdef HIP_FORCESTL
#include "src/acc/hip/hip_utils_stl.h"
#else
#include... |
ac1dfd00179bb3559611f6ace3da55e1d8ea9c720476b10622e816873aeaae5f | C++ | 448 | 16 | #include <ATen/DeviceAccelerator.h>
#include <ATen/accelerator/Graph.h>
namespace at::accelerator {
Graph::Graph(bool keep_graph) {
c10::DeviceType device_type = at::accelerator::getAccelerator(true).value();
TORCH_CHECK(
has_graph_impl(device_type),
"Graph is not supported on device type: ",
de... |
502347c6299ee44e29322744403f4e2342fb0ecea043bd654911f31bc27deb8c | C++ | 452 | 19 | #include "filament_mapping.h"
void FilamentMapping::write(std::string filename)
{
index.write(filename + "_index.mrc");
signed_dist.write(filename + "_signed_dist.mrc");
mask.write(filename + "_mask.mrc");
}
FilamentMapping FilamentMapping::read(std::string filename)
{
FilamentMapping out;
out.index.read(filen... |
e4711a5511375755c3cdf5336b60d20ee5021f43e72d33b5d696179ec1c3742e | C++ | 453 | 18 | #include "spline_2D_deformation_model.h"
Spline2DDeformationModel::Spline2DDeformationModel()
{
}
Spline2DDeformationModel::Spline2DDeformationModel(
const Deformation2D::Parameters& parameters,
const gravis::i2Vector& imageSize)
:
imageSize(imageSize),
gridSize(parameters.grid_width, parameters.grid_hei... |
7dc35120c9298d7e713e3045c42bd864208775293cb46bb966ce73c5a8843265 | C++ | 456 | 21 | #include <ATen/detail/XPUHooksInterface.h>
namespace at {
namespace detail {
const XPUHooksInterface& getXPUHooks() {
auto create_impl = [] {
auto hooks = XPUHooksRegistry()->Create("XPUHooks");
if (hooks) {
return hooks;
}
return std::make_unique<XPUHooksInterface>();
};
static auto hooks... |
67d9db15693c9237781b339c51732ffbce931b8146093f4e0f1244e5625c1965 | C++ | 457 | 22 | #include <ATen/detail/IPUHooksInterface.h>
namespace at {
namespace detail {
const IPUHooksInterface& getIPUHooks() {
auto create_impl = [] {
auto hooks = IPUHooksRegistry()->Create("IPUHooks");
if (hooks) {
return hooks;
}
return std::make_unique<IPUHooksInterface>();
};
static auto hooks... |
c38e52e336189644d4888b843344b815178e1f2bcb4921490368b093c6ec910e | C++ | 457 | 20 | #include "image_file_helper.h"
#include <src/image.h>
using namespace gravis;
t3Vector<long int> ImageFileHelper::getSize(const std::string &filename)
{
Image<RFLOAT> img;
img.read(filename, false);
return t3Vector<long int>(img.data.xdim, img.data.ydim, img.data.zdim * img.data.ndim);
}
double ImageFileHelper:... |
14ab2ea811dd5b231758b601436c9b914494b9313afee86068b853304cca25f2 | C++ | 461 | 20 | #include <torch/csrc/jit/api/module.h>
#include <torch/jit.h>
#include <torch/script.h>
#include <fstream>
#include <iostream>
#include <string>
int main(int argc, char* argv[]) {
std::string input_file_path{argv[1]};
std::string output_file_path{argv[2]};
std::ifstream ifs(input_file_path);
std::stringstrea... |
7e5184e1f8ff5d1726500f1d995143335e2ac9db5ceadaa2ee9bc4cdd0a2abef | C++ | 472 | 12 | #include <ATen/core/op_registration/adaption.h>
namespace c10::impl {
void common_device_check_failure(Device common_device, const at::Tensor& tensor, at::CheckedFrom methodName, at::CheckedFrom argName) {
TORCH_CHECK(false,
"Expected all tensors to be on the same device, but got ", argName, " is on ", tensor.... |
e2bb4b30ef0bc0d511821cbb062de3ac1e1bb77eb0bf21f775bad2234adb7a82 | C++ | 484 | 20 | #ifdef _SYCL_ENABLED
// Make sure we build for SYCL
#include "src/acc/sycl/device_stubs.h"
#include "src/acc/settings.h"
#include "src/time.h"
#include "src/ml_optimiser.h"
#include "src/acc/acc_ptr.h"
#include "src/acc/acc_projector.h"
#include "src/acc/acc_backprojector.h"
#include "src/acc/sycl/sycl_helper_functi... |
331a007390b412f35ff287fe577bb631d70096ba8845f720032c94b21468cbba | C++ | 501 | 22 | #include <ATen/detail/HPUHooksInterface.h>
namespace at {
namespace detail {
TORCH_API const at::HPUHooksInterface& getHPUHooks() {
auto create_impl = [] {
auto hooks = HPUHooksRegistry()->Create("HPUHooks", HPUHooksArgs{});
if (hooks) {
return hooks;
}
return std::make_unique<HPUHooksInterfac... |
fae79793ed6810d92c32c1e5e157ac5c354cec876e44c4812e71158d70c30891 | C++ | 521 | 25 | // Copyright © 2022 Apple Inc.
#include <ATen/detail/MPSHooksInterface.h>
namespace at {
namespace detail {
const MPSHooksInterface& getMPSHooks() {
auto create_impl = [] {
#if !defined C10_MOBILE
auto hooks = MPSHooksRegistry()->Create("MPSHooks");
if (hooks) {
return hooks;
}
#endif
return... |
e3dfa4407e0edef7f3290229f50b735945edbdeb5327adb41a9d25cecad2c779 | C++ | 524 | 28 | #include <src/image.h>
#include <src/jaz/single_particle/vtk_helper.h>
int main(int argc, char *argv[])
{
if (argc < 2)
{
std::cerr << "usage: relion_mrc2vtk X.(mrc/mrcs/tiff/spi)\n -> X.vtk\n";
return RELION_EXIT_FAILURE;
}
std::string fn(argv[1]), fn2;
if (fn.find_last_of('.') != std::string::npos)
{
f... |
b1ec24592c424ea5def1cbf7f7e3dbc815ad8f7f9e5924bdc927af571cacfeb9 | C++ | 530 | 31 | #include <src/args.h>
#include <mpi.h>
#include <src/jaz/tomography/programs/align_mpi.h>
int main(int argc, char *argv[])
{
AlignProgramMpi program(argc, argv);
try
{
if (program.nodeCount < 2)
{
REPORT_ERROR("align_mpi: this program needs to be run with at least two MPI processes!");
}
program.run()... |
ee215f1cdcbe25c897123c93708ee062e88734531c83e4c354fb26a7c7c58200 | C++ | 532 | 20 | #include <Rcpp.h>
using namespace Rcpp;
// Nipals
List Nipals(SEXP Mat, SEXP params);
RcppExport SEXP pcaMethods_Nipals(SEXP MatSEXP, SEXP paramsSEXP) {
BEGIN_RCPP
SEXP __sexp_result;
{
Rcpp::RNGScope __rngScope;
Rcpp::traits::input_parameter< SEXP >::type Mat(MatSEXP );
Rcpp::traits::... |
10795a924224914b0a1ee498eb59a64a468771418a09e5a722a5e7312d5f5987 | C++ | 535 | 16 | #include <c10/hip/HIPCachingAllocator.h>
#include <ATen/hip/impl/HIPCachingAllocatorMasqueradingAsCUDA.h>
namespace c10 { namespace hip {
namespace HIPCachingAllocatorMasqueradingAsCUDA {
c10::cuda::CUDACachingAllocator::CUDAAllocator* get() {
return c10::cuda::CUDACachingAllocator::get();
}
void recordStreamMasqu... |
aa148fa5677ef35d896ae99a1c1a12bf7f62c57a5685378f9e532c382c7bb7b6 | C++ | 537 | 20 | #include <ATen/ATen.h>
#include <ATen/NativeFunctions.h>
#include <torch/library.h>
#include <ATen/quantized/Quantizer.h>
#include <ATen/native/quantized/cpu/QuantizedOps.h>
namespace at::native {
DEFINE_DISPATCH(qdropout_stub);
static Tensor quantized_dropout(
const Tensor& qx, double output_scale, int64_t outp... |
1a23fcb35a558924282425bacfc6579a5e618725b209e3f0e489583255f84a79 | C++ | 540 | 19 | #include <ATen/core/List.h>
namespace c10::detail {
bool operator==(const ListImpl& lhs, const ListImpl& rhs) {
return *lhs.elementType == *rhs.elementType &&
lhs.list.size() == rhs.list.size() &&
// see: [container equality]
std::equal(
lhs.list.cbegin(),
lhs.list.cend(),
... |
fd2b27346eb5bc601da06fe2ed3069271ae46fc688c560dd1872a38ab8883fc0 | C++ | 548 | 27 | // Copyright (C) 1996 Bernd Feige
// This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING).
#include "Polar.hh"
Polar::Polar() {
r=0;
}
Polar::Polar(Point* p) {
r=p->abs();
theta=acos(p->z/r);
phi=atan2(p->x, p->y);
}
Point Polar::to_Point() {
Point p;
double cos_theta=cos(theta);
double... |
9b8aa7330871d6c900fcd4437ca09b0684cff839f265b990b1d365cd7937740c | C++ | 552 | 31 | #include <src/args.h>
#include <mpi.h>
#include <src/jaz/tomography/programs/ctf_refinement_mpi.h>
int main(int argc, char *argv[])
{
CtfRefinementProgramMpi program(argc, argv);
try
{
if (program.nodeCount < 2)
{
REPORT_ERROR("refine_ctf_mpi: this program needs to be run with at least two MPI processes!")... |
0e9a46a7d23522739e26e3f2ca7a6593346115830c3b97525d18b50655f6bc12 | C++ | 556 | 18 | #include <ATen/core/PythonOpRegistrationTrampoline.h>
namespace at::impl {
std::atomic<c10::impl::PyInterpreter*>
PythonOpRegistrationTrampoline::interpreter_{nullptr};
c10::impl::PyInterpreter* PythonOpRegistrationTrampoline::getInterpreter() {
return PythonOpRegistrationTrampoline::interpreter_.load();
}
bo... |
554df518d13e330f2fd9d029b7a686e9262c0af77c407fdfeb8c0b0b207e013e | C++ | 556 | 23 | #ifdef _SYCL_ENABLED
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include "src/acc/sycl/device_stubs.h"
#include "src/acc/acc_ptr.h"
#include "src/acc/acc_projector.h"
#include "src/acc/acc_backprojector.h"
#include "src/acc/acc_projector_plan.h"
#include "src/acc/sycl/sycl_benchmark_utils.h"
#includ... |
5c8bc4fa2aaa2e0047e312760f8d22c8f52a7d5cbc3f85fe699bd8765235d80c | C++ | 560 | 23 | #ifdef _SYCL_ENABLED
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include "src/acc/sycl/device_stubs.h"
#include "src/acc/acc_ptr.h"
#include "src/acc/acc_projector.h"
#include "src/acc/acc_backprojector.h"
#include "src/acc/acc_projector_plan.h"
#include "src/acc/sycl/sycl_benchmark_utils.h"
#includ... |
749a27cc332152e8c475340ef62d05bf1f0293f0b60ddceaf1ea7643f4c65f3d | C++ | 562 | 24 | #include <ATen/detail/HIPHooksInterface.h>
namespace at {
namespace detail {
// See getCUDAHooks for some more commentary
const HIPHooksInterface& getHIPHooks() {
auto create_impl = [] {
#if !defined C10_MOBILE
auto hooks = HIPHooksRegistry()->Create("HIPHooks", HIPHooksArgs{});
if (hooks) {
return ho... |
bb654629979470ff0e3206f9a769f11ef6f4081ac1223a96531fab1a2ae55824 | C++ | 568 | 22 | #include<RcppArmadillo.h>
// [[Rcpp::depends(RcppArmadillo)]]
#include "multiP.h"
using namespace Rcpp;
List multiP(List partials, arma::mat psvar_in){
int nsize = partials.size();
int ps_nrows = psvar_in.n_rows; // this should be the column dimension
List out(nsize);
for(int k = 0; k < nsize; k++){
... |
15e7ff135d0e60832993667f1a2e9ad6f01d6bfe54e3b71b3e4624a0f519b700 | C++ | 579 | 23 | #include <ATen/detail/MAIAHooksInterface.h>
namespace at {
namespace detail {
// See getCUDAHooks for some more commentary
const MAIAHooksInterface& getMAIAHooks() {
auto create_impl = [] {
auto hooks = MAIAHooksRegistry()->Create("MAIAHooks");
if (hooks) {
return hooks;
}
return std::make_uni... |
7a204690070fa55cdf8435acf85945c7933b3980137448566f3948ed454871f2 | C++ | 586 | 23 | #include <ATen/detail/XLAHooksInterface.h>
namespace at {
namespace detail {
const XLAHooksInterface& getXLAHooks() {
auto create_impl = [] {
// Create XLA hooks using the registry
auto hooks = XLAHooksRegistry()->Create("torch_xla::detail::XLAHooks");
if (hooks) {
return hooks;
}
// If ho... |
2cf9f51c03dd659741e7c8bb4d8b731aa224dced929f8bf81e23a78cb9b9998a | C++ | 602 | 23 | #ifdef ALTCPU
// Make sure we build for CPU
#include "src/acc/cpu/device_stubs.h"
#include "src/acc/settings.h"
#include "src/time.h"
#include "src/ml_optimiser.h"
#include "src/acc/acc_ptr.h"
#include "src/acc/acc_projector.h"
#include "src/acc/acc_backprojector.h"
#include "src/acc/cpu/cpu_helper_functions.h"
#inc... |
2af9be6ef4fb7a7b24c6aad86bbdf00ad17181c49cf09d0d2dbe919c9c6dfa06 | C++ | 604 | 32 | #include "fft_buffer.h"
FloatFFTBuffer::FloatFFTBuffer()
{
}
FloatFFTBuffer::FloatFFTBuffer(int w, int h, int d)
: real(w,h,d),
complex(w/2 + 1, h, d)
{
plan = FFT::FloatPlan(real, complex, FFTW_ESTIMATE);
}
void FloatFFTBuffer::FourierTransform()
{
FFT::FourierTransform(real, complex, plan, FFT::Both);
}
void F... |
44c4b8a97d309925ca5739da420e0fc530141679dd73e8e138e1eaa086674618 | C++ | 604 | 15 | #include <torch/torch.h>
int main(int argc, const char* argv[]) {
std::cout << "Checking that CUDA archs are setup correctly" << std::endl;
TORCH_CHECK(torch::rand({ 3, 5 }, torch::Device(torch::kCUDA)).defined(), "CUDA archs are not setup correctly");
// These have to run after CUDA is initialized
s... |
7976f0351ec3568f21f20b28cfcb3d6d13f03cc65a94a252c4c291fe8ac91080 | C++ | 608 | 31 | #include <src/jaz/single_particle/vtk_helper.h>
#include <src/jaz/math/Zernike.h>
int main(int argc, char *argv[])
{
const int N = 12;
const int s = 400;
Image<RFLOAT> out(s,s,N);
for (int i = 0; i < N; i++)
{
int m, n;
Zernike::oddIndexToMN(i,m,n);
std::cout << i << " -> " << m << ", " << n << "\n"... |
6f4411a64deb80a34f3bc3b53415cdc6c2bd48f03f95924d4729d5189b2e5783 | C++ | 610 | 31 | #include <ATen/FuncTorchTLS.h>
namespace at::functorch {
namespace {
thread_local std::unique_ptr<FuncTorchTLSBase> kFuncTorchTLS = nullptr;
}
std::unique_ptr<FuncTorchTLSBase> getCopyOfFuncTorchTLS() {
if (kFuncTorchTLS == nullptr) {
return nullptr;
}
return kFuncTorchTLS->deepcopy();
}
void setFuncTor... |
29ef23f27db4a533f0b2df881de4d8ac467f8d9f4b8284b7945d27156a9d6f9f | C++ | 632 | 20 | #include <ATen/cuda/PeerToPeerAccess.h>
#include <ATen/Context.h>
#include <c10/cuda/PeerToPeerAccess.h>
namespace at::cuda {
bool get_p2p_access(c10::DeviceIndex dev, c10::DeviceIndex dev_to_access) {
// Ensure CUDA is lazily initialized before forwarding to c10
at::globalContext().lazyInitDevice(c10::DeviceTyp... |
0b9f5e2909d1bb3f758dbeb2e830184ab3b04a67799a8235bc0f70351894c3e3 | C++ | 635 | 24 | #include <ATen/functorch/VmapInterpreter.h>
#include <ATen/functorch/DynamicLayer.h>
namespace at::functorch {
void VmapInterpreterPtr::processImpl(
const c10::OperatorHandle& op,
torch::jit::Stack* stack) {
setup_dispatch_key_tls(TransformType::Vmap, DispatchKeySet(DispatchKey::FuncTorchVmapMode));
op.ca... |
be7d1a2578e6d3bc00b098559562bc4ea2b9f565473309eab6eea5ebbfd5f15a | C++ | 658 | 24 | // Copyright 2004-present Facebook. All Rights Reserved.
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/core/Tensor.h>
#include <ATen/Dispatch.h>
#include <ATen/native/cpu/StackKernel.h>
#include <ATen/native/cpu/SerialStackImpl.h>
namespace at::native {
namespace {
void stack_serial_kernel(Tensor& resul... |
a89c6541b812b6caf424ae794b33a915f81c801cf973b8907298a78347b5737f | C++ | 659 | 30 | #include <ATen/core/TorchDispatchUtils.h>
namespace at::impl {
bool tensor_has_dispatch(const at::Tensor& t) {
DispatchKeySet key_set({DispatchKey::Python, DispatchKey::PythonTLSSnapshot});
return t.key_set().has_any(key_set);
}
bool tensorlist_has_dispatch(at::ITensorListRef li) {
for (const auto& t : li) {
... |
128409afb3e54427edb3fa474546274f26cdf3dd4878c788eb6d5084e9198237 | C++ | 663 | 29 | #define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/core/Tensor.h>
#ifndef AT_PER_OPERATOR_HEADERS
#include <ATen/NativeFunctions.h>
#include <ATen/MPSFunctions.h>
#else
#include <ATen/ops/eq_mps_dispatch.h>
#include <ATen/ops/equal_native.h>
#endif
namespace at {
namespace mps {
TORCH_API at::Tensor eq(const a... |
bd73f1990632540d050fa45fcb9634eed6460b471ca684fc2c1ab89bb850de58 | C++ | 664 | 39 | #include "spherical_coordinates.h"
using namespace gravis;
SphericalCoordinates::SphericalCoordinates()
{
}
SphericalCoordinates::SphericalCoordinates(double phi, double theta)
: phi(phi), theta(theta)
{
}
SphericalCoordinates::SphericalCoordinates(const d3Vector& cartesian)
{
const double len = cartesian.length()... |
a91443de54de52fd9de02df08d445295f9f3d46cf08ee3575dd87e15d202bff6 | C++ | 670 | 24 | #include "../libstfio/section.h"
#include <gtest/gtest.h>
TEST(Section_test, constructors) {
Section sec0;
EXPECT_EQ( sec0.size(), 0 );
Section sec1(Vector_double(32768, 0), "Test section");
EXPECT_EQ( sec1.size(), 32768 );
Section sec2(32768, "Test section");
EXPECT_EQ( sec2.size(), 32768 );... |
d6f672bd6dccbb54149826b070668004f92a907ea48b2ad6dc0ad274ca3d5e04 | C++ | 672 | 26 | #include <ATen/miopen/Types.h>
#include <ATen/ATen.h>
#include <miopen/version.h>
namespace at { namespace native {
miopenDataType_t getMiopenDataType(const at::Tensor& tensor) {
if (tensor.scalar_type() == at::kFloat) {
return miopenFloat;
} else if (tensor.scalar_type() == at::kHalf) {
return miopenHal... |
4e7b5d611f41f055d0ea3dbff1046ebff219ee23d35cfb966a28aea4d87dd95c | C++ | 673 | 30 | #include <ATen/detail/MTIAHooksInterface.h>
namespace at {
namespace detail {
const MTIAHooksInterface& getMTIAHooks() {
auto create_impl = [] {
auto hooks = MTIAHooksRegistry()->Create("MTIAHooks");
if (hooks) {
return hooks;
}
return std::make_unique<MTIAHooksInterface>();
};
static auto... |
486729dd2a9116b677b4d68c67859355715ea22f643fc392a28e8f67a04e90d6 | C++ | 682 | 28 | #include <atomic>
#include <ATen/metal/Context.h>
namespace at::metal {
std::atomic<const MetalInterface*> g_metal_impl_registry;
MetalImplRegistrar::MetalImplRegistrar(MetalInterface* impl) {
g_metal_impl_registry.store(impl);
}
at::Tensor& metal_copy_(at::Tensor& self, const at::Tensor& src) {
auto p = at::m... |
38caa3fc49e1385c3234d24a6fe795a00bd2c0bc6737d40371a0fb6e94e6fd59 | C++ | 685 | 30 | #include <ATen/ATen.h>
#include <benchmark/benchmark.h>
static void tensor_add(benchmark::State& state) {
const size_t batchSize = static_cast<size_t>(state.range(0));
const size_t channels = static_cast<size_t>(state.range(1));
at::Tensor a = at::rand({batchSize, channels});
at::Tensor b = at::rand({batchSi... |
69d2ee3af0452e02ed8abc038246ea703c49d2bd73f080bba8e4590456b0acf5 | C++ | 687 | 32 | #include "linear_2D_deformation.h"
using namespace gravis;
Linear2DDeformation::Linear2DDeformation()
{
}
Linear2DDeformation::Linear2DDeformation(
i2Vector imageSize,
const double* coefficients)
{
Deformation2D::Parameters parameters;
parameters.grid_width = 1;
parameters.grid_height = 1;
deformatio... |
79511ff76e327d8bfe2f75b83d3d23e4da77bdf76398f45e1ab1d4e8c2e1ea33 | C++ | 688 | 23 | #include <stdlib.h>
#include <string.h>
#include "src/acc/cpu/device_stubs.h"
#include "src/acc/acc_ptr.h"
#include "src/acc/acc_projector.h"
#include "src/acc/acc_backprojector.h"
#include "src/acc/acc_projector_plan.h"
#include "src/acc/cpu/cpu_benchmark_utils.h"
#include "src/acc/cpu/cpu_helper_functions.h"
#inclu... |
5c341745bb8456f467c121fdd8438050a4b5805cb8f1a9deed1174584a56d31f | C++ | 694 | 26 | #include <ATen/LegacyVmapMode.h>
namespace at::impl {
thread_local static int64_t VmapMode_current_vmap_level = 0;
int64_t VmapMode::current_vmap_level() {
return VmapMode_current_vmap_level;
}
int64_t VmapMode::increment_nesting() {
VmapMode_current_vmap_level++;
if (VmapMode_current_vmap_level == 1) {
c... |
10f2ede563cbe419009f4f4d685f000408f9d693d6f36ccb9b87fcc2ae1a79bc | C++ | 697 | 24 | #ifdef ALTCPU
// Make sure we build for CPU
#include "src/acc/cpu/device_stubs.h"
#include "src/acc/acc_ptr.h"
#include "src/acc/acc_projector.h"
#include "src/acc/acc_backprojector.h"
#include "src/acc/acc_projector_plan.h"
#include "src/acc/cpu/cpu_benchmark_utils.h"
#include "src/acc/cpu/cpu_helper_functions.h"
#i... |
4511417d8ad9da2ec817190fc6bd2fce62f36fcf1485fafddb4c8ca0ae7c9cc1 | C++ | 711 | 39 | #include "optics_data.h"
#include <src/error.h>
#include <src/jaz/util/log.h>
#include <src/jaz/util/zio.h>
#include <iostream>
#include <fstream>
OpticsData::OpticsData()
{
}
OpticsData::OpticsData(std::string optFn, int verbosity)
{
if (verbosity > 0)
{
Log::beginSection("Reading "+optFn);
}
std::ifstr... |
fddc24cb018c68dbc263fba3f10540a653c441a59f8f8c21c4244184e7bee3b6 | C++ | 716 | 16 | #include "gcmi_mex_adapter_utils.hpp"
class MexFunction : public gcmi::MexAdapterBase {
public:
void operator()(matlab::mex::ArgumentList outputs, matlab::mex::ArgumentList inputs) override {
if (!inputs.empty() || outputs.size() > 1) {
fail("gcmi_cpp_ping:usage", "gcmi_cpp_ping takes no inputs... |
79d5b705ed63d5913c127b893a9a2c837378701cabbdac7c841f29e6fb7cb853 | C++ | 718 | 28 | #include <ATen/core/Dict.h>
namespace c10::detail {
bool operator==(const DictImpl& lhs, const DictImpl& rhs) {
bool isEqualFastChecks =
*lhs.elementTypes.keyType == *rhs.elementTypes.keyType &&
*lhs.elementTypes.valueType == *rhs.elementTypes.valueType &&
lhs.dict.size() == rhs.dict.size();
if ... |
22c89e545c6158dc3beb03080d51930d73215820d2af0499ec74da9ad9ef48cc | C++ | 724 | 21 | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the BSD-style license found in the
// LICENSE file in the root directory of this source tree.
#include <gtest/gtest.h>
#include <ATen/core/type_factory.h>
#include "caffe2/android/pytorch_android/src/main/cpp/pytorch_jni_co... |
7437e80785655db2f6ea3626b303652dcb7997b35cdd560a52b89ff6c1ef9330 | C++ | 733 | 28 | #define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/core/Tensor.h>
#include <ATen/native/quantized/cpu/QuantizedOps.h>
#ifndef AT_PER_OPERATOR_HEADERS
#include <ATen/NativeFunctions.h>
#else
#include <ATen/ops/gelu_native.h>
#endif
namespace at::native {
DEFINE_DISPATCH(qgelu_stub);
Tensor gelu_quantized_cpu(... |
df5d522e9412c80e29614650309ac450a0d9114bbf6f99d20e29c40b578bd00a | C++ | 733 | 23 | #include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <cassert>
#include "src/acc/cpu/device_stubs.h"
#include "src/acc/acc_ptr.h"
#include "src/acc/acc_projector.h"
#include "src/acc/acc_backprojector.h"
#include "src/acc/acc_projector_plan.h"
#include "src/acc/cpu/cpu_benchmark_utils.h"
#in... |
49bcc1f83d9e5668f510df72a7c695da840ee17e34b885529b36e3ff43a86208 | C++ | 737 | 24 | #define TORCH_ASSERT_NO_OPERATORS
#include <ATen/native/UnaryOps.h>
#include <ATen/Dispatch.h>
#include <ATen/native/Math.h>
#include <ATen/native/TensorIterator.h>
#include <ATen/native/cpu/Loops.h>
namespace at::native {
inline namespace CPU_CAPABILITY {
static void airy_ai_kernel(TensorIteratorBase& iterator) {
... |
1267dbff42cddfe0f0123d4572db0ab6ed32745c812e3190621d2361e972c6f8 | C++ | 742 | 24 | #ifdef _SYCL_ENABLED
// Make sure we build for SYCL
#include "src/acc/sycl/device_stubs.h"
#include "src/acc/acc_ptr.h"
#include "src/acc/acc_projector.h"
#include "src/acc/acc_backprojector.h"
#include "src/acc/acc_projector_plan.h"
#include "src/acc/sycl/sycl_benchmark_utils.h"
#include "src/acc/sycl/sycl_helper_fu... |
3676b1e59b09d371d8394cd15f6ddf6f1b9d13beb88df4540ddf299ee3688e16 | C++ | 745 | 22 | #include <ATen/core/DeprecatedTypeProperties.h>
#include <ATen/core/UnsafeFromTH.h>
namespace at {
Tensor DeprecatedTypeProperties::unsafeTensorFromTH(void * th_pointer, bool retain) const {
return at::unsafeTensorFromTH(th_pointer, retain);
}
Storage DeprecatedTypeProperties::unsafeStorageFromTH(void * th_pointe... |
4020a97d09b277d01236e0dacb2f246e931b9f8f3358ad47e84f4fa8edc2e4f7 | C++ | 745 | 33 | #define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/native/IndexingUtils.h>
namespace at::native {
bool canUse32BitIndexMath(const TensorBase& t, int64_t max_elem) {
auto elements = t.sym_numel();
if (elements >= max_elem) {
return false;
}
if (elements == 0) {
return max_elem > 0;
}
c10::S... |
3aa75bc1947f09837ce51a10f715dd5a7c2d4686f7f86025aff14bc1cdd96417 | C++ | 752 | 36 | #include <ATen/NodeCreationHooks.h>
#include <c10/util/Exception.h>
#include <utility>
namespace at::impl {
namespace {
thread_local NodeCreationHooksTLS tls;
}
void NodeCreationHooks::push_hook(c10::SafePyObject hook) {
tls.stack.emplace_back(std::move(hook));
}
void NodeCreationHooks::pop_hook() {
TORCH_INTER... |
a177e8bbcc52a2036efb9f2f123bffe624c1fc84b410485a879ada2ff155117d | C++ | 767 | 29 | #include <ATen/core/dispatch/ObservedOperators.h>
#include <string>
#include <unordered_set>
namespace c10 {
/* static */
std::unordered_set<std::string>& ObservedOperators::getUnobservedOperatorList() {
// names of the operators that should not be observed
static std::unordered_set<std::string> not_observed_ops... |
915a7c81b08578c830fb9daf4d414fa00e7adfa049fb9bb29a34261dd805f94f | C++ | 782 | 35 | #include "spline_2D_deformation.h"
using namespace gravis;
Spline2DDeformation::Spline2DDeformation()
{
}
Spline2DDeformation::Spline2DDeformation(
i2Vector imageSize,
i2Vector gridSize,
const double* coefficients)
{
Deformation2D::Parameters parameters;
parameters.grid_width = gridSize.x;
parameters... |
2b0d655d675c05bbc8b4d0dfa7886e51dcbfc11c606333bc32385faf708fd917 | C++ | 786 | 23 | // 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.
#include <ATen/Operators.h>
#include <ATen/core/dispatch/Dispatcher.h>
#include <ATen/functorch/BatchRulesHe... |
d2beb5d4fa513fd6edc149be7c06505e9f0fd2799ee4fe4ded4984fe2a6522c6 | C++ | 795 | 34 | #include "Fourier_2D_deformation.h"
using namespace gravis;
Fourier2DDeformation::Fourier2DDeformation()
{
}
Fourier2DDeformation::Fourier2DDeformation(
i2Vector imageSize,
i2Vector gridSize,
const double* coefficients)
{
Deformation2D::Parameters parameters;
parameters.grid_width = gridSize.x;
param... |
b05cf337bb6bd26d749e09ff24a52a674c4978a34cb9d4409fbd0429e1072234 | C++ | 815 | 23 | #define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/core/Tensor.h>
#include <ATen/native/TensorCompare.h>
namespace at::native {
namespace {
// Composite op implementation for simplicity. This materializes the cross product of elements and test elements,
// so it is not very memory efficient, but it is fast on... |
4316abd7a681bc4c6955482995c3245e32092cde91e8c6da18610b94c14386d1 | C++ | 821 | 32 | #define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/Config.h>
#if AT_MKLDNN_ENABLED()
#include <c10/core/Allocator.h>
// needs to be included only once in library.
#include <ideep_pin_singletons.hpp>
#include <ATen/native/mkldnn/IDeepRegistration.h>
using namespace ideep;
static RegisterEngineAllocator cpu_al... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.