include/SDL_cpuinfo.h
branchSDL-1.3
changeset 1662 782fd950bd46
parent 1426 ef9a9064bff2
child 1668 4da1ee79c9af
equal deleted inserted replaced
1661:281d3f4870e5 1662:782fd950bd46
    18 
    18 
    19     Sam Lantinga
    19     Sam Lantinga
    20     slouken@libsdl.org
    20     slouken@libsdl.org
    21 */
    21 */
    22 
    22 
    23 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    23 /**
    24 /* CPU feature detection for SDL                                       */
    24  * \file SDL_cpuinfo.h
       
    25  *
       
    26  * CPU feature detection for SDL
       
    27  */
    25 
    28 
    26 #ifndef _SDL_cpuinfo_h
    29 #ifndef _SDL_cpuinfo_h
    27 #define _SDL_cpuinfo_h
    30 #define _SDL_cpuinfo_h
    28 
    31 
    29 #include "SDL_stdinc.h"
    32 #include "SDL_stdinc.h"
    30 
    33 
    31 #include "begin_code.h"
    34 #include "begin_code.h"
    32 /* Set up for C function definitions, even when using C++ */
    35 /* Set up for C function definitions, even when using C++ */
    33 #ifdef __cplusplus
    36 #ifdef __cplusplus
       
    37 /* *INDENT-OFF* */
    34 extern "C" {
    38 extern "C" {
       
    39 /* *INDENT-ON* */
    35 #endif
    40 #endif
    36 
    41 
    37 /* This function returns true if the CPU has the RDTSC instruction
    42 /* This function returns true if the CPU has the RDTSC instruction
    38  */
    43  */
    39 extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void);
    44 extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC (void);
    40 
    45 
    41 /* This function returns true if the CPU has MMX features
    46 /* This function returns true if the CPU has MMX features
    42  */
    47  */
    43 extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);
    48 extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX (void);
    44 
    49 
    45 /* This function returns true if the CPU has MMX Ext. features
    50 /* This function returns true if the CPU has MMX Ext. features
    46  */
    51  */
    47 extern DECLSPEC SDL_bool SDLCALL SDL_HasMMXExt(void);
    52 extern DECLSPEC SDL_bool SDLCALL SDL_HasMMXExt (void);
    48 
    53 
    49 /* This function returns true if the CPU has 3DNow features
    54 /* This function returns true if the CPU has 3DNow features
    50  */
    55  */
    51 extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void);
    56 extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow (void);
    52 
    57 
    53 /* This function returns true if the CPU has 3DNow! Ext. features
    58 /* This function returns true if the CPU has 3DNow! Ext. features
    54  */
    59  */
    55 extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNowExt(void);
    60 extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNowExt (void);
    56 
    61 
    57 /* This function returns true if the CPU has SSE features
    62 /* This function returns true if the CPU has SSE features
    58  */
    63  */
    59 extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void);
    64 extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE (void);
    60 
    65 
    61 /* This function returns true if the CPU has SSE2 features
    66 /* This function returns true if the CPU has SSE2 features
    62  */
    67  */
    63 extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void);
    68 extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2 (void);
    64 
    69 
    65 /* This function returns true if the CPU has AltiVec features
    70 /* This function returns true if the CPU has AltiVec features
    66  */
    71  */
    67 extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void);
    72 extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec (void);
    68 
    73 
    69 /* Ends C function definitions when using C++ */
    74 /* Ends C function definitions when using C++ */
    70 #ifdef __cplusplus
    75 #ifdef __cplusplus
       
    76 /* *INDENT-OFF* */
    71 }
    77 }
       
    78 /* *INDENT-ON* */
    72 #endif
    79 #endif
    73 #include "close_code.h"
    80 #include "close_code.h"
    74 
    81 
    75 #endif /* _SDL_cpuinfo_h */
    82 #endif /* _SDL_cpuinfo_h */
       
    83 
       
    84 /* vi: set ts=4 sw=4 expandtab: */