question for nvidia developpers:
do you think it’s better to use #defines or const for fixed values definitions? does nvcc do anything useful with the const keyword, or is it better for the preprocessor to hand him fixed values.
– a subquestion of this is, in the code I’ve seen
const int tid = threadIdx.x;
wouldn’t threadIdx.x be computed at runtime and thus, how does the compiler use the const keyword to optimize it? or does the compiler statically replace the value for each thread since it knows the number of threads? (same for blockIdx.x)