getDeviceProperties not found

This is very strange.

I have 2 versions of some code, one slightly older than the other. On the newest code, I have it so that the number of threads per block is initialized by some deviceProp.maxThreadsPerBlock variable. Everything works fine.

Turns out, my older code performs better than my newer code, so I’m making some changes on it to make it more usable to any GPU card, not just my own. I added in these 2 lines:

[codebox]cudaDeviceProp deviceProp;

getDeviceProperties(deviceProp);[/codebox]

…and I get the error: “error: identifier “getDeviceProperties” is undefined”

Anybody know why?

How about trying cudaGetDeviceProperties?

It works. Thanks, avidday. Any idea why getDeviceProperties() isn’t recognized in this code but is recognized in a different program of mine? They started out as identical copies of code, but then I updated/modified the other one to use getDeviceProperties() and it still works fine.

AFAIK there is no function called getDeviceProperties in either API. Your choices are either cudaGetDeviceProperties from the runtime API, or cuGetDeviceProperties from the driver API. I have no idea where getDeviceProperties might be coming from…