getting number of cuda devices

Dear Friends,

which of the following methods can be used to get the number of cuda devices , cuDeviceGetcount() or CudaGetDeviceCount() ?
what is the difference between these two functions?
under which case each of them is used?

pls anone answere.


Both can be used, depending on whether you are using the runtime or device API. cuda* functions are in the runtime API and cu* functions are in the device API. See the programming guide for a description of the differences between the two API’s.

Has anyone noticed a problem with applications that use both APIs? (See other post.)