Why does the following snippet not work with CUDA (both 3.2 and 4.0)?
#define NUM_BLOCKS 16
// lots of code.
dim3 dimBlock(NUM_BLOCKS, NUM_BLOCKS);
but this,
dim3 dimBlock(16, 16);
does?
I keep getting a error : expected a ")" and error : expected an expression. What am I missing?
Are you certain you didn’t write
(note the semicolon at the end)?
I get exactly the errors you described, when the erroneus semicolon is there.