username_4567
username_4567

Reputation: 4903

Query number of CPU processors available using CUDA

Is it possible to find number of processors available in system using CUDA runtime APIs? I know using cudaDeviceProp structure I can gather information about particular GPU but how to gather such information about CPU core?

Upvotes: 1

Views: 446

Answers (1)

Martin Beckett
Martin Beckett

Reputation: 96119

CUDA doesn't run on CPU cores (are you thinking of OpenCL) so it doesn't provide any info about the CPU.

Detecting what type of cpu and how many cores would be OS specific - what platform are you on? See Get number of CPUs in Linux using C

Upvotes: 2

Related Questions