From 80d90562daedb0fda275aeb04809fd22060a196a Mon Sep 17 00:00:00 2001 From: Steven Date: Sun, 25 Jan 2026 23:49:06 +0000 Subject: fix(examples): cuda use def instead of const --- examples/gpu/cuda_vector_add.zc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/gpu/cuda_vector_add.zc') 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"; -- cgit v1.2.3