zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
SDL_cpuinfo.h File Reference
#include "SDL_stdinc.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_GetCPUCacheLineSize (void)
 
DECLSPEC int SDLCALL SDL_GetCPUCount (void)
 
DECLSPEC SDL_bool SDLCALL SDL_Has3DNow (void)
 
DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec (void)
 
DECLSPEC SDL_bool SDLCALL SDL_HasMMX (void)
 
DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC (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)
 

Detailed Description

CPU feature detection for SDL.

Definition in file SDL_cpuinfo.h.

Macro Definition Documentation

#define SDL_CACHELINE_SIZE   128

Definition at line 77 of file SDL_cpuinfo.h.

Referenced by SDL_GetCPUCacheLineSize().

Function Documentation

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.

Definition at line 471 of file SDL_cpuinfo.c.

References cpuid, d, SDL_CACHELINE_SIZE, SDL_GetCPUType(), and SDL_strcmp().

DECLSPEC int SDLCALL SDL_GetCPUCount ( void  )

This function returns the number of CPU cores available.

Definition at line 334 of file SDL_cpuinfo.c.

References int, NULL, and SDL_CPUCount.

DECLSPEC SDL_bool SDLCALL SDL_Has3DNow ( void  )

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

Definition at line 557 of file SDL_cpuinfo.c.

References CPU_HAS_3DNOW, SDL_FALSE, SDL_GetCPUFeatures(), and SDL_TRUE.

Referenced by SDL_CalculateBlitA(), and SDL_ChooseBlitFunc().

DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec ( void  )

This function returns true if the CPU has AltiVec features.

Definition at line 539 of file SDL_cpuinfo.c.

References CPU_HAS_ALTIVEC, SDL_FALSE, SDL_GetCPUFeatures(), and SDL_TRUE.

Referenced by SDL_CalculateBlitN(), and SDL_ChooseBlitFunc().

DECLSPEC SDL_bool SDLCALL SDL_HasMMX ( void  )

This function returns true if the CPU has MMX features.

Definition at line 548 of file SDL_cpuinfo.c.

References CPU_HAS_MMX, SDL_FALSE, SDL_GetCPUFeatures(), and SDL_TRUE.

Referenced by SDL_BlitCopy(), SDL_CalculateBlitA(), SDL_ChooseBlitFunc(), SDL_FillRect(), and SDL_SW_SetupYUVDisplay().

DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC ( void  )

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

Definition at line 530 of file SDL_cpuinfo.c.

References CPU_HAS_RDTSC, SDL_FALSE, SDL_GetCPUFeatures(), and SDL_TRUE.

DECLSPEC SDL_bool SDLCALL SDL_HasSSE ( void  )

This function returns true if the CPU has SSE features.

Definition at line 566 of file SDL_cpuinfo.c.

References CPU_HAS_SSE, SDL_FALSE, SDL_GetCPUFeatures(), and SDL_TRUE.

Referenced by SDL_BlitCopy(), SDL_ChooseBlitFunc(), and SDL_FillRect().

DECLSPEC SDL_bool SDLCALL SDL_HasSSE2 ( void  )

This function returns true if the CPU has SSE2 features.

Definition at line 575 of file SDL_cpuinfo.c.

References CPU_HAS_SSE2, SDL_FALSE, SDL_GetCPUFeatures(), and SDL_TRUE.

Referenced by SDL_ChooseBlitFunc().

DECLSPEC SDL_bool SDLCALL SDL_HasSSE3 ( void  )

This function returns true if the CPU has SSE3 features.

Definition at line 584 of file SDL_cpuinfo.c.

References CPU_HAS_SSE3, SDL_FALSE, SDL_GetCPUFeatures(), and SDL_TRUE.

DECLSPEC SDL_bool SDLCALL SDL_HasSSE41 ( void  )

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

Definition at line 593 of file SDL_cpuinfo.c.

References CPU_HAS_SSE41, SDL_FALSE, SDL_GetCPUFeatures(), and SDL_TRUE.

DECLSPEC SDL_bool SDLCALL SDL_HasSSE42 ( void  )

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

Definition at line 602 of file SDL_cpuinfo.c.

References CPU_HAS_SSE42, SDL_FALSE, SDL_GetCPUFeatures(), and SDL_TRUE.