text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
#include <thrust/for_each.h>
#include <thrust/iterator/counting_iterator.h>
#include <thrust/iterator/zip_iterator.h>
#include <thrust/tuple.h>
#include <stdgpu/contract.h>
#include <stdgpu/iterator.h>
#include <stdgpu/memory.h>
#include <stdgpu/utility.h>
namespace stdgpu
{
template <typename T, typename Allocato... | the_stack |
const int HIGHEST = 3;
const int ITER = 100;
const int WORKLOAD = 1;
int sizepernode;
// global var
float preScore = -99999999999.f;
float score = 0.f;
float maxScore[HIGHEST] = {-999999999.f};
bool orders[NODE_N][NODE_N];
bool preOrders[NODE_N][NODE_N];
bool preGraph[NODE_N][NODE_N];
bool bestGraph[HIGHEST][NODE_N][N... | the_stack |
#include <nbla/array.hpp>
#include <nbla/cuda/common.hpp>
#include <nbla/cuda/function/slice.hpp>
#include <nbla/cuda/math.hpp>
#include <nbla/cuda/utils/nd_index.cuh>
#include <nbla/cuda/utils/nd_index.hpp>
#include <nbla/variable.hpp>
namespace nbla {
// 1d slice
template <typename T>
__global__ void kernel_slice_1... | the_stack |
#include <amg.h>
#include <types.h>
#include <cutil.h>
#include <iostream>
#include <iomanip>
#include <amg_level.h>
#include <cycles/cgcycle.h>
#include <allocator.h>
#include <my_timer.h>
template<class Matrix, class Vector>
AMG<Matrix, Vector>::AMG(bool verbose, int convergeType, int cycleType,
int solverType, do... | the_stack |
* \test Tests conversion between vectors with different numeric type
**/
//
// *** System
//
#include <iostream>
#include <iomanip>
#include <vector>
//
// *** ViennaCL
//
//#define VIENNACL_DEBUG_ALL
#include "viennacl/vector.hpp"
#include "viennacl/vector_proxy.hpp"
template<typename NumericT, typename Vector... | the_stack |
#include <cub/cub.h>
#include <mgpuhost.cuh>
#include <moderngpu.cuh>
#include <nvbio/strings/string_set.h>
#include <nvbio/basic/thrust_view.h>
#include <nvbio/basic/cuda/sort.h>
#include <nvbio/basic/cuda/timer.h>
#include <nvbio/basic/cuda/ldg.h>
#include <nvbio/basic/cuda/primitives.h>
#include <nvbio/io/output/ou... | the_stack |
extern "C" {
#include <ccv.h>
#include <ccv_internal.h>
#include <nnc/ccv_nnc.h>
#include <nnc/ccv_nnc_easy.h>
#include <nnc/ccv_nnc_internal.h>
}
#include <nnc/gpu/ccv_nnc_compat.h>
#ifdef HAVE_CUDA
template<typename NUM>
__global__ void _ccv_nnc_roi_align_forw_nchw(const int nchw, const int ch, const int w, const i... | the_stack |
#include <collectives/ib_comm.hpp>
#include <iostream>
#include <sstream>
#include <utils.cuh>
#include <utils.hpp>
namespace HugeCTR {
static void* proxy_thread_func(void* cfg) {
auto ibv_config = (struct IbvProxy::InitConfig*)cfg;
// set numa allocation policy to local
set_mempolicy(MPOL_LOCAL, NULL, 0);
C... | the_stack |
#include "../util_ptx.cuh"
#include "../util_type.cuh"
#include "../util_math.cuh"
#include "../util_namespace.cuh"
CUB_NAMESPACE_BEGIN
// Implementation of the MergePath algorithm, as described in:
// Odeh et al, "Merge Path - Parallel Merging Made Simple"
// doi:10.1109/IPDPSW.2012.202
template <typename KeyT,
... | the_stack |
template<typename T, int BS> __global__
void phase_factor_kernel (T *kPoints, int *makeTwoCopies,
T *pos, T **phi_in, T **phi_out,
int num_splines, int num_walkers)
{
__shared__ T in_shared[2*BS+1], kPoints_s[BS][3],
pos_s[BS][3];
volatile __shared__ ... | the_stack |
#include "caffe/fast_rcnn_layers.hpp"
using std::max;
using std::min;
#define PI 3.1415926
namespace caffe {
template <typename Dtype>
__global__ void RotateROIPoolForward(const int nthreads, const Dtype* bottom_data,
const Dtype spatial_scale, const int channels, const int height,
const int width, const in... | the_stack |
#include <gunrock/app/snn/snn_app.cu>
#include <gunrock/graphio/labels.cuh>
#include <gunrock/app/test_base.cuh>
// KNN includes
// Gunrock KNN app
#include <gunrock/app/knn/knn_app.cu>
#include <gunrock/app/knn/knn_helpers.cuh>
#include <gunrock/app/knn/knn_problem.cuh>
#include <gunrock/app/knn/knn_enactor.cuh>
#inc... | the_stack |
// ISO2DFD: HIP Port of the 2D-Finite-Difference-Wave Propagation,
//
// ISO2DFD is a finite difference stencil kernel for solving the 2D acoustic
// isotropic wave equation. Kernels in this sample are implemented as 2nd order
// in space, 2nd order in time scheme without boundary conditions. Using HIP,
// the sa... | the_stack |
#include "math_constants.h"
//Eigen includes
#include <Eigen/Dense>
#include <Eigen/Sparse>
//Boost
#include "boost/program_options.hpp"
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp>
//My own includes
#include "add_model_info.h"
#include "logger.h"
#include "global_params.h"
#inclu... | the_stack |
/**
* ___ _ _ ___ _ _ ___ ___ ___ ___
* / __| | | | \ /_\ | | ___| _ ) __/ __/ __|
* | (__| |_| | |) / _ \ | |_|___| _ \ _| (_ \__ \
* \___|\___/|___/_/ \_\ |____| |___/_| \___|___/
* 2012
* by Jens Wetzl (jens.wetzl@fau.de)
* ... | the_stack |
namespace arboretum {
namespace core {
template <typename SUM_T>
__global__ void hist_gain_kernel(
const SUM_T *const __restrict__ hist_prefix_sum,
const unsigned *const __restrict__ hist_prefix_count,
const SUM_T *const __restrict__ parent_sum,
const unsigned int *const __restrict__ parent_count, const unsign... | the_stack |
using ::testing::ElementsAreArray;
class UpdatesTest : public ::testing::TestWithParam<::testing::tuple<FloatT, FloatT>> {
protected:
template <typename T>
T* create_storage(const FloatT value,
const size_t first_size,
const size_t second_size,
Streams* ... | the_stack |
namespace cuHE {
// Initailization
static uint32 **dhBuffer_; // pinned memory for ZZX-Raw conversions
void initCuHE(ZZ *coeffMod_, ZZX modulus) {
dhBuffer_ = new uint32 *[numDevices()];
for (int i=0; i<numDevices(); i++) {
CSC(cudaSetDevice(i));
CSC(cudaMallocHost(&dhBuffer_[i],
param.rawLen*param._wordsCo... | the_stack |
#include "cudapoa_structs.cuh"
#include <claraparabricks/genomeworks/utils/cudautils.hpp>
#include <claraparabricks/genomeworks/utils/limits.cuh>
#include <stdio.h>
namespace claraparabricks
{
namespace genomeworks
{
namespace cudapoa
{
template <typename ScoreT>
__device__ __forceinline__ ScoreT* get_score_ptr(S... | the_stack |
#include <algorithm>
#include <iostream>
#include <thrust/device_vector.h>
#include <thrust/sort.h>
#include <sys/stat.h>
namespace pqt {
PerturbationProTree::PerturbationProTree(uint _dim, uint _p, uint _p2) :
ProTree(_dim, _p, _p2), d_multiCodeBook(NULL), d_multiCodeBook2(NULL), d_codeBookDistL2(
NULL), d_c... | the_stack |
namespace MegAutoBA {
namespace geo {
namespace {
template <typename T>
__global__ void QuaternionToRotation(
const int nItem, const int N, const T *Qx, const T *Qy, const T *Qz,
const T *Qw, const T *dQx, const T *dQy, const T *dQz, const T *dQw, T *R00,
T *R01, T *R02, T *R10, T *R11, T *R12, T *R20, T *R... | the_stack |
* This sample demonstrates how 2D convolutions
* with very large kernel sizes
* can be efficiently implemented
* using FFT transformations.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <cufft.h>
#include <cutil_inline.h>
typedef float2 Complex;
/////////////////////////////////... | the_stack |
#include "HoughCircle.h"
#include <iostream>
#include <fstream>
#include <cmath>
using namespace std;
#include "ErrorCode.h"
#include "CoordiSet.h"
//#define DEBUG
// 宏:HOUGH_INF_GREAT
// 定义了一个足够大的正整数,该整数在使用过程中被认为是无穷大。
#define HOUGH_INF_GREAT ((1 << 30) - 1)
// 宏:DEF_BLOCK_X 和 DEF_BLOCK_YI
// 定义了默认的线程块的尺寸。
#defin... | the_stack |
typedef int int32_t;
#define CUCL_GLOBAL_KERNEL extern "C" __global__
#define GASQ
#define GLOB_ID_1D (blockDim.x * blockIdx.x + threadIdx.x)
#define LOC_ID_1D (threadIdx.x)
#define GRP_ID_1D (blockIdx.x)
#define LOC_SZ_1D (blockDim.x)
#define LOCSHAR_MEM __shared__
#define LSMASQ
#define BARRIER_SYNC __syncthreads()
C... | the_stack |
namespace NKernel
{
struct TNonNegativeSegmentedSum
{
template <typename T>
__host__ __device__ __forceinline__ T operator()(const T& left, const T& right) const
{
const bool leftFlag = ExtractSignBit(left);
const bool rightFlag = ExtractSignBit(right);
... | the_stack |
#include "bm3d.hpp"
#define cimg_display 0
#include "CImg.h"
// Repeat the execution of kernels 100 times
#define REPEAT 100
// Adjust the size of the total shared local memory for different GPUs
// e.g. 48KB on P100
#define TOTAL_SLM 48*1024
// Adjust the thread block size of the block matching kernel for diffe... | the_stack |
#include "luaT.h"
#include "THC.h"
#include <lua.h>
#include "THCGeneral.h"
#define CAFFE_CUDA_NUM_THREADS 1024
// CUDA: various checks for different function calls.
#define CUDA_CHECK(condition) \
/* Code block avoids redefinition of cudaError_t error */ \
do { \
cudaError_t error = condition; \
if(error !... | the_stack |
#define EIGEN_TEST_NO_LONGDOUBLE
#define EIGEN_TEST_NO_COMPLEX
#define EIGEN_TEST_FUNC cxx11_tensor_device
#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int
#define EIGEN_USE_GPU
#include "main.h"
#include <unsupported/Eigen/CXX11/Tensor>
using Eigen::Tensor;
using Eigen::RowMajor;
// Context for evaluation on cpu
struct ... | the_stack |
__device__
float4 firstEigenVector( float* matrix )
{
// 8 iterations seems to be more than enough.
float4 v = make_float4(1.0f, 1.0f, 1.0f, 0.0f);
#pragma unroll
for(int i = 0; i < 8; i++) {
float x = v.x * matrix[0] + v.y * matrix[1] + v.z * matrix[2];
float y = v.x * matrix[1] + v.y * ma... | the_stack |
#include "caffe/layers/domain_transform_layer.hpp"
#include "caffe/layer.hpp"
#include "caffe/common.cuh"
#include "caffe/util/math_functions.hpp"
namespace caffe {
template <typename Dtype>
__global__ void kernel_horizontal_filter_left_to_right_forward(
const int channels, const int height, const int width,
... | the_stack |
* Copyright (c) 2017 by Contributors
* \file quantized_conv.cu
* \brief
* \author Ziheng Jiang, Jun Wu
*/
#include "../nn/convolution-inl.h"
#include "./quantization_utils.h"
#include "../tensor/matrix_op-inl.h"
namespace mxnet {
namespace op {
// value + bias_value * (range1 / limit_range1) * (limit_range2 / rang... | the_stack |
//#include "util.h"
//#include "time.h"
#include <matrix_io.h>
#include <readers.h>
#include <matrix_coloring/min_max.h>
#include <matrix_coloring/round_robin.h>
#include <matrix_coloring/multi_hash.h>
#include <cycles/v_cycle.h>
#include <cycles/w_cycle.h>
#include <cycles/f_cycle.h>
#include <cycles/cg_cycle.h>
#i... | the_stack |
#include "nnpooling.hpp"
#include "datacu.hpp"
#include <assert.h>
#include <float.h>
#include <sm_20_atomic_functions.h>
// -------------------------------------------------------------------
// Max pooling helpers
// ----------------------------------------------------... | the_stack |
#pragma once
#include <gunrock/util/array_utils.cuh>
#include <gunrock/app/problem_base.cuh>
#include <gunrock/oprtr/1D_oprtr/for_all.cuh>
#include <unordered_set>
namespace gunrock {
namespace app {
namespace knn {
/**
* @brief Speciflying parameters for KNN Problem
* @param parameters The util::Parameter<...> ... | the_stack |
#include <assert.h>
#define OSD_PATCH_BASIS_CUDA
#include "../osd/patchBasisCommonTypes.h"
#include "../osd/patchBasisCommon.h"
#include "../osd/patchBasisCommonEval.h"
// -----------------------------------------------------------------------------
template<int N> struct DeviceVertex {
float v[N];
__device_... | the_stack |
// For this example, there are quite a few template parameters that are used to generate the actual code.
// In order to simplify passing many parameters, we use the same approach as the CGBN library, which is to
// create a container class with static constants and then pass the class.
// The CGBN context uses the fo... | the_stack |
__device__ void kernel_ecc( const fp timeinst,
const fp* d_initvalu,
fp *d_finavalu,
const int valu_offset,
const fp* d_params){
//=====================================================================
// VARIABLES
//==============================... | the_stack |
#include <stdint.h>
#include "miner.h"
#include "cuda_helper.h"
void bitcoin_cpu_init(int thr_id);
void bitcoin_cpu_hash(int thr_id, uint32_t threads, uint32_t startNounce, const uint32_t *const ms, uint32_t merkle, uint32_t time, uint32_t compacttarget, uint32_t *const h_nounce);
void bitcoin_midstate(const uint32_t ... | the_stack |
#include "gpu/image/blur.hpp"
#include "../deviceBuffer.hpp"
#include "../deviceStream.hpp"
#include "cuda/util.hpp"
#include "image/transpose.hpp"
#include "libvideostitch/profile.hpp"
#include <cuda_runtime.h>
#include <cassert>
#define RGBA_BOX_BLUR_1D_BLOCK_SIZE (4 * 32)
#define RGBA_BOX_BLUR_SS_1D_BLOCK_SIZE ... | the_stack |
namespace at {
namespace native {
#if defined(USE_ROCM)
constexpr int CAT_ARRAY_BATCH_SIZE = 1024;
#else
constexpr int CAT_ARRAY_BATCH_SIZE = 128;
#endif
constexpr int CAT_ARRAY_MAX_INPUT_DIMS = 4;
namespace {
inline bool getCatGrid(ptrdiff_t nTensors, dim3& grid) {
const int numSM = at::cuda::getCurrentDeviceProp... | the_stack |
#include <iostream>
#include <algorithm>
#include "cuhnsw.hpp"
#include "cuda_search_kernels.cuh"
#include "cuda_build_kernels.cuh"
namespace cuhnsw {
void CuHNSW::GetDeviceInfo() {
CHECK_CUDA(cudaGetDevice(&devId_));
cudaDeviceProp prop;
CHECK_CUDA(cudaGetDeviceProperties(&prop, devId_));
mp_cnt_ = prop.mul... | the_stack |
// includes, system
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <float.h>
// includes, project
#include "cutil_inline.h"
#include "config.h"
#include "structs.h"
#include "util.h"
#include "matlab.h"
#include "bisect_large.cuh"
// includes, kernels
#include "bisect_kernel_la... | the_stack |
#pragma once
#include <gunrock/util/select_device.cuh>
#include <gunrock/app/enactor_base.cuh>
#include <gunrock/app/enactor_iteration.cuh>
#include <gunrock/app/enactor_loop.cuh>
#include <gunrock/app/sm/sm_problem.cuh>
#include <gunrock/oprtr/oprtr.cuh>
namespace gunrock {
namespace app {
namespace sm {
/**
* @br... | the_stack |
#include "ICcircleRadii.h"
#include "Image.h"
#include "ErrorCode.h"
// 宏 IC_BLOCK_X 和 IC_BLOCK_Y
#define IC_BLOCK_X 32
#define IC_BLOCK_Y 8
#define IC_BLOCK_Z 8
// 宏 IC_MAX_INT 和 IC_MIN_INT
// 定义距离的最大值和最小值
#define IC_MAX_INT 65536
#define IC_MIN_INT -1
// Kernel 函数:_getContourKer(获得轮廓... | the_stack |
using namespace std;
namespace amgx
{
namespace fixcolor_gauss_seidel_solver
{
// -------------------------
// Kernels
// -------------------------
template<typename IndexType, typename ValueTypeA, int blockrows_per_cta, int blockrows_per_warp, int bsize, int bsize_sq>
__global__
void setupBlockGSSmooth3by3BlockDiaC... | the_stack |
#include "cuda_helper.h"
static __constant__ uint64_t c_PaddedMessage80[16]; // padded message (80 bytes + padding)
static __constant__ uint32_t statebufferpre[8];
static __constant__ uint32_t statechainvpre[40];
#define MULT2(a,j) {\
tmp = a[7+(8*j)];\
a[7+(8*j)] = a[6+(8*j)];\
a[6+(8*j)] = a[5+(8*j)];\
a[5+(8*j... | the_stack |
#include "BilateralFilter.h"
#include <iostream>
#include <cmath>
using namespace std;
// 宏:DEF_BLOCK_X 和 DEF_BLOCK_Y
// 定义了默认的线程块的尺寸。
#define DEF_BLOCK_X 32
#define DEF_BLOCK_Y 8
// 纹理内存只能用于全局变量,使用全局存储时需要加入边界判断,经测试效率不及
// 纹理内存
static texture<unsigned char, 2, cudaReadModeElementType> _bilateralInimgTex;
// Hos... | the_stack |
#include "../shaders/tonemap.cuh"
#include "../shaders/uniforms.cuh"
#define FRAMEBUFFER_GLOBAL
#include "framebuffer.cuh"
#include "viewport.cuh"
__device__ void clamp_d(math::int2& v, const math::int2& lim)
{
v.x = max(0, min(lim.x, v.x));
v.y = max(0, min(lim.y, v.y));
}
__device__ void add(math::f... | the_stack |
namespace amgx
{
namespace locally_downwind_kernels
{
// ---------------------------
// Kernels
// ---------------------------
// Kernel to color the rows of the matrix, using min-max approach
template <typename IndexType>
__global__
void colorRowsKernel(IndexType *row_colors, const int num_colors, const int num_rows)... | the_stack |
* \file
* cub::PersistentBlockHisto256 implements a stateful abstraction of CUDA thread blocks for histogramming multiple tiles as part of device-wide 256-bin histogram.
*/
#pragma once
#include <iterator>
#include "../../util_arch.cuh"
#include "../../block/block_load.cuh"
#include "../../block/block_histo_256.cu... | the_stack |
#include "EventFilter/HcalRawToDigi/plugins/DecodeGPU.h"
#include <cooperative_groups.h>
using namespace cooperative_groups;
namespace hcal {
namespace raw {
__forceinline__ __device__ char const* get_subdet_str(DetId const& did) {
switch (did.subdetId()) {
case HcalEmpty:
return "HcalE... | the_stack |
* Copyright (c) 2015 by Contributors
* \file pad.cu
* \brief
* \author Sebastian Bodenstein
*/
#include <algorithm>
#include "./pad-inl.h"
#include "../common/cuda/utils.h"
namespace mshadow {
namespace cuda {
////////////////////////////////////////////////////////////////////////////////
// Special Case: 2d imag... | the_stack |
#include <cuda.h>
// Disable strict aliasing errors for CUDA 9.
#if CUDA_VERSION >= 9000
#ifdef __GNUC__
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
#pragma GCC diagnostic push
#endif
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif // __GNUC__
#endif // CUDA_VERSION >= 9000
#include <cuda_fp16.... | the_stack |
#ifndef CPU_ONLY
__global__ void gpu_set_zero(int number_of_elements,
real* __restrict g_state_real,
real* __restrict g_state_imag)
{
int n = blockIdx.x * blockDim.x + threadIdx.x;
if (n < number_of_elements) {
g_state_real[n] = 0;
g_state_imag[n] = 0;
}
}
#else
void cpu_set_zero(int number_of_eleme... | the_stack |
#define COST_EPSILON 1e-2
using ::testing::Contains;
class TextEntityTest : public ModelTest<ModelTestWrapper<LSE>> {
protected:
virtual typename DataSourceType::BatchType* create_batch(
const size_t batch_size,
const size_t window_size) const {
return new typename DataSourceType::BatchTy... | the_stack |
////////////////////////////////////////////////////////////////////////////////
// //
// Description: //
// The Runge-Kutta-Fehlberg method is an adaptive procedure for approxi- ... | the_stack |
#include "data.hpp"
#include <cassert>
#include <cstdlib>
#include <cmath>
#include <time.h>
#ifdef _MSC_VER
#include "windows.h"
#else
#include <sys/time.h>
#endif
#ifndef NDEBUG
#include <iostream>
#endif
#if ENABLE_GPU
#include "datacu.hpp"
#endif
using namespace vl ;
/* ----------------------------------------... | the_stack |
#include "roipooling.hpp"
#include "../datacu.hpp"
#include <assert.h>
#include <cfloat>
#include <algorithm>
#include <sm_20_atomic_functions.h>
/* ---------------------------------------------------------------- */
/* Helpers */
/* ---------------------------... | the_stack |
#include <iostream>
#include <chrono>
#include <algorithm>
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include "bbcu/bbcu.h"
#include "bbcu/bbcu_util.h"
#include "Common.cuh"
#include "StochasticLut.cuh"
// -------------------------------------------------
// Forward
// -------------------... | the_stack |
template <typename T>
__global__ void RowwiseMomentsCUDAKernel(
const int rows,
const int cols,
const T* X,
T* mean,
T* variance) {
__shared__ typename BlockReduce<T>::TempStorage m_storage;
__shared__ typename BlockReduce<T>::TempStorage v_storage;
const T scale = T(1) / static_cast<T>(cols);... | the_stack |
#include "CUFLU.h"
#if ( MODEL == HYDRO )
// external functions
#ifdef __CUDACC__
#include "CUFLU_Shared_FluUtility.cu"
#else // #ifdef __CUDACC__
void Hydro_Rotate3D( real InOut[], const int XYZ, const bool Forward, const int Mag_Offset );
void Hydro_Con2Flux( const int XYZ, real Flux[], const real In[], const ... | the_stack |
// host
void attenuate_segment( Input * __restrict I, Source * __restrict S,
int QSR_id, int FAI_id, float * __restrict state_flux,
SIMD_Vectors * __restrict simd_vecs)
{
// Unload local vector vectors
float * __restrict q0 = simd_vecs->q0;
float * __restrict q1 = simd_vecs->q1;
f... | the_stack |
#include "common/omptarget.h"
#include "target_impl.h"
// Return true if this is the master thread.
INLINE static bool IsMasterThread(bool isSPMDExecutionMode) {
return !isSPMDExecutionMode && GetMasterThreadID() == GetThreadIdInBlock();
}
////////////////////////////////////////////////////////////////////////////... | the_stack |
#include "miner.h"
#include "cuda_helper.h"
#include "cuda_vectors.h"
#include "skein_header.h"
#include <openssl/sha.h>
/* try 1024 for 970+ */
#define TPB52 1024
#define TPB50 768
#define maxResults 16
/* 16 adapters max */
static uint32_t *d_resNonce[MAX_GPUS];
static uint32_t *h_resNonce[MAX_GPUS];
extern "C" vo... | the_stack |
#include <ops/declarable/helpers/transforms.h>
#include <helpers/ShapeUtils.h>
#include <helpers/PointersManager.h>
#include <helpers/ConstantTadHelper.h>
namespace sd {
namespace ops {
namespace helpers {
//////////////////////////////////////////////////////////////////////////
template<typename T>
__global__... | the_stack |
// TODO: Run some/all tests for half-precision floating-point values, e.g __half from:
// #include <cuda_fp16.h>
// TODO: Also test behavior with warps with some inactive/exited lanes
#include <kat/detail/execution_space_specifiers.hpp>
namespace kernels {
template <typename T, std::size_t N>
KAT_FHD kat::array<T... | the_stack |
#include "cupoch/geometry/pointcloud.h"
#include "cupoch/geometry/trianglemesh.h"
#include "cupoch/geometry/voxelgrid.h"
#include "cupoch/io/class_io/pointcloud_io.h"
#include "cupoch/io/class_io/trianglemesh_io.h"
#include "cupoch/io/class_io/voxelgrid_io.h"
#include "cupoch/utility/console.h"
namespace cupoch {
nam... | the_stack |
* \file
* cub::WarpScanSmem provides smem-based variants of parallel prefix scan across CUDA warps.
*/
#pragma once
#include "../../thread/thread_operators.cuh"
#include "../../thread/thread_load.cuh"
#include "../../thread/thread_store.cuh"
#include "../../util_type.cuh"
#include "../../util_namespace.cuh"
/// Op... | the_stack |
namespace vilib {
#define BLOCKDIM_X 32
#define BLOCKDIM_Y 4
#define RESULT_STEPS 8
#define HALO_STEPS 1
#define INSTANTIATE_1D_COL(I, O) \
template __host__ void conv_filter_col_gpu<I, O>(const I *... | the_stack |
// https://stackoverflow.com/questions/16282136/is-there-a-cuda-equivalent-of-perror
#define cudaCheckErrors(msg) \
do { \
cudaError_t __err = cudaGetLastError(); \
if (__err != cudaSuccess) { \
mexPrintf("%s \n",msg);\
mexErrMsgIdAndTxt("CBCT:CUDA:Atb",cudaGetError... | the_stack |
#include "opencv2/core/cuda/common.hpp"
#include "opencv2/core/cuda/border_interpolate.hpp"
#include "opencv2/core/cuda/vec_traits.hpp"
#include "opencv2/core/cuda/vec_math.hpp"
#include "opencv2/core/cuda/saturate_cast.hpp"
#include "opencv2/core/cuda/filters.hpp"
namespace cv { namespace cuda { namespace device
{
... | the_stack |
#include <nbla/array.hpp>
#include <nbla/variable.hpp>
#include <nbla/cuda/common.hpp>
#include <nbla/cuda/function/batch_normalization.hpp>
#include <nbla/cuda/limits.hpp>
//#include <nbla/cuda/function/kernel/batch_normalization.cuh>
#include "kernel/batch_normalization.cu"
#define BATCH_NORMALIZATION_USE_PARALLEL... | the_stack |
#include <nbla/array.hpp>
#include <nbla/logger.hpp>
#include <nbla/variable.hpp>
#include <nbla/cuda/array/cuda_array.hpp>
#include <nbla/cuda/common.hpp>
#include <nbla/cuda/cudnn/cudnn.hpp>
#include <nbla/cuda/cudnn/function/batch_normalization.hpp>
#include <nbla/cuda/function/batch_normalization.hpp>
#include <nb... | the_stack |
#include <mxnet/base.h>
#include <mxnet/operator.h>
#include <algorithm>
#include <cstring>
#include <vector>
#include "../../mxnet_op.h"
#include "../../../common/cuda_utils.h"
namespace mxnet {
namespace op {
template <typename DType>
__device__ DType deformable_im2col_bilinear(const DType* bottom_data,
... | the_stack |
#define _VOLATILE_
typedef long long ll_t;
typedef unsigned long long ull_t;
typedef struct __builtin_align__(32) {
float s0, s1, s2, s3, s4, s5, s6, s7;
} _float8;
typedef union {
_float8 f8;
float val[8];
} float8;
__device__ void madd(
float a,
float b,
float &c
) {
c = fmaf(a, b, c);
}
__device... | the_stack |
namespace cg = cooperative_groups;
#include <helper_cuda.h>
#include "FunctionPointers_kernels.h"
// Texture object for reading image
cudaTextureObject_t tex;
extern __shared__ unsigned char LocalBlock[];
static cudaArray *array = NULL;
#define RADIUS 1
// pixel value used for thresholding function,
// works well ... | the_stack |
namespace anakin{
namespace saber{
//const float bbox_clip_default = std::log(1000.0 / 16.0);
template<typename Dtype>
__global__ void ker_nchw_to_nhwc(Dtype * out_data,
const int n,
const int c,
const int hw,
... | the_stack |
#pragma once
#include <ptx_primitives.cuh>
template<int num_uints, int cols, int rows>
struct IBitMask;
template<typename T, int cols, int rows>
struct RowRepeater
{
static constexpr T Repeater = (RowRepeater<T, cols, rows - 1>::Repeater << cols) | 1;
};
template<typename T, int cols>
struct RowR... | the_stack |
#include <THC/THC.h>
#include <THC/THCAtomics.cuh>
#include <THC/THCDeviceUtils.cuh>
#include <stdio.h>
#include <vector>
#include <math.h>
#include <float.h>
#include "rroi_align_kernel.h"
#define DIVUP(m, n) ((m) / (m) + ((m) % (n) > 0))
#define CUDA_1D_KERNEL_LOOP(i, n) \
for (int i =... | the_stack |
#include <cuda.h>
#include <cuda_runtime.h>
#include <thrust/device_vector.h>
#include <Eigen/Core>
#include <sophus/se3.hpp>
#include <vector>
#define CUDA_1D_KERNEL_LOOP(i, n) \
for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < n; \
i += blockDim.x * gridDim.x)
inline __dev... | the_stack |
#pragma once
#include <gunrock/util/device_intrinsics.cuh>
#include <gunrock/util/cta_work_progress.cuh>
#include <gunrock/util/io/modified_load.cuh>
#include <gunrock/util/io/modified_store.cuh>
#include <gunrock/util/io/load_tile.cuh>
#include <gunrock/util/operators.cuh>
#include <gunrock/util/soa_tuple.cuh>
#inclu... | the_stack |
extern "C" {
__constant__ LaunchParams launch_params;
}
struct RayPayload {
// payload registers 0, 1
float2 uv;
// payload register 2
float t_hit;
// payload register 3
uint32_t material_id;
// payload registers 4, 5, 6
float3 normal;
};
__device__ RayPayload make_ray_payload() {
... | the_stack |
//
// This file contains dimension reduction operation functions and
// kernels that work on both contiguous and non-contiguous tensor
// arguments of arbitrary (up to MAX_CUTORCH_DIMS) dimensioned
// arguments without copying or temporary storage, for reducing an
// entire tensor to one value.
//
#include "THCReduceA... | the_stack |
#include <ATen/ATen.h>
#include <ATen/cuda/CUDAContext.h>
#include <cuda.h>
#include <cuda_runtime.h>
#include <cuda_fp16.h>
#include <cuda_profiler_api.h>
#include "THC/THC.h"
#include <ATen/cuda/CUDAContext.h>
#include <torch/extension.h>
#include <math.h>
#include "strided_batched_gemm.h"
#include "softmax.h"
#incl... | the_stack |
#include <nbla/array.hpp>
#include <nbla/cuda/common.hpp>
#include <nbla/cuda/function/image_augmentation.hpp>
#include <nbla/cuda/math.hpp>
#include <nbla/variable.hpp>
#include <curand_kernel.h>
namespace nbla {
__global__ void kernel_prepare_curand(const int num, curandStateXORWOW_t *state,
... | the_stack |
namespace amgx
{
struct Not_empty_row
{
typedef bool result_type;
template< typename Tuple >
inline __device__ __host__ bool operator()( const Tuple &t ) const
{
return thrust::get<0>(t) != thrust::get<1>(t);
}
};
template< typename Matrix, typename Vector >
static
void build_sort_permuta... | the_stack |
#pragma once
#include <gunrock/util/multithreading.cuh>
#include <gunrock/util/multithread_utils.cuh>
#include <gunrock/util/kernel_runtime_stats.cuh>
#include <gunrock/util/test_utils.cuh>
#include <gunrock/util/scan/block_scan.cuh>
#include <gunrock/oprtr/advance/kernel.cuh>
#include <gunrock/oprtr/advance/kernel_p... | the_stack |
namespace megdnn {
namespace cuda {
namespace relayout_format {
namespace internal {
using namespace integer_subbyte;
template <typename dt>
struct qtype_signedness;
template <>
struct qtype_signedness<dtype::QuantizedS4> {
static constexpr bool value = true;
};
template <>
struct qtype_signedness<dtype::Quantiz... | the_stack |
extern "C"
{
#include "sph/sph_sha2.h"
#include "sph/sph_keccak.h"
#include "sph/sph_ripemd.h"
#include "sph/sph_haval.h"
#include "sph/sph_tiger.h"
#include "sph/sph_whirlpool.h"
#include "sph/sph_blake.h"
}
#include "miner.h"
#include "cuda_helper.h"
//#include "mpir.h"
//extern int device_map[MAX_GPUS];
static ui... | the_stack |
namespace h2o4gpu {
#define BLOCK_SIZE 32
inline cusolverStatus_t cusolverDnTgeqrf_bufferSize(cusolverDnHandle_t handle,
int m, int n, float *A,
int lda, int *lwork) {
return cusolverDnSgeqrf_bufferSize(handle, m... | the_stack |
namespace nvbio {
namespace bowtie2 {
namespace cuda {
namespace {
std::string mate_file_name(const std::string& file_name, const uint32 anchor)
{
const size_t dot = file_name.find('.');
if (dot == std::string::npos)
return file_name + (anchor ? ".2" : ".1");
else
{
std::string output ... | the_stack |
__constant__ static __align__(16) uint32_t c_E8_bslice32[42][8] = {
// Round 0 (Function0)
{ 0xa2ded572, 0x90d6ab81, 0x67f815df, 0xf6875a4d, 0x0a15847b, 0xc54f9f4e, 0x571523b7, 0x402bd1c3 },
{ 0xe03a98ea, 0xb4960266, 0x9cfa455c, 0x8a53bbf2, 0x99d2c503, 0x1a1456b5, 0x9a99b266, 0x31a2db88 }, // 1
{ 0x5c5aa303, 0x8... | the_stack |
template <typename T>
void random_data(int verbose, thrust::device_vector<T> &array, int m, int n) {
thrust::host_vector<T> host_array(m * n);
for (int i = 0; i < m * n; i++) {
host_array[i] = (T)rand() / (T)RAND_MAX;
}
array = host_array;
}
/**
* Like copy_data but shuffles the data according to mapping ... | the_stack |
#include <iostream>
#include <algorithm>
#include <chrono>
#include <nppdefs.h>
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include "bbcu/bbcu.h"
#include "bbcu/bbcu_util.h"
#include "Common.cuh"
//////////////////////////////
// forward
//////////////////////////////
__global__ void kerna... | the_stack |
///////////////////////////////////////////////////////////////////// Headers //
// Project
#include "Config.h"
#include "Pba.h"
#include "Geometry.h"
#include "PerfTimer.h"
#include "GDelData.h"
#include "GDelKernels.h"
#include "GDelCommon.h"
//////////////////////////////////////////////////////////////... | the_stack |
#define WARP_SIZE 32
#define TREE_NODE_SIZE WARP_SIZE
#define TREE_FANOUT (TREE_NODE_SIZE + 1)
#define N_MULTI_P 16
#define BLCK_PER_MP_create 256 // blocks per multiprocessor during tree creation
#define BLCK_PER_MP_search 512 // blocks per multiprocessor during tree searching
#define WAPRS_PER_BLCK_join 8//16 /... | the_stack |
#include <glm/glm.hpp>
#include <glm/ext.hpp>
#include "../../src/SharedStructs.h"
#include "getShadingData.h"
#include "random.h"
#include <Settings.h>
#include "tools.h"
#include "lights.h"
#include "bsdf.h"
#define NEXTMULTIPLEOF(a, b) (((a) + ((b)-1)) & (0x7fffffff - ((b)-1)))
using namespace glm;
#ifndef __la... | the_stack |
typedef unsigned int uint32_t;
typedef unsigned long long uint64_t;
#if __CUDA_ARCH__ < 350
#define ROTL32(x,n) (((x) << (n % 32)) | ((x) >> (32 - (n % 32))))
#define ROTR32(x,n) (((x) >> (n % 32)) | ((x) << (32 - (n % 32))))
#else
#define ROTL32(x,n) __funnelshift_l((x), (x), (n))
#define ROTR32(x,n) __fu... | the_stack |
#include <thrust/partition.h>
#include <logger.h>
using namespace std;
namespace amgx
{
namespace cf_jacobi_solver
{
struct is_coarse
{
__host__ __device__
int operator()(const int &x)
{
return (int) (x == COARSE);
}
};
struct is_fine
{
__host__ __device__
int operator()(const int &x... | the_stack |
#include <LightGBM/cuda/cuda_algorithms.hpp>
#include "cuda_single_gpu_tree_learner.hpp"
#include <algorithm>
namespace LightGBM {
__global__ void ReduceLeafStatKernel_SharedMemory(
const score_t* gradients,
const score_t* hessians,
const int num_leaves,
const data_size_t num_data,
const int* data_index_t... | the_stack |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.