Module cpuinfo
Available on crate feature
dep_sdl3
only.Expand description
CPU feature detection for SDL.
These functions are largely concerned with reporting if the system has access to various SIMD instruction sets, but also has other important info to share, such as system RAM size and number of logical CPU cores.
CPU instruction set checks, like SDL_HasSSE()
and SDL_HasNEON()
, are
available on all platforms, even if they don’t make sense (an ARM processor
will never have SSE and an x86 processor will never have NEON, for example,
but these functions still exist and will simply return false in these
cases).
Constants§
- SDL_
CACHELINE_ SIZE - A guess for the cacheline size used for padding.
Functions§
- SDL_
GetCPU ⚠Cache Line Size - Determine the L1 cache line size of the CPU.
- SDL_
GetNum ⚠LogicalCPU Cores - Get the number of logical CPU cores available.
- SDL_
GetSIMD ⚠Alignment - Report the alignment this system needs for SIMD allocations.
- SDL_
GetSystemRAM ⚠ - Get the amount of RAM configured in the system.
- SDL_
HasARMSIMD ⚠ - Determine whether the CPU has ARM SIMD (ARMv6) features.
- SDL_
HasAVX ⚠ - Determine whether the CPU has AVX features.
- SDL_
HasAV ⚠X2 - Determine whether the CPU has AVX2 features.
- SDL_
HasAV ⚠X512F - Determine whether the CPU has AVX-512F (foundation) features.
- SDL_
HasAlti ⚠Vec - Determine whether the CPU has AltiVec features.
- SDL_
HasLASX ⚠ - Determine whether the CPU has LASX (LOONGARCH SIMD) features.
- SDL_
HasLSX ⚠ - Determine whether the CPU has LSX (LOONGARCH SIMD) features.
- SDL_
HasMMX ⚠ - Determine whether the CPU has MMX features.
- SDL_
HasNEON ⚠ - Determine whether the CPU has NEON (ARM SIMD) features.
- SDL_
HasSSE ⚠ - Determine whether the CPU has SSE features.
- SDL_
HasSS ⚠E2 - Determine whether the CPU has SSE2 features.
- SDL_
HasSS ⚠E3 - Determine whether the CPU has SSE3 features.
- SDL_
HasSS ⚠E41 - Determine whether the CPU has SSE4.1 features.
- SDL_
HasSS ⚠E42 - Determine whether the CPU has SSE4.2 features.