diff options
Diffstat (limited to 'examples/gpu/cuda_vector_add.zc')
| -rw-r--r-- | examples/gpu/cuda_vector_add.zc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/gpu/cuda_vector_add.zc b/examples/gpu/cuda_vector_add.zc index d1f896a..534950d 100644 --- a/examples/gpu/cuda_vector_add.zc +++ b/examples/gpu/cuda_vector_add.zc @@ -15,7 +15,7 @@ fn add_kernel(a: float*, b: float*, c: float*, n: int) { } fn main() { - const N = 1024; + def N = 1024; "=> Zen C CUDA Vector Addition"; "-> Vector size: {N} elements"; @@ -43,7 +43,7 @@ fn main() { cuda_copy_to_device(d_a, h_a, N * sizeof(float)); cuda_copy_to_device(d_b, h_b, N * sizeof(float)); - const BLOCK_SIZE = 256; + def BLOCK_SIZE = 256; let num_blocks = (N + BLOCK_SIZE - 1) / BLOCK_SIZE; "-> Launching: {num_blocks} blocks x {BLOCK_SIZE} threads"; |
