diff options
Diffstat (limited to 'constant_cycles_kernel.cu')
| -rw-r--r-- | constant_cycles_kernel.cu | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/constant_cycles_kernel.cu b/constant_cycles_kernel.cu index b45ae8c..6748552 100644 --- a/constant_cycles_kernel.cu +++ b/constant_cycles_kernel.cu | |||
| @@ -8,8 +8,8 @@ | |||
| 8 | 8 | ||
| 9 | #include "testbench.h" | 9 | #include "testbench.h" |
| 10 | 10 | ||
| 11 | __global__ void loop_on_gpu(unsigned long iters, int *__unused) { | 11 | __global__ void loop_on_gpu(uint64_t iters, int *__unused) { |
| 12 | for (volatile int i = 0; i < iters; i++) (*__unused)++; | 12 | for (volatile uint32_t i = 0; i < iters; i++) (*__unused)++; |
| 13 | } | 13 | } |
| 14 | 14 | ||
| 15 | int main(int argc, char **argv) { | 15 | int main(int argc, char **argv) { |
| @@ -23,8 +23,8 @@ int main(int argc, char **argv) { | |||
| 23 | } | 23 | } |
| 24 | 24 | ||
| 25 | // Input is multiplied by one million, unless infinite | 25 | // Input is multiplied by one million, unless infinite |
| 26 | unsigned long num_iters = strtoul(argv[1], NULL, 10); | 26 | uint64_t num_iters = strtoull(argv[1], NULL, 10); |
| 27 | if (num_iters != (unsigned long)(-1)) | 27 | if (num_iters != (uint64_t)(-1)) |
| 28 | num_iters *= 1000 * 1000; | 28 | num_iters *= 1000 * 1000; |
| 29 | 29 | ||
| 30 | // Initialize CUDA and a context (hack) | 30 | // Initialize CUDA and a context (hack) |
