commit stringlengths 40 40 | subject stringlengths 4 1.73k | repos stringlengths 5 127k | old_file stringlengths 2 751 | new_file stringlengths 2 751 | new_contents stringlengths 1 8.98k | old_contents stringlengths 0 6.59k | license stringclasses 13
values | lang stringclasses 23
values |
|---|---|---|---|---|---|---|---|---|
076a23b0e9d35e830189fde5185d245916155352 | fix examples/00_basic_usage.cu | rk0der/railgun,rk0der/railgun,rk0der/railgun | example/00_basic_usage.cu | example/00_basic_usage.cu | #include <stdio.h>
#include "railgun.h"
#define N 100
__global__ void
matrix_add(int* a, int* b, int* c)
{
int i;
i = threadIdx.x;
if (i < N) {
c[i] = a[i] + b[i];
}
}
int main(void)
{
int *a, *b, *c, i;
railgun_t *rg;
a = (int*)malloc(sizeof(int) * N);
b = (int*)malloc(sizeof(int) * N);
c = ... | #include <stdio.h>
#include "railgun.h"
#define N 100
__global__ void
matrix_add(int* a, int* b, int* c)
{
int i;
i = threadIdx.x
if (i < N) {
c[i] = a[i] + b[i];
}
}
int main(void)
{
int *a, *b, *c, i;
railgun_t *rg;
a = (int*)malloc(sizeof(int) * N);
b = (int*)malloc(sizeof(int) * N);
c = (... | mit | Cuda |
4853ea7634435f51697b654ca321b95881cbde58 | Check for errors while starting CUDA kernel | SKA-ScienceDataProcessor/RC,SKA-ScienceDataProcessor/RC,SKA-ScienceDataProcessor/RC,SKA-ScienceDataProcessor/RC,SKA-ScienceDataProcessor/RC | MS2/dna-programs/cuda-dotp.cu | MS2/dna-programs/cuda-dotp.cu |
#include <stdio.h>
/* Global variable for returning result of computation */
__device__ float g_res;
/* CUDA kernel for dot product. Optimized for brevity
*/
__global__ void dotp_kernel(double xs[], double ys[]) {
const unsigned int idx = threadIdx.x + blockIdx.x*blockDim.x;
double mine = xs[idx] * ys[idx];... |
/* Global variable for returning result of computation */
__device__ float g_res;
/* CUDA kernel for dot product. Optimized for brevity
*/
__global__ void dotp_kernel(double xs[], double ys[]) {
const unsigned int idx = threadIdx.x + blockIdx.x*blockDim.x;
double mine = xs[idx] * ys[idx];
atomicAdd(&g_r... | apache-2.0 | Cuda |
870c43e3eb7ad0fa7ac85f21361be0dc833a96cc | Replace pow with exp in Kernel.cu | MeteoSwiss-APN/comm_overlap_bench,MeteoSwiss-APN/comm_overlap_bench | src/Kernel.cu | src/Kernel.cu | #include "Kernel.h"
__global__
void cukernel(Real __restrict__ * in, Real __restrict__* out, const int kSize, const int iStride, const int jStride, const int kStride)
{
int ipos = blockIdx.x * 32 + threadIdx.x;
int jpos = blockIdx.y * 8 + threadIdx.y;
out[ipos*iStride + jpos*jStride] = (exp(in[ipos*iStr... | #include "Kernel.h"
__global__
void cukernel(Real __restrict__ * in, Real __restrict__* out, const int kSize, const int iStride, const int jStride, const int kStride)
{
int ipos = blockIdx.x * 32 + threadIdx.x;
int jpos = blockIdx.y * 8 + threadIdx.y;
out[ipos*iStride + jpos*jStride] = (pow(in[ipos*iStr... | bsd-2-clause | Cuda |
81a797194336621be18dcffdcb96774e99f85b85 | fix example/01_dump_args.cu | rk0der/railgun,rk0der/railgun,rk0der/railgun | example/01_dump_args.cu | example/01_dump_args.cu | #include <stdio.h>
#include "railgun.h"
#define N 20
int
main(void)
{
int i;
int a[N], b[N], c[N];
railgun_t *rg;
railgun_args *args;
rg = get_railgun();
for (i = 0; i < N; i++) {
a[i] = i;
b[i] = i % 10;
}
args = rg->wrap_args("ii|i", a, N, b, N, c, N);
printf("Testing...\n");
dump_a... | #include <stdio.h>
#include "railgun.h"
#define N 20
int
main(void)
{
int i;
int a[N], b[N], c[N];
railgun_t *rg;
railgun_args *args;
rg = get_railgun();
for (i = 0; i < N; i++) {
a[i] = i;
b[i] = i % 10;
}
args = rg->wrap_args("iii", a, N, b, N, c, N);
printf("Testing...\n");
dump_ar... | mit | Cuda |
d7ee421be952cdf13dc9c7bfc0ffe2181b39b5b7 | add cuda unit test | QiJune/Paddle,reyoung/Paddle,lispc/Paddle,lcy-seso/Paddle,lcy-seso/Paddle,Canpio/Paddle,hedaoyuan/Paddle,PaddlePaddle/Paddle,lispc/Paddle,baidu/Paddle,hedaoyuan/Paddle,baidu/Paddle,reyoung/Paddle,yu239/Paddle,putcn/Paddle,lispc/Paddle,pkuyym/Paddle,hedaoyuan/Paddle,luotao1/Paddle,lcy-seso/Paddle,yu239/Paddle,jacquesqia... | paddle/majel/test/cuda_test.cu | paddle/majel/test/cuda_test.cu | #include <stdio.h>
#include <cuda_runtime.h>
#include "gtest/gtest.h"
#define CHECK_ERR(x) \
if (x != cudaSuccess) { \
fprintf(stderr,"%s in %s at line %d\n", \
cudaGetErrorString(err),__FILE__,__LINE__); \
exit(-1); ... | #include <stdio.h>
#include <cuda_runtime.h>
#include "gtest/gtest.h"
#define CHECK_ERR(x) \
if (x != cudaSuccess) { \
fprintf(stderr,"%s in %s at line %d\n", \
cudaGetErrorString(err),__FILE__,__LINE__); \
exit(-1); ... | apache-2.0 | Cuda |
85b486df4fb6847145c403a0cad14b6baac4e6b1 | Update relu.cu | hshindo/Merlin.jl | src/cuda/relu.cu | src/cuda/relu.cu | const int CUDA_NUM_THREADS = 512;
// CUDA: number of blocks for threads.
inline int GET_BLOCKS(const int N) { return (N + CUDA_NUM_THREADS - 1) / CUDA_NUM_THREADS; }
// CUDA: grid stride looping
#define CUDA_LOOP(i, n) \
for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < (n); i += blockDim.x * gridDim.x)
temp... | const int CUDA_NUM_THREADS = 512;
// CUDA: number of blocks for threads.
inline int GET_BLOCKS(const int N) { return (N + CUDA_NUM_THREADS - 1) / CUDA_NUM_THREADS; }
// CUDA: grid stride looping
#define CUDA_LOOP(i, n) \
for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < (n); i += blockDim.x * gridDim.x)
temp... | mit | Cuda |
9ebb12249da82cd34cf34eab614462fc63087d64 | fix test_cuda_elementwise_small, after removing `using namespace std` | hughperkins/coriander,hughperkins/coriander,hughperkins/cuda-on-cl,hughperkins/cuda-on-cl,hughperkins/coriander,hughperkins/cuda-on-cl,hughperkins/cuda-on-cl,hughperkins/coriander | test/eigen/test_cuda_elementwise_small.cu | test/eigen/test_cuda_elementwise_small.cu | // This is from Eigen unsupported/test/cxx11_tensor_cuda.cu
#define EIGEN_TEST_NO_LONGDOUBLE
#define EIGEN_TEST_NO_COMPLEX
#define EIGEN_TEST_FUNC cuda_elementwise_small
#define EIGEN_USE_GPU
// #if defined __CUDACC_VER__ && __CUDACC_VER__ >= 70500
// #include <cuda_fp16.h>
// #endif
#include <unsupported/Eigen/CXX11... | // This is from Eigen unsupported/test/cxx11_tensor_cuda.cu
#define EIGEN_TEST_NO_LONGDOUBLE
#define EIGEN_TEST_NO_COMPLEX
#define EIGEN_TEST_FUNC cuda_elementwise_small
#define EIGEN_USE_GPU
// #if defined __CUDACC_VER__ && __CUDACC_VER__ >= 70500
// #include <cuda_fp16.h>
// #endif
#include <unsupported/Eigen/CXX11... | apache-2.0 | Cuda |
e7bfb5fdcf31bc416f4c845e8595ce0572b18e8a | fix typo | silverneko/dsdl,silverneko/dsdl,silverneko/dsdl | gpu/demo/demo.cu | gpu/demo/demo.cu | #include <algorithm>
#include <iostream>
#include <cassert>
#include <cmath>
#include <chrono>
using namespace std;
#define TIMER_SET(t0) std::chrono::time_point<std::chrono::steady_clock> t0 = std::chrono::steady_clock::now()
#define TIMER_DIFF(t0, t1) std::chrono::duration_cast<std::chrono::microseconds> (t1 - t0).... | #include <algorithm>
#include <iostream>
#include <cassert>
#include <cmath>
#include <chrono>
using namespace std;
#define TIMER_SET(t0) std::chrono::time_point<std::chrono::steady_clock> t0 = std::chrono::steady_clock::now()
#define TIMER_DIFF(t0, t1) std::chrono::duration_cast<std::chrono::microseconds> (t1 - t0).... | mit | Cuda |
f65738eb0409d1eba37830db3f4b0052624316f1 | rebuild normalizedInterpolated horizontal Gaussian | alicevision/popsift,poparteu/popsift,alicevision/popsift,poparteu/popsift,alicevision/popsift | src/popsift/s_pyramid_build_ra.cu | src/popsift/s_pyramid_build_ra.cu | /*
* Copyright 2016-2017, Simula Research Laboratory
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include "s_pyramid_build_ra.h"
#include "sift_constants.... | /*
* Copyright 2016-2017, Simula Research Laboratory
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include "s_pyramid_build_ra.h"
#include "sift_constants.... | mpl-2.0 | Cuda |
8cf1ddf31f5c44ba9b5680c561ceb03142fb203e | Simplify leaky_relu | omidsakhi/deepflow,omidsakhi/deepflow,omidsakhi/deepflow,omidsakhi/deepflow,omidsakhi/deepflow | src/nodes/leaky_relu.cu | src/nodes/leaky_relu.cu | #include "core/common_cu.h"
#include "nodes/leaky_relu.h"
__global__
void ReluKernel(int n, const float *x, const float *x_dy, float *y_dx, const float slope)
{
int i = blockIdx.x*blockDim.x + threadIdx.x;
if (i < n)
{
if (x[i] > 0)
y_dx[i] = x_dy[i];
else
y_dx[i] = x_dy[i] * slope;
}
}
LeakyRelu::L... | #include "core/common_cu.h"
#include "nodes/leaky_relu.h"
__global__
void ReluKernel(int n, const float * __restrict__ x, const float * __restrict__ y, float beta, float * __restrict__ z, const float slope)
{
int i = blockIdx.x*blockDim.x + threadIdx.x;
if (i < n)
{
if (x[i] > 0)
z[i] = beta * z[i] + y[i];
... | bsd-3-clause | Cuda |
f1ad64ebfaa8a198b0b4727ccc10ec11b332da09 | Test get_temporary_buffer, return_temporary_buffer, malloc, and free with thrust::seq in __device__ code. | raygit/thrust,Ricardo666666/thrust,sarvex/thrust,egaburov/thrust,xiongzhanblake/thrust,dachziegel/thrust,sdalton1/thrust,xiongzhanblake/thrust_src,thrust/thrust,sarvex/thrust,thvasilo/thrust,egaburov/thrust,zeryx/thrust,arnabgho/thrust,mohamed-ali/thrust,mohamed-ali/thrust,raygit/thrust,zeryx/thrust,thrust/thrust,GrimD... | testing/backend/cuda/memory.cu | testing/backend/cuda/memory.cu | #include <unittest/unittest.h>
#include <thrust/system/cuda/memory.h>
#include <thrust/system/cpp/memory.h>
#include <thrust/memory.h>
#include <thrust/execution_policy.h>
#include <thrust/logical.h>
template<typename T1, typename T2>
bool are_same_type(const T1 &, const T2 &)
{
return false;
}
template<typename ... | #include <unittest/unittest.h>
#include <thrust/system/cuda/memory.h>
#include <thrust/system/cpp/memory.h>
template<typename T1, typename T2>
bool are_same_type(const T1 &, const T2 &)
{
return false;
}
template<typename T>
bool are_same_type(const T &, const T &)
{
return true;
}
void TestSelectSystemCudaToCpp... | apache-2.0 | Cuda |
da6e53c2620d92ec6ff16c23af69c4e531d23417 | Add -nocudainc option to CUDA preprocessor test. | apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-cl... | test/Preprocessor/cuda-preprocess.cu | test/Preprocessor/cuda-preprocess.cu | // Tests CUDA compilation with -E.
// REQUIRES: clang-driver
// REQUIRES: x86-registered-target
// REQUIRES: nvptx-registered-target
#ifndef __CUDA_ARCH__
#define PREPROCESSED_AWAY
clang_unittest_no_arch PREPROCESSED_AWAY
#else
clang_unittest_cuda_arch __CUDA_ARCH__
#endif
// CHECK-NOT: PREPROCESSED_AWAY
// RUN: %c... | // Tests CUDA compilation with -E.
// REQUIRES: clang-driver
// REQUIRES: x86-registered-target
// REQUIRES: nvptx-registered-target
#ifndef __CUDA_ARCH__
#define PREPROCESSED_AWAY
clang_unittest_no_arch PREPROCESSED_AWAY
#else
clang_unittest_cuda_arch __CUDA_ARCH__
#endif
// CHECK-NOT: PREPROCESSED_AWAY
// RUN: %c... | apache-2.0 | Cuda |
c5736602e3acd041dd599ce1e413b13585c2c621 | Test max_element with thrust::device in __device__ code. | xiongzhanblake/thrust_src,xiongzhanblake/thrust,mohamed-ali/thrust,sdalton1/thrust,thrust/thrust,zhenglaizhang/thrust,xiongzhanblake/thrust_src,Ricardo666666/thrust,zhenglaizhang/thrust,egaburov/thrust,thrust/thrust,Ricardo666666/thrust,raygit/thrust,andrewcorrigan/thrust-multi-permutation-iterator,xiongzhanblake/thrus... | testing/backend/cuda/max_element.cu | testing/backend/cuda/max_element.cu | #include <unittest/unittest.h>
#include <thrust/extrema.h>
#include <thrust/execution_policy.h>
template<typename ExecutionPolicy, typename Iterator, typename Iterator2>
__global__
void max_element_kernel(ExecutionPolicy exec, Iterator first, Iterator last, Iterator2 result)
{
*result = thrust::max_element(exec, fi... | #include <unittest/unittest.h>
#include <thrust/extrema.h>
#include <thrust/execution_policy.h>
template<typename Iterator, typename Iterator2>
__global__
void max_element_kernel(Iterator first, Iterator last, Iterator2 result)
{
*result = thrust::max_element(thrust::seq, first, last);
}
template<typename Iterato... | apache-2.0 | Cuda |
e4f9bf2db04241ae9d7248402a2433f414b8a59f | remove sleep | undertherain/benchmarker,undertherain/benchmarker,undertherain/benchmarker,undertherain/benchmarker | benchmarker/modules/problems/cublas/main.cu | benchmarker/modules/problems/cublas/main.cu | //#include <stdio.h>
//#include <stdlib.h>
#include <iostream>
#include <cblas.h>
#include <cublas_v2.h>
#include <chrono>
#include "config.h"
#include "args.hpp"
#include <unistd.h>
using namespace std::chrono;
int main(int argc, char * argv[]) {
size_t m, n, k;
float * A, *B, *C;
double dtime;
ar... | //#include <stdio.h>
//#include <stdlib.h>
#include <iostream>
#include <cblas.h>
#include <cublas_v2.h>
#include <chrono>
#include "config.h"
#include "args.hpp"
#include <unistd.h>
using namespace std::chrono;
int main(int argc, char * argv[]) {
size_t m, n, k;
float * A, *B, *C;
double dtime;
ar... | mpl-2.0 | Cuda |
3782b78481ce9702c082cf21154719993b435c74 | Fix failure in lit test kernel-call.cu due to name mangling | apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/cl... | test/CodeGenCUDA/kernel-call.cu | test/CodeGenCUDA/kernel-call.cu | // RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s --check-prefixes=CUDA,CHECK
// RUN: %clang_cc1 -x hip -emit-llvm %s -o - | FileCheck %s --check-prefixes=HIP,CHECK
#include "Inputs/cuda.h"
// CHECK-LABEL: define{{.*}}g1
// HIP: call{{.*}}hipSetupArgument
// HIP: call{{.*}}hipLaunchByPtr
// CUDA: call{{.*}}cudaSe... | // RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s --check-prefixes=CUDA,CHECK
// RUN: %clang_cc1 -x hip -emit-llvm %s -o - | FileCheck %s --check-prefixes=HIP,CHECK
#include "Inputs/cuda.h"
// CHECK-LABEL: define{{.*}} void @_Z2g1i
// HIP: call{{.*}}hipSetupArgument
// HIP: call{{.*}}hipLaunchByPtr
// CUDA: call{... | apache-2.0 | Cuda |
511bc4be455a61cbf3d0a8e8a95c38bbcc2cbb03 | Comment removed, n/a | gunrock/gunrock,gunrock/gunrock,gunrock/gunrock | unittests/array/test_array.cu | unittests/array/test_array.cu | #include <cstdlib> // EXIT_SUCCESS
#include <iostream>
#include <gunrock/container/array.hxx>
#include <gunrock/error.hxx> // error checking
template <std::size_t N>
__global__ void kernel(int dummy) {
int idx = threadIdx.x + (blockDim.x * blockIdx.x);
if (idx >= N)
return;
gunrock::array<float, N> a;
... | #include <cstdlib> // EXIT_SUCCESS
#include <iostream>
#include <gunrock/container/array.hxx>
#include <gunrock/error.hxx> // error checking
template <std::size_t N>
__global__ void kernel(int dummy) {
int idx = threadIdx.x + (blockDim.x * blockIdx.x);
if (idx >= N)
return;
gunrock::array<float, N> a;
... | apache-2.0 | Cuda |
36b679eeaa7247234181a30fa8451c16b333c606 | Test min_element with thrust::device in __device__ code. | jaredhoberock/thrust,thrust/thrust,sarvex/thrust,raygit/thrust,marksantos/thrust,thvasilo/thrust,jaredhoberock/thrust,raygit/thrust,andrewcorrigan/thrust-multi-permutation-iterator,egaburov/thrust,mohamed-ali/thrust,thvasilo/thrust,mohamed-ali/thrust,xiongzhanblake/thrust_src,arnabgho/thrust,Ricardo666666/thrust,xiongz... | testing/backend/cuda/min_element.cu | testing/backend/cuda/min_element.cu | #include <unittest/unittest.h>
#include <thrust/extrema.h>
#include <thrust/execution_policy.h>
template<typename ExecutionPolicy, typename Iterator, typename Iterator2>
__global__
void min_element_kernel(ExecutionPolicy exec, Iterator first, Iterator last, Iterator2 result)
{
*result = thrust::min_element(exec, fi... | #include <unittest/unittest.h>
#include <thrust/extrema.h>
#include <thrust/execution_policy.h>
template<typename Iterator, typename Iterator2>
__global__
void min_element_kernel(Iterator first, Iterator last, Iterator2 result)
{
*result = thrust::min_element(thrust::seq, first, last);
}
template<typename Iterato... | apache-2.0 | Cuda |
a757208748a9be0a61914b97396cbea923095512 | Simplify the fill.cu example a bit | egaburov/agency,egaburov/agency | fill.cu | fill.cu | #include <iostream>
#include <cassert>
#include <thrust/device_vector.h>
#include <thrust/logical.h>
#include "cuda/execution_policy.hpp"
struct fill_functor
{
int* x;
__host__ __device__
fill_functor(int* x_)
: x(x_)
{}
__device__
void operator()(cuda::parallel_agent& self)
{
int i = self.ind... | #include <iostream>
#include <cassert>
#include <thrust/device_vector.h>
#include <thrust/logical.h>
#include <thrust/functional.h>
#include "cuda/grid_executor.hpp"
#include "cuda/execution_policy.hpp"
struct fill_functor
{
int* x;
__host__ __device__
fill_functor(int* x_)
: x(x_)
{}
__device__
voi... | bsd-3-clause | Cuda |
21a942db0ede30549404e0a4f6f2c4ede91075e8 | Fix typo in GPU TWF force compute function | joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue | hoomd/md/TWFDriverPotentialPairGPU.cu | hoomd/md/TWFDriverPotentialPairGPU.cu | /*! \file TWFDriverPotentialPairGPU.cu
\brief Defines the driver functions for computing all types of pair forces
on the GPU
*/
#include "EvaluatorPairTWF.h"
#include "AllDriverPotentialPairGPU.cuh"
hipError_t gpu_compute_twf_forces(
const pair_args_t& pair_args, const EvaluatorPairTWF::param_type *d_param... | /*! \file TWFDriverPotentialPairGPU.cu
\brief Defines the driver functions for computing all types of pair forces
on the GPU
*/
#include "EvaluatorPairTWF.h"
#include "AllDriverPotentialPairGPU.cuh"
hipError_t gpu_compute_twftemp_forces(
const pair_args_t& pair_args, const EvaluatorPairTWF::param_type *d_p... | bsd-3-clause | Cuda |
58516feeaa188dc5648809b070a1bd4adc1f310a | Fix a build error. | nakdai/aten,nakdai/aten | src/libidaten/kernel/intersect.cu | src/libidaten/kernel/intersect.cu | #include "kernel/intersect.cuh"
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include "cuda/helper_math.h"
typedef bool(*FuncIntersect)(const aten::ShapeParameter&, const aten::ray&, float t_min, float t_max, aten::hitrecord&);
__device__ FuncIntersect funcIntersect[aten::ShapeType::ShapeTypeMax]... | #include "kernel/intersect.cuh"
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include "cuda/helper_math.h"
typedef bool(*FuncIntersect)(const aten::ShapeParameter&, const aten::ray&, float t_min, float t_max, aten::hitrecord&);
__device__ FuncIntersect funcIntersect[aten::ShapeType::ShapeTypeMax]... | mit | Cuda |
4b1ce160d335c9c8eb8a9afdb5e6325dd71bb6f3 | disable LRN for CUDA 7.0 (#2134) | Prasad9/incubator-mxnet,thirdwing/mxnet,weleen/mxnet,wangyum/mxnet,ForkedReposBak/mxnet,fullfanta/mxnet,yajiedesign/mxnet,eric-haibin-lin/mxnet,rahul003/mxnet,luoyetx/mxnet,ykim362/mxnet,luoyetx/mxnet,stefanhenneking/mxnet,solin319/incubator-mxnet,stefanhenneking/mxnet,pluskid/mxnet,crazy-cat/incubator-mxnet,lxn2/mxnet... | src/operator/lrn.cu | src/operator/lrn.cu | /*!
* Copyright (c) 2015 by Contributors
* \file lrn.cu
* \brief
* \author Bing Xu
*/
#include "./lrn-inl.h"
#if MXNET_USE_CUDNN == 1
#include "./cudnn_lrn-inl.h"
#endif
namespace mxnet {
namespace op {
template<>
Operator* CreateOp<gpu>(LRNParam param) {
#if MXNET_USE_CUDNN == 1
return new CuDNNLocalResponseNo... | /*!
* Copyright (c) 2015 by Contributors
* \file lrn.cu
* \brief
* \author Bing Xu
*/
#include "./lrn-inl.h"
#if MXNET_USE_CUDNN == 1
#include "./cudnn_lrn-inl.h"
#endif
namespace mxnet {
namespace op {
template<>
Operator* CreateOp<gpu>(LRNParam param) {
#if MXNET_USE_CUDNN == 1
return new CuDNNLocalResponseNo... | apache-2.0 | Cuda |
c974a9932533500376c262b3e7f4ca40e4114073 | Remove the extra endif by merge error | lispc/Paddle,jacquesqiao/Paddle,wen-bo-yang/Paddle,pkuyym/Paddle,luotao1/Paddle,emailweixu/Paddle,dayhaha/Paddle,yu239/Paddle,chengduoZH/Paddle,Canpio/Paddle,zuowang/Paddle,qingqing01/Paddle,putcn/Paddle,Canpio/Paddle,pengli09/Paddle,zhouxiao-coder/Paddle,PaddlePaddle/Paddle,yu239/Paddle,baidu/Paddle,alvations/Paddle,C... | paddle/cuda/include/hl_device_functions.cuh | paddle/cuda/include/hl_device_functions.cuh | /* Copyright (c) 2016 Baidu, Inc. All Rights Reserve.
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 ... | /* Copyright (c) 2016 Baidu, Inc. All Rights Reserve.
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 ... | apache-2.0 | Cuda |
e0add473c53bc6b17fed1ee9d5f326295440e921 | remove excessive debug info | poparteu/CCTag,poparteu/CCTag,poparteu/CCTag,poparteu/CCTag | src/cuda/frame_export.cu | src/cuda/frame_export.cu | // #include <iostream>
// #include <limits>
// #include <assert.h>
// #include <fstream>
// #include <string.h>
#include <cuda_runtime.h>
// #include "debug_macros.hpp"
#include "frame.h"
// #include "clamp.h"
// #include "frame_gaussian.h"
namespace popart {
using namespace std;
bool Frame::applyExport( cctag::Edg... | // #include <iostream>
// #include <limits>
// #include <assert.h>
// #include <fstream>
// #include <string.h>
#include <cuda_runtime.h>
// #include "debug_macros.hpp"
#include "frame.h"
// #include "clamp.h"
// #include "frame_gaussian.h"
namespace popart {
using namespace std;
bool Frame::applyExport( cctag::Edg... | mpl-2.0 | Cuda |
4ed5f7dbb994f19355eb861966fef6e9760c0fce | Disable neon when enable gpu. | reyoung/Paddle,lispc/Paddle,lispc/Paddle,PaddlePaddle/Paddle,tensor-tang/Paddle,Canpio/Paddle,chengduoZH/Paddle,putcn/Paddle,PaddlePaddle/Paddle,baidu/Paddle,chengduoZH/Paddle,chengduoZH/Paddle,luotao1/Paddle,hedaoyuan/Paddle,putcn/Paddle,hedaoyuan/Paddle,hedaoyuan/Paddle,lcy-seso/Paddle,pengli09/Paddle,Canpio/Paddle,h... | paddle/cuda/include/hl_matrix_type.cuh | paddle/cuda/include/hl_matrix_type.cuh | /* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve.
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 ... | /* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve.
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 ... | apache-2.0 | Cuda |
d443b2fece171214f3f709b7d6acbdfa2d8c4cfa | update max steps to match c version | SLACKHA/accelerInt,SLACKHA/accelerInt,SLACKHA/accelerInt,SLACKHA/accelerInt | exponential_integrators/exprb43/exprb43_props.cuh | exponential_integrators/exprb43/exprb43_props.cuh | /*rb43_props.cuh
*Various macros controlling behaviour of RB43 algorithm
* \file rb43_props.cuh
* \author Nicholas Curtis
* \date 03/10/2015
*/
#ifndef RB43_PROPS_CUH
#define RB43_PROPS_CUH
#include "header.cuh"
#include <cuComplex.h>
#include <stdio.h>
//if defined, uses (I - h * Hm)^-1 to smooth the krylov er... | /*rb43_props.cuh
*Various macros controlling behaviour of RB43 algorithm
* \file rb43_props.cuh
* \author Nicholas Curtis
* \date 03/10/2015
*/
#ifndef RB43_PROPS_CUH
#define RB43_PROPS_CUH
#include "header.cuh"
#include <cuComplex.h>
#include <stdio.h>
//if defined, uses (I - h * Hm)^-1 to smooth the krylov er... | mit | Cuda |
0cfd315d08bd167a318f42ebb4ffc63628d605c6 | Increase depth to avoid stack overflows | igui/OppositeRenderer,igui/OppositeRenderer,igui/ILPSolver,igui/RPSolver,igui/ILPSolver,igui/RPSolver | RenderEngine/material/Hole.cu | RenderEngine/material/Hole.cu | /*
* Copyright (c) 2013 Opposite Renderer
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/
#include <optix.h>
#include <optix_cuda.h>
#include <optixu/optixu_math_namespace.h>
#include "config.h"
#include "renderer/Hitpoint.h"
#incl... | /*
* Copyright (c) 2013 Opposite Renderer
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/
#include <optix.h>
#include <optix_cuda.h>
#include <optixu/optixu_math_namespace.h>
#include "config.h"
#include "renderer/Hitpoint.h"
#incl... | mit | Cuda |
7716d29d409ed69e8c31971b45df206acad1fc36 | Remove compiler check for MSVC < 2015U3. | NVlabs/cub,NVlabs/CUB,NVIDIA/cub | cub/util_cpp_dialect.cuh | cub/util_cpp_dialect.cuh | /******************************************************************************
* Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistribution... | /******************************************************************************
* Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistribution... | bsd-3-clause | Cuda |
6e8c927cc87b94d2f0ee0c8d476033498ecc765e | fix reduction_sum_axisall.cu test | hughperkins/coriander,hughperkins/cuda-on-cl,hughperkins/coriander,hughperkins/cuda-on-cl,hughperkins/coriander,hughperkins/cuda-on-cl,hughperkins/cuda-on-cl,hughperkins/coriander | test/eigen/reduction_sum_axisall.cu | test/eigen/reduction_sum_axisall.cu | // This is from Eigen unsupported/test/cxx11_tensor_cuda.cu
#define EIGEN_TEST_NO_LONGDOUBLE
#define EIGEN_TEST_NO_COMPLEX
#define EIGEN_TEST_FUNC cuda_reduction
#define EIGEN_USE_GPU
#include <unsupported/Eigen/CXX11/Tensor>
#include "main.h"
#include <iostream>
using Eigen::Tensor;
void test_cuda_reduction()
{
... | // This is from Eigen unsupported/test/cxx11_tensor_cuda.cu
#define EIGEN_TEST_NO_LONGDOUBLE
#define EIGEN_TEST_NO_COMPLEX
#define EIGEN_TEST_FUNC cuda_reduction
#define EIGEN_USE_GPU
#include <unsupported/Eigen/CXX11/Tensor>
#include "main.h"
#include <iostream>
using Eigen::Tensor;
void test_cuda_reduction()
{
... | apache-2.0 | Cuda |
6da4434e76025121b6b15027bafba4ccdce3a306 | Add __host__ __device__ to the functor in remove_points2d.cu | raygit/thrust,zeryx/thrust,thrust/thrust,raygit/thrust,arnabgho/thrust,xiongzhanblake/thrust,jaredhoberock/thrust,thrust/thrust,dachziegel/thrust,xiongzhanblake/thrust_src,sdalton1/thrust,Ricardo666666/thrust,jaredhoberock/thrust,sarvex/thrust,marksantos/thrust,arnabgho/thrust,dachziegel/thrust,zhenglaizhang/thrust,sar... | examples/remove_points2d.cu | examples/remove_points2d.cu | #include <thrust/host_vector.h>
#include <thrust/remove.h>
#include <thrust/random.h>
// This example generates random points in the
// unit square [0,1)x[0,1) and then removes all
// points where x^2 + y^2 > 1
//
// The x and y coordinates are stored in separate arrays
// and a zip_iterator is used to combine them ... | #include <thrust/host_vector.h>
#include <thrust/remove.h>
#include <thrust/random.h>
// This example generates random points in the
// unit square [0,1)x[0,1) and then removes all
// points where x^2 + y^2 > 1
//
// The x and y coordinates are stored in separate arrays
// and a zip_iterator is used to combine them ... | apache-2.0 | Cuda |
7196a8d4b204d262cd2563ef39f6da35dd56268d | move declaration out of loop | cupy/cupy,cupy/cupy,cupy/cupy,cupy/cupy | cupy/core/include/cupy/atomics.cuh | cupy/core/include/cupy/atomics.cuh | #pragma once
#if __CUDA_ARCH__ < 600
__device__ double atomicAdd(double *address, double val)
{
unsigned long long int* address_as_ull = (unsigned long long int*)address;
unsigned long long int old = *address_as_ull;
unsigned long long int assumed;
do {
assumed = old;
old = atomicCAS(address_as_ull,... | #pragma once
#if __CUDA_ARCH__ < 600
__device__ double atomicAdd(double *address, double val)
{
unsigned long long int* address_as_ull = (unsigned long long int*)address;
unsigned long long int old = *address_as_ull;
unsigned long long int assumed;
do {
assumed = old;
old = atomicCAS(address_as_ull,... | mit | Cuda |
dc225037008021909d05758abbb91827019aa20c | support for join operations with column.valid == nullptr | gpuopenanalytics/libgdf,gpuopenanalytics/libgdf,gpuopenanalytics/libgdf,gpuopenanalytics/libgdf | src/util/bit_util.cuh | src/util/bit_util.cuh |
/*
* Copyright 2018 BlazingDB, Inc.
* Copyright 2018 Alexander Ocsa <alexander@blazingdb.com>
*
* 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/licens... |
/*
* Copyright 2018 BlazingDB, Inc.
* Copyright 2018 Alexander Ocsa <alexander@blazingdb.com>
*
* 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/licens... | apache-2.0 | Cuda |
af8fe0f98004635e105fa5031f1c3de8381e86b4 | Replace make_unique in cuda_utils.cu (#2052) | microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime | onnxruntime/core/providers/cuda/cuda_utils.cu | onnxruntime/core/providers/cuda/cuda_utils.cu | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Thrust code needs to be compiled with nvcc
#include <memory>
#include "core/providers/cuda/shared_inc/cuda_utils.h"
#include "core/providers/cuda/cu_inc/common.cuh"
#include "cudnn_common.h"
namespace onnxruntime {
name... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Thrust code needs to be compiled with nvcc
#include <memory>
#include "core/providers/cuda/shared_inc/cuda_utils.h"
#include "core/providers/cuda/cu_inc/common.cuh"
#include "cudnn_common.h"
namespace onnxruntime {
name... | mit | Cuda |
ac0d94fa282040b6983e95fbc2cedaa0461c14b5 | Test set_intersection with thrust::device in __device__ code. | xiongzhanblake/thrust_src,GrimDerp/thrust,Ricardo666666/thrust,dachziegel/thrust,jaredhoberock/thrust,xiongzhanblake/thrust,raygit/thrust,arnabgho/thrust,Ricardo666666/thrust,mohamed-ali/thrust,jaredhoberock/thrust,Ricardo666666/thrust,jaredhoberock/thrust,sarvex/thrust,thrust/thrust,sdalton1/thrust,egaburov/thrust,ega... | testing/backend/cuda/set_intersection.cu | testing/backend/cuda/set_intersection.cu | #include <unittest/unittest.h>
#include <thrust/set_operations.h>
#include <thrust/functional.h>
#include <thrust/sort.h>
#include <thrust/extrema.h>
#include <thrust/iterator/discard_iterator.h>
template<typename ExecutionPolicy, typename Iterator1, typename Iterator2, typename Iterator3, typename Iterator4>
__globa... | #include <unittest/unittest.h>
#include <thrust/set_operations.h>
#include <thrust/functional.h>
#include <thrust/sort.h>
#include <thrust/extrema.h>
#include <thrust/iterator/discard_iterator.h>
template<typename Iterator1, typename Iterator2, typename Iterator3, typename Iterator4>
__global__
void set_intersection_... | apache-2.0 | Cuda |
1340ce6f9e6ad77dee92f0fc30047bfeced76380 | Create surface objects lazily in Occupancy. | Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller | src/placement/occupancy.cu | src/placement/occupancy.cu | #include "./occupancy.h"
#include "../utils/cuda_helper.h"
__global__ void occupancyKernel(cudaTextureObject_t positions,
cudaSurfaceObject_t output, int width, int height)
{
int x = blockIdx.x * blockDim.x + threadIdx.x;
int y = blockIdx.y * blockDim.y + threadIdx.y;
if (x >= width || y >= height)
retur... | #include "./occupancy.h"
#include "../utils/cuda_helper.h"
__global__ void occupancyKernel(cudaTextureObject_t positions,
cudaSurfaceObject_t output, int width, int height)
{
int x = blockIdx.x * blockDim.x + threadIdx.x;
int y = blockIdx.y * blockDim.y + threadIdx.y;
if (x >= width || y >= height)
retur... | mit | Cuda |
d865d3496863d76650fcdfa196c72e427b252ec3 | Fix CUDA crash in fast RCNN model (#1092) | microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime | onnxruntime/core/providers/cuda/cuda_utils.cu | onnxruntime/core/providers/cuda/cuda_utils.cu | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Thrust code needs to be compiled with nvcc
#include <memory>
#include "core/providers/cuda/shared_inc/cuda_utils.h"
#include "core/providers/cuda/cu_inc/common.cuh"
#include "cudnn_common.h"
namespace onnxruntime {
name... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Thrust code needs to be compiled with nvcc
#include <memory>
#include <mutex>
#include <thrust/device_vector.h>
#include <thrust/execution_policy.h>
#include <thrust/fill.h>
#include "core/providers/cuda/shared_inc/cuda_... | mit | Cuda |
682056bd62ed0dbbfae9ff0b1a44368b438a18f5 | Modify not to clear random seed. | nakdai/aten,nakdai/aten | src/libidaten/svgf/svgf_init.cu | src/libidaten/svgf/svgf_init.cu | #include "svgf/svgf.h"
#include "cuda/cudadefs.h"
#include "cuda/helper_math.h"
#include "cuda/cudautil.h"
#include "cuda/cudamemory.h"
#include "aten4idaten.h"
__global__ void initSVGF(
idaten::SVGFPathTracing::Path* path,
idaten::SVGFPathTracing::PathThroughput* throughput,
idaten::SVGFPathTracing::Pat... | #include "svgf/svgf.h"
#include "cuda/cudadefs.h"
#include "cuda/helper_math.h"
#include "cuda/cudautil.h"
#include "cuda/cudamemory.h"
#include "aten4idaten.h"
__global__ void initSVGF(
idaten::SVGFPathTracing::Path* path,
idaten::SVGFPathTracing::PathThroughput* throughput,
idaten::SVGFPathTracing::Pat... | mit | Cuda |
ac547bdcb19bd9ad054566a071fb177c89f1dd01 | build warnings | hughperkins/cuda-on-cl,hughperkins/coriander,hughperkins/coriander,hughperkins/cuda-on-cl,hughperkins/cuda-on-cl,hughperkins/cuda-on-cl,hughperkins/coriander,hughperkins/coriander | test/cocl/test_callbacks.cu | test/cocl/test_callbacks.cu | // tests cuEventCreate
#include <iostream>
#include <memory>
#include <unistd.h>
using namespace std;
#include <cuda.h>
__global__ void longKernel(float *data, int N, float value) {
for(int i = 0; i < N; i++) {
data[i] += value;
}
}
void myCallback(CUstream stream, size_t status, void *data) {
... | // tests cuEventCreate
#include <iostream>
#include <memory>
#include <unistd.h>
using namespace std;
#include <cuda.h>
__global__ void longKernel(float *data, int N, float value) {
for(int i = 0; i < N; i++) {
data[i] += value;
}
}
void myCallback(CUstream stream, size_t status, void *data) {
... | apache-2.0 | Cuda |
5b95cad44f9a331692afc84538460a4815541b9c | Initialize counting iterator (on OS X, this matters). Works on OS X with -m32. | bryancatanzaro/cooperative,bryancatanzaro/cooperative | test/for_each.cu | test/for_each.cu | #include <cooperative/cuda/tag.h>
#include <cooperative/cuda/functional.h>
#include <cooperative/cuda/transform.h>
#include <thrust/iterator/retag.h>
#include <thrust/device_vector.h>
#include <iostream>
//Requires power of 2 thread block size
//Consider how to encode this in the type system
//(We want several kinds ... | #include <cooperative/cuda/tag.h>
#include <cooperative/cuda/functional.h>
#include <cooperative/cuda/transform.h>
#include <thrust/iterator/retag.h>
#include <thrust/device_vector.h>
#include <iostream>
//Requires power of 2 thread block size
//Consider how to encode this in the type system
//(We want several kinds ... | apache-2.0 | Cuda |
ddad545706b98c9d50ef37009c23ce0af87fbb4c | Remove meaningless std::forward to CUDA kernel | tkerola/chainer,ktnyt/chainer,chainer/chainer,keisuke-umezawa/chainer,niboshi/chainer,chainer/chainer,ktnyt/chainer,jnishi/chainer,ktnyt/chainer,hvy/chainer,hvy/chainer,wkentaro/chainer,ktnyt/chainer,keisuke-umezawa/chainer,hvy/chainer,pfnet/chainer,okuta/chainer,niboshi/chainer,wkentaro/chainer,chainer/chainer,niboshi... | xchainer/cuda/elementwise.cuh | xchainer/cuda/elementwise.cuh | #pragma once
#include <algorithm>
#include <cstdint>
#include <utility>
#include "xchainer/constant.h"
#include "xchainer/cuda/cuda_runtime.h"
#include "xchainer/index_iterator.h"
#include "xchainer/indexable_array.h"
#include "xchainer/indexer.h"
#include "xchainer/shape.h"
namespace xchainer {
namespace cuda {
nam... | #pragma once
#include <algorithm>
#include <cstdint>
#include <utility>
#include "xchainer/constant.h"
#include "xchainer/cuda/cuda_runtime.h"
#include "xchainer/index_iterator.h"
#include "xchainer/indexable_array.h"
#include "xchainer/indexer.h"
#include "xchainer/shape.h"
namespace xchainer {
namespace cuda {
nam... | mit | Cuda |
1487d3a3d4fc01037ea0d4a1a2fc39ec55ce72c5 | Test inner_product with thrust::device in __device__ code. | zhenglaizhang/thrust,thrust/thrust,thrust/thrust,zhenglaizhang/thrust,xiongzhanblake/thrust_src,mohamed-ali/thrust,zeryx/thrust,thvasilo/thrust,xiongzhanblake/thrust_src,marksantos/thrust,andrewcorrigan/thrust-multi-permutation-iterator,dachziegel/thrust,sdalton1/thrust,raygit/thrust,dachziegel/thrust,egaburov/thrust,G... | testing/backend/cuda/inner_product.cu | testing/backend/cuda/inner_product.cu | #include <unittest/unittest.h>
#include <thrust/inner_product.h>
#include <thrust/execution_policy.h>
template<typename ExecutionPolicy, typename Iterator1, typename Iterator2, typename T, typename Iterator3>
__global__
void inner_product_kernel(ExecutionPolicy exec, Iterator1 first1, Iterator1 last1, Iterator2 first... | #include <unittest/unittest.h>
#include <thrust/inner_product.h>
#include <thrust/execution_policy.h>
template<typename Iterator1, typename Iterator2, typename T, typename Iterator3>
__global__
void inner_product_kernel(Iterator1 first1, Iterator1 last1, Iterator2 first2, T init, Iterator3 result)
{
*result = thrus... | apache-2.0 | Cuda |
b549d322d0ce9e3b7a1ac0fcfa27acf1e212e590 | Add multi_device example back to Thrust-NUMA | arnabgho/thrust,andrewcorrigan/thrust-multi-permutation-iterator,egaburov/thrust,jaredhoberock/thrust,jaredhoberock/thrust,marksantos/thrust,thrust/thrust,thvasilo/thrust,mohamed-ali/thrust,zeryx/thrust,thvasilo/thrust,xiongzhanblake/thrust,Ricardo666666/thrust,dachziegel/thrust,sdalton1/thrust,andrewcorrigan/thrust-mu... | examples/multi_device.cu | examples/multi_device.cu | #include <thrust/host_vector.h>
#include <thrust/device_vector.h>
#include <thrust/fill.h>
#include <thrust/reduce.h>
#include "cuda_multidev.h"
template<typename Pointer>
struct placed_ptr
{
placed_ptr(Pointer ptr, int place)
: ptr_(ptr), place_(place) {}
Pointer ptr_;
int place_;
};
template<typename P... | apache-2.0 | Cuda | |
c870ec88683aaf4b1fc86a43ce9367001b3ee4d3 | add cuda setting | stormHan/Parallel_RVD,stormHan/Parallel_RVD | Parallel_RVD/Cudaclass.cu | Parallel_RVD/Cudaclass.cu | #include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <iostream>
/*
process the cuda error
*/
inline void checkCudaErrors(cudaError err)
{
if (cudaSuccess != err)
{
fprintf(stderr, "CUDA Runtime API error : %s.\n", cudaGetErrorString(err));
return;
}
}
extern "C" void runCuda(double* host_s... | mit | Cuda | |
88f5d10d4de4581533e0c9adafaf55aaaabc186e | Add CUDA hybrid test. | quantumlib/qsim,quantumlib/qsim,quantumlib/qsim,quantumlib/qsim | tests/hybrid_cuda_test.cu | tests/hybrid_cuda_test.cu | // Copyright 2019 Google LLC. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicabl... | apache-2.0 | Cuda | |
312d69993cc296bec8975890ec7250ee0c6f1d09 | Test the transform scan algorithms with thrust::seq in __device__ code. | sarvex/thrust,mohamed-ali/thrust,zhenglaizhang/thrust,sdalton1/thrust,jaredhoberock/thrust,arnabgho/thrust,sarvex/thrust,andrewcorrigan/thrust-multi-permutation-iterator,marksantos/thrust,mohamed-ali/thrust,Ricardo666666/thrust,xiongzhanblake/thrust,xiongzhanblake/thrust_src,thrust/thrust,zhenglaizhang/thrust,jaredhobe... | testing/backend/cuda/transform_scan.cu | testing/backend/cuda/transform_scan.cu | #include <unittest/unittest.h>
#include <thrust/transform_scan.h>
#include <thrust/execution_policy.h>
template<typename Iterator1, typename Iterator2, typename Function1, typename Function2, typename Iterator3>
__global__
void transform_inclusive_scan_kernel(Iterator1 first, Iterator1 last, Iterator2 result1, Functi... | apache-2.0 | Cuda | |
5708c1d7ab065f26e32b6a956ac539de1b51972d | add example 01 | rk0der/railgun,rk0der/railgun,rk0der/railgun | example/01_dump_args.cu | example/01_dump_args.cu | #include <stdio.h>
#include "railgun.h"
#define N 20
int
main(void)
{
int i;
int a[N], b[N], c[N];
railgun_t *rg;
railgun_args *args;
rg = get_railgun();
for (i = 0; i < N; i++) {
a[i] = i;
b[i] = i % 10;
}
args = rg->wrap_args("iii", a, N, b, N, c, N);
printf("Testing...\n");
dump_ar... | mit | Cuda | |
c8b2415136f855202df9bea09adf0ddbf46a617d | Add minimal_custom_backend example | google-code-export/thrust,hemmingway/thrust,google-code-export/thrust,hemmingway/thrust,lishi0927/thrust,UIKit0/thrust,google-code-export/thrust,allendaicool/thrust,UIKit0/thrust,malenie/thrust,allendaicool/thrust,hemmingway/thrust,Vishwa07/thrust,rdmenezes/thrust,levendlee/thrust,bfurtaw/thrust,UIKit0/thrust,levendlee... | examples/minimal_custom_backend.cu | examples/minimal_custom_backend.cu | #include <thrust/iterator/iterator_traits.h>
#include <thrust/device_vector.h>
#include <thrust/for_each.h>
#include <thrust/transform.h>
#include <thrust/functional.h>
#include <iostream>
// This example demonstrates how to build a minimal custom
// Thrust backend by intercepting for_each's dispatch.
// We begin by ... | apache-2.0 | Cuda | |
2fa9213e33656f5c287fc62e3b65d8c590c77e6c | Add a small BLAS example. Resolves issue #55 | cusplibrary/cusplibrary,cusplibrary/cusplibrary,cusplibrary/cusplibrary,sdalton1/cusplibrary,cusplibrary/cusplibrary,sdalton1/cusplibrary,sdalton1/cusplibrary,sdalton1/cusplibrary | examples/Algorithms/blas.cu | examples/Algorithms/blas.cu | #include <cusp/blas.h>
#include <cusp/array2d.h>
#include <cusp/print.h>
#include <iostream>
int main(void)
{
// initialize x vector
cusp::array1d<float, cusp::host_memory> x(2);
x[0] = 1;
x[1] = 2;
// initialize y vector
cusp::array1d<float, cusp::host_memory> y(2);
y[0] = 1;
y[1] = 2... | apache-2.0 | Cuda | |
26e3599eb7df33015cc9c65e3c5895e374fc5bcb | Add an example of building a 2D grid data structure. | jbrownbridge/thrust,jbrownbridge/thrust,jbrownbridge/thrust,jbrownbridge/thrust | examples/build_grid.cu | examples/build_grid.cu | #include <thrust/device_vector.h>
#include <thrust/host_vector.h>
#include <thrust/generate.h>
#include <thrust/sort.h>
#include <thrust/binary_search.h>
#include <thrust/iterator/counting_iterator.h>
#include <cuda.h> // for float2
#include <stdlib.h> // for rand()
#include <iostream>
// return a random float2 in ... | apache-2.0 | Cuda | |
ff84e8a02ba8989a098bf7b5dccc6a9ebfb0ab17 | Add a unit test for the convenient caching allocator in detail. | thrust/thrust,jaredhoberock/thrust,thrust/thrust,thrust/thrust,jaredhoberock/thrust,jaredhoberock/thrust,thrust/thrust,jaredhoberock/thrust,jaredhoberock/thrust,andrewcorrigan/thrust-multi-permutation-iterator,andrewcorrigan/thrust-multi-permutation-iterator,thrust/thrust,andrewcorrigan/thrust-multi-permutation-iterato... | testing/caching_allocator.cu | testing/caching_allocator.cu | #include <unittest/unittest.h>
#include <thrust/detail/config.h>
#include <thrust/detail/caching_allocator.h>
template<typename Allocator>
void test_implementation(Allocator alloc)
{
typedef typename thrust::detail::allocator_traits<Allocator> Traits;
typedef typename Allocator::pointer Ptr;
Ptr p = Trai... | apache-2.0 | Cuda | |
e8fba6d1c6ed7e76751cfe65423f83123d307ea9 | Test is_sorted with thrust::seq in __device__ code. | marksantos/thrust,thrust/thrust,sdalton1/thrust,zhenglaizhang/thrust,zeryx/thrust,marksantos/thrust,sarvex/thrust,Ricardo666666/thrust,zeryx/thrust,mohamed-ali/thrust,marksantos/thrust,zeryx/thrust,jaredhoberock/thrust,xiongzhanblake/thrust_src,dachziegel/thrust,GrimDerp/thrust,GrimDerp/thrust,thvasilo/thrust,egaburov/... | testing/backend/cuda/is_sorted.cu | testing/backend/cuda/is_sorted.cu | #include <unittest/unittest.h>
#include <thrust/sort.h>
#include <thrust/execution_policy.h>
template<typename Iterator, typename Iterator2>
__global__
void is_sorted_kernel(Iterator first, Iterator last, Iterator2 result)
{
*result = thrust::is_sorted(thrust::seq, first, last);
}
template<typename T>
void TestIs... | apache-2.0 | Cuda | |
66f61650cd3154bab328033afee97f8650e6ed44 | Add complex transform tests. | mohamed-ali/thrust,thrust/thrust,egaburov/thrust,andrewcorrigan/thrust-multi-permutation-iterator,Ricardo666666/thrust,marksantos/thrust,Ricardo666666/thrust,jaredhoberock/thrust,dachziegel/thrust,GrimDerp/thrust,andrewcorrigan/thrust-multi-permutation-iterator,zeryx/thrust,dachziegel/thrust,jaredhoberock/thrust,raygit... | testing/complex_transform.cu | testing/complex_transform.cu | #include <unittest/unittest.h>
#include <thrust/host_vector.h>
#include <thrust/complex.h>
#include <thrust/transform.h>
struct basic_arithmetic_functor
{
template<typename T>
__host__ __device__
thrust::complex<T> operator()(const thrust::complex<T> &x,
const thrust::complex<T> &y)
{
// exercise unary... | apache-2.0 | Cuda | |
063d174f704a6f6ef1ddd9adc7889e2364d60f52 | Create tiling_coalesced.cu | alchemz/CUDA_Concurrent_Programming_Research,alchemz/CUDA_Concurrent_Programming_Research | tiling/tiling_coalesced.cu | tiling/tiling_coalesced.cu | #include <stdio.h>
#include "gputimer.h"
#include "utils.h"
const int N= 1024; // matrix size will be NxN
const int K= 1; // TODO, set K to the correct value and tile size will be KxK
// to be launched with one thread per element, in (tilesize)x(tilesize) threadblocks
// thread blocks read & write tiles, in coalesc... | mit | Cuda | |
12f26b6a981159f2cb01813c7a49aa67b64f20a6 | Add test_future_cast.cu | egaburov/agency,egaburov/agency | testing/cuda/test_future_cast.cu | testing/cuda/test_future_cast.cu | #include <agency/cuda/future.hpp>
#include <agency/future.hpp>
#include <iostream>
#include <cassert>
struct empty {};
int main()
{
{
// construction of future<void> from empty types
using future_type1 = agency::cuda::future<empty>;
future_type1 f1 = agency::cuda::make_ready_future(empty());
using... | bsd-3-clause | Cuda | |
22184a69ec1858956199a3a84d9830129ba3dd14 | add advance kernel file | anshumang/gunrock-swched-swmm,anshumang/gunrock-swched-swmm,anshumang/gunrock-swched-swmm,vvishal/gunrock,anshumang/gunrockINST,ydwu/gunrock,vvishal/gunrock,anshumang/gunrockINST,Damien-/gunrock,vvishal/gunrock,anshumang/gunrock-swched-swmm,Damien-/gunrock,Damien-/gunrock,anshumang/gunrockINST,anshumang/gunrock-swched-... | gunrock/oprtr/advance/kernel_policy.cuh | gunrock/oprtr/advance/kernel_policy.cuh | // ----------------------------------------------------------------
// Gunrock -- Fast and Efficient GPU Graph Library
// ----------------------------------------------------------------
// This source code is distributed under the terms of LICENSE.TXT
// in the root directory of this source distribution.
// ----------... | apache-2.0 | Cuda | |
43c7b6f21c172b9707e73b0595ab26572ea1309b | Add unit tests for select_system, with one KNOWN_FAILURE | thrust/thrust,xiongzhanblake/thrust,thvasilo/thrust,Ricardo666666/thrust,Ricardo666666/thrust,thrust/thrust,thvasilo/thrust,xiongzhanblake/thrust_src,jaredhoberock/thrust,raygit/thrust,sdalton1/thrust,thrust/thrust,GrimDerp/thrust,marksantos/thrust,xiongzhanblake/thrust_src,Ricardo666666/thrust,sdalton1/thrust,andrewco... | testing/memory.cu | testing/memory.cu | #include <unittest/unittest.h>
#include <thrust/memory.h>
struct my_tag : thrust::device_system_tag {};
template<typename T1, typename T2>
bool is_same(const T1 &, const T2 &)
{
return false;
}
template<typename T>
bool is_same(const T &, const T &)
{
return true;
}
void TestSelectSystemDifferentTypes()
{
// ... | apache-2.0 | Cuda | |
63e511a30ec123019dc7a517c3e378fee2493eba | Test fill & fill_n with thrust::seq from __device__ code. | sarvex/thrust,xiongzhanblake/thrust,xiongzhanblake/thrust_src,Ricardo666666/thrust,xiongzhanblake/thrust,thrust/thrust,zeryx/thrust,egaburov/thrust,andrewcorrigan/thrust-multi-permutation-iterator,raygit/thrust,GrimDerp/thrust,raygit/thrust,sarvex/thrust,zhenglaizhang/thrust,jaredhoberock/thrust,marksantos/thrust,zheng... | testing/backend/cuda/fill.cu | testing/backend/cuda/fill.cu | #include <unittest/unittest.h>
#include <thrust/fill.h>
#include <thrust/execution_policy.h>
template<typename Iterator, typename T>
__global__
void fill_kernel(Iterator first, Iterator last, T value)
{
thrust::fill(thrust::seq, first, last, value);
}
template<typename T>
void TestFillDeviceSeq(size_t n)
{
thru... | apache-2.0 | Cuda | |
40bb9f23cdfe0d54c64e8580a12e0547eaa48659 | Test any_of, all_of, and none_of with thrust::seq in __device__ code. | sarvex/thrust,zhenglaizhang/thrust,egaburov/thrust,mohamed-ali/thrust,raygit/thrust,egaburov/thrust,andrewcorrigan/thrust-multi-permutation-iterator,Ricardo666666/thrust,Ricardo666666/thrust,jaredhoberock/thrust,Ricardo666666/thrust,xiongzhanblake/thrust_src,raygit/thrust,marksantos/thrust,zeryx/thrust,jaredhoberock/th... | testing/backend/cuda/logical.cu | testing/backend/cuda/logical.cu | #include <unittest/unittest.h>
#include <thrust/logical.h>
#include <thrust/functional.h>
#include <thrust/execution_policy.h>
template<typename Iterator, typename Function, typename Iterator2>
__global__
void all_of_kernel(Iterator first, Iterator last, Function f, Iterator2 result)
{
*result = thrust::all_of(thru... | apache-2.0 | Cuda | |
bb8cdf666308b2d431076f0485d7f3f4e4e23838 | Test inner_product with thrust::seq in __device__ code. | zhenglaizhang/thrust,jaredhoberock/thrust,dachziegel/thrust,jaredhoberock/thrust,sdalton1/thrust,xiongzhanblake/thrust_src,raygit/thrust,egaburov/thrust,andrewcorrigan/thrust-multi-permutation-iterator,jaredhoberock/thrust,sdalton1/thrust,sarvex/thrust,Ricardo666666/thrust,thrust/thrust,thrust/thrust,thrust/thrust,Grim... | testing/backend/cuda/inner_product.cu | testing/backend/cuda/inner_product.cu | #include <unittest/unittest.h>
#include <thrust/inner_product.h>
#include <thrust/execution_policy.h>
template<typename Iterator1, typename Iterator2, typename T, typename Iterator3>
__global__
void inner_product_kernel(Iterator1 first1, Iterator1 last1, Iterator2 first2, T init, Iterator3 result)
{
*result = thrus... | apache-2.0 | Cuda | |
9165df3848e611b141a1505a12e15db3bb799beb | Add a test that exposes #260 | GPUOpen-ProfessionalCompute-Tools/HIP,ROCm-Developer-Tools/HIP,ROCm-Developer-Tools/HIP,GPUOpen-ProfessionalCompute-Tools/HIP,ROCm-Developer-Tools/HIP,GPUOpen-ProfessionalCompute-Tools/HIP,ROCm-Developer-Tools/HIP,GPUOpen-ProfessionalCompute-Tools/HIP,GPUOpen-ProfessionalCompute-Tools/HIP,ROCm-Developer-Tools/HIP | tests/hipify-clang/allocators.cu | tests/hipify-clang/allocators.cu | // RUN: %run_test hipify "%s" "%t" %cuda_args
#pragma once
#include <cuda_runtime.h>
/**
* Allocate GPU memory for `count` elements of type `T`.
*/
template<typename T>
static T* gpuMalloc(size_t count) {
T* ret = nullptr;
// CHECK: hipMalloc(&ret, count * sizeof(T));
cudaMalloc(&ret, count * sizeof(T... | mit | Cuda | |
bc4c074e804d2d621dcaeb3c6e86f4a683a2e3a9 | Test reverse algorithms with thrust::seq in __device__ code. | dachziegel/thrust,thrust/thrust,dachziegel/thrust,egaburov/thrust,xiongzhanblake/thrust,sdalton1/thrust,jaredhoberock/thrust,sarvex/thrust,egaburov/thrust,arnabgho/thrust,andrewcorrigan/thrust-multi-permutation-iterator,xiongzhanblake/thrust_src,andrewcorrigan/thrust-multi-permutation-iterator,arnabgho/thrust,egaburov/... | testing/backend/cuda/reverse.cu | testing/backend/cuda/reverse.cu | #include <unittest/unittest.h>
#include <thrust/reverse.h>
#include <thrust/execution_policy.h>
template<typename Iterator>
__global__
void reverse_kernel(Iterator first, Iterator last)
{
thrust::reverse(thrust::seq, first, last);
}
template<typename T>
void TestReverseDeviceSeq(const size_t n)
{
thrust::host_v... | apache-2.0 | Cuda | |
412c70319873a31d6de99c0245b934a750f881e7 | Test uninitialized_fill algorithms with thrust::seq in __device__ code. | raygit/thrust,arnabgho/thrust,jaredhoberock/thrust,dachziegel/thrust,GrimDerp/thrust,mohamed-ali/thrust,egaburov/thrust,zeryx/thrust,dachziegel/thrust,zhenglaizhang/thrust,jaredhoberock/thrust,Ricardo666666/thrust,thvasilo/thrust,egaburov/thrust,thvasilo/thrust,andrewcorrigan/thrust-multi-permutation-iterator,Ricardo66... | testing/backend/cuda/uninitialized_fill.cu | testing/backend/cuda/uninitialized_fill.cu | #include <unittest/unittest.h>
#include <thrust/uninitialized_fill.h>
#include <thrust/execution_policy.h>
template<typename Iterator, typename T>
__global__
void uninitialized_fill_kernel(Iterator first, Iterator last, T val)
{
thrust::uninitialized_fill(thrust::seq, first, last, val);
}
void TestUninitializedFi... | apache-2.0 | Cuda | |
1bd00d9d62f80dc1f9dd26c28f80e549bc2357ed | Test scatter algorithms with thrust::seq in __device__ code. | mohamed-ali/thrust,jaredhoberock/thrust,dachziegel/thrust,andrewcorrigan/thrust-multi-permutation-iterator,raygit/thrust,marksantos/thrust,raygit/thrust,thrust/thrust,thrust/thrust,sdalton1/thrust,mohamed-ali/thrust,marksantos/thrust,arnabgho/thrust,zhenglaizhang/thrust,GrimDerp/thrust,sarvex/thrust,sdalton1/thrust,mar... | testing/backend/cuda/scatter.cu | testing/backend/cuda/scatter.cu | #include <unittest/unittest.h>
#include <thrust/scatter.h>
#include <thrust/execution_policy.h>
template<typename Iterator1, typename Iterator2, typename Iterator3>
__global__
void scatter_kernel(Iterator1 first, Iterator1 last, Iterator2 map_first, Iterator3 result)
{
thrust::scatter(thrust::seq, first, last, map_... | apache-2.0 | Cuda | |
64f3fbdeec5440ef0548df2a0f74f3f43e57a96b | Test set_difference_by_key with thrust::seq in __device__ code. | sdalton1/thrust,raygit/thrust,andrewcorrigan/thrust-multi-permutation-iterator,sarvex/thrust,marksantos/thrust,thvasilo/thrust,xiongzhanblake/thrust,egaburov/thrust,GrimDerp/thrust,thvasilo/thrust,jaredhoberock/thrust,xiongzhanblake/thrust,xiongzhanblake/thrust,dachziegel/thrust,Ricardo666666/thrust,jaredhoberock/thrus... | testing/backend/cuda/set_difference_by_key.cu | testing/backend/cuda/set_difference_by_key.cu | #include <unittest/unittest.h>
#include <thrust/set_operations.h>
#include <thrust/sort.h>
#include <thrust/execution_policy.h>
template<typename Iterator1, typename Iterator2, typename Iterator3, typename Iterator4, typename Iterator5, typename Iterator6, typename Iterator7>
__global__
void set_difference_by_key_ker... | apache-2.0 | Cuda | |
d027f61e81f94cc85f48899a1047fa959233dc33 | Add uninitialized_vector example | Ricardo666666/thrust,raygit/thrust,sdalton1/thrust,Ricardo666666/thrust,mohamed-ali/thrust,mohamed-ali/thrust,dachziegel/thrust,zeryx/thrust,xiongzhanblake/thrust_src,arnabgho/thrust,andrewcorrigan/thrust-multi-permutation-iterator,egaburov/thrust,marksantos/thrust,sarvex/thrust,sarvex/thrust,thvasilo/thrust,jaredhober... | examples/uninitialized_vector.cu | examples/uninitialized_vector.cu | // Occasionally, it is advantageous to avoid initializing the individual
// elements of a device_vector. For example, the default behavior of
// zero-initializing numeric data may introduce undesirable overhead.
// This example demonstrates how to avoid default construction of a
// device_vector's data by using a custo... | apache-2.0 | Cuda | |
a25571dcf53a21da4ebbf0af94d201d26861dca4 | Test merge_by_key with thrust::seq in __device__ code. | arnabgho/thrust,sdalton1/thrust,jaredhoberock/thrust,xiongzhanblake/thrust,jaredhoberock/thrust,jaredhoberock/thrust,andrewcorrigan/thrust-multi-permutation-iterator,thvasilo/thrust,zhenglaizhang/thrust,sdalton1/thrust,egaburov/thrust,sarvex/thrust,andrewcorrigan/thrust-multi-permutation-iterator,marksantos/thrust,xion... | testing/backend/cuda/merge_by_key.cu | testing/backend/cuda/merge_by_key.cu | #include <unittest/unittest.h>
#include <thrust/merge.h>
#include <thrust/functional.h>
#include <thrust/sort.h>
#include <thrust/execution_policy.h>
template<typename Iterator1,
typename Iterator2,
typename Iterator3,
typename Iterator4,
typename Iterator5,
typename Itera... | apache-2.0 | Cuda | |
c8b5d37350a09fc57307697e6428872f61c0f220 | Add test case for r206302 | apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-cl... | test/CodeGenCUDA/launch-bounds.cu | test/CodeGenCUDA/launch-bounds.cu | // RUN: %clang_cc1 %s -triple nvptx-unknown-unknown -fcuda-is-device -emit-llvm -o - | FileCheck %s
#include "../SemaCUDA/cuda.h"
#define MAX_THREADS_PER_BLOCK 256
#define MIN_BLOCKS_PER_MP 2
// Test both max threads per block and Min cta per sm.
extern "C" {
__global__ void
__launch_bounds__( MAX_THREADS_PER_BL... | apache-2.0 | Cuda | |
533db4bfabdd670023076c9452373cc66096542d | Test set_intersection_by_key with thrust::seq in __device__ code. | GrimDerp/thrust,andrewcorrigan/thrust-multi-permutation-iterator,xiongzhanblake/thrust,arnabgho/thrust,zeryx/thrust,raygit/thrust,jaredhoberock/thrust,marksantos/thrust,xiongzhanblake/thrust,egaburov/thrust,zhenglaizhang/thrust,xiongzhanblake/thrust_src,thvasilo/thrust,GrimDerp/thrust,sdalton1/thrust,Ricardo666666/thru... | testing/backend/cuda/set_intersection_by_key.cu | testing/backend/cuda/set_intersection_by_key.cu | #include <unittest/unittest.h>
#include <thrust/set_operations.h>
#include <thrust/execution_policy.h>
template<typename Iterator1, typename Iterator2, typename Iterator3, typename Iterator4, typename Iterator5, typename Iterator6>
__global__
void set_intersection_by_key_kernel(Iterator1 keys_first1, Iterator1 keys_l... | apache-2.0 | Cuda | |
32ac2680abc0d406b554f5a0a0a1f51a087e5ee1 | Create Mstep.cu | acekillersg/SpikeSorting,sunshiner2018/SpikeSorting-1,acekillersg/SpikeSorting,sunshiner2018/SpikeSorting-1 | Spikesorting/GPU_only/Mstep.cu | Spikesorting/GPU_only/Mstep.cu | apache-2.0 | Cuda | ||
fcba64fb2a906eddcd7685245d270b1dd68fc408 | add test_floatstarstar.cu | hughperkins/cuda-on-cl,hughperkins/coriander,hughperkins/cuda-on-cl,hughperkins/cuda-on-cl,hughperkins/coriander,hughperkins/coriander,hughperkins/coriander,hughperkins/cuda-on-cl | test/cocl/test_floatstarstar.cu | test/cocl/test_floatstarstar.cu | // double indirection, ie float **, in kernel parameter
// this test cuts all gpu buffers from one single gpu buffer
#include <iostream>
#include <memory>
#include <cassert>
using namespace std;
#include <cuda.h>
struct BoundedArray {
float *bounded_array[8];
};
__global__ void run_bounded_array(struct Bounde... | apache-2.0 | Cuda | |
488ea4910b6590d63cc8db4ed87261a4a04741e7 | add forgotten file | joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue | hoomd/hpmc/IntegratorHPMCMonoImplicitGPU.cu | hoomd/hpmc/IntegratorHPMCMonoImplicitGPU.cu | // Copyright (c) 2009-2017 The Regents of the University of Michigan
// This file is part of the HOOMD-blue project, released under the BSD 3-Clause License.
#include "IntegratorHPMCMonoImplicitGPU.cuh"
namespace hpmc
{
namespace detail
{
/*! \file IntegratorHPMCMonoImplicitGPU.cu
\brief Definition of CUDA kern... | bsd-3-clause | Cuda | |
6aca9a61ef817dc3039ba9cfa1025b6cfe88a08c | Add Monte Carlo example. | bfurtaw/thrust,julianromera/thrust,hemmingway/thrust,h1arshad/thrust,rdmenezes/thrust,lishi0927/thrust,UIKit0/thrust,malenie/thrust,Vishwa07/thrust,allendaicool/thrust,rdmenezes/thrust,UIKit0/thrust,hemmingway/thrust,hemmingway/thrust,bfurtaw/thrust,julianromera/thrust,allendaicool/thrust,h1arshad/thrust,Vishwa07/thrus... | examples/monte_carlo.cu | examples/monte_carlo.cu | #include <thrust/random/linear_congruential_engine.h>
#include <thrust/iterator/counting_iterator.h>
#include <thrust/transform_reduce.h>
#include <iostream>
// we could vary M & N to find the perf sweet spot
struct estimate_pi
{
__host__ __device__
float operator()(unsigned int seed)
{
using namespace th... | apache-2.0 | Cuda | |
806112df473debd316cafbd774506bf9d4e1d7ac | Create xnor-popcnt-accum.cu | gpu0/cuda-code,gpu0/cuda-code | xnor/xnor-popcnt-accum.cu | xnor/xnor-popcnt-accum.cu | #include<iostream>
#include <stdio.h>
#define ITER 1024*1024*16
#define SSZ 512
#define BSZ 7*4
#include <time.h>
#include <sys/time.h>
#define USECPSEC 1000000ULL
unsigned long long dtime_usec(unsigned long long start){
timeval tv;
gettimeofday(&tv, 0);
return ((tv.tv_sec*USECPSEC)+tv.tv_usec)-start;
}
__g... | bsd-3-clause | Cuda | |
64083b5d4a589ed3ec9dc8961c864daa2d4df7c1 | Add testing/cudart.cu Add TestCudaMemcpyD2DNullPointerError Add TestCudaMallocResultAligned | UIKit0/thrust,google-code-export/thrust,bfurtaw/thrust,bfurtaw/thrust,julianromera/thrust,levendlee/thrust,bfurtaw/thrust,Vishwa07/thrust,rdmenezes/thrust,hemmingway/thrust,UIKit0/thrust,malenie/thrust,julianromera/thrust,lishi0927/thrust,h1arshad/thrust,levendlee/thrust,h1arshad/thrust,allendaicool/thrust,UIKit0/thrus... | testing/cudart.cu | testing/cudart.cu | #include <unittest/unittest.h>
#include <cuda_runtime_api.h>
#include <thrust/detail/util/align.h>
void TestCudaMemcpyD2DNullPointerError(void)
{
cudaError_t result1 = cudaMemcpy((void*)0, (void*)0, 1, cudaMemcpyDeviceToDevice);
cudaError_t result2 = cudaGetLastError();
ASSERT_EQUAL(cudaErrorInvalidValue, resul... | apache-2.0 | Cuda | |
8a1d95533f8809c38d52708cd2df93ed8f8fece7 | Test tabulate with thrust::seq in __device__ code. | dachziegel/thrust,thvasilo/thrust,Ricardo666666/thrust,sarvex/thrust,sdalton1/thrust,Ricardo666666/thrust,sarvex/thrust,raygit/thrust,sarvex/thrust,zeryx/thrust,xiongzhanblake/thrust,raygit/thrust,egaburov/thrust,egaburov/thrust,zeryx/thrust,xiongzhanblake/thrust_src,xiongzhanblake/thrust_src,GrimDerp/thrust,andrewcorr... | testing/backend/cuda/tabulate.cu | testing/backend/cuda/tabulate.cu | #include <unittest/unittest.h>
#include <thrust/tabulate.h>
#include <thrust/functional.h>
#include <thrust/execution_policy.h>
template<typename Iterator, typename Function>
__global__
void tabulate_kernel(Iterator first, Iterator last, Function f)
{
thrust::tabulate(thrust::seq, first, last, f);
}
void TestTabu... | apache-2.0 | Cuda | |
92fb5a3a94dd74c1ab6cb75bba286728693671be | Add missing unit test | ROCm-Developer-Tools/HIP,GPUOpen-ProfessionalCompute-Tools/HIP,ROCm-Developer-Tools/HIP,ROCm-Developer-Tools/HIP,GPUOpen-ProfessionalCompute-Tools/HIP,GPUOpen-ProfessionalCompute-Tools/HIP,GPUOpen-ProfessionalCompute-Tools/HIP,ROCm-Developer-Tools/HIP,ROCm-Developer-Tools/HIP,GPUOpen-ProfessionalCompute-Tools/HIP | tests/hipify-clang/unit_tests/libraries/CUB/cub_01.cu | tests/hipify-clang/unit_tests/libraries/CUB/cub_01.cu | // RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
// CHECK: #include <hip/hip_runtime.h>
#include <iostream>
// CHECK: #include <hiprand.h>
#include <curand.h>
// CHECK: #include <hipcub/hipcub.hpp>
#include <cub/cub.cuh>
#include <iostream>
// TODO:
// using namespace cub;
template <typename T>
__global__... | mit | Cuda | |
f4ff37beeca0e88efc5d30327e9ab1f42e102d5b | Add minimal_custom_backend example | GrimDerp/thrust,xiongzhanblake/thrust_src,xiongzhanblake/thrust,zeryx/thrust,Ricardo666666/thrust,marksantos/thrust,raygit/thrust,jaredhoberock/thrust,thvasilo/thrust,zhenglaizhang/thrust,GrimDerp/thrust,thrust/thrust,xiongzhanblake/thrust,sdalton1/thrust,raygit/thrust,marksantos/thrust,egaburov/thrust,mohamed-ali/thru... | examples/minimal_custom_backend.cu | examples/minimal_custom_backend.cu | #include <thrust/iterator/iterator_traits.h>
#include <thrust/device_vector.h>
#include <thrust/for_each.h>
#include <thrust/transform.h>
#include <thrust/functional.h>
#include <iostream>
// This example demonstrates how to build a minimal custom
// Thrust backend by intercepting for_each's dispatch.
// We begin by ... | apache-2.0 | Cuda | |
0174fcfd46479931026fbb2a7713c11a7ded1d1e | Test for devicePtrAt with cub | mcmaniac/cuda-arrays,mcmaniac/cuda-arrays,mcmaniac/cuda-arrays | test/cub.cu | test/cub.cu | #include <cassert>
#include <cub/device/device_reduce.cuh>
#include <CuArrays>
#include <CuArrays_H/cuda_utils.h>
const double zero = 0;
namespace Red
{
// number of samples
const int N = 10;
// temp storage for reduce
void *d_tmp = NULL;
size_t s_tmp = 0;
// double valued output
doubl... | apache-2.0 | Cuda | |
8190dd487d667c2eeda924418d0b040a5619ae0a | Add unit tests for user-customized allocators | jaredhoberock/thrust,andrewcorrigan/thrust-multi-permutation-iterator,thrust/thrust,raygit/thrust,Ricardo666666/thrust,raygit/thrust,marksantos/thrust,jaredhoberock/thrust,zeryx/thrust,andrewcorrigan/thrust-multi-permutation-iterator,jaredhoberock/thrust,xiongzhanblake/thrust,arnabgho/thrust,marksantos/thrust,sdalton1/... | testing/allocator.cu | testing/allocator.cu | #include <unittest/unittest.h>
#include <thrust/device_malloc_allocator.h>
#include <thrust/system/cpp/vector.h>
#include <memory>
struct my_allocator_with_custom_construct1
: thrust::device_malloc_allocator<int>
{
__host__ __device__
my_allocator_with_custom_construct1()
{}
template<typename T>
__host__ ... | apache-2.0 | Cuda | |
479e7f0b3be1f604c77d1cff671c774c73272ee4 | Add test file. | bryancatanzaro/generics,bryancatanzaro/generics | test.cu | test.cu | #include "ldg.h"
#include <thrust/device_vector.h>
#include <iostream>
template<typename T>
struct non_pod {
T x;
T y;
T z;
__host__ __device__
non_pod() {}
__host__ __device__
non_pod(T a, T b, T c) : x(a), y(b), z(c) {}
friend std::ostream& operator<<(std::ostream& os, const non_pod... | bsd-3-clause | Cuda | |
7dbf0747da6e9daa1f9f010c2741af373362d263 | Add minimal test.cu file. | brendanlong/cuda-scons,bryancatanzaro/cuda-scons,bryancatanzaro/cuda-scons | test.cu | test.cu | //Minimal CUDA program
__global__ void foo(int* r) {
if(threadIdx.x == 0) {
r[0] = blockIdx.x;
}
}
int main() {
int* r;
cudaMalloc(&r, sizeof(int));
foo<<<128, 128>>>(r);
}
| apache-2.0 | Cuda | |
e63437066ac448fcdf98e229e00460aa1b4bc871 | add new kernel file | EasonLiao/CudaTree | cudatree/cuda_kernels/feature_selector.cu | cudatree/cuda_kernels/feature_selector.cu | #include<stdio.h>
#include<math.h>
#include<stdint.h>
#define IDX_DATA_TYPE %s
#define SAMPLE_DATA_TYPE %s
__global__ void feature_selector(IDX_DATA_TYPE *sorted_indices,
SAMPLE_DATA_TYPE *samples,
uint8_t* boolean_mask,
int n_samples,
... | bsd-3-clause | Cuda | |
dce6ccc620c1bd6ae747063833c08f9aaea4bcf8 | Test unique algorithms with thrust::seq in __device__ code. | dachziegel/thrust,Ricardo666666/thrust,thvasilo/thrust,thvasilo/thrust,jaredhoberock/thrust,sdalton1/thrust,Ricardo666666/thrust,sdalton1/thrust,thvasilo/thrust,zeryx/thrust,zhenglaizhang/thrust,xiongzhanblake/thrust_src,dachziegel/thrust,GrimDerp/thrust,GrimDerp/thrust,GrimDerp/thrust,marksantos/thrust,thrust/thrust,s... | testing/backend/cuda/unique.cu | testing/backend/cuda/unique.cu | #include <unittest/unittest.h>
#include <thrust/unique.h>
#include <thrust/execution_policy.h>
template<typename Iterator1, typename Iterator2>
__global__
void unique_kernel(Iterator1 first, Iterator1 last, Iterator2 result)
{
*result = thrust::unique(thrust::seq, first, last);
}
template<typename Iterator1, type... | apache-2.0 | Cuda | |
2faf2800a08634918c1c7abc5872a7850bb73ecd | Add square.cu to lit testsuite | ROCm-Developer-Tools/HIP,ROCm-Developer-Tools/HIP,GPUOpen-ProfessionalCompute-Tools/HIP,GPUOpen-ProfessionalCompute-Tools/HIP,ROCm-Developer-Tools/HIP,GPUOpen-ProfessionalCompute-Tools/HIP,GPUOpen-ProfessionalCompute-Tools/HIP,ROCm-Developer-Tools/HIP,GPUOpen-ProfessionalCompute-Tools/HIP,ROCm-Developer-Tools/HIP | tests/hipify-clang/square.cu | tests/hipify-clang/square.cu | // RUN: %run_test hipify "%s" "%t" %cuda_args
/*
Copyright (c) 2015-2016 Advanced Micro Devices, Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, inc... | mit | Cuda | |
3228d9a21b2dfd57aef8ab5779df1556b8d1a853 | Test select_system with cuda::tag | sarvex/thrust,mohamed-ali/thrust,GrimDerp/thrust,andrewcorrigan/thrust-multi-permutation-iterator,zhenglaizhang/thrust,xiongzhanblake/thrust,Ricardo666666/thrust,thrust/thrust,jaredhoberock/thrust,jaredhoberock/thrust,xiongzhanblake/thrust_src,xiongzhanblake/thrust_src,GrimDerp/thrust,sdalton1/thrust,sarvex/thrust,arna... | testing/backend/cuda/memory.cu | testing/backend/cuda/memory.cu | #include <unittest/unittest.h>
#include <thrust/system/cuda/memory.h>
template<typename T1, typename T2>
bool is_same(const T1 &, const T2 &)
{
return false;
}
template<typename T>
bool is_same(const T &, const T &)
{
return true;
}
void TestSelectSystemCudaToCpp()
{
using thrust::system::detail::generic::sele... | apache-2.0 | Cuda | |
06771d20ba4b4627997de830624031e8611345d4 | Add vec_add.cu test | GPUOpen-ProfessionalCompute-Tools/HIP,ROCm-Developer-Tools/HIP,ROCm-Developer-Tools/HIP,GPUOpen-ProfessionalCompute-Tools/HIP,ROCm-Developer-Tools/HIP,GPUOpen-ProfessionalCompute-Tools/HIP,GPUOpen-ProfessionalCompute-Tools/HIP,ROCm-Developer-Tools/HIP,ROCm-Developer-Tools/HIP,GPUOpen-ProfessionalCompute-Tools/HIP | tests/hipify-clang/vec_add.cu | tests/hipify-clang/vec_add.cu | // RUN: %run_test hipify "%s" "%t" %cuda_args
// Kernel definition
__global__ void vecAdd(float* A, float* B, float* C)
{
int i = threadIdx.x;
A[i] = 0;
B[i] = i;
C[i] = A[i] + B[i];
}
// CHECK: #include <hip/hip_runtime.h>
#include <stdio.h>
#define SIZE 10
#define KERNELINVOKES 5000000
int vecadd(int gpud... | mit | Cuda | |
9a535c806294ca22c3b153b16e355e442907b882 | Add a test for r266496 (raise an error if a CUDA installation isn't found) | llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/cl... | test/Driver/cuda-not-found.cu | test/Driver/cuda-not-found.cu | // REQUIRES: clang-driver
// Check that we raise an error if we're trying to compile CUDA code but can't
// find a CUDA install, unless -nocudainc was passed.
// RUN: %clang -### --sysroot=%s/no-cuda-there %s 2>&1 | FileCheck %s --check-prefix ERR
// RUN: %clang -### --cuda-path=%s/no-cuda-there %s 2>&1 | FileCheck %... | apache-2.0 | Cuda | |
ac5b5cbb1b2711c9ce2a80b5a365f764566211a6 | add file | electronic-structure/sirius,electronic-structure/sirius,toxa81/sirius,toxa81/sirius,toxa81/sirius,toxa81/sirius,electronic-structure/sirius,toxa81/sirius,electronic-structure/sirius,electronic-structure/sirius,electronic-structure/sirius,toxa81/sirius,electronic-structure/sirius | src/Kernels/augmentation_operator.cu | src/Kernels/augmentation_operator.cu |
// Copyright (c) 2013-2019 Anton Kozhevnikov, Thomas Schulthess
// 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,... | bsd-2-clause | Cuda | |
7251e7a3e78e8315acad03c1a346a2eb3eb78587 | Test multi-agent then_execute without shared parameters with nvcc | egaburov/agency,egaburov/agency | testing/cuda/test_then_execute.cu | testing/cuda/test_then_execute.cu | #include <agency/cuda/grid_executor.hpp>
#include <algorithm>
#include <iostream>
__managed__ int increment_me;
struct increment_and_return_void
{
template<class Index>
__device__
void operator()(const Index&, int& past)
{
atomicAdd(&increment_me, past);
}
};
template<class Executor>
void test()
{
... | bsd-3-clause | Cuda | |
9a9cf6fd1904da5d8ce915b12b5a81d6fc26e7aa | Add an example of building a 2D grid data structure. | xiongzhanblake/thrust_src,andrewcorrigan/thrust-multi-permutation-iterator,marksantos/thrust,thvasilo/thrust,dachziegel/thrust,raygit/thrust,xiongzhanblake/thrust,arnabgho/thrust,zhenglaizhang/thrust,thrust/thrust,arnabgho/thrust,thrust/thrust,GrimDerp/thrust,Ricardo666666/thrust,marksantos/thrust,jaredhoberock/thrust,... | examples/build_grid.cu | examples/build_grid.cu | #include <thrust/device_vector.h>
#include <thrust/host_vector.h>
#include <thrust/generate.h>
#include <thrust/sort.h>
#include <thrust/binary_search.h>
#include <thrust/iterator/counting_iterator.h>
#include <cuda.h> // for float2
#include <stdlib.h> // for rand()
#include <iostream>
// return a random float2 in ... | apache-2.0 | Cuda | |
ee11343df0c27159e881b4226047f01fe815a44f | Add an example of Monte Carlo using disjoint subsequences of random numbers from a common stream. | h1arshad/thrust,levendlee/thrust,julianromera/thrust,Vishwa07/thrust,malenie/thrust,julianromera/thrust,hemmingway/thrust,malenie/thrust,google-code-export/thrust,rdmenezes/thrust,google-code-export/thrust,rdmenezes/thrust,bfurtaw/thrust,levendlee/thrust,hemmingway/thrust,rdmenezes/thrust,allendaicool/thrust,hemmingway... | examples/monte_carlo_disjoint_sequences.cu | examples/monte_carlo_disjoint_sequences.cu | #include <thrust/random.h>
#include <thrust/iterator/counting_iterator.h>
#include <thrust/functional.h>
#include <thrust/transform_reduce.h>
#include <iostream>
// The technique demonstrated in the example monte_carlo.cu
// assigns an independently seeded random number generator to each
// of 30K threads, uses a si... | apache-2.0 | Cuda | |
d4034a2e9b9b753eeca1a07fc8cf38931fd542e1 | Add an example of building a 2D grid data structure. | UIKit0/thrust,malenie/thrust,julianromera/thrust,bfurtaw/thrust,levendlee/thrust,h1arshad/thrust,julianromera/thrust,levendlee/thrust,levendlee/thrust,google-code-export/thrust,lishi0927/thrust,bfurtaw/thrust,malenie/thrust,lishi0927/thrust,UIKit0/thrust,bfurtaw/thrust,google-code-export/thrust,malenie/thrust,rdmenezes... | examples/build_grid.cu | examples/build_grid.cu | #include <thrust/device_vector.h>
#include <thrust/host_vector.h>
#include <thrust/generate.h>
#include <thrust/sort.h>
#include <thrust/binary_search.h>
#include <thrust/iterator/counting_iterator.h>
#include <cuda.h> // for float2
#include <stdlib.h> // for rand()
#include <iostream>
// return a random float2 in ... | apache-2.0 | Cuda | |
40b05134429f18b5a8c5fa6fe525ae9c3c13fcd4 | Add test for various in/out type | fixstars-jp/libSGM,fixstars/libSGM | test/integrated.cu | test/integrated.cu | #include <gtest/gtest.h>
#include <thrust/device_vector.h>
#include <libsgm.h>
#include "internal.h"
#include "generator.hpp"
static bool is_cuda_input(sgm::EXECUTE_INOUT type) { return (type & 0x1) > 0; }
static bool is_cuda_output(sgm::EXECUTE_INOUT type) { return (type & 0x2) > 0; }
class LibSGM : public testing::... | apache-2.0 | Cuda | |
7364c220273d3efd3e6f751ff86a221f790fd210 | Add cuda stream example | arrayfire/forge,arrayfire/forge | examples/cuda/stream.cu | examples/cuda/stream.cu | /*******************************************************
* Copyright (c) 2015-2019, ArrayFire
* All rights reserved.
*
* This file is distributed under 3-clause BSD license.
* The complete license agreement can be obtained at:
* http://arrayfire.com/licenses/BSD-3-Clause
*****************************************... | bsd-3-clause | Cuda | |
56c6f5e7a1ef48adc300c26254c07b28e7de9c53 | Add test for compiling CUDA code with -S. | llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/cl... | test/Driver/cuda-output-asm.cu | test/Driver/cuda-output-asm.cu | // Tests CUDA compilation with -S.
// REQUIRES: clang-driver
// REQUIRES: x86-registered-target
// REQUIRES: nvptx-registered-target
// RUN: %clang -### -S -target x86_64-linux-gnu --cuda-gpu-arch=sm_20 %s 2>&1 \
// RUN: | FileCheck -check-prefix HOST -check-prefix SM20 %s
// RUN: %clang -### -S -target x86_64-linu... | apache-2.0 | Cuda | |
eb9f891471143c22c2cfb93bc68e47cbeed66ee4 | Create kld.cu | gpu0/cuda-code,gpu0/cuda-code | kld.cu | kld.cu | /**
* Calculate Kullback-Leibler Divergence using Thrust
*/
#include <thrust/host_vector.h>
#include <thrust/device_vector.h>
#include <thrust/generate.h>
#include <thrust/transform.h>
#include <thrust/sequence.h>
#include <thrust/copy.h>
#include <thrust/fill.h>
#include <thrust/replace.h>
#include <thrust/functional... | bsd-3-clause | Cuda | |
0f621a93b09bee1320c764018f6ab0ac25737e4b | Fix SoftReLU action when compiled with cudnn | antoan2/incubator-mxnet,crazy-cat/incubator-mxnet,zhreshold/mxnet,likelyzhao/mxnet,wangyum/mxnet,ykim362/mxnet,hotpxl/mxnet,LinkHS/incubator-mxnet,eric-haibin-lin/mxnet,piiswrong/mxnet,saurabh3949/mxnet,lxn2/mxnet,formath/mxnet,pluskid/mxnet,kkk669/mxnet,Ldpe2G/mxnet,sergeykolychev/mxnet,madjam/mxnet,crazy-cat/incubato... | src/operator/activation.cu | src/operator/activation.cu | /*!
* Copyright (c) 2015 by Contributors
* \file activation.cu
* \brief
* \author Bing Xu
*/
#include "./activation-inl.h"
#include "./mshadow_op.h"
#if MXNET_USE_CUDNN == 1
#include "./cudnn_activation-inl.h"
#endif
namespace mxnet {
namespace op {
template<>
Operator *CreateOp<gpu>(ActivationParam param, int dty... | /*!
* Copyright (c) 2015 by Contributors
* \file activation.cu
* \brief
* \author Bing Xu
*/
#include "./activation-inl.h"
#include "./mshadow_op.h"
#if MXNET_USE_CUDNN == 1
#include "./cudnn_activation-inl.h"
#endif
namespace mxnet {
namespace op {
template<>
Operator *CreateOp<gpu>(ActivationParam param, int dty... | apache-2.0 | Cuda |
e1def22d827d482631b14cd600d57248f58ea41a | add b4step2.cu | ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw | applications/clawpack/advection/2d/swirl/user_cuda/b4step2.cu | applications/clawpack/advection/2d/swirl/user_cuda/b4step2.cu | #include "../swirl_user.h"
#include <fc2d_cudaclaw.h>
#include <fclaw_base.h> /* Needed for SC_MIN, SC_MAX */
__device__ double psi(double x, double y)
{
return (pow(sin(M_PI*x), 2) * pow(sin(M_PI*y),2)) / M_PI;
}
__device__ void swirl_b4step2_test(int mbc, int mx, int my, int meqn, double q[],
... | bsd-2-clause | Cuda | |
8bb9849f10a61c6bed3202145c618291ffce4529 | Introduce custom_temporary_allocation example | allendaicool/thrust,julianromera/thrust,malenie/thrust,julianromera/thrust,rdmenezes/thrust,rdmenezes/thrust,lishi0927/thrust,lishi0927/thrust,UIKit0/thrust,hemmingway/thrust,h1arshad/thrust,malenie/thrust,allendaicool/thrust,levendlee/thrust,google-code-export/thrust,UIKit0/thrust,bfurtaw/thrust,levendlee/thrust,UIKit... | examples/custom_temporary_allocation.cu | examples/custom_temporary_allocation.cu | #include <thrust/device_vector.h>
#include <thrust/generate.h>
#include <thrust/sort.h>
#include <thrust/pair.h>
#include <cstdlib>
#include <iostream>
#include <map>
#include <cassert>
// This example demonstrates how to intercept calls to get_temporary_buffer
// and return_temporary_buffer to control how Thrust all... | apache-2.0 | Cuda | |
ab4a529b35fed1994b68e1dde03d19b24c9b1e71 | ADD implicit_t program | feltor-dev/feltor,mwiesenberger/feltor,feltor-dev/feltor,feltor-dev/feltor,mwiesenberger/feltor,mwiesenberger/feltor,feltor-dev/feltor,mwiesenberger/feltor | inc/dg/implicit_t.cu | inc/dg/implicit_t.cu | #include <iostream>
#include <iomanip>
#include <thrust/device_vector.h>
#include "implicit.h"
#include "elliptic.h"
template< class Geometry, class Matrix, class Container>
struct Diffusion
{
Diffusion( Geometry& g, double nu, unsigned order)
{
m_temp[0] = dg::evaluate( dg::zero, g);
m_temp... | mit | Cuda | |
802ede55ffa84a6b1e5bbf63e7d07090041797e7 | Add utitlity program normalize_solovev_t.cu | mwiesenberger/feltor,mwiesenberger/feltor,feltor-dev/feltor,mwiesenberger/feltor,feltor-dev/feltor,mwiesenberger/feltor,feltor-dev/feltor,feltor-dev/feltor | inc/geometries/normalize_solovev_t.cu | inc/geometries/normalize_solovev_t.cu | #include <iostream>
#include <fstream>
#include "dg/algorithm.h"
#include "dg/file/file.h"
#include "solovev.h"
#include "fluxfunctions.h"
int main( int argc, char* argv[])
{
Json::Value geom_js;
if( argc == 3)
{
std::cout << argv[0]<< " "<<argv[1]<<" -> " <<argv[2]<<std::endl;
file::file2J... | mit | Cuda |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.