I’m trying to work through the CUDA by Example book, but have run into a bit of a problem. In the first program I tried to compile - their enum_gpu.cu from chapter 3, they use a variable “cudaDeviceProp prop”, and the compiler sees it as an undefined type. There’s a struct of that name in /usr/local/cuda/include/device_types.h, and the code compiles & runs if I change the var to “struct cudaDeviceProp prop”. There’s no typedef for it in any of the CUDA include files.
Is this their error, or have I messed up something in my installation?
So it would seem that it’s the “CUDA By Example” authors’ mistake, and that my code needs to refer to “struct cudaDeviceProp” (and same for other structs, etc) rather than as a defined type?
So it would seem that it’s the “CUDA By Example” authors’ mistake, and that my code needs to refer to “struct cudaDeviceProp” (and same for other structs, etc) rather than as a defined type?