Skip to content

srvm/cuda_bind

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 

Repository files navigation

CUDA Bind

A version of bind for CUDA. Works from within both host and device code, and can handle __device__ and __host__ __device__ lambdas.

Example code:

__device__ float mul(float x, float y) { return x * y; }

__global__ my_kernel(float *) {
  using namespace cb;
  using namespace cb::placeholders;

  auto mul2 = bind(mul, _1, 2);
  auto mul24 = bind(mul, 2, 4);

  mul2(4);
  mul24();
}

About

Version of bind that works from within CUDA device code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages