text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
namespace minerva {
namespace cuda {
static void FindConfiguration(size_t size, int& num_blocks, int& num_threads) {
num_threads = 0;
if(size <= 32)
num_threads = 32;
else if(size <= 64)
num_threads = 64;
else if(size <= 128)
num_threads = 128;
else if(size <= 256)
num_threads = 256;
else i... | the_stack |
#include <vector>
#include <assert.h>
using namespace std;
#define SAMPLECOLLECT_DEBUG 2
HistoryCollection::HistoryCollection(const ImgRegParams & img_region_params, const int numFlowsInHistory,const int maxCompressedFrames,const int uncompressedFrames ){
writeBuffer = 0;
collectedFlows = 0;
numFlows = numFlow... | the_stack |
#include "index_host_copy.cuh"
#include <unordered_set>
#include <claraparabricks/genomeworks/cudamapper/index.hpp>
#include <claraparabricks/genomeworks/io/fasta_parser.hpp>
namespace claraparabricks
{
namespace genomeworks
{
namespace cudamapper
{
DeviceIndexCache::DeviceIndexCache(const CacheType cache_type,
... | the_stack |
namespace faiss {
namespace gpu {
// Kernel responsible for calculating distance from residual vector to
// each product quantizer code centroid
template <
typename OutCodeT,
typename CentroidT,
int DimsPerSubQuantizer,
bool L2Distance>
__global__ void __launch_bounds__(288, 3) pqCodeDi... | the_stack |
using namespace megdnn;
using namespace cuda;
using namespace relayout_format;
using namespace internal;
namespace {
template <
bool with_pad, int pack_w, int pack_c, bool same_scale, bool all_pad,
typename SrcType, typename DstType, typename DnnSrcType, typename DnnDstType>
struct RelayoutKern {
u... | the_stack |
#include <thrust/device_ptr.h>
#include <thrust/sort.h>
#include <thrust/reverse.h>
#include <thrust/reduce.h>
#include <thrust/merge.h>
#include <thrust/fill.h>
#include <thrust/iterator/reverse_iterator.h>
#include <thrust/device_vector.h>
#include <thrust/sort.h>
#if __CUDA_ARCH__ > 200
#define MAXXGRID ... | the_stack |
using namespace facebook::cuda;
namespace facebook { namespace deeplearning { namespace torch {
namespace detail {
// Read weight tensor. Need to regularize this type of access for the
// template implementation.
//
__device__
void packOutputPlanes(float& result, DeviceTensor<float, 6>& weight,
int... | the_stack |
__constant__ KernParameters c_params;
const int OPT_BW = 32,
OPT_BH = 8,
OPT_NB = 5;
const int SPACING = 5;
template <int BW, int BH>
struct SSIMData
{
float2 mean[BH*2+4][BW*2+4],
var[BH*2+4][BW*2+4];
float cross[BH*2+4][BW*2+4],
value[BH*2+4][BW*2+4];
int2 or... | the_stack |
extern __global__ void array_set_kernel(float *output, float value,
size_t size);
extern __global__ void float_memory_copy(float *A, const float *B, size_t len);
extern int Float_Add(float *A, const float *B, int len,
DLStreamHandle stream_handle);
__global_... | the_stack |
#include "ew_op_gpu.h"
#include "gpu_hmma.h"
#include <stdio.h>
template <uint OP_A, bool N64>
__global__ void __launch_bounds__(128,6) bst_sgemm_32x64x32_xn(
const uint2* __restrict__ Lut,
const bhalf* __restrict__ A,
const float* __restrict__ B,
float* C,
uint szCtxHeadStateB, ... | the_stack |
#pragma once
#include <cuda.h>
#include <gunrock/util/cuda_properties.cuh>
#include <gunrock/util/vector_types.cuh>
namespace gunrock {
namespace util {
namespace io {
/**
* Enumeration of data movement cache modifiers.
*/
namespace ld {
enum CacheModifier {
NONE, // default (currently ca)
cg, // cache gl... | the_stack |
#include "parallax/simpleFlow.hpp"
#include "./kernels/patchDifferenceFunction.cu"
#include "backend/common/vectorOps.hpp"
#include "backend/cuda/deviceBuffer.hpp"
#include "backend/cuda/deviceStream.hpp"
#include "backend/cuda/core1/kernels/samplingKernel.cu"
#include "gpu/image/sampling.hpp"
#include "gpu/image/im... | the_stack |
using namespace std;
#ifndef MAP_FILE
#define MAP_FILE MAP_SHARED
#endif
long fsize(int fd) {
struct stat stat;
int res = fstat(fd, &stat);
return stat.st_size;
}
int printll(char *s) {
while (*s != '\n' && *s != ',' && *s != '\t') {
putchar(*s++);
}
return 0;
}
long hash(char *str0, int len) {
uns... | the_stack |
#ifdef RAPIDJSON_DEFINED
#include "rapidjson/document.h"
#include "rapidjson/prettywriter.h"
#include "rapidjson/filestream.h"
#endif
using namespace std;
namespace amgx
{
#ifdef RAPIDJSON_DEFINED
static int unnamed_scope_counter = 0;
static rapidjson::Document json_parser; //made as global to avoid passing template ... | the_stack |
static inline void THNN_(SpatialConvolutionLocal_shapeCheck)(
THCState *state,
THCTensor *input, THCTensor *gradOutput,
THCTensor *weight, THCTensor *bias,
int kH, int kW, int dH,
int dW, int pad... | the_stack |
#include <map>
#include "cuda_runtime.h"
#include "miner.h"
#include "salsa_kernel.h"
#include "kepler_kernel.h"
#define TEXWIDTH 32768
#define THREADS_PER_WU 4 // four threads per hash
typedef enum
{
ANDERSEN,
SIMPLE
} MemoryAccess;
// scratchbuf constants (pointers to scratch buffer for each warp, i.e. 32 h... | the_stack |
#ifndef __STDC_CONSTANT_MACROS
#define __STDC_CONSTANT_MACROS
#endif
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdbool.h>
#include <cuda.h>
#include "CRC64.h"
// The polynomial here is the bit-reversed encoding of 0x42f0e1eba9ea3693.
static const uint64_t crc64_poly = UINT64_C(0xc96c5795d7870f42);... | the_stack |
template <typename T, typename S, typename G>
__global__ void MomentumUpdateVariableKernel(const size_t size, T *variable, T *accumulation, const S *learning_rate,
const G *gradient, const S *momentum, bool use_nesterov) {
if (use_nesterov) {
for (size_t i = blockIdx.x... | the_stack |
#include "cublas_v2.h"
#include "cusolverDn.h"
#include <thrust/device_vector.h>
#include <thrust/device_ptr.h>
#include <thrust/gather.h>
#include <thrust/sort.h>
#include <cmath>
#include "_reg_maths.h"
#include "_reg_tools.h"
#include "_reg_blockMatching.h"
#define IDX2C(i,j,ld) (((j)*(ld))+(i))
/* **************... | the_stack |
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <inttypes.h>
#include <iostream>
#include <iterator>
#include <map>
#include <sstream>
#include <stdint.h>
#include <stdio.h>
#include <string>
#include <sys/stat.h>
#include <unistd.h>
#include <unordered_set>
#include <vector>
/* every tool needs to ... | the_stack |
#define INTENSIVE_GMF
#include "cuda_x11_aes_alexis.cuh"
#define TPB 384
__device__ __forceinline__
static void round_3_7_11(const uint32_t sharedMemory[4][256], uint32_t* r, uint4 *p, uint4 &x){
KEY_EXPAND_ELT(sharedMemory, &r[ 0]);
*(uint4*)&r[ 0] ^= *(uint4*)&r[28];
x = p[ 2] ^ *(uint4*)&r[ 0];
KEY_EXPAND_EL... | the_stack |
char *cp_to_device(char *from, size_t size) {
char *tmp;
cudaMalloc((void**)&tmp, size);
cudaMemcpy(tmp, from, size, cudaMemcpyHostToDevice);
return tmp;
}
void cp_to_host(char *to, char*from, size_t size) {
cudaMemcpy(to, from, size, cudaMemcpyDeviceToHost);
cudaFree(from);
}
__global__ void ccc_loop1(con... | the_stack |
#include <ATen/ATen.h>
#include <ATen/cuda/CUDAContext.h>
#include <cuda.h>
#include <cuda_runtime.h>
// #include <THC/THC.h>
// #include <THC/THCAtomics.cuh>
// #include <THC/THCDeviceUtils.cuh>
// extern THCState *state;
// author: Charles Shang
// https://github.com/torch/cunn/blob/master/lib/THCUNN/generic/Spati... | the_stack |
#include <thread>
#include <atomic>
#include <algorithm>
#include <vector>
#include <set>
#include <stdio.h>
#include <torch/extension.h>
#include <ATen/ATen.h>
#include <c10/cuda/CUDAGuard.h>
#include <ATen/cuda/CUDAContext.h>
#include <ATen/cuda/Exceptions.h>
#include <cusolverDn.h>
#include <cublas_v2.h>
#include ... | the_stack |
#define SOLVE_ZERO_INI_GUESS
//#define DEBUG
namespace amgx
{
struct TestCase
{
std::string file_name;
std::string config_string;
double max_mem_usage;
size_t max_mem_leak;
};
template <class Handle>
struct CWrapper
{
AMGX_Mode mode;
Handle hdl;
};
// parameter is used as test name
DECLARE_... | the_stack |
#include <cuda_runtime.h>
#include <cuda_fp16.h>
#include "math.hpp"
#include "bbox_utils.hpp"
#include "grid_stride_range.hpp"
#include "block_stride_range.hpp"
#include "execution.hpp"
#include "vector_traits.hpp"
#include "memory.hpp"
#include "../cuda4dnn/csl/stream.hpp"
#include "../cuda4dnn/csl/span.hpp"
#inclu... | the_stack |
#include "cml/cml_blas.cuh"
#include "cml/cml_matrix.cuh"
#include "cml/cml_vector.cuh"
#include "equil_helper.cuh"
#include "matrix/matrix.h"
#include "matrix/matrix_dense.h"
#include "util.h"
#include "timer.h"
#include <thrust/device_ptr.h>
#include <thrust/device_vector.h>
#include <thrust/host_vector.h>
#include ... | the_stack |
* \file
* cub::BlockHisto256 provides methods for constructing (and compositing into) 256-bin histograms from 8b data partitioned across threads within a CUDA thread block.
*/
#pragma once
#include "../util_arch.cuh"
#include "../block/block_radix_sort.cuh"
#include "../block/block_discontinuity.cuh"
#include "../u... | the_stack |
#include <cudf/detail/concatenate.hpp>
#include <cudf/detail/copy.hpp>
namespace legate {
namespace pandas {
namespace comm {
using namespace Legion;
namespace detail {
struct packed_columns_view {
packed_columns_view(const cudf::packed_columns &columns)
: metadata(columns.metadata_.get()), gpu_data(columns.g... | the_stack |
// Maintainer: joaander
#include "ComputeThermoGPU.cuh"
#include "hoomd/HOOMDMath.h"
#include "hoomd/VectorMath.h"
#include <hip/hip_runtime.h>
#include <assert.h>
/*! \file ComputeThermoGPU.cu
\brief Defines GPU kernel code for computing thermodynamic properties on the GPU. Used by
ComputeThermoGPU.
*/
//! ... | the_stack |
"This file can only be used from inside common/unified/base/kernel_launch_reduction.hpp"
#endif
#include "core/synthesizer/implementation_selection.hpp"
#include "cuda/base/device_guard.hpp"
#include "cuda/base/types.hpp"
#include "cuda/components/cooperative_groups.cuh"
#include "cuda/components/reduction.cuh"
#incl... | the_stack |
#include <limits>
#include <vector>
#include "k2/csrc/array_ops.h"
#include "k2/csrc/fsa_algo.h"
#include "k2/csrc/fsa_utils.h"
#include "k2/csrc/hash.h"
#include "k2/csrc/macros.h"
#include "k2/csrc/ragged_ops.h"
namespace k2 {
namespace intersect_internal {
struct StateInfo {
// the state_idx01 in a_fsas_.
in... | the_stack |
#include <iostream>
#include <stdio.h>
#include <util/helper_math.h>
namespace dart {
// -=-=-=-=-=-=-=-=-=- kernels -=-=-=-=-=-=-=-=-=-
template <typename DepthType>
__global__ void gpu_depthToVertices(const DepthType * depthIn,
float4 * vertOut,
... | the_stack |
* \test Testing the BLAS level 2 routines in the ViennaCL BLAS-like shared library
**/
// include necessary system headers
#include <iostream>
#include <vector>
// Some helper functions for this tutorial:
#include "viennacl.hpp"
#include "viennacl/vector.hpp"
template<typename ScalarType>
ScalarType diff(ScalarT... | the_stack |
#define STR1(X) #X
#define STR(X) STR1(X)
#define STRINGIFY(X,Y) X ## Y
#define CON(X,Y) STRINGIFY(X,Y)
#define KDir kernels
#include "includes/ourmacros.h"
extern __shared__ type tile[];
__device__ __forceinline__ void fvinomgeneralolap_main_coars(const type * __restrict__ Atmp, type * Btmp, const int tb_size... | the_stack |
#pragma once
#include "MarchingCubesConstCuda.h"
#include "ScalableTSDFVolumeCuda.h"
#include <Cuda/Common/Palatte.h>
#include <Cuda/Container/HashTableCudaDevice.cuh>
#include <Cuda/Container/HashTableCudaKernel.cuh>
#include <Cuda/Open3DCuda.h>
#include <Cuda/Container/MemoryHeapCudaDevice.cuh>
#include <Cuda/Cont... | the_stack |
#define CUBEHASH_ROUNDS 16 /* this is r for CubeHashr/b */
#define CUBEHASH_BLOCKBYTES 32 /* this is b for CubeHashr/b */
#define TPB35 576
#define TPB50 1024
#define ROTATEUPWARDS7(a) ROTL32(a,7)
#define ROTATEUPWARDS11(a) ROTL32(a,11)
static __device__ __forceinline__ void rrounds(uint32_t x[2][2][2][2][2])
{
in... | the_stack |
* This sample illustrates the usage of CUDA streams for overlapping
* kernel execution with device/host memcopies. The kernel is used to
* initialize an array to a specific value, after which the array is
* copied to the host (CPU) memory. To increase performance, multiple
* kernel/memcopy pairs are launched asyn... | the_stack |
using namespace std;
__device__ __host__ float de(Vec3 pos) ;
__device__ __host__ Vec3 getNormal(Vec3 pos)
{
Vec3 xDir = Vec3(1,0,0);
Vec3 yDir = Vec3(0,1,0);
Vec3 zDir = Vec3(0,0,1);
return Vec3::normalize(Vec3(de(pos+xDir)-de(pos-xDir),
de(pos+yDir)-de(pos-yDir),
... | the_stack |
using namespace std;
/* ------------------------ 2d Spreading Kernels ----------------------------*/
/* Kernels for NUptsdriven Method */
__global__
void Spread_2d_NUptsdriven(FLT *x, FLT *y, CUCPX *c, CUCPX *fw, int M,
const int ns, int nf1, int nf2, FLT es_c, FLT es_beta, int *idxnupts,
int pirange)
{
int xs... | the_stack |
#include "cupoch/geometry/kdtree_flann.h"
#include "cupoch/geometry/kdtree_search_param.h"
#include "cupoch/geometry/pointcloud.h"
#include "cupoch/registration/colored_icp.h"
#include "cupoch/utility/console.h"
#include "cupoch/utility/eigen.h"
using namespace cupoch;
using namespace cupoch::registration;
namespace ... | the_stack |
namespace pcl
{
namespace device
{
__device__ __forceinline__ float
getMinTime (const float3& volume_max, const float3& origin, const float3& dir)
{
float txmin = ( (dir.x > 0 ? 0.f : volume_max.x) - origin.x) / dir.x;
float tymin = ( (dir.y > 0 ? 0.f : volume_max.y) - origin.y) / dir.y;
... | the_stack |
#include <stdio.h>
#include "dev_evaluate_gravity.cu"
#include "n_per_cell.h"
#ifdef __DEVICE_EMULATION__
#endif
inline int n_norm(int n, int j) {
n = ((n-1)/j) * j + j;
if (n == 0) n = j;
return n;
}
double get_time();
extern "C"
{
int n_alloc;
int cuda_interaction_list_len;
int cuda_interaction... | the_stack |
template <typename FloatT>
AdamTransformGradientUpdater<FloatT>::AdamTransformGradientUpdater(
const size_t source_vector_dim,
const size_t target_vector_dim,
Streams* const streams,
const FloatT beta1,
const FloatT beta2,
const FloatT epsilon)
: TransformGradientUpdater<FloatT>(
... | the_stack |
#include "_reg_localTransformation_gpu.h"
#include "_reg_localTransformation_kernels.cu"
/* *************************************************************** */
/* *************************************************************** */
void reg_spline_getDeformationField_gpu(nifti_image *controlPointImage,
nifti_im... | the_stack |
#include <glm/glm.hpp>
#include <GL/glut.h>
// Thrust Dependencies
#include <thrust/device_ptr.h>
#include <thrust/device_vector.h>
#include <thrust/copy.h>
// Voxelpipe Dependency
#include <voxelpipe/voxelpipe.h>
// Octree-SLAM Dependencies
#include <octree_slam/timing_utils.h>
#include <octree_slam/world/voxelizat... | the_stack |
// Multidecrease.cu
// 实现图像的多阈值N值化图像生成操作
#include "Multidecrease.h"
#include <iostream>
#include <fstream>
#include <cmath>
using namespace std;
#include "ErrorCode.h"
// 宏:DEF_BLOCK_X ºÍ DEF_BLOCK_Y
// 定义了默认的线程块尺寸
#define DEF_BLOCK_X 32
#define DEF_BLOCK_Y 8
// Kernel 函数: _multidecrease_frontKer(前向 N 值化)
// ... | the_stack |
#include <cstdio>
#include <random>
#include <hip/hip_runtime.h>
#include "tables.h"
// problem size
constexpr unsigned int N(1024);
constexpr unsigned int Nd2(N / 2);
constexpr unsigned int voxelXLv1(16);
constexpr unsigned int voxelYLv1(16);
constexpr unsigned int voxelZLv1(64);
constexpr unsigned int gridXLv1((N - ... | the_stack |
#pragma once
#include <gunrock/app/enactor_base.cuh>
#include <gunrock/app/enactor_iteration.cuh>
#include <gunrock/app/enactor_loop.cuh>
#include <gunrock/app/vn/vn_problem.cuh>
#include <gunrock/oprtr/oprtr.cuh>
namespace gunrock {
namespace app {
namespace vn {
/**
* @brief Speciflying parameters for vn Enactor
... | the_stack |
#include "core/providers/cuda/cu_inc/common.cuh"
#include "transpose_impl.h"
namespace onnxruntime {
namespace cuda {
constexpr unsigned int TILE_DIM = 16;
template <typename T>
__global__ void Transpose3DKernel(const TArray<int64_t> input_shape,
const TArray<int64_t> input_strides,... | the_stack |
#include "_reg_nmi.h"
#include "_reg_nmi_gpu.h"
#include "_reg_nmi_kernels.cu"
/* \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ */
/* \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ */
reg_nmi_gpu::reg_nmi_gpu():
reg_nmi::reg_nmi()
{
this->forwardJointHistogramLog_device=NULL;... | the_stack |
#ifndef CONV_KERNEL_CU
#define CONV_KERNEL_CU
#include <stdint.h>
/*
#define CHECK_BANK_CONFLICTS 0
#if CHECK_BANK_CONFLICTS
#define AS(i, j) cutilBankChecker(((float*)&As[0][0]), (BLOCK_SIZE * i + j))
#define BS(i, j) cutilBankChecker(((float*)&Bs[0][0]), (BLOCK_SIZE * i + j))
#else
#define AS(i, j) As[i][j]
#define ... | the_stack |
// #define DEBUG_RESULT
namespace lightseq {
namespace cuda {
template <OperationType OpType_>
QuantGptEncoder<OpType_>::QuantGptEncoder(
int max_batch_size, const int *p_d_token_id, float *p_d_ppl,
int *p_d_sample_id, const QuantGptWeight<OpType_> &tw, cudaStream_t stream,
cudaStream_t cache_stream, cubl... | the_stack |
#include <optix.h>
#if (OPTIX_VERSION < 70000)
#include <optixu/optixu_math_namespace.h>
#else
#include <optix.h>
#include <cuda_runtime.h>
#endif
#include <OSL/device_string.h>
#include <OSL/oslclosure.h>
#include "rend_lib.h"
#include "util.h"
#if (OPTIX_VERSION < 70000)
// Ray payload
rtDeclareVariable (PRD_ra... | the_stack |
// TODO: Add d_visit_lookup and d_valid_in d_valid_out into ProblemBase
#pragma once
#include <gunrock/util/cta_work_distribution.cuh>
#include <gunrock/util/cta_work_progress.cuh>
#include <gunrock/util/kernel_runtime_stats.cuh>
#include <gunrock/util/device_intrinsics.cuh>
#include <gunrock/oprtr/CULL_filter/cta.c... | the_stack |
#include<iostream>
#include<vector>
#include<string>
#include<fstream>
#include<cassert>
#include<algorithm>
#include<utility>
#include<queue>
#include<limits>
using namespace s2t::decodernet;
using namespace s2t::sys;
using namespace s2t::common;
using namespace std;
// kernel for decoder compuatations
__global__ v... | the_stack |
#include <nvbench/benchmark.cuh>
#include <nvbench/callable.cuh>
#include <nvbench/state.cuh>
#include <nvbench/type_list.cuh>
#include <nvbench/type_strings.cuh>
#include <nvbench/types.cuh>
#include "test_asserts.cuh"
#include <fmt/format.h>
#include <algorithm>
#include <variant>
#include <vector>
template <type... | the_stack |
#include "cooperative_groups.h"
#include "cuda_profiler_api.h"
namespace motis::raptor {
using namespace cooperative_groups;
// leader type must be unsigned 32bit
// no leader is a zero ballot vote (all 0) minus 1 => with underflow all 1's
constexpr unsigned int FULL_MASK = 0xFFFFffff;
constexpr unsigned int NO_LEAD... | the_stack |
#include "unit_test.h"
#include "matrix.h"
#include "csr_multiply.h"
namespace amgx
{
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template< typename T >
struct Epsilon
{};
template<>
struct Epsilon<float>
{
static __device__ __host__ __... | the_stack |
#include "common.hpp"
namespace HugeCTR {
namespace {
__global__ void reverse_relu_kernel(__half* dRelu, __half* mask, const __half* dY, int n) {
const size_t tid = blockIdx.x * blockDim.x + threadIdx.x;
const size_t num_threads = blockDim.x * gridDim.x;
const __half2 zero = TypeFunc<__half2>::zero();
__half2... | the_stack |
#include <cuComplex.h>
#include "memtransfer.h"
using namespace std;
int ALLOCGPUMEM1D_PLAN(CUFINUFFT_PLAN d_plan)
/*
wrapper for gpu memory allocation in "plan" stage.
Melody Shih 11/21/21
*/
{
// Mult-GPU support: set the CUDA Device ID:
int orig_gpu_device_id;
cudaGetDevice(& orig_gpu_device_id);
cudaSetDev... | the_stack |
#include "include/common.h"
// 一个二维的Eigen向量, 不强制使用字节对齐
using Vec2ida = Eigen::Matrix<int, 2, 1, Eigen::DontAlign>;
namespace kinectfusion {
namespace internal {
namespace cuda {
// 更新 TSDF 模型的核函数
__global__
void update_tsdf_kernel(
const PtrStepSz<float... | the_stack |
#include "opencv2/core/cuda/common.hpp"
#include "opencv2/core/cuda/border_interpolate.hpp"
#define tx threadIdx.x
#define ty threadIdx.y
#define bx blockIdx.x
#define by blockIdx.y
#define bdx blockDim.x
#define bdy blockDim.y
#define BORDER_SIZE 5
#define MAX_KSIZE_HALF 100
namespace cv { namespace cuda { namespac... | the_stack |
#include <algorithm>
#include <limits>
#include "cml/cml_blas.cuh"
#include "cml/cml_linalg.cuh"
#include "cml/cml_matrix.cuh"
#include "matrix/matrix_dense.h"
#include "projector/projector_direct.h"
#include "projector_helper.cuh"
#include "util.h"
#include "timer.h"
#include "solver/glm.h"
#include "../include/cud... | the_stack |
#include "pcl/gpu/utils/safe_call.hpp"
#include "thrust/transform.h"
#include "thrust/device_ptr.h"
namespace pcl
{
namespace device
{
//[spinimage][angles] = [0..FSize][..FSize]
extern __shared__ float simage_angles[];
template<class It> __device__ __forceinline__ float3 fetch(It ptr, int index) { retur... | the_stack |
#include <algorithm>
#include <iostream>
#include <device_launch_parameters.h>
#include <common/Constants.h>
#include "hashing/TicketBoardSet.cuh"
namespace surfelwarp { namespace device {
__global__ void buildLatticeIndexKernel(
cudaTextureObject_t rgb_image,
const unsigned subsampled_rows, const unsigned su... | the_stack |
#include <stdio.h>
#include <array>
#include <string>
#include <type_traits>
#include "gromacs/gpu_utils/device_stream.h"
#include "gromacs/gpu_utils/gputraits.cuh"
#include "gromacs/math/vec.h"
#include "gromacs/math/vectypes.h"
#include "gromacs/utility/exceptions.h"
#include "gromacs/utility/fatalerror.h"
#include... | the_stack |
#define FULL_MASK 0xffffffff
#define TILESIZE 32
#define WARPSIZE 32
template <typename RealType>
void __global__ k_find_block_bounds(
const int N, // Number of atoms
const int D, // Box dimensions, typically 3
const int T, // Number of tile... | the_stack |
namespace reduction {
// Utility functions
template <typename _dim3>
__device__ __forceinline__ nvfuser_index_t size(const _dim3& d) {
return (nvfuser_index_t)d.x * (nvfuser_index_t)d.y * (nvfuser_index_t)d.z;
}
#define isize(d) ((d).x * (d).y * (d).z)
template <typename _dim3pos, typename _dim3dim>
__device__ __f... | the_stack |
#include <torch/script.h>
#include <c10/cuda/CUDACachingAllocator.h>
#include <cuda.h>
#include <cuda_runtime.h>
#include <solr/solr.cuh>
#include <cnpy/cnpy.h>
extern inline void cudaPrintError(const char* file, const int line);
#define CUDA_PRINT_ERROR() cudaPrintError(__FILE__, __LINE__)
//#define DE... | the_stack |
// Copyright (c) 2018 Changan Wang
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, di... | the_stack |
#include <cub/cub.cuh>
#include <libvis/cuda/cuda_auto_tuner.h>
#include "badslam/cost_function.cuh"
#include "badslam/cuda_util.cuh"
#include "badslam/cuda_matrix.cuh"
#include "badslam/surfel_projection_nvcc_only.cuh"
#include "badslam/util.cuh"
#include "badslam/util_nvcc_only.cuh"
namespace vis {
__global__ void... | the_stack |
* \file
* cub::WarpScanSmem provides smem-based variants of parallel prefix scan of items partitioned across a CUDA thread warp.
*/
#pragma once
#include "../../thread/thread_operators.cuh"
#include "../../thread/thread_load.cuh"
#include "../../thread/thread_store.cuh"
#include "../../util_type.cuh"
#include "../.... | the_stack |
\brief Execution environment
*/
#include <cstring>
#include "cutlass/numeric_types.h"
#include "cutlass/layout/matrix.h"
#include "cutlass/layout/tensor.h"
#include "cutlass/util/reference/device/tensor_compare.h"
#include "cutlass/util/reference/device/tensor_fill.h"
#include "cutlass/util/reference/host/tensor_fil... | the_stack |
//#define NVBIO_CUDA_DEBUG
#include <cub/cub.cuh>
#include <nvbio/basic/omp.h>
#include "input_thread.h"
#include <nvbio/basic/pipeline.h>
#include <nvbio/sufsort/sufsort.h>
#include <nvbio/sufsort/sufsort_utils.h>
#include <nvbio/sufsort/file_bwt.h>
#include <nvbio/sufsort/bwte.h>
#include <nvbio/basic/timer.h>
#inc... | the_stack |
#pragma once
#include <gunrock/util/error_utils.cuh>
#include <gunrock/util/cuda_properties.cuh>
#include <gunrock/util/device_intrinsics.cuh>
#include <gunrock/util/io/modified_load.cuh>
#include <gunrock/util/io/modified_store.cuh>
#include <gunrock/util/array_utils.cuh>
namespace gunrock {
namespace util {
/**
*... | the_stack |
/** \addtogroup cudpp_cta
* @{
*/
/** @name Compress Functions
* @{
*/
#include <stdio.h>
#include <cudpp_globals.h>
template<class T, int depth>
__device__ void
binSearch_frag_mult(T* keyArraySmem, T* valueArraySmem, int offset, int &mid, T cmpValue, T testValue, int myAddress, int testGlobalIndex,
... | the_stack |
* \file
* cub::DeviceHistogram provides device-wide parallel operations for constructing histogram(s) from a sequence of samples data residing within global memory.
*/
#pragma once
#include <stdio.h>
#include <iterator>
#include "dispatch/device_histogram_dispatch.cuh"
#include "../util_namespace.cuh"
/// Optiona... | the_stack |
cuda_determinant::cuda_determinant() :
N(0), A(NULL), Ainv(NULL), Ainv_delta(NULL), Ainv_colk(0),
new_row(NULL), delta(0)
{
};
cuda_determinant::cuda_determinant(int n)
{
resize(N);
}
void
cuda_determinant::resize(int n)
{
N = n;
cudaMalloc((void**)&A , N*N*sizeof(float));
cudaMalloc((void**)&Ai... | the_stack |
#include "sample_kmers.h"
#include "utils.h"
#include <nvbio/basic/pipeline_context.h>
#include <nvbio/basic/numbers.h>
#include <nvbio/basic/bloom_filter.h>
#include <nvbio/basic/primitives.h>
#include <nvbio/basic/console.h>
#include <nvbio/basic/timer.h>
#include <nvbio/basic/threads.h>
#include <nvbio/basic/system.... | the_stack |
namespace AggMIS {
namespace GraphHelpers {
namespace Kernels {
__global__ void mapAdjacencyToBlockKernel(int size,
int *adjIndexes,
int *adjacency,
int *adjacencyBlockLabel,
int *blockMappedAdjacency,
int *fineAggregate) {
int idx = blockIdx.x * blockDim.x + ... | the_stack |
typedef unsigned char uint8_t;
typedef long long ll_t;
typedef struct __device_builtin__ __builtin_align__(_NCS_)
{
uint8_t _VARNAMES_;
} _uint8n_t;
typedef union {
_uint8n_t u8n;
uint8_t val[_NCS_];
} uint8n_t;
__device__ __forceinline__ float atomicMax(float *address, float val)
{
int ret = __float_as_int... | the_stack |
#include "open3d/core/Dispatch.h"
#include "open3d/core/Dtype.h"
#include "open3d/core/MemoryManager.h"
#include "open3d/core/ParallelFor.h"
#include "open3d/core/SizeVector.h"
#include "open3d/core/Tensor.h"
#include "open3d/core/hashmap/CUDA/StdGPUHashBackend.h"
#include "open3d/core/hashmap/DeviceHashBackend.h"
#inc... | the_stack |
#include <stdgpu/config.h>
#if STDGPU_BACKEND == STDGPU_BACKEND_CUDA
#define STDGPU_BACKEND_ATOMIC_HEADER <stdgpu/STDGPU_BACKEND_DIRECTORY/atomic.cuh> // NOLINT(bugprone-macro-parentheses,misc-macro-parentheses)
// cppcheck-suppress preprocessorErrorDirective
#include STDGPU_BACKEND_ATOMIC_HEADER
#unde... | the_stack |
#include <cuda.h>
#include <device_launch_parameters.h>
#include <texture_fetch_functions.h>
#include <builtin_types.h>
#include <vector_functions.h>
#include <math_functions.h>
#include <float.h>
#include <cuComplex.h>
#include "Reduction\f_dot_f.cuh"
#include "Reduction\Reduction.cu"
#define ADD 0
#define SUB ... | the_stack |
#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <torch/serialize/tensor.h>
#include <torch/types.h>
#define THREADS_PER_BLOCK 256
#define DIVUP(m, n) ((m) / (n) + ((m) % (n) > 0))
// #define DEBUG
__device__ inline void lidar_to_local_coords(float shift_x, float shift_y,
... | the_stack |
#include "k2/csrc/math.h"
#include "k2/csrc/utils.h"
namespace k2 {
// See FillValues() where this is invoked. It fills a region with
// a constant value.
__global__ void FillValuesKernel(int32_t *data, int32_t num_values,
int32_t value) {
int32_t job_idx = (blockIdx.x * blockDim.x... | the_stack |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
// CHECK: #include <hip/hip_runtime.h>
#include <cuda_runtime.h>
// CHECK: #include <hipsparse.h>
#include <cusparse.h>
// NOTE: CUDA 10.0
/* compute | b - A*x|_inf */
void residaul_eval(
int n,
// CHECK: const hipsparseMatDescr_t descrA,
const cusparse... | the_stack |
// Visualizing Errors in Rendered High Dynamic Range Images
// Eurographics 2021,
// by Pontus Andersson, Jim Nilsson, Peter Shirley, and Tomas Akenine-Moller.
// Pointer to the paper: https://research.nvidia.com/publication/2021-05_HDR-FLIP.
// FLIP: A Difference Evaluator for Alternating Images
// High Performance G... | the_stack |
#include <vector>
#include <random>
#include <iostream>
#include <chrono>
#include <numeric>
#include <math.h>
#include <cuda_runtime.h>
#include <stdexcept>
#define CUDA_CHECK_STATUS( cuda_function_call ) \
if (cudaError_t const status = cuda_function_call) \
{ \
throw std::runtime_error( cudaGetError... | the_stack |
* \file
* cub::BlockReduceByKeyiles implements a stateful abstraction of CUDA thread blocks for participating in device-wide reduce-value-by-key.
*/
#pragma once
#include <iterator>
#include "scan_tiles_types.cuh"
#include "../../block/block_load.cuh"
#include "../../block/block_discontinuity.cuh"
#include "../../... | the_stack |
#ifndef NO_CUDA_MAIN
__constant__ float Acuda[48];
#endif
// typedef struct
// {
// float *coefs;
// uint3 stride;
// float3 gridInv;
// int num_splines;
// } multi_UBspline_3d_s_cuda;
#ifndef NO_CUDA_MAIN
multi_UBspline_3d_s_cuda*
create_multi_UBspline_3d_s_cuda (multi_UBspline_3d_s* spline)
{
float A_h[48... | the_stack |
#include <cuda.h> // for CUDA_VERSION
#include "../common/interp.h"
#define ipow(a,b) ( (magma_int_t)(std::pow( (float)(a), (float)(b) ) ) )
//////////////////////////////////////////////////////////////////////////////////////////
template<typename T, int P, int Q>
static magma_int_t
interp_generic_kernel_driver... | the_stack |
* \file
* AgentRadixSortUpsweep implements a stateful abstraction of CUDA thread blocks for participating in device-wide radix sort upsweep .
*/
#pragma once
#include "../thread/thread_reduce.cuh"
#include "../thread/thread_load.cuh"
#include "../warp/warp_reduce.cuh"
#include "../block/block_load.cuh"
#include "..... | the_stack |
#include "pcl/gpu/utils/safe_call.hpp"
#include "pcl/gpu/utils/device/warp.hpp"
#include "pcl/gpu/utils/device/functional.hpp"
#include "pcl/gpu/utils/device/funcattrib.hpp"
#include "pcl/gpu/utils/timers_cuda.hpp"
#include "pcl/gpu/features/device/pair_features.hpp"
#include <iostream>
using namespace pcl::gpu;
usin... | the_stack |
#include "cupoch/geometry/trianglemesh.h"
#include "cupoch/utility/console.h"
#include "cupoch/utility/platform.h"
#include "cupoch/visualization/shader/shader.h"
#include "cupoch/visualization/shader/texture_simple_shader.h"
#include "cupoch/visualization/utility/color_map.h"
using namespace cupoch;
using namespace c... | the_stack |
/////////////////////////////////////////////////////////////////////
Domain::Domain(Int_t numRanks, Index_t colLoc,
Index_t rowLoc, Index_t planeLoc,
Index_t nx, int tp, int nr, int balance, Int_t cost)
:
m_e_cut(Real_t(1.0e-7)),
m_p_cut(Real_t(1.0e-7)),
m_q_cut(Real_t(1.0e-7)... | the_stack |
* \brief Implements PME GPU spline calculation and charge spreading in CUDA.
* TODO: consider always pre-sorting particles (as in DD case).
*
* \author Aleksei Iupinov <a.yupinov@gmail.com>
*/
#include "gmxpre.h"
#include <cassert>
#include "gromacs/gpu_utils/cuda_kernel_utils.cuh"
#include "gromacs/gpu_utils... | the_stack |
#include <assert.h>
#include <cuda.h>
#include <cuda_runtime.h>
#include <iostream>
#include "cudacommon.h"
#include "CUDAStencil.cpp"
using std::cout;
using std::cin;
//
// We are using the "trick" illustrated by the NVIDIA simpleTemplates example
// for accessing dynamically-allocated shared memory from a templatize... | the_stack |
#include "common.h"
#include "device_tensor.h"
namespace {
template<typename DType, typename Acctype>
struct KD2Op {
__device__ KD2Op(DeviceTensor<DType, 3> x,
DeviceTensor<DType, 2> c,
DeviceTensor<DType, 2> std) : X(x), C(c), STD(std) {}
__device__ __forceinline__ Acctype o... | the_stack |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.