SDL
2.0
|
Go to the source code of this file.
Macros | |
#define | SDL_CACHELINE_SIZE 128 |
Functions | |
int | SDL_GetCPUCount (void) |
int | SDL_GetCPUCacheLineSize (void) |
SDL_bool | SDL_HasRDTSC (void) |
SDL_bool | SDL_HasAltiVec (void) |
SDL_bool | SDL_HasMMX (void) |
SDL_bool | SDL_Has3DNow (void) |
SDL_bool | SDL_HasSSE (void) |
SDL_bool | SDL_HasSSE2 (void) |
SDL_bool | SDL_HasSSE3 (void) |
SDL_bool | SDL_HasSSE41 (void) |
SDL_bool | SDL_HasSSE42 (void) |
SDL_bool | SDL_HasAVX (void) |
SDL_bool | SDL_HasAVX2 (void) |
SDL_bool | SDL_HasNEON (void) |
int | SDL_GetSystemRAM (void) |
CPU feature detection for SDL.
Definition in file SDL_cpuinfo.h.
#define SDL_CACHELINE_SIZE 128 |
Definition at line 92 of file SDL_cpuinfo.h.
Referenced by SDL_GetCPUCacheLineSize().
int SDL_GetCPUCacheLineSize | ( | void | ) |
This function returns the L1 cache line size of the CPU
This is useful for determining multi-threaded structure padding or SIMD prefetch sizes.
Definition at line 556 of file SDL_cpuinfo.c.
References cpuid, d, SDL_CACHELINE_SIZE, SDL_GetCPUType(), SDL_strcmp, and void.
Referenced by SDL_GetSystemRAM().
int SDL_GetCPUCount | ( | void | ) |
This function returns the number of CPU cores available.
Definition at line 406 of file SDL_cpuinfo.c.
References NULL, and SDL_CPUCount.
Referenced by SDL_GetSystemRAM().
int SDL_GetSystemRAM | ( | void | ) |
This function returns the amount of RAM configured in the system, in MB.
Definition at line 697 of file SDL_cpuinfo.c.
References main, NULL, SDL_GetCPUCacheLineSize(), SDL_GetCPUCount(), SDL_GetCPUType(), SDL_Has3DNow(), SDL_HasAltiVec(), SDL_HasAVX(), SDL_HasAVX2(), SDL_HasMMX(), SDL_HasNEON(), SDL_HasRDTSC(), SDL_HasSSE(), SDL_HasSSE2(), SDL_HasSSE3(), SDL_HasSSE41(), SDL_HasSSE42(), and SDL_SystemRAM.
This function returns true if the CPU has 3DNow! features.
Definition at line 641 of file SDL_cpuinfo.c.
References CPU_FEATURE_AVAILABLE, and CPU_HAS_3DNOW.
Referenced by SDL_GetSystemRAM().
This function returns true if the CPU has AltiVec features.
Definition at line 629 of file SDL_cpuinfo.c.
References CPU_FEATURE_AVAILABLE, and CPU_HAS_ALTIVEC.
Referenced by SDL_GetSystemRAM().
This function returns true if the CPU has AVX features.
Definition at line 677 of file SDL_cpuinfo.c.
References CPU_FEATURE_AVAILABLE, and CPU_HAS_AVX.
Referenced by SDL_GetSystemRAM().
This function returns true if the CPU has AVX2 features.
Definition at line 683 of file SDL_cpuinfo.c.
References CPU_FEATURE_AVAILABLE, and CPU_HAS_AVX2.
Referenced by SDL_GetSystemRAM().
This function returns true if the CPU has MMX features.
Definition at line 635 of file SDL_cpuinfo.c.
References CPU_FEATURE_AVAILABLE, and CPU_HAS_MMX.
Referenced by SDL_GetSystemRAM().
This function returns true if the CPU has NEON (ARM SIMD) features.
Definition at line 689 of file SDL_cpuinfo.c.
References CPU_FEATURE_AVAILABLE, and CPU_HAS_NEON.
Referenced by SDL_GetSystemRAM().
This function returns true if the CPU has the RDTSC instruction.
Definition at line 623 of file SDL_cpuinfo.c.
References CPU_FEATURE_AVAILABLE, and CPU_HAS_RDTSC.
Referenced by SDL_GetSystemRAM().
This function returns true if the CPU has SSE features.
Definition at line 647 of file SDL_cpuinfo.c.
References CPU_FEATURE_AVAILABLE, and CPU_HAS_SSE.
Referenced by SDL_GetSystemRAM().
This function returns true if the CPU has SSE2 features.
Definition at line 653 of file SDL_cpuinfo.c.
References CPU_FEATURE_AVAILABLE, and CPU_HAS_SSE2.
Referenced by SDL_GetSystemRAM().
This function returns true if the CPU has SSE3 features.
Definition at line 659 of file SDL_cpuinfo.c.
References CPU_FEATURE_AVAILABLE, and CPU_HAS_SSE3.
Referenced by SDL_GetSystemRAM().
This function returns true if the CPU has SSE4.1 features.
Definition at line 665 of file SDL_cpuinfo.c.
References CPU_FEATURE_AVAILABLE, and CPU_HAS_SSE41.
Referenced by SDL_GetSystemRAM().
This function returns true if the CPU has SSE4.2 features.
Definition at line 671 of file SDL_cpuinfo.c.
References CPU_FEATURE_AVAILABLE, and CPU_HAS_SSE42.
Referenced by SDL_GetSystemRAM().