lion03 / thrust

Automatically exported from code.google.com/p/thrust
Apache License 2.0
0 stars 0 forks source link

Implement thread_index(), block_index(), etc. functions #301

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
CUDA built-in variables require compilation with nvcc.  But this requires us to 
guard their use with ugly #ifdefs.  We should do all this stuff in one place.

Original issue reported on code.google.com by jaredhoberock on 8 Feb 2011 at 12:49

GoogleCodeExporter commented 8 years ago
Current POR is to implement these in a cuda_closure

struct cuda_closure
{
   unsigned int thread_index(void) const { return threadIdx.x; }
   unsigned int block_index(void) const { return blockIdx.x; }
};

Original comment by wnbell on 21 Aug 2011 at 10:22

GoogleCodeExporter commented 8 years ago

Original comment by wnbell on 21 Aug 2011 at 10:41

GoogleCodeExporter commented 8 years ago
This issue was closed by revision 78e5dc3e2633.

Original comment by wnbell on 19 Oct 2011 at 7:37