My Project
Macros | Functions
SDL_cpuinfo.h File Reference
#include "SDL_stdinc.h"
#include <immintrin.h>
#include "begin_code.h"
#include "close_code.h"

Go to the source code of this file.

Macros

#define SDL_CACHELINE_SIZE   128
 

Functions

DECLSPEC int SDLCALL SDL_GetCPUCount (void)
 
DECLSPEC int SDLCALL SDL_GetCPUCacheLineSize (void)
 
DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC (void)
 
DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec (void)
 
DECLSPEC SDL_bool SDLCALL SDL_HasMMX (void)
 
DECLSPEC SDL_bool SDLCALL SDL_Has3DNow (void)
 
DECLSPEC SDL_bool SDLCALL SDL_HasSSE (void)
 
DECLSPEC SDL_bool SDLCALL SDL_HasSSE2 (void)
 
DECLSPEC SDL_bool SDLCALL SDL_HasSSE3 (void)
 
DECLSPEC SDL_bool SDLCALL SDL_HasSSE41 (void)
 
DECLSPEC SDL_bool SDLCALL SDL_HasSSE42 (void)
 
DECLSPEC SDL_bool SDLCALL SDL_HasAVX (void)
 
DECLSPEC SDL_bool SDLCALL SDL_HasAVX2 (void)
 
DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F (void)
 
DECLSPEC SDL_bool SDLCALL SDL_HasNEON (void)
 
DECLSPEC int SDLCALL SDL_GetSystemRAM (void)
 

Detailed Description

CPU feature detection for SDL.

Function Documentation

◆ SDL_GetCPUCacheLineSize()

DECLSPEC int SDLCALL 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.

◆ SDL_GetCPUCount()

DECLSPEC int SDLCALL SDL_GetCPUCount ( void  )

This function returns the number of CPU cores available.

◆ SDL_GetSystemRAM()

DECLSPEC int SDLCALL SDL_GetSystemRAM ( void  )

This function returns the amount of RAM configured in the system, in MB.

◆ SDL_Has3DNow()

DECLSPEC SDL_bool SDLCALL SDL_Has3DNow ( void  )

This function returns true if the CPU has 3DNow! features.

◆ SDL_HasAltiVec()

DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec ( void  )

This function returns true if the CPU has AltiVec features.

◆ SDL_HasAVX()

DECLSPEC SDL_bool SDLCALL SDL_HasAVX ( void  )

This function returns true if the CPU has AVX features.

◆ SDL_HasAVX2()

DECLSPEC SDL_bool SDLCALL SDL_HasAVX2 ( void  )

This function returns true if the CPU has AVX2 features.

◆ SDL_HasAVX512F()

DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F ( void  )

This function returns true if the CPU has AVX-512F (foundation) features.

◆ SDL_HasMMX()

DECLSPEC SDL_bool SDLCALL SDL_HasMMX ( void  )

This function returns true if the CPU has MMX features.

◆ SDL_HasNEON()

DECLSPEC SDL_bool SDLCALL SDL_HasNEON ( void  )

This function returns true if the CPU has NEON (ARM SIMD) features.

◆ SDL_HasRDTSC()

DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC ( void  )

This function returns true if the CPU has the RDTSC instruction.

◆ SDL_HasSSE()

DECLSPEC SDL_bool SDLCALL SDL_HasSSE ( void  )

This function returns true if the CPU has SSE features.

◆ SDL_HasSSE2()

DECLSPEC SDL_bool SDLCALL SDL_HasSSE2 ( void  )

This function returns true if the CPU has SSE2 features.

◆ SDL_HasSSE3()

DECLSPEC SDL_bool SDLCALL SDL_HasSSE3 ( void  )

This function returns true if the CPU has SSE3 features.

◆ SDL_HasSSE41()

DECLSPEC SDL_bool SDLCALL SDL_HasSSE41 ( void  )

This function returns true if the CPU has SSE4.1 features.

◆ SDL_HasSSE42()

DECLSPEC SDL_bool SDLCALL SDL_HasSSE42 ( void  )

This function returns true if the CPU has SSE4.2 features.