cpp-sdl2
C++ header-only SDL2 wrapper
sdl::system Namespace Reference

Get information about the system (os, cpu, ram...) More...

Functions

bool is_tablet ()
 
bool has_AVX512F ()
 
std::string platform ()
 Get used platform as a string. More...
 
int cpu_cacheline_size ()
 Get the size of a cacheline. More...
 
int cpu_count ()
 Get the numbers of CPU in the system. More...
 
int system_ram ()
 Get the amount of ram in the system `. More...
 
bool has_3DNow ()
 Returns true if system has AMD 3DNow! support. More...
 
bool has_AVX ()
 Return true if CPU has AVX instruction set support. More...
 
bool has_AVX2 ()
 Return true if CPU has AVX2 instruction set support. More...
 
bool has_AltiVec ()
 Return true if cpu has Apple/IBM/Motorola AltiVec SIMD support. More...
 
bool has_MMX ()
 Return true if cpu has Intel MMX support. More...
 
bool has_RDTSC ()
 Return true if current cpu has a TSC register. More...
 
bool has_SSE ()
 Return true if cpu supports 1st gen SSE. More...
 
bool has_SSE2 ()
 Return true if cpu supports SSE2. More...
 
bool has_SSE3 ()
 Return true if cpu supports SSE3. More...
 
bool has_SSE41 ()
 Return true if cpu supports SSE41. More...
 
bool has_SSE42 ()
 Return true if cpu supports SSE42. More...
 

Detailed Description

Get information about the system (os, cpu, ram...)

Function Documentation

◆ cpu_cacheline_size()

int sdl::system::cpu_cacheline_size ( )
inline

Get the size of a cacheline.

Returns
size of "L1" cache, in bytes

Definition at line 59 of file utils.hpp.

◆ cpu_count()

int sdl::system::cpu_count ( )
inline

Get the numbers of CPU in the system.

Definition at line 65 of file utils.hpp.

◆ has_3DNow()

bool sdl::system::has_3DNow ( )
inline

Returns true if system has AMD 3DNow! support.

Definition at line 78 of file utils.hpp.

◆ has_AltiVec()

bool sdl::system::has_AltiVec ( )
inline

Return true if cpu has Apple/IBM/Motorola AltiVec SIMD support.

Definition at line 96 of file utils.hpp.

◆ has_AVX()

bool sdl::system::has_AVX ( )
inline

Return true if CPU has AVX instruction set support.

Definition at line 84 of file utils.hpp.

◆ has_AVX2()

bool sdl::system::has_AVX2 ( )
inline

Return true if CPU has AVX2 instruction set support.

Definition at line 90 of file utils.hpp.

◆ has_AVX512F()

bool sdl::system::has_AVX512F ( )
inline

Definition at line 45 of file utils.hpp.

◆ has_MMX()

bool sdl::system::has_MMX ( )
inline

Return true if cpu has Intel MMX support.

Definition at line 102 of file utils.hpp.

◆ has_RDTSC()

bool sdl::system::has_RDTSC ( )
inline

Return true if current cpu has a TSC register.

Definition at line 108 of file utils.hpp.

◆ has_SSE()

bool sdl::system::has_SSE ( )
inline

Return true if cpu supports 1st gen SSE.

Definition at line 114 of file utils.hpp.

◆ has_SSE2()

bool sdl::system::has_SSE2 ( )
inline

Return true if cpu supports SSE2.

Definition at line 120 of file utils.hpp.

◆ has_SSE3()

bool sdl::system::has_SSE3 ( )
inline

Return true if cpu supports SSE3.

Definition at line 126 of file utils.hpp.

◆ has_SSE41()

bool sdl::system::has_SSE41 ( )
inline

Return true if cpu supports SSE41.

Definition at line 132 of file utils.hpp.

◆ has_SSE42()

bool sdl::system::has_SSE42 ( )
inline

Return true if cpu supports SSE42.

Definition at line 138 of file utils.hpp.

◆ is_tablet()

bool sdl::system::is_tablet ( )
inline

Definition at line 40 of file utils.hpp.

◆ platform()

std::string sdl::system::platform ( )
inline

Get used platform as a string.

Definition at line 52 of file utils.hpp.

◆ system_ram()

int sdl::system::system_ram ( )
inline

Get the amount of ram in the system `.

Returns
amount of RAM in MB

Definition at line 72 of file utils.hpp.