diff options
| author | Anthony LaTorre <tlatorre9@gmail.com> | 2011-09-03 13:16:37 -0400 |
|---|---|---|
| committer | Anthony LaTorre <tlatorre9@gmail.com> | 2011-09-03 13:16:37 -0400 |
| commit | b651fd549daa7847ec95df6f7009d05285fa73af (patch) | |
| tree | ef1d5239c59efb889d98c96958221d4d002c3bd3 /tests/test_sample_cdf.cu | |
| parent | a0189d3ca6b55a8ea82cd46edc6673e5d4dec65c (diff) | |
| parent | 38f05bf761490def1886016524f328528b08f549 (diff) | |
| download | chroma-b651fd549daa7847ec95df6f7009d05285fa73af.tar.gz chroma-b651fd549daa7847ec95df6f7009d05285fa73af.tar.bz2 chroma-b651fd549daa7847ec95df6f7009d05285fa73af.zip | |
merge
Diffstat (limited to 'tests/test_sample_cdf.cu')
| -rw-r--r-- | tests/test_sample_cdf.cu | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_sample_cdf.cu b/tests/test_sample_cdf.cu new file mode 100644 index 0000000..1401772 --- /dev/null +++ b/tests/test_sample_cdf.cu @@ -0,0 +1,16 @@ +// -*-c++-*- +#include "random.h" + +extern "C" { + +__global__ void test_sample_cdf(int offset, int ncdf, + float *cdf_x, float *cdf_y, float *out) +{ + int id = blockDim.x * blockIdx.x + threadIdx.x; + curandState s; + curand_init(0, id, offset, &s); + + out[id] = sample_cdf(&s, ncdf, cdf_x, cdf_y); +} + +} |
