galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
CPUInfo.cpp
Go to the documentation of this file.
1
7
8#include <SDL3/SDL_cpuinfo.h>
9
10#include "CPUInfo.hpp"
11
12namespace galaxy
13{
15 {
16 const CPUInfo info {
17 .cpu_cache_line_size = SDL_GetCPUCacheLineSize(),
18 .logical_core_count = SDL_GetNumLogicalCPUCores(),
19 .system_page_size = SDL_GetSystemPageSize(),
20 .simd_alignment = SDL_GetSIMDAlignment(),
21 .system_ram = SDL_GetSystemRAM(),
22 .has_altivec = SDL_HasAltiVec(),
23 .has_arm_simd = SDL_HasARMSIMD(),
24 .has_avx = SDL_HasAVX(),
25 .has_avx2 = SDL_HasAVX2(),
26 .has_avx512f = SDL_HasAVX512F(),
27 .has_lasx = SDL_HasLASX(),
28 .has_lsx = SDL_HasLSX(),
29 .has_mmx = SDL_HasMMX(),
30 .has_neon = SDL_HasNEON(),
31 .has_sse = SDL_HasSSE(),
32 .has_sse2 = SDL_HasSSE2(),
33 .has_sse3 = SDL_HasSSE3(),
34 .has_sse41 = SDL_HasSSE41(),
35 .has_sse42 = SDL_HasSSE42(),
36 .has_sve2 = false
37 };
38
39 return info;
40 }
41} // namespace galaxy
CPUInfo get_cpu_info() noexcept
Generates CPU info data.
Definition CPUInfo.cpp:14
Application.hpp galaxy.
Data structure containing info about the cpu, such as RAM, cache, SIMD, etc.
Definition CPUInfo.hpp:19