Wiki Page Content

Differences between revisions 3 and 4
Revision 3 as of 2012-10-03 05:55:46
Size: 601
Editor: msturner
Comment: Fixed return value text, which was incorrect. Also added example code.
Revision 4 as of 2013-09-15 18:23:26
Size: 614
Comment: Corrected syntax highlighting.
Deletions are marked like this. Additions are marked like this.
Line 17: Line 17:
{{{
printf( "Number of logical CPU cores: %d\n", SDL_GetCPUCount() );
{{{#!highlight cpp
printf("Number of logical CPU cores: %d\n", SDL_GetCPUCount());

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());


CategoryAPI, CategoryCPU

None: SDL_GetCPUCount (last edited 2016-11-28 21:40:11 by PhilippWiesemann)

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