text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
#include "GReduceStream.h" #include "ReduceStreamKernel.cu" #include <pycaUtils.h> #include <mem.h> #include <gmem.h> #include <Vec2D.h> // TEST make sure boost isn't included in nvcc code #if defined(BOOST_COMPILER) int bla[-1]; #endif namespace PyCA { GReduceStream::GReduceStream(){ int *d_buf; dmemAlloc(d...
the_stack
namespace k2 { template <int32_t NUM_KEY_BITS> void TestHashConstruct() { for (auto &c : {GetCpuContext(), GetCudaContext()}) { for (int32_t size : { 128, 1024, 2048, 65536, 1048576}) { Hash hash(c, size, NUM_KEY_BITS); // obviously we're not going to fill it completely... this hash is not //...
the_stack
#include "Normalization.h" // 宏:用来定义使用 online 算法求平均值和方差 //#define USE_ONLINE // 宏:DEF_BLOCK_X 和 DEF_BLOCK_Y // 定义了默认的线程块尺寸 #define DEF_BLOCK_X 32 #define DEF_BLOCK_Y 8 #ifdef USE_ONLINE // Kernel 函数:_nomalizeKer(实现对输入图像的每个点进行正规化) // 对输入图像的每一个点,以该点为中心的邻域,求出该邻域内的平均值和总体方差, // 然后将该点的像素与平均值作差,再除以总体方差,得到的值作为输出 static __...
the_stack
#include <exception> #include <memory> #include <string> #include <unordered_map> #include <claraparabricks/genomeworks/cudamapper/types.hpp> #include <claraparabricks/genomeworks/utils/allocator.hpp> #include <claraparabricks/genomeworks/cudamapper/index.hpp> namespace claraparabricks { namespace genomeworks { nam...
the_stack
#define MAX_K 4 #define MAX_BATCH_SIZE 32 #define MAX_N 12 Tensor FFModel::aggregate(const Tensor* inputs, /* gate_preds, gate_assign, full_gate_pred, n * exp_pred */ int n, float lambda_bal, const char* name) { Aggregate* aggr = new Aggregate(*this, inputs, n, lambda_bal, name); layers....
the_stack
#include <isce3/core/DateTime.h> #include <isce3/core/Orbit.h> #include <isce3/core/StateVector.h> #include <isce3/core/TimeDelta.h> #include <isce3/core/Vector.h> #include <isce3/except/Error.h> #include <isce3/cuda/core/Orbit.h> using isce3::core::DateTime; using isce3::core::OrbitInterpBorderMode; using isce3::cor...
the_stack
#define DEFINE_EXTTYPE1(T, NAME) \ struct exttype_##T##_##1 : NAME##1 { \ DACE_HDFI exttype_##T##_##1 operator*(const exttype_##T##_##1 &other) const { \ exttype_##T##_##1 result; \ ...
the_stack
template <class Matrix, class Vector> void RandMIS_Aggregator<Matrix, Vector>::computePermutation(TetMesh* meshPtr, IdxVector_h &permutation, IdxVector_h &ipermutation, IdxVector_h &aggregateIdx, IdxVector_h &partitionIdx, int* partitionlabel, int* nnout, int* &xadjout, int* &adjncyout, int metissize) { // Getting th...
the_stack
__constant__ float kEpsilon = 1.0e-10; // used to prevent division by 0 extern "C" { // CUDA version of the scenario_step() in // "ai_economist.foundation.scenarios.covid19_env.py" // CUDA version of the sir_step() in // "ai_economist.foundation.scenarios.covid19_env.py" __device__ void cuda_sir_step( ...
the_stack
#include "ValueQuantizer.h" #include "ColumnQuantizer.h" #include "QuantizedMatrix.h" namespace Microsoft { namespace MSR { namespace CNTK { // ======================================================================= // thread layout helpers // ======================================================================= /...
the_stack
* Copyright 2014 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable l...
the_stack
static inline void THNN_(TemporalRowConvolution_shapeCheck)( THCState *state, THCTensor *input, THCTensor *gradOutput, THCTensor *weight, THCTensor *bias, int kW, int dW, int padW) { THArgCheck(kW > 0, 5, "kernel size should be greater than zero, but got kW: %d", kW); THArgCheck(dW > 0, 6, "st...
the_stack
using namespace std; /* ========================= * IReducerSegment * ========================= */ // Null mat --> reducer on host IReduceSegment::IReduceSegment(IEightGPUReducer& parent, int deviceID, Queue<int>* finishQueue) : _deviceID(deviceID), _next(NULL), _finishQueue(finishQueue), Thread(true, getDeviceCPUs...
the_stack
#include "node_specs.h" #include <stdio.h> typedef unsigned int uint; typedef float real; typedef float4 real4; /* int3 gives problems with memory copies therefor im using int4 Wrong type for attribute nocapture void (i64, i8*, <unrecognized-type...
the_stack
#if !defined(CUDA_VERSION) #define __device__ __attribute__((device)) #define __global__ __attribute__((global)) #define __shared__ __attribute__((shared)) #define __constant__ __attribute__((constant)) typedef unsigned long long uint64_t; #endif // CHECK-LABEL: test_wmma_buitins __device__ void test_wmma_buitins(int...
the_stack
namespace cgbn { typedef enum { dlimbs_algs_common, dlimbs_algs_half, dlimbs_algs_full, dlimbs_algs_multi } dlimbs_algs_t; template<class core, dlimbs_algs_t implementation> class dispatch_dlimbs_t; template<class core> class dispatch_dlimbs_t<core, dlimbs_algs_common> { public: static const uint32_t TP...
the_stack
namespace rxmesh { namespace patcher { Patcher::Patcher(uint32_t patch_size, const std::vector<uint32_t>& ff_offset, const std::vector<uint32_t>& ff_values, const std::vector<std::vector<ui...
the_stack
#include "include/common.h" #define BLOCK_SIZE_X 32 #define BLOCK_SIZE_Y 32 using Matf31da = Eigen::Matrix<float, 3, 1, Eigen::DontAlign>; namespace kinectfusion { namespace internal { namespace cuda { // 卧槽, nvcc 支持模板函数啊, 牛逼 // 设备端的函数, 用于执行归约累加的操作 template<int SIZE> ...
the_stack
#include <thrust/complex.h> /////////////////////////////////////////////////////////////////////////////// // CONVOLVE // /////////////////////////////////////////////////////////////////////////////// template<typename T> __device__ void _cupy_convolv...
the_stack
#include "nnbnorm_cudnn.hpp" #include "cudnnhelper.hpp" #include "../datacu.hpp" #include "copy.hpp" #include <assert.h> #define CHECK(x) \ { \ cudnnError = x ; \ if (cudnnError != CUDNN_STATUS_SUCCESS) { \ error = context.setError(context.getCudaHelper().catchCudnnError(cudnnError, \ STRINGIZE(__FILE__) ":" STRINGIZ...
the_stack
#include <string> #include <vector> #include "optimization/kernels/kernel_common.h" #include "model/host_only_model.h" #include "model/mirrored_model.h" #include "util/dart_io.h" #include "util/dart_types.h" #include "util/mirrored_memory.h" #include "mesh/assimp_mesh_reader.h" namespace { __global__ void getErrorJ...
the_stack
cv::Mat surfelwarp::downloadDepthImage(const DeviceArray2D<unsigned short>& image_gpu) { const auto num_rows = image_gpu.rows(); const auto num_cols = image_gpu.cols(); cv::Mat depth_cpu(num_rows, num_cols, CV_16UC1); image_gpu.download(depth_cpu.data, sizeof(unsigned short) * num_cols); return depth_cpu; } cv::M...
the_stack
#include "aggregation/coarseAgenerators/coarse_A_generator.h" #include "aggregation/selectors/agg_selector.h" #include "matrix_coloring/matrix_coloring.h" #include "matrix_coloring/min_max.h" #include "solvers/solver.h" #include "classical/selectors/selector.h" #include "classical/interpolators/interpolator.h" #includ...
the_stack
// Avoid warnings in includes with CUDA compiler #pragma GCC diagnostic ignored "-Wattributes" #pragma diag_suppress code_is_unreachable #include "libvis/cuda/patch_match_stereo.cuh" #include <math_constants.h> #include "libvis/cuda/cuda_auto_tuner.h" #include "libvis/cuda/cuda_unprojection_lookup.cuh" #include "lib...
the_stack
Implementing Breadth first search on CUDA using algorithm given in DAC'10 paper "An Effective GPU Implementation of Breadth-First Search" Copyright (c) 2010 University of Illinois at Urbana-Champaign. All rights reserved. Permission to use, copy, modify and distribute this software and its documentatio...
the_stack
#include <iostream> using namespace std; namespace cufhe { using BootstrappingKeyNTT = TGSWSampleArray_T<FFP>; BootstrappingKeyNTT* bk_ntt = nullptr; MemoryDeleter bk_ntt_deleter = nullptr; KeySwitchingKey* ksk_dev = nullptr; MemoryDeleter ksk_dev_deleter = nullptr; CuNTTHandler<>* ntt_handler = nullptr; __global__ ...
the_stack
#if !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 600 #else __device__ double atomicAdd(double* a, double b) { return b; } #endif #include <algorithm> #include <cfloat> #include <vector> #include "deformable_psroi_pooling_layer.hpp" #include "caffe/util/gpu_util.cuh" using std::max; using std::min; namespace caffe { ...
the_stack
#include <cuda_helper.h> #include <cuda_vectors.h> #include <miner.h> __constant__ static uint32_t _ALIGN(16) c_midstate112[8]; __constant__ static uint32_t _ALIGN(16) c_midbuffer112[8]; __constant__ static uint32_t _ALIGN(16) c_dataEnd112[12]; __constant__ static const uint32_t _ALIGN(8) c_K[64] = { 0x428A2F98, 0x...
the_stack
#include <iostream> #include <chrono> #include "cuda_runtime.h" #include "device_launch_parameters.h" #include "bbcu/bbcu.h" #include "bbcu/bbcu_util.h" // ------------------------------------------------- // set // ------------------------------------------------- __global__ void kernal_fp32_Vector_set ...
the_stack
// These are loosely adapted from libc++'s tests. In general, we don't care a // ton about verifying the return types or results we get, on the assumption // that our standard library is correct. But we care deeply about calling every // overload of every function (so that we verify that everything compiles). // // We...
the_stack
///////////////////////////////////////////////////////////////////// Headers // #include "GDelKernels.h" #include "Geometry.h" #include "GDelPredDevice.h" ///////////////////////////////////////////////////////////////////// Kernels // template < bool doFast > __forceinline__ __device__ void makeInitialCo...
the_stack
#include <cuda.h> #include <cuda_runtime.h> #include "PermutohedralLatticeGPU.cuh" #include "DeviceMemoryAllocator.h" #include <vector> // for kernels that are actually only implemented in single-precision // (here because of needing atomicMinf) #define AT_DISPATCH_SINGLE_FLOAT(TYPE, NAME, ...) ...
the_stack
struct SoftmaxDPInitParams { DnnHandle handle; int batchSize; bool profiling; }; Tensor RnnModel::add_softmaxDP_node(Tensor logit, Tensor label, ParallelConfig pc) { assert(logit.numDim == 3); assert(logit.adim[2] == LSTM_PER_NODE_LENGTH); assert(logit.pdim[2] == LSTM_PER_NODE_LENGTH); SoftmaxDP* node = ...
the_stack
* $Created by: Xu Chen (email: hello_master1954@163.com) 2018-09-25 */ #include "../../XTensor.h" #include "../../XDevice.h" #include "../../XUtility.h" #include "Spread.cuh" #include "CopyValues.h" namespace nts { // namespace nts(NiuTrans.Tensor) #ifdef USE_CUDA /* This is core assignment for spread function. ...
the_stack
#pragma once #include "cuda/Complex.cuh" #include "cuda/ComputeCapabilities.cuh" #include "cuda/CudaUtils.cuh" #include "cuda/DeviceTensor.cuh" #include "cuda/MemoryAccess.cuh" #include "cuda/fbfft/Twiddles.cuh" #include <cuda_runtime.h> #include <glog/logging.h> using namespace facebook::cuda; namespace facebook {...
the_stack
#include "ssids/gpu/kernels/datatypes.h" #include "cuda/cuda_check.h" #define min(x,y) ((x) < (y) ? (x) : (y)) #define max(x,y) ((x) > (y) ? (x) : (y)) #define MAX_CUDA_BLOCKS 65535 //#define SM_3X (__CUDA_ARCH__ == 300 || __CUDA_ARCH__ == 350 || __CUDA_ARCH__ == 370) //FIXME: Verify if the code for Keplers (sm_3x) ...
the_stack
#include <cuda_runtime.h> #include <math.h> #include <stdio.h> #include <sys/time.h> #define max(a,b) \ ({ __typeof__ (a) _a = (a); \ __typeof__ (b) _b = (b); \ _a > _b ? _a : _b;}) #define min(a,b) \ ({ __typeof__ (a) _a = (a); \ __typeof__ (b) _b ...
the_stack
This example requires NVIDIA Ampere GPU or later. */ // Standard Library includes #include <iostream> #include <sstream> #include <vector> // CUTLASS Includes #include "cutlass/cutlass.h" #include "cutlass/functional.h" #include "cutlass/layout/matrix.h" #include "cutlass/gemm/warp/default_mma_tensor_op.h" #include "...
the_stack
#include "THCTensorMath.h" #include "THCGeneral.h" #include "THCNumerics.cuh" #include "THCReduce.cuh" #include "THCReduceAll.cuh" #include "THCThrustAllocator.cuh" #include <thrust/functional.h> #include <thrust/device_ptr.h> #include <thrust/transform_reduce.h> #include <thrust/inner_product.h> #if CUDA_VERSION >= 70...
the_stack
#include "amgx_types/util.h" #include "amgx_types/rand.h" #include "amgx_types/io.h" #include <sstream> #include <iomanip> namespace amgx { template <class TConfig> EigenSolver<TConfig>::EigenSolver(AMG_Config &cfg, const std::string &cfg_scope) : m_A(0), m_converged(false), m_curr_iter(0), m_num_iters(0),...
the_stack
namespace mxnet { namespace op { #define DIVUP(m,n) ((m) / (n) + ((m) % (n) > 0)) #define CHECK_ERROR(ans) { gpuAssert((ans), __FILE__, __LINE__); } inline void gpuAssert(cudaError_t code, const char *file, int line, bool abort=true) { if (code != cudaSuccess) { fprintf(stderr,"GPUassert: %s %s %d\n", cu...
the_stack
const uint32_t WARP_SIZE = 32, BATCH_UNROLL = 4; using namespace megdnn; using namespace cuda; using namespace convolution; using namespace chanwise; namespace { /*! * \brief compute grad w.r.t. filter * * block dim: out_id * kern_id * threads with the same out_id computes grad for corresponding kernel element ...
the_stack
#include "utility.hpp" using namespace ppl::common; namespace ppl { namespace cv { namespace cuda { #define MIN(a,b) ((a) < (b) ? (a) : (b)) #define MAX(a,b) ((a) > (b) ? (a) : (b)) #define INC(x, l) ((x + 1) >= (l) ? (x) : ((x) + 1)) #define INTER_RESIZE_COEF_BITS 11 #define INTER_RESIZE_COEF_SCALE (1 << INTER_RE...
the_stack
using namespace cub; using namespace std; /** * Computes the histogram over the digit values of an array of keys that MUST have a length of an integer multiple of (KPT * blockDim.x). * The padding to the integer multiple can be done by adding 0's at the end and subtracting the number of padded 0's from the final res...
the_stack
#include <claraparabricks/genomeworks/utils/cudautils.hpp> //GW_CU_CHECK_ERR #include <claraparabricks/genomeworks/utils/stringutils.hpp> //array_to_string #include <claraparabricks/genomeworks/utils/signed_integer_utils.hpp> //get_size #include <numeric> #include "gtest/gtest.h" namespace clarapa...
the_stack
#include "cuda_runtime.h" #include <cuda.h> #include "device_launch_parameters.h" #include <cuda_runtime_api.h> #include "HoughLine.h" #include "Image.h" #include <iostream> #include <fstream> #include <cmath> using namespace std; #include "ErrorCode.h" #include "CoordiSet.h" // 宏:DEF_BLOCK_X 和 DEF_BLOCK_Y // 定义了默认...
the_stack
#include <helpers/ConstantTadHelper.h> #include <helpers/PointersManager.h> #include <ops/declarable/helpers/top_k.h> namespace sd { namespace ops { namespace helpers { ////////////////////////////////////////////////////////////////////////// template <typename X, typename Y> SD_KERNEL static void inTopKCuda(const v...
the_stack
#include "_reg_common_cuda.h" #include "_reg_tools.h" /* ******************************** */ void cudaCommon_computeGridConfiguration(dim3 &r_blocks, dim3 &r_grid, const int targetVoxelNumber) { unsigned int maxThreads = 256; unsigned int maxBlocks = 65365; unsigned int blocks = (targetVoxelNumber % maxThreads) ?...
the_stack
#include <amgx_types/util.h> #include <amgx_types/math.h> using namespace std; namespace amgx { /*************************************** * Source Definitions ***************************************/ template<class TConfig> MatrixColoring<TConfig>::MatrixColoring(AMG_Config &cfg, const std::string &cfg_scope) : ...
the_stack
#include <THC/THC.h> #include <cuda.h> #include <cuda_runtime.h> #include <device_launch_parameters.h> template <typename scalar_t> __device__ __forceinline__ int is_include( scalar_t token, const scalar_t* __restrict__ subset, const size_t size) { for (size_t i = 0; i < size; ++i) { ...
the_stack
#include <cuda.h> #include <cuda_fp16.h> #include <cuda_profiler_api.h> #include <cuda_runtime.h> //#include <ATen/ATen.h> #include <ATen/cuda/CUDAContext.h> #include <ATen/cuda/Exceptions.h> #include "cutlass/cutlass.h" #include "cutlass/gemm/gemm.h" #include "cutlass/gemm/wmma_gemm_traits.h" namespace { cublasOper...
the_stack
#define FIT_COPYDRIFT 0 #define NUM_TIME_VARYING_PARAMS 3 #define DEBUG_REG_FITTING 0 #define TMIDNUC_REG_STEP 0.01f #define RDR_REG_STEP 0.01f #define PDR_REG_STEP 0.001f #define REGLEVMARMAT_LHS_LEN (((NUM_TIME_VARYING_PARAMS)*(NUM_TIME_VARYING_PARAMS + 1)) / 2) #define REGLEVMARMAT_RHS_LEN (NUM_TIME_VARYING_PARAMS) ...
the_stack
//#define NVBIO_CUDA_DEBUG #include <cub/cub.cuh> #include <zlib/zlib.h> #include <nvbio/basic/omp.h> #include "bloom_filters.h" #include "input_thread.h" #include "output_thread.h" #include "sample_kmers.h" #include "error_correct.h" #include <nvbio/basic/pipeline.h> #include <nvbio/basic/numbers.h> #include <nvbio/...
the_stack
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// namespace csr_multiply_sm35 { #include <amgx_types/util.h> #include <sm_utils.inl> #include <hash_containers_sm35.inl> // Included inside the namespace to solve name colisions. ///////////////////...
the_stack
#if defined(CUDA_SIFTGPU_ENABLED) #include "GL/glew.h" #include "stdio.h" #include "CuTexImage.h" #include "ProgramCU.h" #include "GlobalUtil.h" //---------------------------------------------------------------- //Begin SiftGPU setting section. ////////////////////////////////////////////////////////// #define IMUL(...
the_stack
#include "flowfilter/gpu/util.h" #include "flowfilter/gpu/error.h" #include "flowfilter/gpu/flowfilter.h" namespace flowfilter { namespace gpu { FlowFilter::FlowFilter() : Stage() { __height = 0; __width = 0; __configured = false; __inputImageSet = false; } FlowFilter::FlowFilter(flowfilter::gp...
the_stack
#define NVBIO_CUDA_DEBUG #include <stdio.h> #include <stdlib.h> #include <vector> #include <algorithm> #include <nvbio/basic/timer.h> #include <nvbio/basic/console.h> #include <nvbio/basic/strided_iterator.h> #include <nvbio/basic/cuda/arch.h> #include <nvbio/basic/cuda/work_queue.h> namespace nvbio { namespace wqtes...
the_stack
/** @addtogroup cudpp_app * @{ */ /** @name RadixSort Functions * @{ */ #include "cuda_util.h" #include "cudpp.h" #include "cudpp_util.h" #include "cudpp_radixsort.h" #include "cudpp_scan.h" #if 0 #include "kernel/radixsort_kernel.cuh" #include "cudpp_maximal_launch.h" #include <cstdlib> #include <cstdio> #incl...
the_stack
#include "radix_tree.cu.h" #include "fs_constants.h" #include "fs_debug.cu.h" #include "util.cu.h" #include "cpu_ipc.cu.h" #include "mallocfree.cu.h" #include "fs_structures.cu.h" #include "timer.h" #include "hash_table.cu.h" #include "swapper.cu.h" #include "fs_globals.cu.h" #include "preclose_table.cu.h" #include "fs...
the_stack
#include <thrust/device_ptr.h> #include <thrust/scan.h> #include <cuComplex.h> #include "../cuspreadinterp.h" #include "../memtransfer.h" using namespace std; // only relates to the locations of the nodes, which only needs to be done once int CUSPREAD2D_PAUL_PROP(int nf1, int nf2, int M, CUFINUFFT_PLAN d_plan) { cu...
the_stack
#include "../../utils/timer.h" /* You will probably want to move the following declarations to a central header file. */ struct stemmer; extern struct stemmer *create_stemmer(void); extern void free_stemmer(struct stemmer *z); extern int stem(struct stemmer *z, char *b, int k); /* The main part of the stemming a...
the_stack
#include "cupoch/geometry/geometry_utils.h" #include "cupoch/utility/console.h" namespace cupoch { namespace geometry { namespace { template <int Dim> struct transform_points_functor { transform_points_functor( const Eigen::Matrix<float, Dim + 1, Dim + 1> &transform) : transform_(transform){}...
the_stack
#include <io/utilities/parsing_utils.cuh> #include <io/utilities/time_utils.cuh> #include <cudf/fixed_point/fixed_point.hpp> #include <thrust/execution_policy.h> #include <thrust/reduce.h> namespace cudf { namespace io { /** * @brief Parses non-negative integral vales. * * This helper function is only intended t...
the_stack
#include "CUDADataFormats/EcalRecHitSoA/interface/EcalRecHit.h" #include "CUDADataFormats/EcalRecHitSoA/interface/EcalUncalibratedRecHit.h" #include "EcalRecHitBuilderKernels.h" #include "KernelHelpers.h" namespace ecal { namespace rechit { // uncalibrecHit flags enum UncalibRecHitFlags { kGood = -1,...
the_stack
//#include <cuda.h> //#include "caffe/layer.hpp" #include "caffe/layers/margin_softmax_loss_layer.hpp" #include "caffe/util/math_functions.hpp" //#define M_PI 3.14159265358979323846 namespace caffe { // no need to take 'sqrt'!!! template <typename Dtype> void caffe_gpu_norm2(const int n, const Dtype* x, Dtype*...
the_stack
namespace amgx { cublasHandle_t Cublas::m_handle = 0; namespace { // real valued calls cublasStatus_t cublas_axpy(cublasHandle_t handle, int n, const float *alpha, const float *x, int incx, float *y, int incy) { return cublasSaxpy(ha...
the_stack
#include <gtest/gtest.h> #include <cmath> #include <complex> #include <tuple> #include <vector> #include "dali/kernels/common/utils.h" #include "dali/kernels/erase/erase_gpu.h" #include "dali/kernels/scratch.h" #include "dali/pipeline/data/tensor_list.h" #include "dali/test/tensor_test_utils.h" #include "dali/test/tes...
the_stack
#include "utils/utils.cuh" #include "utils/intrinsics.cuh" #include "kernel_libs/kernel_fusion.cuh" #include "data_structures/graph.cuh" #include "data_structures/active_set.cuh" #include "data_structures/functor.cuh" #include "abstraction/config.cuh" template<ASFmt fmt, QueueMode M, typename G, typename F> __global__...
the_stack
#pragma once #include <assert.h> #include <stdint.h> #include <cub/block/block_discontinuity.cuh> #include "rxmesh/context.h" #include "rxmesh/handle.h" #include "rxmesh/iterator.cuh" #include "rxmesh/kernels/collective.cuh" #include "rxmesh/kernels/debug.cuh" #include "rxmesh/kernels/loader.cuh" #include "rxmesh/ker...
the_stack
#ifndef __NBLA_CUDA_UTILS_FAST_REDUCE_CUH__ #define __NBLA_CUDA_UTILS_FAST_REDUCE_CUH__ #include <assert.h> #include <nbla/cuda/common.hpp> #include <nbla/cuda/math.hpp> #include <nbla/cuda/utils/index_converter.cuh> #include <nbla/cuda/utils/reduce.hpp> #include <nbla/cuda/utils/warp_shuffle.cuh> #include <n...
the_stack
#pragma once #include "cuda/ComputeCapabilities.cuh" #include "cuda/CudaUtils.cuh" #include "cuda/DeviceTensor.cuh" #include "cuda/WarpBitonicSort.cuh" #include "cuda/WarpReductions.cuh" #include <assert.h> #include <boost/preprocessor/repetition/repeat.hpp> #include <cuda.h> #include <device_functions.h> #include <m...
the_stack
#include "common/common_texture_utils.h" #include "common/safe_call_utils.hpp" #include "pcg_solver/BlockPCG.h" #include "pcg_solver/BinBlockCSR.h" #include "pcg_solver/solver_configs.h" #include "math/DenseGaussian.h" #include <device_launch_parameters.h> #include <iostream> namespace surfelwarp { namespace device {...
the_stack
#include <map> #include <vector> #include <cublas_v2.h> #include <cuda.h> #include <curand.h> #include <time.h> #include <curand_kernel.h> #include <helper_cuda.h> #include "../../util/include/matrix.h" #include "nvmatrix_kernels.cuh" #include "nvmatrix_operators.cuh" #include "memory.cuh" #ifdef WARNINGS #define WAR...
the_stack
extern cudaError_t MyStreamSynchronize(cudaStream_t stream, int situation, int thr_id); #include "cuda_helper.h" static __constant__ uint64_t stateo[25]; static __constant__ uint64_t RC[24]; static const uint64_t cpu_RC[24] = { 0x0000000000000001ull, 0x0000000000008082ull, 0x800000000000808aull, 0x80000000800...
the_stack
#define WARPS_NUM 8 /** Natural order in constant memory */ __constant__ int gpujpeg_huffman_gpu_encoder_order_natural[GPUJPEG_ORDER_NATURAL_SIZE]; /** * Huffman coding tables in constant memory - each has 257 items (256 + 1 extra) * There are are 4 of them - one after another, in following order: * - luminance...
the_stack
// #if __CUDA_ARCH__ == 500 #define u64type uint2 #define vectype uint28 #define memshift 3 #else #define u64type uint2 #define vectype uint28 #define memshift 4 #endif __device__ vectype *DMatrix; static __device__ __forceinline__ void Gfunc_v35(uint2 & a, uint2 &b, uint2 &c, uint2 &d) { a += b; d = eorsw...
the_stack
#include <thrust/random.h> #include <thrust/device_vector.h> #include <cooperative_groups.h> namespace cg = cooperative_groups; #include <helper_cuda.h> #include <helper_string.h> #include "cdpQuicksort.h" //////////////////////////////////////////////////////////////////////////////// // Inline PTX call to return i...
the_stack
#if !defined(ENABLE_GPU) || !defined(ENABLE_CUDNN) #error "bilinearsampler_cudnn.cu can only be compiled with GPU and CUDNN (v5 or higher) support." #endif #include "nnbilinearsampler_cudnn.hpp" #include "cudnnhelper.hpp" #include "../datacu.hpp" #include <assert.h> #include <algorithm> #if CUDNN_VERSION < 5000 #warn...
the_stack
#include <rmm/cuda_stream_view.hpp> #include <rmm/mr/device/per_device_resource.hpp> #include <thrust/for_each.h> #include <thrust/iterator/counting_iterator.h> #include "detail/arrow_allocator.hpp" namespace cudf { namespace detail { namespace { /** * @brief Create arrow data buffer from given cudf column */ tem...
the_stack
namespace cg = cooperative_groups; #include <helper_string.h> #include "SobelFilter_kernels.h" // Texture object for reading image cudaTextureObject_t texObject; extern __shared__ unsigned char LocalBlock[]; static cudaArray *array = NULL; #define RADIUS 1 #ifdef FIXED_BLOCKWIDTH #define BlockWidth 80 #define Shar...
the_stack
* \mainpage MC-GPU v1.1 * * * \b MC-GPU is an x ray transport simulation code that can generate radiographic * projection images and computed tomography (CT) scans of voxelized objects, * including realistic human anatomy phantoms. * * The code implements a massively multi-threaded Monte Carlo simulation ...
the_stack
__device__ int getNewFileId() { return atomicAdd(&g_file_id,1); } DEBUG_NOINLINE __device__ void rt_node::init() volatile { /* n_leaves=0; char* ptr=(char*)&(leaves); for(int i=0;i<sizeof(leaves);i++){ ptr[i]=0;} */ } DEBUG_NOINLINE __device__ volatile rt_node* rt_node::alloc( volatile rt_node** toUpdatePtr) { ...
the_stack
#pragma once #include "cuda/ComputeCapabilities.cuh" #include "cuda/NumericLimits.cuh" #include "cuda/RegisterUtils.cuh" #include "cuda/SmallSort.cuh" #include "cuda/TopK.cuh" #include <assert.h> #include <boost/preprocessor/repetition/repeat.hpp> #include <cuda.h> #include <device_functions.h> #include <math_constan...
the_stack
#include <thrust/count.h> #include <thrust/execution_policy.h> #include <thrust/logical.h> #include <thrust/transform_reduce.h> #include "impl.cuh" namespace { using namespace manifold; struct FaceAreaVolume { const Halfedge* halfedges; const glm::vec3* vertPos; const float precision; __host__ __device__ th...
the_stack
#include <cuda.h> #include <cuda_runtime.h> #include <tuple> __global__ void forward_face_index_map_cuda_kernel( const float* faces, const int batch_size, const int num_faces, const int image_height, const int image_width, const float near, const float far, ...
the_stack
#include "nvblox/integrators/cuda/projective_integrators_common.cuh" #include "nvblox/integrators/integrators_common.h" #include "nvblox/utils/timing.h" namespace nvblox { ProjectiveColorIntegrator::ProjectiveColorIntegrator() : ProjectiveIntegratorBase() { sphere_tracer_.params().maximum_ray_length_m = max_int...
the_stack
#include <cfloat> #include <fstream> #include <iostream> #include <thread> #define TINYOBJLOADER_IMPLEMENTATION #define USE_PNG #include <OpenGP/GL/Application.h> #include <OpenGP/GL/Components/GUICanvasComponent.h> #include <OpenGP/GL/ImguiRenderer.h> #include <OpenGP/Image/Image.h> #include "OctopusComponent.h" #i...
the_stack
struct EmbedInitParams { DnnHandle handle; int batchSize, outputSize, vocabSize; }; Tensor RnnModel::add_embed_node(Tensor x, int vocab_size, int output_size, ParallelConfig pc, SharedVariable params) { assert(x.numDim == 2); assert(x.adim[1] == LSTM_PER_NODE_LENGTH); assert(x...
the_stack
#define EIGEN_TEST_NO_LONGDOUBLE #define EIGEN_TEST_NO_COMPLEX #define EIGEN_TEST_FUNC cxx11_tensor_of_float16_cuda #define EIGEN_DEFAULT_DENSE_INDEX_TYPE int #define EIGEN_USE_GPU #if defined __CUDACC_VER__ && __CUDACC_VER__ >= 70500 #include <cuda_fp16.h> #endif #include "main.h" #include <unsupported/Eigen/CXX11/Te...
the_stack
#include <cmath> #include "caffe/common.hpp" #include "caffe/util/math_functions.hpp" namespace caffe { template <> void caffe_gpu_gemm<float>(const CBLAS_TRANSPOSE TransA, const CBLAS_TRANSPOSE TransB, const int M, const int N, const int K, const float alpha, const float* A, const float* B, const float beta...
the_stack
#include "thrust/device_vector.h" #include "caffe/common.hpp" #include "caffe/layer.hpp" #include "caffe/syncedmem.hpp" #include "caffe/layers/operator/guided_crf_layer.hpp" #include "caffe/layer.hpp" #include "caffe/util/math_functions.hpp" namespace caffe { static __global__ void softmax_forward_kernel(const int m...
the_stack
#include "CollisionGrid.cuh" #include <chrono> #include <iomanip> #include <thrust/execution_policy.h> #include <thrust/extrema.h> #include <thrust/iterator/counting_iterator.h> #include "CudaUtils.cuh" #define SK_DEVICE __host__ __device__ namespace viper { Vec4 CollisionGrid::b_sphere; const thrust::device_vec...
the_stack
* COMPILATION TIP * nvcc -lcurand XORMRGgens2distri.cu -o XORMRGgens2distri * nvcc -g -lcurand XORMRGgens2distri.cu -o XORMRGgens2distri * -g generate debug information for host code, * */ #include <stdio.h> #include <curand_kernel.h> #define CUDA_CALL(x) do { if((x) != cudaSuccess) { \ printf("Error at %s:%...
the_stack
// // Return fatal error and safely exit program // void FatalError(const int lineNumber = 0) { // std::cerr << "FatalError"; // if (lineNumber != 0) std::cerr << " at LINE " << lineNumber; // std::cerr << ". Program Terminated." << std::endl; // cudaDeviceReset(); // exit(EXIT_FAILURE); // } // // Check CUD...
the_stack
namespace surfelwarp { namespace device { __device__ __constant__ float4 reference_node_coordinates[d_max_num_nodes]; /* This kernel do skinning of both vertex and nodes given * node coordinate and vertex coordinate, vertex.w can not be used */ __global__ void skinningVertexNodeBruteForceKernel( const Devi...
the_stack
// // sunnet project // Copyright (C) 2018 by Contributors <https://github.com/Tyill/sunnet> // // This code is licensed under the MIT License. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files(the "Software"), to deal // in the So...
the_stack
extern "C" { #endif #include <stdio.h> #include <math.h> #include <float.h> #include "roi_align_kernel.h" #define CUDA_1D_KERNEL_LOOP(i, n) \ for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < n; \ i += blockDim.x * gridDim.x) /*** Forward ***/ __device__ float...
the_stack
The example demenstrates how to reduce one of the operands of the GEMM along the k-dimension when computing GEMM. So the output also contains either a Mx1 or 1XN vector. It only works with Ampere HMMA 16x8x16 FP16 tensor cores, though it is not difficult to apply to other Turing/Ampere tensor core instructions. Most...
the_stack
#define WARP_REDUCE_32BIT(ASM_OP, ASM_T, ASM_CL, MIN_MAX_LANE) \ _Pragma("unroll") \ for (int STEP = 0; STEP < xlib::Log2<WARP_SZ>::value; STEP++) { \ asm( ...
the_stack
#include "base/memory.h" #include "core/optimizer.h" #include "util/gpu.cuh" namespace graphvite { namespace gpu { namespace graph { /** * @brief Train node embedding with 0-moment optimizers * @tparam Vector vector type of embeddings * @tparam Index integral type of indexes * @tparam Model embedding model * @tp...
the_stack