SDL3pp
A slim C++ wrapper for SDL3
Loading...
Searching...
No Matches
SDL3pp_cpuinfo.h
1#ifndef SDL3PP_CPUINFO_H_
2#define SDL3PP_CPUINFO_H_
3
4#include <SDL3/SDL_cpuinfo.h>
5#include "SDL3pp_stdinc.h"
6
7namespace SDL {
8
36constexpr int CACHELINE_SIZE = SDL_CACHELINE_SIZE;
37
49inline int GetNumLogicalCPUCores() { return SDL_GetNumLogicalCPUCores(); }
50
63inline int GetCPUCacheLineSize() { return SDL_GetCPUCacheLineSize(); }
64
77inline bool HasAltiVec() { return SDL_HasAltiVec(); }
78
90inline bool HasMMX() { return SDL_HasMMX(); }
91
108inline bool HasSSE() { return SDL_HasSSE(); }
109
126inline bool HasSSE2() { return SDL_HasSSE2(); }
127
144inline bool HasSSE3() { return SDL_HasSSE3(); }
145
162inline bool HasSSE41() { return SDL_HasSSE41(); }
163
180inline bool HasSSE42() { return SDL_HasSSE42(); }
181
196inline bool HasAVX() { return SDL_HasAVX(); }
197
212inline bool HasAVX2() { return SDL_HasAVX2(); }
213
228inline bool HasAVX512F() { return SDL_HasAVX512F(); }
229
245inline bool HasARMSIMD() { return SDL_HasARMSIMD(); }
246
258inline bool HasNEON() { return SDL_HasNEON(); }
259
272inline bool HasLSX() { return SDL_HasLSX(); }
273
286inline bool HasLASX() { return SDL_HasLASX(); }
287
297inline int GetSystemRAM() { return SDL_GetSystemRAM(); }
298
321inline size_t GetSIMDAlignment() { return SDL_GetSIMDAlignment(); }
322
324
325} // namespace SDL
326
327#endif /* SDL3PP_CPUINFO_H_ */
int GetNumLogicalCPUCores()
Get the number of logical CPU cores available.
Definition SDL3pp_cpuinfo.h:49
bool HasLASX()
Determine whether the CPU has LASX (LOONGARCH SIMD) features.
Definition SDL3pp_cpuinfo.h:286
bool HasAVX2()
Determine whether the CPU has AVX2 features.
Definition SDL3pp_cpuinfo.h:212
bool HasAVX()
Determine whether the CPU has AVX features.
Definition SDL3pp_cpuinfo.h:196
bool HasSSE42()
Determine whether the CPU has SSE4.2 features.
Definition SDL3pp_cpuinfo.h:180
bool HasARMSIMD()
Determine whether the CPU has ARM SIMD (ARMv6) features.
Definition SDL3pp_cpuinfo.h:245
bool HasSSE3()
Determine whether the CPU has SSE3 features.
Definition SDL3pp_cpuinfo.h:144
bool HasSSE41()
Determine whether the CPU has SSE4.1 features.
Definition SDL3pp_cpuinfo.h:162
int GetCPUCacheLineSize()
Determine the L1 cache line size of the CPU.
Definition SDL3pp_cpuinfo.h:63
bool HasMMX()
Determine whether the CPU has MMX features.
Definition SDL3pp_cpuinfo.h:90
bool HasAVX512F()
Determine whether the CPU has AVX-512F (foundation) features.
Definition SDL3pp_cpuinfo.h:228
constexpr int CACHELINE_SIZE
A guess for the cacheline size used for padding.
Definition SDL3pp_cpuinfo.h:36
size_t GetSIMDAlignment()
Report the alignment this system needs for SIMD allocations.
Definition SDL3pp_cpuinfo.h:321
bool HasSSE()
Determine whether the CPU has SSE features.
Definition SDL3pp_cpuinfo.h:108
bool HasAltiVec()
Determine whether the CPU has AltiVec features.
Definition SDL3pp_cpuinfo.h:77
int GetSystemRAM()
Get the amount of RAM configured in the system.
Definition SDL3pp_cpuinfo.h:297
bool HasLSX()
Determine whether the CPU has LSX (LOONGARCH SIMD) features.
Definition SDL3pp_cpuinfo.h:272
bool HasSSE2()
Determine whether the CPU has SSE2 features.
Definition SDL3pp_cpuinfo.h:126
bool HasNEON()
Determine whether the CPU has NEON (ARM SIMD) features.
Definition SDL3pp_cpuinfo.h:258
the main namespace where all SDL3pp public functions and types live
Definition SDL3pp_assert.h:7