I am trying to do something like
cudaDeviceProp deviceProp;
cudaGetDeviceProperties(&deviceProp, device);
but when i compile using
nvcc cuda_tools.c
i get the error
cuda_tools.c:32: error: ‘cudaDeviceProp’ undeclared (first use in this function)
cuda_tools.c:32: error: (Each undeclared identifier is reported only once
cuda_tools.c:32: error: for each function it appears in.)
cuda_tools.c:32: error: expected ‘;’ before ‘deviceProp’
cuda_tools.c:33: error: ‘deviceProp’ undeclared (first use in this function)
I’ve tried including cuda.h, cuda_runtime.h, cuda_runtime_api.h and driver_types.h but this didn’t seem to work.
I’m using Cuda compilation tools, release 3.1, V0.2.1221 on Ubuntu 10.04 with gcc 4.3.4.
What am I doing wrong here?