text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
#include "Host/Algorithm.hpp" //xlib::upper_bound_left
#include "Device/DataMovement/RegReordering.cuh" //xlib::shuffle_reordering
#include "Device/Util/Basic.cuh" //xlib::sync
#include "Device/Util/DeviceProperties.cuh" //xlib::WARP_SIZE
#include "Host/Metaprogramming.hpp" ... | the_stack |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <hip/hip_runtime.h>
#include "utilits.h"
#include "easywave.h"
#include "cOgrd.h"
#include "cOkadaEarthquake.h"
// CUDA kernels
#include "kernels.cuh"
double diff(timespec start, timespec end) {
timespec temp;
if ((end.tv_nsec-... | the_stack |
#include <cuco/detail/pair.cuh>
namespace cuco {
namespace detail {
namespace cg = cooperative_groups;
/**
* @brief Initializes each slot in the flat `slots` storage to contain `k` and `v`.
*
* Each space in `slots` that can hold a key value pair is initialized to a
* `pair_atomic_type` containing the key `k` and... | the_stack |
namespace lightseq {
namespace cuda {
template <OperationType OpType_>
MoeDecoder<OpType_>::MoeDecoder(int max_batch_size, const int* p_d_padding_mask,
const _DataType* p_d_encoder_output,
int* p_d_result, MoeWeight<OpType_>& tw,
... | the_stack |
namespace at {
namespace native {
namespace {
#define MAX_THREADS 512
// see NOTE [ Nearest neighbor upsampling kernel implementation ]
template <typename scalar_t>
C10_LAUNCH_BOUNDS_1(1024)
__global__ void upsample_nearest3d_out_frame(
const scalar_t* input,
size_t dim_b,
size_t dim_c,
size_t src_dim... | the_stack |
#include <thrust/copy.h>
#include <thrust/fill.h>
#include <amg_solver.h>
#include "amg_signal.h"
#include <matrix_io.h>
#include "amgx_c.h"
#include "amgxP_c.h"
#include "../../core/include/version.h"
#include "distributed/distributed_manager.h"
#include "distributed/comms_mpi_gpudirect.h"
#include "distributed/comms_... | the_stack |
* sha-512 kernel implementation.
*
* ==========================(LICENSE BEGIN)============================
*
* Copyright (c) 2014 djm34
*
* 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 witho... | the_stack |
inline hipError_t checkCuda(hipError_t result, int s){
if (result != hipSuccess) {
fprintf(stderr, "HIP Runtime Error at line %d: %s\n", s, hipGetErrorString(result));
assert(result == hipSuccess);
}
return result;
}
// CUDA fbr atomic sing slcLikeFbr
__global__ void mttkrp_MIHCSR_kernel_slc_atomic_fbrL... | the_stack |
using namespace std;
#define MAXNAMESIZE 1024 // max filename length
#define SEED 1
/* increase this to reduce probability of random error */
/* increasing it also ups running time of "speedy" part of the code */
/* SP = 1 seems to be fine */
#define SP 1 // number of repetitions of speedy must be >=1
... | the_stack |
#include "optimization/optimization.h"
#include "util/mirrored_memory.h"
#include "kernel_common.h"
namespace dart {
// -=-=-=-=-=-=-=-=-=- kernels -=-=-=-=-=-=-=-=-=-
__global__ void gpu_selfIntersectionCount(const float4 * testSites,
const int nSites,
... | the_stack |
#include <algorithm>
#include <ctime>
#include <limits>
#include <random>
#include "best_splits.h"
#include "continuous_tree_grower.h"
#include "cub/cub.cuh"
#include "cuda_helpers.h"
#include "gain.cuh"
#include "garden.h"
#include "hist_tree_grower.h"
#include "histogram.h"
#include "model_helper.h"
#include "object... | the_stack |
#include <iostream>
#include <algorithm>
#include <chrono>
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include "bbcu/bbcu.h"
#include "bbcu/bbcu_util.h"
//////////////////////////////
// forward
//////////////////////////////
#define IM2COL_BORDER_CONSTANT 0
#define IM2COL_BORDER_REFLEC... | the_stack |
namespace oneflow {
namespace {
class LayerNormCudnnBnCtx final {
public:
LayerNormCudnnBnCtx(const ShapeView& data_shape, const ShapeView& param_shape,
DataType data_type) {
const int64_t cudnn_c = param_shape.elem_cnt();
CHECK_EQ(data_shape.elem_cnt() % cudnn_c, 0);
const int64_... | the_stack |
// TODO: Have 2 groups of 16 threads collaborate
// TODO: Add support for outside diagonal
// TODO: Add support for unsorted rows
#define EXPERIMENTAL_LU_FACTORS
#define EXPERIMENTAL_LU_FORWARD
#define EXPERIMENTAL_LU_BACKWARD
using namespace std;
namespace amgx
{
namespace multicolor_ilu_solver
{
// -----------
//... | the_stack |
* Test of BlockScan utilities
******************************************************************************/
// Ensure printing of CUDA runtime errors to console
#define CUB_STDERR
#include <stdio.h>
#include <iostream>
#include <limits>
#include <typeinfo>
#include <cub/block/block_scan.cuh>
#include <cub/block/b... | 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, 4)
pqCodeDista... | the_stack |
#include "opencv2/core/cuda/common.hpp"
#include "opencv2/core/cuda/utility.hpp"
#include "opencv2/core/cuda/reduce.hpp"
#include "opencv2/core/cuda/limits.hpp"
#include "opencv2/core/cuda/vec_distance.hpp"
#include "opencv2/core/cuda/datamov_utils.hpp"
#include "opencv2/core/cuda/warp_shuffle.hpp"
namespace cv { name... | the_stack |
#include "super_scaler.h"
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <mutex>
#include <queue>
#include <thread>
#include "mpi.h"
#include "nccl.h"
#include "unistd.h"
#define NNSCALER_MPICHECK(cmd) \
do ... | the_stack |
* \file dnn/src/cuda/cutlass/util.cu
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BA... | the_stack |
* \brief Implements helper routines for PME gather and spline routines.
*
* \author Aleksei Iupinov <a.yupinov@gmail.com>
*/
#include "gmxpre.h"
#include <cassert>
#include "gromacs/gpu_utils/cuda_kernel_utils.cuh"
#include "gromacs/gpu_utils/vectype_ops.cuh"
#include "pme.cuh"
#include "pme_grid.h"
/*! \inte... | the_stack |
// thread block size
#define BLOCK_SIZE 256
// integration direction
#define integrateXcoord 1
#define integrateYcoord 0
__global__ void pad_projections_kernel(
double* d_img,
const int nDetXMap,
const int nDetYMap,
const int nElem,
const int np)
{
const int gid = blockIdx.x * blockDim.x + threa... | the_stack |
extern "C"{
#endif
#include "reduce_kernel.h"
#include <stdio.h>
#define CUDA_1D_KERNEL_LOOP(i,n) \
for (int i=blockIdx.x*blockDim.x + threadIdx.x;i<n; \
i += blockDim.x * gridDim.x)
__global__ void SoftmaxForward(
const int nthreads,
const float * input_data,
const in... | the_stack |
#include <cuda.h>
#include <math_constants.h>
#include <cuda_runtime_api.h>
#include <device_launch_parameters.h>
#include <texture_fetch_functions.h>
#include <builtin_types.h>
#include <vector_types.h>
#include <vector_functions.h>
#define CHARACTER_MAP_DIGITS_OFFSET (16)
#define CHARACTER_MAP_X (56)
#define ... | the_stack |
// Use 1024 threads per block, which requires cuda sm_2x or above
const int CUDA_NUM_THREADS = 512;
const int BLOCK_SIZE_LIMIT = 32768;
typedef unsigned long long int DegreeType;
// CUDA: number of blocks for threads.
inline int GET_BLOCKS(const int N)
{
int ret = (N + CUDA_NUM_THREADS - 1) / CUDA_NUM_THREADS;
re... | the_stack |
#include "UnpackGPU.h"
namespace ecal {
namespace raw {
__forceinline__ __device__ void print_raw_buffer(uint8_t const* const buffer,
uint32_t const nbytes,
uint32_t const nbytes_per_row = 20) {
for (... | the_stack |
#include "OtsuForThree.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
// 存储在常量内存中的概率集和均值集
__constant__ float dev_W[256];
__constant__ float dev_U[256];
/... | the_stack |
//Util device functions
/////////////////////////////////////////////////////////////
//WARP LEVEL NO SYNC FUNCTIONS, USE WITH CAUTION
/*********************************8
*
* shared memory pointer naming conventions:
*
* [v][type]sm[OffsetDescriptor][Usage]
*
* v: if pointer name starts with a... | the_stack |
#pragma once
#include <map>
#include <unordered_map>
#include <set>
namespace gunrock {
namespace app {
namespace louvain {
/******************************************************************************
* Housekeeping Routines
******************************************************************************/
cudaEr... | the_stack |
* Host code.
*
* This sample implements matrix multiplication as described in Chapter 3
* of the programming guide.
* It has been written for clarity of exposition to illustrate various CUDA
* programming principles, not with the goal of providing the most
* performant generic kernel for matrix multiplication.
*... | the_stack |
#include <THC/THC.h>
#include <THC/THCAtomics.cuh>
#include <THC/THCDeviceUtils.cuh>
#include <cuda.h>
#include <cuda_runtime.h>
#include <cfloat>
#include "common.hpp"
using math_ops::Exp;
using math_ops::Pow;
#define BLOCKSIZE 512
namespace soft_dice_space {
template<typename T>
class sum_op {
public:
__d... | the_stack |
// Make sure we don't allow dynamic initialization for device
// variables, but accept empty constructors allowed by CUDA.
// RUN: %clang_cc1 -verify %s -triple nvptx64-nvidia-cuda -fcuda-is-device -std=c++11 %s
#ifdef __clang__
#include "Inputs/cuda.h"
#endif
// Use the types we share with CodeGen tests.
#include "... | the_stack |
#include "../kernels/transformerKernels.h"
#include "../kernels/embKernels.h"
/**
@file
Transformer encoder, composed by gemm lib and
custom cuda kernel function
*/
namespace lightseq {
namespace cuda {
template <OperationType OpType_>
Encoder<OpType_>::Encoder(int max_batch_size, int *p_d_token_id,
... | the_stack |
* An implementation of COO SpMV using prefix scan to implement a
* reduce-value-by-row strategy
******************************************************************************/
// Ensure printing of CUDA runtime errors to console
#define CUB_STDERR
#include <iterator>
#include <vector>
#include <string>
#include <al... | the_stack |
#include <ops/declarable/helpers/convolutions.h>
#include "cudnnUtils.h"
namespace sd {
namespace ops {
namespace platforms {
//////////////////////////////////////////////////////////////////////////
std::tuple<std::unique_ptr<NDArray>, std::unique_ptr<NDArray>> checkConv2dCUDNNPadAsymmetric(
const NDArray* inp... | the_stack |
#if !defined(CUDA_VERSION)
#define __device__ __attribute__((device))
#define __global__ __attribute__((global))
#define __shared__ __attribute__((shared))
#define __constant__ __attribute__((constant))
typedef unsigned long long uint64_t;
#endif
// We have to keep all builtins that depend on particular target feature... | the_stack |
#include <utilities/graph_utils.cuh>
namespace cugraph {
namespace detail {
template <typename vertex_t, typename edge_t, typename weight_t>
__global__ void attraction_kernel(const vertex_t* restrict row,
const vertex_t* restrict col,
const weight_t*... | the_stack |
template <class Space>
void TestArray2dBasicConstructor(void)
{
cusp::array2d<float, Space> A(3, 2);
ASSERT_EQUAL(A.num_rows, 3);
ASSERT_EQUAL(A.num_cols, 2);
ASSERT_EQUAL(A.num_entries, 6);
ASSERT_EQUAL(A.values.size(), 6);
}
DECLARE_HOST_DEVICE_UNITTEST(TestArray2dBasicConstructor... | the_stack |
#include <opencv2/cudafeatures2d.hpp>
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include "labeling_algorithms.h"
#include "register.h"
#define BLOCK_ROWS 16
#define BLOCK_COLS 16
using namespace cv;
namespace {
// Only use it with unsigned numeric types
template <typename T>
__device__ __... | the_stack |
#include <assert.h>
#include <math.h> // For floor.
#include <limits>
// We never want positions to go exactly to the border or exactly to the edge
// of an occupied piece of geometry. Therefore all rays will be truncated by
// a very small amount (hit_margin).
const float hit_margin = 1e-5f;
const float epsilon = 1e... | the_stack |
#include "caffe/layers/neuron_layer.hpp"
#include "caffe/layers/prelu_layer.hpp"
namespace caffe {
template<typename Dtype, typename MItype, typename MOtype>
void PReLULayer<Dtype, MItype, MOtype>::GenerateProgram() {
this->device_program_ = this->device_->CreateProgram();
stringstream ss;
ss << this->device_p... | the_stack |
* \file
* cub::AgentSpmv implements a stateful abstraction of CUDA thread blocks for participating in device-wide SpMV.
*/
#pragma once
#include <iterator>
#include "../util_type.cuh"
#include "../block/block_reduce.cuh"
#include "../block/block_scan.cuh"
#include "../block/block_exchange.cuh"
#include "../config.... | the_stack |
*
* Benchmark: Iterative solver tests (solver.cpp and solver.cu are identical, the latter being required for compilation using CUDA nvcc)
*
*/
#ifndef NDEBUG
#define NDEBUG
#endif
#include <boost/numeric/ublas/matrix_sparse.hpp>
#include <boost/numeric/ublas/io.hpp>
#include <boost/numeric/ublas/... | the_stack |
namespace oneflow {
namespace {
template<typename T, typename G>
__global__ void SGDUpdateGpu(int64_t n, T scale, float l1, float l2, float weight_decay,
float learning_rate_val, const float* learning_rate,
const T* scale_by_ptr, const int64_t* skip_if, const ... | the_stack |
#include <cuda.h>
#include "CondFormats/EcalObjects/interface/EcalPulseCovariances.h"
#include "CondFormats/EcalObjects/interface/EcalPulseShapes.h"
#include "DataFormats/EcalDigi/interface/EcalDataFrame.h"
#include "DataFormats/EcalDigi/interface/EcalDigiCollections.h"
#include "DataFormats/Math/interface/approx_exp.... | the_stack |
#define LBANN_LAYER_NORM_LAYER_INSTANTIATE
#include "lbann/comm_impl.hpp"
#include "lbann/layers/regularizers/layer_norm.hpp"
#include "lbann/utils/gpu/helpers.hpp"
#include <thrust/pair.h>
namespace lbann {
namespace {
/** Functor for adding @c thrust::pair objects. */
template <typename Pair>
struct pair_sum {
... | the_stack |
#ifdef USE_CUBLAS
void LMFitCUDA::solve_equation_systems_lup()
{
dim3 threads(1, 1, 1);
dim3 blocks(1, 1, 1);
// initialize components of equation systems
gpu_data_.copy(gpu_data_.decomposed_hessians_, gpu_data_.hessians_, n_fits_ * info_.n_parameters_to_fit_ * info_.n_parameters_to_fit_);
// d... | the_stack |
#pragma once
#include <gunrock/util/array_utils.cuh>
#include <gunrock/graph/graph_base.cuh>
#include <gunrock/graph/coo.cuh>
#include <gunrock/util/binary_search.cuh>
#include <gunrock/util/device_intrinsics.cuh>
namespace gunrock {
namespace graph {
/**
* @brief CSR data structure which uses Compressed Sparse Row... | the_stack |
namespace nvbio {
namespace { // anonymous namespace
/// convert a DNA+N+$ symbol to its ASCII character
///
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE char dna6_to_char(const uint8 c)
{
return c == 0u ? 'A' :
c == 1u ? 'C' :
c == 2u ? 'G' :
c == 3u ? 'T' :
c == 255u ?... | the_stack |
#include <algorithm>
#include <cassert>
#include <cmath>
#include <limits>
#include <thrust/complex.h>
#include <thrust/device_vector.h>
#include <thrust/functional.h>
#include <thrust/reduce.h>
#include <typeinfo>
#include <isce3/container/RadarGeometry.h>
#include <isce3/core/Ellipsoid.h>
#include <isce3/core/Linspa... | the_stack |
namespace xgboost {
template <typename T>
struct HostDeviceVectorImpl {
struct DeviceShard {
DeviceShard() : index_(-1), device_(-1), start_(0), on_d_(false), vec_(nullptr) {}
static size_t ShardStart(size_t size, int ndevices, int index) {
size_t portion = dh::DivRoundUp(size, ndevices);
size_... | the_stack |
#include "AffineTrans.h"
#include <iostream>
#include <fstream>
#include <cmath>
using namespace std;
#include <npp.h>
#include <nppdefs.h>
#include <nppcore.h>
#include <nppi.h>
// 宏:M_PI
// π值。对于某些操作系统,M_PI可能没有定义,这里补充定义 M_PI。
#ifndef M_PI
#define M_PI 3.14159265359
#endif
// 宏:DEF_BLOCK_X 和 DEF_BLOCK_Y
// 定义了默认的... | the_stack |
#include <torch/extension.h>
#include <cuda_runtime.h>
#include <iostream>
#include <stdio.h>
#define TensorAccessor5D torch::PackedTensorAccessor<scalar_t,5,torch::RestrictPtrTraits,int32_t>
/*
#if !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 600
#else
static __inline__ __device__ double atomicAdd(double *address, d... | the_stack |
* It also shows how to correctly templatize dynamically allocated shared
* memory arrays.
* Host code.
*/
#include <shrUtils.h>
// includes, system
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
// includes, project
#include <sdkHelper.h> // helper for shared that are common to CUDA SDK... | the_stack |
using namespace std;
typedef uint8_t uint8;
typedef unsigned int uint32;
typedef unsigned long long int uint64;
#define STREAM_BLOCK 16
#define BLOCK_SIZE 32
#define BLOCK_D_SIZE 64
#define INTEGRAL_BLOCK_SIZE 8
#define XDIM_MAX_THREADS 1024
#define XDIM_H_THREADS 512
#define XDIM_Q_THREADS 256
#define SHARED_MEMORY 49... | the_stack |
#define NUM_NL_ITERS 5
//#define DEBUG
namespace amgx
{
template <class Handle>
struct CWrapper
{
AMGX_Mode mode;
Handle hdl;
};
// parameter is used as test name
DECLARE_UNITTEST_BEGIN(TestMemoryUse);
std::string base_keywords()
{
return "stress";
}
struct TestCase
{
std::vector<std::string>... | the_stack |
__device__ __constant__ float EPS2;
__device__ __constant__ float DT_TICK;
struct ds64
{
union
{
float2 val;
double dbl;
};
__device__ ds64() {}
__device__ ds64(float x) : val(make_float2(x, x)) {}
__device__ ds64 operator+=(const float x)
{
const float vx = val.x + x;
const float vy = v... | the_stack |
* @file
* The cub::WarpExchange class provides [<em>collective</em>](index.html#sec0)
* methods for rearranging data partitioned across a CUDA warp.
*/
#pragma once
#include <cub/config.cuh>
#include <cub/util_ptx.cuh>
#include <cub/util_type.cuh>
CUB_NAMESPACE_BEGIN
/**
* @brief The WarpExchange class provid... | the_stack |
namespace at {
namespace native {
template <typename scalar_t>
struct TopKTypeConfig {};
template <>
struct TopKTypeConfig<float> {
typedef uint32_t RadixType;
// Converts a float to an integer representation with the same
// sorting; i.e., for floats f1, f2:
// if f1 < f2 then convert(f1) < convert(f2)
//... | the_stack |
#define __fadd_rn(a,b) ((a)+(b))
#define __fsub_rn(a,b) ((a)-(b))
#define __frsqrt_rn(a) (1.f / sqrtf(a))
union un { float f; unsigned int ui; };
__device__ __host__ __forceinline__
void svd(
float a11, float a12, float a13, float a21, float a22, float a23, float a31, float a32, float a33, // input A
... | the_stack |
#include <thrust/sequence.h>
#include <boost/config.hpp>
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/connected_components.hpp>
#include "impl.cuh"
#include "polygon.h"
namespace {
using namespace manifold;
using namespace thrust::placeholders;
struct ToSphere {
float length;
__host__ __devic... | the_stack |
template<typename T, int BS>
__device__
T min_dist_all (T x, T y, T z,
T L[3][3], T Linv[3][3], T images[27][3])
{
int tid = threadIdx.x;
T u0 = Linv[0][0]*x + Linv[0][1]*y + Linv[0][2]*z;
T u1 = Linv[1][0]*x + Linv[1][1]*y + Linv[1][2]*z;
T u2 = Linv[2][0]*x + Linv[2][1]*y + Linv[2][2]*z;
u0 -= rintf(... | the_stack |
#include <ATen/ATen.h>
#include <ATen/cuda/CUDAContext.h>
// #include <THC/THC.h>
#include <THC/THCAtomics.cuh>
// #include <THC/THCDeviceUtils.cuh>
#define CUDA_KERNEL_LOOP(i, n) \
for (int i = blockIdx.x * blockDim.x + threadIdx.x; \
i < (n); ... | the_stack |
namespace surfelwarp { namespace device {
enum {
jtj_blk_size = 36,
warp_size = 32,
num_warps = 4,
thread_blk_size = num_warps * warp_size,
};
__device__ __forceinline__ void computeScalarJtJBlock(
const float jacobian[6],
float jtj_blk[jtj_blk_size],
const float weight_square = 1.0f
) {
#pragma un... | the_stack |
#include <algorithm>
#include <chrono>
#include <cmath>
#include <iostream>
#include <memory>
#include <random>
#include "io_iterator.h"
#include "pwu_kernel_parameter.h"
#include "rpucuda_pulsed_device.h"
namespace RPU {
/**********************************************************************************************... | the_stack |
void THCTensor_(indexCopy_long)(THCState *state, THCTensor *dst, int dim, THLongTensor *indices, THCTensor *src)
{
THCAssertSameGPU(THCTensor_(checkGPU)(state, 2, dst, src));
THCudaLongTensor *indices_ = THCudaLongTensor_newWithSize1d(state, indices->size[0]);
THCudaLongTensor_copyLong(state, indices_, indices);... | the_stack |
// implementation based on "A new Direct Connected Component Labeling and Analysis Algorithms for
// GPUs"
// https://ieeexplore.ieee.org/document/8596835
#include <vector>
#include "connected_component.h"
#include "thrust/for_each.h"
#include "thrust/iterator/counting_iterator.h"
namespace mmdeploy {
__device__ int... | the_stack |
#include <cuda.h>
#include <cuda_runtime.h>
#include <vector>
#include <curand.h>
#include <stdio.h>
#include <math.h>
#include <float.h>
#include "cudaCG_all.h"
//#define NUM_THREADS 512
#define BLOCK 512
#define CEIL_DIV(num, denum) (num+denum-1)/denum
#define IDX(b,l,t,m,i,cum,L) (i+2*(m+t*(2*l+1)+cum[l]+b*cum[L+... | the_stack |
#include <cuda.h>
#include <string>
#include "utils/blitz_math_function.h"
#include "utils/blitz_gpu_function.h"
namespace blitz {
namespace kernels {
scoped_ptr<CubinLoadModule> CubinModule::instance_(0);
boost::once_flag CubinModule::flag_ = BOOST_ONCE_INIT;
template<>
void SassGemm(
const float* A,
const f... | the_stack |
#pragma once
#include <iostream>
#include <gunrock/app/enactor_base.cuh>
#include <gunrock/app/enactor_iteration.cuh>
#include <gunrock/app/enactor_loop.cuh>
#include <gunrock/oprtr/oprtr.cuh>
#include <gunrock/app/pr_nibble/pr_nibble_problem.cuh>
namespace gunrock {
namespace app {
namespace pr_nibble {
/**
* @br... | the_stack |
#pragma once
#include "hoomd/BoxDim.h"
#include "hoomd/CachedAllocator.h"
#include "hoomd/GPUPartition.cuh"
#include "hoomd/HOOMDMath.h"
#include "hoomd/Index1D.h"
#include "hoomd/RNGIdentifiers.h"
#include "hoomd/RandomNumbers.h"
#include "hoomd/VectorMath.h"
#include "hoomd/hpmc/Moves.h"
#include <hip/hip_runtime.h>... | the_stack |
#include <rmm/cuda_stream_view.hpp>
#include <rmm/device_uvector.hpp>
#include <thrust/functional.h>
#include <thrust/iterator/discard_iterator.h>
#include <thrust/iterator/reverse_iterator.h>
#include <thrust/iterator/zip_iterator.h>
#include <thrust/scan.h>
#include <thrust/transform.h>
namespace { // anonymous
s... | the_stack |
#pragma once
#include <gunrock/util/sort_device.cuh>
#include <gunrock/util/select_device.cuh>
#include <gunrock/util/reduce_device.cuh>
#include <gunrock/util/binary_search.cuh>
#include <gunrock/app/enactor_base.cuh>
#include <gunrock/app/enactor_iteration.cuh>
#include <gunrock/app/enactor_loop.cuh>
#include <gunro... | the_stack |
namespace Saiga
{
namespace CUDA
{
template <typename T, int ElementSize, unsigned int BLOCK_SIZE>
__launch_bounds__(BLOCK_SIZE) __global__ static void copyUnCoalesced(ArrayView<T> data, ArrayView<T> result)
{
CUDA::ThreadInfo<BLOCK_SIZE> ti;
// grid stride loop
for (auto id = ti.thread_id * ElementSize; id... | the_stack |
#pragma once
#include "RGBDOdometryCuda.h"
#include <Cuda/Common/UtilsCuda.h>
#include <Cuda/Geometry/ImageCudaDevice.cuh>
#include <Cuda/Container/ArrayCudaDevice.cuh>
namespace open3d {
namespace cuda {
/**
* Server end
*/
template<size_t N>
__device__
bool RGBDOdometryCudaDevice<N>::ComputePixelwiseCorresponden... | the_stack |
//PTX code for IDCT (GPUJPEG_IDCT_GPU_KERNEL_INPLACE macro) should be a bit faster
//but maybe won't work for newer CCs
#define GPUJPEG_IDCT_USE_ASM 0
/** Fast integer multiplication */
#define FMUL(x,y) (__mul24(x,y))
//#define FMUL(x,y) ((x)*(y))
// X block count which will be processed by one thread block
#def... | the_stack |
using namespace std;
//##define CUDA_CHECK(condition)\
//
// do {
// cudaError_t error = condition;
// if (error != cudaSuccess) {
//
// }
// }
#define CUDA_CHECK(condition) \
/* Code block avoids redefinition of cudaError_t error */ \
do { \
cudaError_t error = condition; \
if (error != cudaSu... | the_stack |
#include <nvbio/basic/numbers.h>
#include <nvbio/basic/algorithms.h>
#include <nvbio/basic/priority_queue.h>
#include <nvbio/basic/timer.h>
#include <nvbio/basic/transform_iterator.h>
#include <nvbio/basic/vector_view.h>
#include <nvbio/basic/primitives.h>
#include <thrust/iterator/counting_iterator.h>
#include <thrust... | the_stack |
#include <thrust/sort.h>
#include <thrust/system/cuda/experimental/pinned_allocator.h>
#include <thrust/unique.h>
#include <algorithm>
#include <functional>
#include <unordered_set>
#include <vector>
#include "core/cuda_helpers.h"
#include "cub/cub.cuh"
#include "io.h"
namespace arboretum {
namespace io {
using name... | the_stack |
using namespace std;
typedef uint8_t uint8;
typedef unsigned int uint32;
typedef unsigned long long int uint64;
#define STREAM_BLOCK 16
#define BLOCK_SIZE 32
#define BLOCK_D_SIZE 64
#define INTEGRAL_BLOCK_SIZE 8
#define XDIM_MAX_THREADS 1024
#define XDIM_H_THREADS 512
#define XDIM_Q_THREADS 256
#define SHARED_MEMORY 49... | the_stack |
* \brief Define CUDA implementation of nbnxn_gpu.h
*
* \author Szilard Pall <pall.szilard@gmail.com>
*/
#include "gmxpre.h"
#include "config.h"
#include <assert.h>
#include <stdlib.h>
#include "gromacs/nbnxm/nbnxm_gpu.h"
#if defined(_MSVC)
# include <limits>
#endif
#include "nbnxm_cuda.h"
#include "groma... | the_stack |
extern "C" {
#include "metis.h"
}
#include "AggMIS_Types.h"
#include "AggMIS_Aggregation_GPU.h"
#include "AggMIS_MIS_GPU.h"
#include "AggMIS_MIS_CPU.h"
#include "AggMIS_MergeSplitConditioner.h"
#include "AggMIS_MergeSplitConditioner_CPU.h"
#include "AggMIS_GraphHelpers.h"
#include <smoothedMG/aggregators/Timer.h>
#incl... | the_stack |
#include <cuda.h>
#include <cuda_runtime.h>
#include <stdio.h>
#include <cfloat>
#include <time.h>
#include <thrust/extrema.h>
#include <Eigen/Geometry>
#include <cublas_v2.h>
#define VERTEX_CHANNELS 3
#define MAX_ROI 128
#define CUDA_1D_KERNEL_LOOP(i, n) \
for (int i = blockIdx.x * blo... | the_stack |
using namespace std;
#define TMPMEMNUM 10353
#define Nstreams 16
__global__ void RL(
const unsigned* __restrict__ sym_c_ptr_dev,
const unsigned* __restrict__ sym_r_idx_dev,
REAL* __restrict__ val_dev,
const unsigned* __restrict__ l_col_ptr_dev,
const unsigned* __restrict__ csr_r_ptr_dev,
co... | the_stack |
using namespace std;
/*
* E = -log(y_t)
* probs: (numOut, numCases)
* labels: (1, numCases)
* maxEnergies: (1, numCases)
* labelLogProbs: (1, numCases) (*out)
* correctProbs: (1, numCases) (*out)
* top5Probs: (1, numCases) (*out)
*
* target: (1, numCases)
*
... | the_stack |
#include <ATen/ATen.h>
#include <cuda.h>
#include <cuda_runtime.h>
#include <thrust/device_vector.h>
#include <Eigen/Core>
#include <Eigen/Dense>
#include <sophus/se3.hpp>
#include <vector>
#define CUDA_1D_KERNEL_LOOP(i, n) \
for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < n; \
... | the_stack |
#include <stdio.h>
__global__ void Sub_V_S(const float *a, const float b, float* out, const int n)
{
int blockId = blockIdx.y * gridDim.x + blockIdx.x;
int i = blockId * blockDim.x + threadIdx.x;
if (i < n)
{
out[i] = a[i] - b;
}
}
__global__ void Sub_S_V(const float a, float* b, float* out, const int n)
{
... | the_stack |
#ifndef CH_SYSTEMFSI_IMPL_H_
#define CH_SYSTEMFSI_IMPL_H_
#include "chrono/ChConfig.h"
#include <thrust/device_vector.h>
#include <thrust/host_vector.h>
#include <thrust/iterator/detail/normal_iterator.h>
#include <thrust/iterator/transform_iterator.h>
#include <thrust/iterator/zip_iterator.h>
#include <thrust/tuple.h... | the_stack |
#pragma once
#include "hoomd/BoxDim.h"
#include "hoomd/GPUPartition.cuh"
#include "hoomd/HOOMDMath.h"
#include "hoomd/Index1D.h"
#include "hoomd/RNGIdentifiers.h"
#include "hoomd/RandomNumbers.h"
#include "hoomd/VectorMath.h"
#include "hoomd/hpmc/HPMCCounters.h"
#include "hoomd/hpmc/Moves.h"
#include <hip/hip_runtime.... | the_stack |
#include "../utils/DeviceUtils.h"
#include "../utils/MathOperators.cuh"
#include "../utils/Tensor.cuh"
#include "../utils/StaticUtils.h"
namespace faiss { namespace gpu {
template <typename T, int kRowsPerBlock, int kRowUnroll, int kColLoad>
__global__ void sumAlongColumns(Tensor<T, 1, true> input,
... | the_stack |
#include "common.h"
#include "gpu_util.cuh"
using std::max;
using std::min;
template <typename Dtype>
__global__ void PSROIPoolingForward(
const int nthreads,
const Dtype* bottom_data,
const Dtype spatial_scale,
const int channels, // total number of channels for one image, e.g. C*N*N
const int he... | the_stack |
#include <cuml/cluster/kmeans_mg.hpp>
#include <cuml/common/logger.hpp>
#include <cuml/metrics/metrics.hpp>
#include <ml_cuda_utils.h>
#include <common/tensor.hpp>
#include <linalg/reduce_cols_by_key.cuh>
#include <linalg/reduce_rows_by_key.cuh>
#include <matrix/gather.cuh>
#include <random/permute.cuh>
#include <r... | the_stack |
#include <miner.h>
#include <cuda_helper.h>
#include <cuda_vectors.h>
#include <cuda_vector_uint2x4.h>
#include "skunk/streebog_arrays.cuh"
//#define FULL_UNROLL
__device__ __forceinline__
static void GOST_FS(const uint2 shared[8][256],const uint2 *const __restrict__ state,uint2* return_state)
{
return_state[0] = __... | the_stack |
#define _SIZE_T_DEFINED
#include <cuda.h>
#include <device_launch_parameters.h>
#include <texture_fetch_functions.h>
#include "float.h"
#include <builtin_types.h>
#include <vector_functions.h>
#include <math.h>
#include "../NeuralNetwork/Activation/ActivationFunction.cu"
extern "C"
{
typedef enum MyBackPropMethod
... | the_stack |
* \file
* cub::BlockScanWarpscans provides warpscan-based variants of parallel prefix scan across a CUDA thread block.
*/
#pragma once
#include "../../util_arch.cuh"
#include "../../util_ptx.cuh"
#include "../../warp/warp_scan.cuh"
#include "../../util_namespace.cuh"
/// Optional outer namespace(s)
CUB_NS_PREFIX
... | the_stack |
#include <stdint.h>
#include <curand_kernel.h>
#include <cuda_runtime.h>
#include <helper_cuda.h>
#include <helper_functions.h>
#include <algorithm>
#include <vector>
/*!\rst
Macro to stringify the expansion of a macro. For example, say we are on line 53:
* ``#__LINE__ --> "__LINE__"``
* ``OL_CUDA_STRINGIFY_E... | the_stack |
#include <cmath>
#include <vector>
#include "nms/kernel.h"
template <typename T>
struct RotatedBox {
T x_ctr, y_ctr, w, h, a;
};
template <typename T>
struct Point {
T x, y;
__host__ __device__ __forceinline__ Point(const T &px = 0, const T &py = 0) : x(px), y(py) {}
__host__ __device__ __forceinline__ Point... | the_stack |
#ifdef _GLIBCXX_ATOMIC_BUILTINS
#undef _GLIBCXX_ATOMIC_BUILTINS
#endif
/*
* Copyright 1993-2010 NVIDIA Corporation. All rights reserved.
*
* Please refer to the NVIDIA end user license agreement (EULA) associated
* with this source code for terms and conditions that govern your use of
* this software. Any use, r... | the_stack |
#include "JobWrapper.h"
#include "SignalProcessingFitterQueue.h"
#include "GpuMultiFlowFitControl.h"
#include "DarkHalo.h"
using namespace std;
////////////////////////////////////////
// workset (represents one job
WorkSet::WorkSet( int flow_key, int flow_block_size)
{
setFlow( flow_key, flow_block_size );
... | the_stack |
#undef isnan
#undef isfinite
#include <iostream>
#include <TooN/TooN.h>
#include <TooN/se3.h>
#include <TooN/GR_SVD.h>
#define INVALID -2 // this is used to mark invalid entries in normal or vertex maps
using namespace std;
__global__ void initVolume( Volume volume, const float2 val ){
uint3 pos = make_uint3... | the_stack |
#include "core/pack/Pack.h"
#include "core/pack/Load.h"
#include "core/pack/Load_Chunks.h"
#include "core/pack/Load_Indref.h"
#include "core/pack/Call.h"
#include "core/pack/GetInds.h"
#include "core/pack/GetDims.h"
#include "core/mapreduce/broadcast_batch_dimensions.h"
#include "core/utils/CudaErrorCheck.cu"
#include ... | the_stack |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.