Wiki Page Content

Revision 6 as of 2016-05-14 22:11:37

Clear message

SDL_GetCPUCount

Use this function to return the number of CPU cores available.

Syntax

int SDL_GetCPUCount(void)

Return Value

Returns the total number of logical CPU cores. On CPUs that include technologies such as hyperthreading, the number of logical cores may be more than the number of physical cores.

Code Example

printf("Number of logical CPU cores: %d\n", SDL_GetCPUCount());

Version

This function is available since SDL 2.0.0.


CategoryAPI, CategoryCPU

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit