2 {* This is a guess for the cacheline size used for padding.
3 * Most x86 processors have a 64 byte cache line.
4 * The 64-bit PowerPC processors have a 128 byte cache line.
5 * We'll use the larger value to be generally safe.
6 *}
7 const
8 SDL_CACHELINE_SIZE = 128;
10 {**
11 * This function returns the number of CPU cores available.
12 *}
13 function SDL_GetCPUCount(): Integer; cdecl external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetCPUCount' {$ENDIF} {$ENDIF};
15 {**
16 * This function returns the L1 cache line size of the CPU
17 *
18 * This is useful for determining multi-threaded structure padding
19 * or SIMD prefetch sizes.
20 *}
21 function SDL_GetCPUCacheLineSize(): Integer cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetCPUCacheLineSize' {$ENDIF} {$ENDIF};
23 {**
24 * This function returns true if the CPU has the RDTSC instruction.
25 *}
26 function SDL_HasRDTSC(): TSDL_Bool cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasRDTSC' {$ENDIF} {$ENDIF};
28 {**
29 * This function returns true if the CPU has AltiVec features.
30 *}
31 function SDL_HasAltiVec(): TSDL_Bool cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasAltiVec' {$ENDIF} {$ENDIF};
33 {**
34 * This function returns true if the CPU has MMX features.
35 *}
36 function SDL_HasMMX(): TSDL_Bool cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasMMX' {$ENDIF} {$ENDIF};
38 {**
39 * This function returns true if the CPU has 3DNow! features.
40 *}
41 function SDL_Has3DNow(): TSDL_Bool cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_Has3DNow' {$ENDIF} {$ENDIF};
43 {**
44 * This function returns true if the CPU has SSE features.
45 *}
46 function SDL_HasSSE(): TSDL_Bool cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasSSE' {$ENDIF} {$ENDIF};
48 {**
49 * This function returns true if the CPU has SSE2 features.
50 *}
51 function SDL_HasSSE2(): TSDL_Bool cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasSSE2' {$ENDIF} {$ENDIF};
53 {**
54 * This function returns true if the CPU has SSE3 features.
55 *}
56 function SDL_HasSSE3(): TSDL_Bool cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasSSE3' {$ENDIF} {$ENDIF};
58 {**
59 * This function returns true if the CPU has SSE4.1 features.
60 *}
61 function SDL_HasSSE41(): TSDL_Bool cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasSSE41' {$ENDIF} {$ENDIF};
63 {**
64 * This function returns true if the CPU has SSE4.2 features.
65 *}
66 function SDL_HasSSE42(): TSDL_Bool cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasSSE42' {$ENDIF} {$ENDIF};
68 {**
69 * This function returns true if the CPU has AVX features.
70 *}
71 function SDL_HasAVX(): TSDL_Bool cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasAVX' {$ENDIF} {$ENDIF};
73 {**
74 * This function returns the amount of RAM configured in the system, in MB.
75 *}
76 function SDL_GetSystemRAM(): Integer cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetSystemRAM' {$ENDIF} {$ENDIF};