text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
////////////////////////////// ////////////////////////////// ////////////////////////////// //Helper functions for leaf-nodes __device__ void compute_monopole(float2 &mass, float2 &posx, float2 &posy, float2 &posz, float4 pos) { mass = ds_accumulate...
the_stack
namespace amgx { template<class TConfig> class NBinormalizationScaler; /********************************************************************** * HOST FUNCTIONS *********************************************************************/ template <typename IndexType, typename MatrixType, typename VectorType> void computeB...
the_stack
template<typename T> __global__ void depth2xyz(uint16_t* d, T* x, T* y, T* z, T invF, int w, int h, T *xyz) { const int idx = threadIdx.x + blockIdx.x*blockDim.x; const int idy = threadIdx.y + blockIdx.y*blockDim.y; const int id = idx+w*idy; if(idx<w && idy<h) { T dd = T(d[id])*0.001; // convert to ...
the_stack
#include "deviceCode.h" #include "helpers.h" #include <optix_device.h> #include <owl/common/math/random.h> extern "C" __constant__ LaunchParams optixLaunchParams; typedef owl::common::LCG<4> Random; struct PRD { Random rng; float t_hit; vec3f gn, sn; vec3f texCoord; struct { vec3f result; float imp...
the_stack
#include "error.h" #include "f5c.h" #include "f5cmisc.cuh" #include "f5cmisc.h" void init_cuda(core_t* core){ cuda_exists(); int32_t cuda_device_num = core->opt.cuda_dev_id; cudaDeviceProp prop; cudaGetDeviceProperties(&prop, cuda_device_num); CUDA_CHK(); cudaSetDevice(cuda_device_num); ...
the_stack
* Test of BlockAdjacentDifference utilities ******************************************************************************/ // Ensure printing of CUDA runtime errors to console #define CUB_STDERR #include <cub/block/block_adjacent_difference.cuh> #include <cub/util_allocator.cuh> #include <thrust/count.h> #include ...
the_stack
// minimal data needed to compute forces on a device typedef struct atom_t { double pos[3] = {0,0,0}; double eps=0; // lj double sig=0; // lj double charge=0; double f[3] = {0,0,0}; // force int molid=0; int frozen=0; double u[3] = {0,0,0}; // dipole double polar=0; // polarizability } d_atom; __glob...
the_stack
#pragma once #include "triangle_buffer.cuh" #include "index_queue.cuh" #include "progress_queue.cuh" #include "config.h" #include <cub/cub.cuh> #include <ptx_primitives.cuh> #include <bitonic_sort.cuh> #include "instrumentation.cuh" #ifndef RASTERIZATION_STAGE_GLOBAL #define RASTERIZATION_STAGE_GLOBAL e...
the_stack
#include "./commonlib/checkerror.h" // checkCudaErrors // the base vectors and weight coefficients (GPU) __constant__ float2 dev_e[9]; // i = x,y; j = 0,1,...8 __constant__ float dev_alpha[9]; // ant vector (GPU) __constant__ int dev_ant[9]; // END of the base vectors and weight coefficients (GPU) void set_...
the_stack
#include "cuda_error.h" #include "cuda_runtime.h" #include "StreamingKernels.h" #include "SingleFitStream.h" #include "JobWrapper.h" #include "GpuMultiFlowFitControl.h" #include "SignalProcessingFitterQueue.h" #include "LayoutTranslator.h" //#define MIN_MEMORY_FOR_ONE_STREAM (450*1024*1024) using namespace std; //...
the_stack
///////////////////////////////////////////////////////////////////////////////////////////////// static int test_malloc(bool verbose) { int errors = 0; const int width = 256; const int height = 128; float *block = 0; printf("test_malloc(%d, %d)\n", width, height); size_t bytes = width * height * sizeof(flo...
the_stack
#include "amgx_types/util.h" #define USE_EXPERIMENTAL_FACTOR_COPY // #define USE_EXPERIMENTAL_NLARGEST namespace amgx { __host__ __device__ __forceinline__ double ourHash2(const int i) { unsigned int a = i; double result; a = (a + 0x7ed55d16) + (a << 12); a = (a ^ 0xc761c23c) + (a >> 19); a = (a ...
the_stack
namespace HugeCTR { template <typename TypeHashKey, typename TypeEmbeddingComp> EmbeddingOptimizer<TypeHashKey, TypeEmbeddingComp>::EmbeddingOptimizer( size_t max_vocabulary_size_per_gpu_, SparseEmbeddingHashParams &param, const std::shared_ptr<GeneralBuffer2<CudaAllocator>> &buf) : param(param) { // new...
the_stack
#include <cusp/coo_matrix.h> #include <cusp/csr_matrix.h> #include <cusp/dia_matrix.h> #include <cusp/ell_matrix.h> #include <cusp/hyb_matrix.h> #include <cusp/multiply.h> template <typename MemorySpace> void TestCooMatrixView(void) { typedef int IndexType;...
the_stack
#include <thrust/count.h> //count #include <thrust/sort.h> //sort #include <thrust/unique.h> //unique #include <thrust/remove.h> //remove #include <thrust/transform_scan.h> //transform_inclusive_scan #include <cusp/detail/format_utils.h> //offsets_to_indices #include <iostream> #include <strided_reduction.h>...
the_stack
* CTA tile-processing abstraction for BFS frontier expansion ******************************************************************************/ #pragma once #include "../../../../util/device_intrinsics.cuh" #include "../../../../util/cta_work_progress.cuh" #include "../../../../util/scan/cooperative_scan.cuh" #include ...
the_stack
#include "miner.h" extern "C" { #include "sph/sph_blake.h" } #include "cuda_helper.h" #ifdef __INTELLISENSE__ #define __byte_perm(x, y, b) x #endif /* threads per block and nonces per thread */ #define TPB 768 #define NPT 384 #define NBN 2 __constant__ uint32_t _ALIGN(16) d_data[21]; /* 16 gpu threads max */ stat...
the_stack
* Cooperative tile reduction and scanning within CTAs ******************************************************************************/ #pragma once #include "../../util/device_intrinsics.cuh" #include "../../util/srts_grid.cuh" #include "../../util/reduction/cooperative_reduction.cuh" #include "../../util/scan/serial...
the_stack
const float sigma_color = 30; //in mm const float sigma_space = 4.5; // in pixels __global__ void bilateralKernel (const PtrStepSz<unsigned short> src, PtrStep<unsigned short> dst, float sigma_space2_inv_half, float sigma_color2_inv_half) { int x = threadIdx.x + blockIdx.x *...
the_stack
namespace AggMIS { namespace MergeSplitGPU { namespace Kernels { namespace D { __device__ void LoadLocalNeighbors(int *neighbors, int *nextNeighbor, int aggSize, ...
the_stack
#include <math.h> #include <cuda.h> #include <cuda_runtime.h> #define EPSILON 0.000001 #define CROSS(dest,v1,v2) \ dest[0]=v1[1]*v2[2]-v1[2]*v2[1]; \ dest[1]=v1[2]*v2[0]-v1[0]*v2[2]; \ dest[2]=v1[0]*v2[1]-v1[1]*v2[0]; #define DOT(v1,v2) (v1[0]*v2[0]+v1[1]*v2[1]+v1[2]*v2[2]) #define SUB(d...
the_stack
// Copyright (c) 2009-2019 The Regents of the University of Michigan // This file is part of the HOOMD-blue project, released under the BSD 3-Clause License. // Maintainer: joaander /*! \file TwoStepRATTLELangevinGPU.cuh \brief Declares GPU kernel code for RATTLELangevin dynamics on the GPU. Used by TwoStepRAT...
the_stack
// // Matrix multiplication: C = A * B. // Host code. // // This sample implements matrix multiplication as described in Chapter 3 // of the programming guide and uses the CUBLAS library to demonstrate // the best performance. // SOME PRECAUTIONS: // IF WE WANT TO CALCULATE ROW-MAJOR MATRIX MULTIPLY C = A * B, // WE J...
the_stack
#include "../kernels/transformerKernels.h" #include "../kernels/transformerKernels_int8.h" #include "../kernels/embKernels_int8.h" #include "cublas_helper.h" /** @file QuantTransformer decoder, composed by gemm lib and custom cuda kernel function */ namespace lightseq { namespace cuda { template <OperationType OpT...
the_stack
#pragma once #include <gunrock/app/problem_base.cuh> #include <gunrock/oprtr/1D_oprtr/for_all.cuh> // MF includes #include <gunrock/app/mf/mf_enactor.cuh> #include <gunrock/app/mf/mf_test.cuh> #define debug_aml(a...) //#define debug_aml(a...) {printf("%s:%d ", __FILE__, __LINE__); printf(a);\ printf("\n");} nam...
the_stack
#include <cuda_runtime.h> #include <cuda_fp16.h> #include "array.hpp" #include "functors.hpp" #include "grid_stride_range.hpp" #include "execution.hpp" #include "vector_traits.hpp" #include "kernel_dispatcher.hpp" #include "../cuda4dnn/csl/stream.hpp" #include "../cuda4dnn/csl/span.hpp" #include "../cuda4dnn/csl/tens...
the_stack
#include <cudf/column/column_device_view.cuh> #include <cudf/detail/utilities/cuda.cuh> #include <cudf/detail/utilities/vector_factories.hpp> #include <cudf/null_mask.hpp> #include <cudf/types.hpp> #include <cudf/utilities/span.hpp> #include <rmm/cuda_stream_view.hpp> namespace cudf { namespace detail { /** * @brief...
the_stack
#include <cuda_runtime_api.h> template<typename T> inline __device__ int intRoundGPU(const T a) { return int(a + T(0.5)); } template <typename T> inline __device__ T process( const T* bodyPartA, const T* bodyPartB, const T* mapX, const T* mapY, const int heatmapWidth, const int heatmapHeight, const T interThresho...
the_stack
using ::testing::DoubleEq; using ::testing::Each; using ::testing::ElementsAre; using ::testing::ElementsAreArray; using ::testing::Eq; using ::testing::FloatEq; class ParamsTest : public ::testing::TestWithParam<RNG::result_type> { protected: virtual void SetUp() override { rng_.seed(GetParam()); } temp...
the_stack
#pragma once namespace hornets_nest { //namespace hornet_alg { struct InitStreaming { HostDeviceVar<PrDynamicData> pd; OPERATOR(vid_t src) { pd().visited[src] = 0; pd().visitedDlt[src] = 0; pd().diffPR[src] = 0.0f; pd().delta[src] = 0.0f; *pd().reduction...
the_stack
#include "cuda_lyra2v2_sm3.cuh" #ifdef __INTELLISENSE__ /* just for vstudio code colors */ #define __CUDA_ARCH__ 500 #endif #define TPB 32 #if __CUDA_ARCH__ >= 500 #include "cuda_lyra2_vectors.h" #define Nrow 4 #define Ncol 4 #define memshift 3 __device__ uint2x4 *DMatrix; __device__ __forceinline__ uint2 LD4S(c...
the_stack
#include <cudf/column/column.hpp> #include <cudf/column/column_device_view.cuh> #include <cudf/column/column_factories.hpp> #include <cudf/detail/get_value.cuh> #include <cudf/detail/nvtx/ranges.hpp> #include <cudf/strings/detail/strings_column_factories.cuh> #include <cudf/strings/split/split.hpp> #include <cudf/strin...
the_stack
#include <doctest.h> #include <taskflow/taskflow.hpp> #include <taskflow/cudaflow.hpp> // ---------------------------------------------------------------------------- // kernel helper // ---------------------------------------------------------------------------- template <typename T> __global__ void k_set(T* ptr, siz...
the_stack
using namespace torchx; namespace rubiks { // kernel function argument list #define DECLARE_KERNEL_DIM_ARGS \ const uint32_t input_numel, \ const uint32_t input_H_dim, \ const uint32_t input_W_dim, \ const uint32_t input_HW_dim, \ const uint32_t input_CHW_dim, \ const uint32_t output_nume...
the_stack
#include <iostream> #include <stack> using namespace std; // 宏:DEBUG // 定义是否输出调试信息 //#define DEBUG_IMG //#define DEBUG_TIME // 宏:DEF_BLOCK_X 和 DEF_BLOCK_Y // 定义了默认的线程块的尺寸。 #define DEF_BLOCK_X 32 #define DEF_BLOCK_Y 8 // 宏:PIXEL(x,y) // 获取图像中(x,y)像素的位置 #define PIXEL(x,y) workimg->imgData[(y)*workimg->width+(x)] // 宏:...
the_stack
#ifndef __NBLA_CUDA_FUNCTION_BASE_TRANSFORM_BINARY_CUH__ #define __NBLA_CUDA_FUNCTION_BASE_TRANSFORM_BINARY_CUH__ #include <nbla/cuda/common.hpp> #include <nbla/cuda/function/utils/base_transform_binary.hpp> #include <nbla/cuda/half.hpp> #include <nbla/cuda/utils/atomic_add.cuh> #include <assert.h> #include <string> ...
the_stack
//#include <sm_utils.inl> #include <strided_reduction.h> #include <math.h> //std::pow #include <matrix_coloring/coloring_utils.h> #include <map> #include <thrust/sort.h> #include <thrust/count.h> #include <thrust/sequence.h> #include <thrust/sort.h> #include <thrust/binary_search.h> #include <memory_intrinsics.h> #incl...
the_stack
//#include <sys/time.h> #include <curand.h> #include <helpers/DebugHelper.h> using namespace sd; #include <loops/special_kernels.h> cudaDeviceProp *deviceProperties; cudaFuncAttributes *funcAttributes = new cudaFuncAttributes[64]; int blockLimit = 128; int maxThreads = 512; bool allowedP2P = false; bool supportedP2P ...
the_stack
#include "internal_utils.h" #include <cuda_fp16.h> // Check async error. // Sync and get kernel status in Debug builds. #ifndef NDEBUG #define SYNC_AND_CHECK_STREAM(stream) do { \ cudaError_t status = cudaStreamSynchronize(stream); \ if (status != cudaSuccess) \ re...
the_stack
// // *** System // #include <iostream> // // *** Boost // #include <boost/numeric/ublas/io.hpp> #include <boost/numeric/ublas/triangular.hpp> #include <boost/numeric/ublas/matrix_sparse.hpp> #include <boost/numeric/ublas/matrix.hpp> #include <boost/numeric/ublas/matrix_proxy.hpp> #include <boost/numeric/ublas/lu.hpp>...
the_stack
#include <string.h> #include <stdint.h> #include <sph/blake2b.h> #include <cuda_helper.h> #include <cuda_vectors.h> #define TPB 512 #define NBN 2 static uint32_t *d_resNonces[MAX_GPUS]; static uint32_t *h_resNonces[MAX_GPUS]; static __constant__ uint2 _ALIGN(16) c_data[10]; static __constant__ uint2 _ALIGN(16) c_v...
the_stack
#include <tensorflow/core/framework/tensor.h> #include "tf_cuda_utils.h" #include "rasterise_grad_common.h" using namespace tensorflow; __global__ void upload_vertices( TTypes<Vertex, 2>::Tensor buffer, TTypes<float, 3>::ConstTensor const vertices, TTypes<int, 3>::ConstTensor const faces, dim3 const tota...
the_stack
* \file * cub::DeviceRadixSort provides device-wide, parallel operations for computing a radix sort across a sequence of data items residing within global memory. */ #pragma once #include <stdio.h> #include <iterator> #include "../block_region/block_region_radix_sort_upsweep.cuh" #include "../block_region/block_re...
the_stack
#include "caffe/layers/lrn_layer.hpp" #include "caffe/util/benchmark.hpp" #include "caffe/util/math_functions.hpp" namespace caffe { template<typename Dtype, typename MItype, typename MOtype> void LRNLayer<Dtype, MItype, MOtype>::GenerateProgram() { this->device_program_ = this->device_->CreateProgram(); stringst...
the_stack
#include "utility.hpp" using namespace ppl::common; namespace ppl { namespace cv { namespace cuda { #define LENGTH 16 #define SHIFT 4 #define LENGTH_X 128 #define LENGTH_Y 4 #define SHIFT_X 7 #define SHIFT_Y 2 template <typename T> __global__ void rotate90Kernel(const T* src, int src_rows, int src_cols, int src_st...
the_stack
#include "caffe/layer.hpp" #include "caffe/layers/flow_warp_layer.hpp" #include "caffe/util/math_functions.hpp" #include "caffe/util/benchmark.hpp" #include <iostream> #include <fstream> #define CUDART_NAN_F __int_as_float(0x7fffffff) namespace caffe { #define min(a,b) ((a<b)?(a):(b)) #define max(a,b) ((...
the_stack
/* partial verif info */ /**********************/ int test_index_array[TEST_ARRAY_SIZE], test_rank_array[TEST_ARRAY_SIZE], S_test_index_array[TEST_ARRAY_SIZE] = {48427,17148,23627,62548,4431}, S_test_rank_array[TEST_ARRAY_SIZE] = {0,18,346,64917,65463}, W_test_index_array[TEST_ARRAY_SIZE] = {357773,93...
the_stack
namespace MLCommon { namespace Score { class ScoreTest : public ::testing::Test { protected: void SetUp() override {} void TearDown() override {} }; typedef ScoreTest ScoreTestHighScore; TEST(ScoreTestHighScore, Result) { float y[5] = {0.1, 0.2, 0.3, 0.4, 0.5}; float y_hat[5] = {0.12, 0.22, 0.32, 0.42, ...
the_stack
#include "IPsecAuthHMACSHA1_kernel.hh" /* The index is given by the order in get_used_datablocks(). */ #define dbid_enc_payloads_d (0) #define dbid_flow_ids_d (1) #define SHA1_THREADS_PER_BLK 32 extern "C" { //__global__ uint32_t d_pad_buffer[16 * 2 * MAX_CHUNK_SIZE * MAX_GROUP_SIZE]; __device__ static uint32_...
the_stack
// Reference outputs (calculated on an M40 GPU) // > ./RNN 20 2 512 64 0 // Forward: 1299 GFLOPs // Backward: 2171 GFLOPs, (1564 GFLOPs), (3549 GFLOPs) // i checksum 1.315793E+06 h checksum 1.315212E+05 // di checksum 6.676003E+01 dh checksum 6.425067E+01 // dw checksum 1.453750E+09 // // > ./RNN 20 2 51...
the_stack
#include "THCTensorMath.h" #include "THCGeneral.h" #include "THCHalf.h" #include "THCTensorCopy.h" #include "THCApply.cuh" #include "THCNumerics.cuh" #include "THCReduce.cuh" template <typename T> struct TensorSigmoidOp { __device__ __forceinline__ void operator()(T* out, T* in) const { T one = (T) 1.0; *out...
the_stack
/* * Shabal implementation. * * ==========================(LICENSE BEGIN)============================ * * Copyright (c) 2007-2010 Projet RNRT SAPHIR * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal...
the_stack
#include <stdint.h> #include "launch_params.h" #include "types.h" #include "path_tracer.h" #include "disney_bsdf.h" #include "lights.h" #include "math.h" #include <optix_device.h> #include <owl/common/math/random.h> #include <owl/common/math/box.h> #include "nvisii/utilities/procedural_sky.h" #include <glm/gtx/matrix...
the_stack
template <typename FloatT> Gradients<FloatT>* MergeGradientsFn<FloatT>::operator()(const GradientAndWeights& gradients_and_weights) const { CHECK_GT(gradients_and_weights.size(), 1); std::vector<Gradients<FloatT>*> gradients; gradients.reserve(gradients_and_weights.size()); for (auto it = gradients_an...
the_stack
#include <cstdio> #include <float.h> #include "cuda_kernel_utils.h" #define BLOCK_SIZE 4 #define PT_BLOCK_SIZE 128 ////////////////////////////////////////////////////////////////////////////////// GPU __constant__ int cellOffsetsPool[27][3]; /** * Method to select a set of points from a point cloud in which all...
the_stack
#include "nnconv.hpp" #include "nnbias.hpp" #include "impl/dispatcher.hpp" #include "impl/blashelper.hpp" #include "impl/copy.hpp" #include "impl/im2row.hpp" #include <cassert> using namespace vl ; using namespace vl::nn ; using namespace vl::impl ; template<DeviceType deviceType, DataType dataType> struct Convolutio...
the_stack
#include "cuda_helper.h" __constant__ uint64_t c_State[25]; __constant__ uint32_t c_PaddedMessage[18]; #define U32TO64_LE(p) \ (((uint64_t)(*p)) | (((uint64_t)(*(p + 1))) << 32)) #define U64TO32_LE(p, v) \ *p = (uint32_t)((v)); *(p+1) = (uint32_t)((v) >> 32); static const uint64_t host_keccak_round_constant...
the_stack
using namespace std; #define MAX_KERNEL_THREADS 256 // float or double typedef float vtype; typedef vector<vector<vtype>> matrix; template<typename T> __device__ T parallel_prefix_sum(const int n, const int *ind, const T *w) { T sum = 0.0; T last; int mn =(((n+blockDim.x-1)/blockDim.x)*blockDim.x); //n i...
the_stack
extern "C" { #include "sph/sph_blake.h" #include "sph/sph_bmw.h" #include "sph/sph_groestl.h" #include "sph/sph_skein.h" #include "sph/sph_jh.h" #include "sph/sph_keccak.h" } #include "miner.h" #include "cuda_helper.h" #include "cuda_quark.h" #include <stdio.h> extern uint32_t quark_filter_cpu_sm2(const int thr_id,...
the_stack
#include "bilinearsampler.hpp" #include "../datacu.hpp" #include <assert.h> #include <float.h> #include <sm_20_atomic_functions.h> #include <cstdio> // maximum size of each grid dimension: #define MAX_GRID_DIM 65535 // this is probably a bad idea.. #if !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 600 #else // an imple...
the_stack
/* * Copyright (c) 2020-2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, th...
the_stack
#include <helper_cuda.h> #include "../../util/include/sync.h" #include "nvmatrix_kernels.cuh" #define GPU_ALLOC_FRACTION 0.95 // Take 95% of available GPU memory #define HOST_ALLOC_CHUNK (1UL << 32) #define SYNC_ON_FREE true #define BUCKET_TYPE ...
the_stack
#include "gtest/gtest.h" #include "k2/csrc/tensor_ops.h" #include "k2/csrc/test_utils.h" #include "k2/csrc/array_ops.h" namespace k2 { /* Return a 1-D tensor with random entries. @param [in] context It specifies the device where the output tensor resides. @param [in] dim Number of elements contained in t...
the_stack
#include <assert.h> #include <pthread.h> #include <stdint.h> #include <stdio.h> #include <map> #include <iostream> using namespace std; /* every tool needs to include this once */ #include "nvbit_tool.h" /* nvbit interface file */ #include "nvbit.h" /* provide some __device__ functions */ #include "utils/utils.h" /...
the_stack
namespace timemachine { template <typename RealType> InertialRestraint<RealType>::InertialRestraint( const std::vector<int> &group_a_idxs, const std::vector<int> &group_b_idxs, const std::vector<double> &masses, const double k) : N_(masses.size()), N_A_(group_a_idxs.size()), N_B_(group_b_idxs.size(...
the_stack
#include <nvToolsExt.h> #define DELETE 1 using namespace timer; namespace hornets_nest { template <bool device> void print_ptr(vid_t* src, vid_t* dst, int count, bool sort = false) { vid_t * s = nullptr; vid_t * d = nullptr; std::vector<vid_t> S, D; if (!device) { s = src; d = dst; } else { S.resiz...
the_stack
// #include <THC/THCTensorMathReduce.cuh> // #include <THC/THCTensorSort.cuh> // #include <THC/THCThrustAllocator.cuh> #include <THC/THCDeviceUtils.cuh> #include <c10/macros/Macros.h> #include <ATen/AccumulateType.h> #include <ATen/cuda/NumericLimits.cuh> // #include <ATen/cuda/DeviceUtils.cuh> #include <type_traits> ...
the_stack
#include "hipcommon.h" #define _USE_MATH_DEFINES #include <float.h> #include "comm.h" using namespace std; #include "kernels_common.h" #include "kernels_compact_storage.h" // **************************************************************************** // Function: addBenchmarkSpecOptions // // Purpose: // Add ben...
the_stack
extern "C" { __global__ void BilinearResampleKernel(float *input, float *output, int inputWidth, int inputHeight, int outputWidth, int outputHeight) { int id = blockDim.x * blockIdx.y * gridDim.x + blockDim.x * blockIdx.x + threadIdx.x; int size = outputWidth * outputHeight; float iT, iB; if (id < si...
the_stack
#include "fast_rnnt/csrc/mutual_information.h" namespace fast_rnnt { /* Forward of mutual_information. Each thread block computes blocks of the 'p' array of (s, t) shape equal to (BLOCK_SIZE, BLOCK_SIZE), e.g. (32, 32). Thread-blocks loop over such blocks, but they might loop only once if there is not that mu...
the_stack
#ifndef _BISECT_UTIL_H_ #define _BISECT_UTIL_H_ // includes, project #include <tests/Eigenvalues/config.h> #include <tests/Eigenvalues/util.h> //////////////////////////////////////////////////////////////////////////////// //! Compute the next lower power of two of n //! @param n number for which next higher power...
the_stack
// number of samples in the input datamatrix. // Fixed here to make static shared memory on a device #define MAXSAMPLE 200 __device__ struct pair_r compute( float *genekj, float *geneij, const char *sample, int wid,int k,int i,int D, const float *gene) { int j; float sx = 0.f, sxx = 0.f, sy = 0.f, sxy ...
the_stack
#include <cstdint> #include <type_traits> #include <c10/util/Exception.h> #include <c10/util/TypeCast.h> #include <c10/macros/Macros.h> #include <ATen/core/Array.h> #include <ATen/detail/FunctionTraits.h> #include <ATen/cuda/detail/OffsetCalculator.cuh> #include <thrust/tuple.h> // References: // https://devblogs.nvi...
the_stack
#include <cuda_runtime.h> #include <device_launch_parameters.h> #include "bvh/BVHNode.h" #include "bvh/MBVHNode.h" #include "CUDAIntersect.h" #include "getShadingData.h" #include "bsdf/bsdf.h" #include "lights.h" #define USE_WARP_PACKETS 1 #define USE_TOP_MBVH 1 #define USE_MBVH 1 #define IS_SPECULAR 1 #define MA...
the_stack
#include "common.cuh" #include "common/include/conversion_kernels.cuh" #include "operation/operation_interface.h" namespace SparseOperationKit { template <typename KeyType, typename ValueType> class CsrConversionDistributed : public Operation { public: explicit CsrConversionDistributed(ConstructionContext_t contex...
the_stack
#include <raft/cudart_utils.h> #include <raft/cuda_utils.cuh> #include <thrust/device_ptr.h> #include <thrust/reduce.h> #include <cub/cub.cuh> #include <math.h> namespace MLCommon { namespace Metrics { typedef enum { IMPL_NONE, SMEM_ATOMICS, GLOBAL_ATOMICS, SORT_AND_GATOMICS } ContingencyMatrixImplType; t...
the_stack
#include <hip/hip_runtime.h> #pragma once inline void ecl_connected_components(const int nodes, const int edges, const int *d_nidx, const int* d_nlist, const int *d_nstat, const int *d_wl, const hipDeviceProp_t& deviceProp); #include <stdlib.h> #include <stdio.h> #include <hip/hip_runtime.h> ...
the_stack
#include <rmm/cuda_stream_view.hpp> #include <thrust/iterator/constant_iterator.h> #include <memory> namespace { template <typename T> void in_place_copy_range(cudf::column_view const& source, cudf::mutable_column_view& target, cudf::size_type source_begin, ...
the_stack
// ----------------------------------------------------------------------------------------- // NVEnc by rigaya // ----------------------------------------------------------------------------------------- // // The MIT License // // Copyright (c) 2014-2016 rigaya // // Permission is hereby granted, free of cha...
the_stack
#define SINC_KERNEL_RADIUS 3 #define SINC_KERNEL_SIZE SINC_KERNEL_RADIUS*2 /* *************************************************************** */ unsigned int min1(unsigned int a, unsigned int b) { return (a < b) ? a : b; } /* *************************************************************** */ __device__ __constant__ f...
the_stack
#include "Inputs/cuda.h" // CHECK-LABEL: @_Z24atomic32_op_singlethreadPiii // CHECK: cmpxchg i32* {{%[0-9]+}}, i32 {{%[0-9]+}}, i32 {{%[0-9]+}} syncscope("singlethread-one-as") // CHECK: cmpxchg weak i32* {{%[0-9]+}}, i32 {{%[0-9]+}}, i32 {{%[0-9]+}} syncscope("singlethread-one-as") monotonic monotonic, align 4 // CHE...
the_stack
#include <cooperative_groups.h> #include <thrust/distance.h> #include <thrust/functional.h> #include <cub/cub.cuh> #include <memory> #include <cuco/allocator.hpp> #include <cuco/probe_sequences.cuh> #include <cuco/traits.hpp> #if defined(CUDART_VERSION) && (CUDART_VERSION >= 11000) && defined(__CUDA_ARCH__) && \ (_...
the_stack
Copyright (C) 2014-16 Andrea Vedaldi. All rights reserved. This file is part of the VLFeat library and is made available under the terms of the BSD license (see the COPYING file). */ #include <assert.h> #include <vector> #include <string> #include <algorithm> #include <iostream> #include <sstream> #include <cstdlib> ...
the_stack
FEM3D::FEM3D(TetMesh* meshPtr) { initializeWithTetMesh(meshPtr); } void FEM3D::initializeWithTetMesh(TetMesh* meshPtr) { nv = meshPtr->vertices.size(); ne = meshPtr->tets.size(); IdxVector_h tri0(ne); IdxVector_h tri1(ne); IdxVector_h tri2(ne); IdxVector_h tri3(ne); for(int i = 0; i < ne; i++) { ...
the_stack
#include <octree_slam/sensor/image_kernels.h> // CUDA / OpenGL Dependencies #include <cuda_gl_interop.h> // Thrust Dependencies #include <thrust/reduce.h> #include <thrust/device_ptr.h> namespace octree_slam { namespace sensor { #define PI 3.14159 int BILATERAL_KERNEL_SIZE = 7; float BILATERAL_SIGMA_DEPTH = 40.0f...
the_stack
#include <stdio.h> #include <stdlib.h> #include <sys/types.h> //#include <dirent.h> #include <boost/lexical_cast.hpp> #include <boost/filesystem.hpp> #include <boost/algorithm/string.hpp> #include "caffe/layers/DenseBlock_layer.hpp" #include "caffe/util/gpu_util.cuh" #include "caffe/util/cudnn.hpp" namespace caffe {...
the_stack
#include <nbla/array.hpp> #include <nbla/cuda/common.hpp> #include <nbla/cuda/function/unpooling.hpp> #include <nbla/cuda/math.hpp> #include <nbla/cuda/utils/atomic_add.cuh> #include <nbla/cuda/utils/nd_index.cuh> #include <nbla/variable.hpp> namespace nbla { template <typename T, bool channel_last = false> __global_...
the_stack
#include <indexing/construction/detail/utilities.cuh> #include <utility/point_to_nearest_polyline.cuh> #include <cuspatial/error.hpp> #include <cuspatial/spatial_join.hpp> #include <cudf/column/column_device_view.cuh> #include <cudf/column/column_factories.hpp> #include <cudf/column/column_view.hpp> #include <cudf/ta...
the_stack
#define NVBIO_CUDA_DEBUG #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <vector> #include <algorithm> #include <crc/crc.h> #include <nvbio/basic/console.h> #include <nvbio/basic/exceptions.h> #include <nvbio/basic/bnt.h> #include <nvbio/basic/numbers.h> #include <nvbio/basic/time...
the_stack
// 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 law or agreed to in writing, software // distributed under...
the_stack
__global__ void approxmatchkernel(int b,int n,int m,const float * __restrict__ xyz1,const float * __restrict__ xyz2,float * __restrict__ match,float * temp){ float * remainL=temp+blockIdx.x*(n+m)*2, * remainR=temp+blockIdx.x*(n+m)*2+n,*ratioL=temp+blockIdx.x*(n+m)*2+n+m,*ratioR=temp+blockIdx.x*(n+m)*2+n+m+n; float mu...
the_stack
#define LBANN_SCATTER_LAYER_INSTANTIATE #include "lbann/layers/transform/scatter.hpp" #include "lbann/utils/gpu/helpers.hpp" namespace lbann { namespace { using Dim2 = gpu_lib::array<size_t, 2>; using Dim3 = gpu_lib::array<size_t, 3>; /** @brief Kernel for scattering a 3D tensor * * output(k,indices(k,j),j) = va...
the_stack
#include "_reg_common_gpu.h" #include "_reg_tools_gpu.h" #include "_reg_tools_kernels.cu" /* *************************************************************** */ /* *************************************************************** */ void reg_voxelCentric2NodeCentric_gpu(nifti_image *targetImage, ...
the_stack
template <class Matrix, class Vector> void MIS_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 the nei...
the_stack
#include <gunrock/app/pr/pr_app.cu> #include <gunrock/app/test_base.cuh> using namespace gunrock; cudaError_t UseParameters(util::Parameters &parameters) { cudaError_t retval = cudaSuccess; GUARD_CU(parameters.Use<int>( "num-elements", util::REQUIRED_ARGUMENT | util::MULTI_VALUE | util::OPTIONAL_PARA...
the_stack
#pragma once #include <Cuda/Common/UtilsCuda.h> #include <Cuda/Common/JacobianCuda.h> #include <Cuda/Common/ReductionCuda.h> #include <Cuda/Container/ArrayCudaDevice.cuh> #include <Cuda/Container/Array2DCudaDevice.cuh> #include "RegistrationCuda.h" namespace open3d { namespace cuda { __global__ void ComputeColorGra...
the_stack
template <int B_Y, int B_X, int imgsPerThread, int filtersPerThread, int numColors, bool scale, bool checkImgBounds> __global__ void filterActs_YxX_color(float* images, float* filters, float* targets, const int numImages, const int numFilters, ...
the_stack
#include "cuNVSM/data.h" #include "cuNVSM/cuda_utils.h" namespace TextEntity { Batch::Batch(const size_t batch_size, const size_t window_size) : batch_size_(batch_size), window_size_(window_size), features_(nullptr), feature_weights_(nullptr), labels_(nullptr), weights_(nullptr), num_insta...
the_stack
#define NSPEEDS 9 #define LOCALSIZEX 128 #define LOCALSIZEY 1 /* dump output files for verification */ #define FINALSTATEFILE "final_state.dat" #define AVVELSFILE "av_vels.dat" /* struct to hold the parameter values */ typedef struct { int nx; /* no. of cells in x-direction */ ...
the_stack
Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later vers...
the_stack