include/SDL_cpuinfo.h
author Sam Lantinga <slouken@libsdl.org>
Mon, 08 Dec 2008 00:25:42 +0000
branchSDL-1.2
changeset 4159 a1b03ba2fcd0
parent 1426 ef9a9064bff2
child 4217 4c4113c2162c
permissions -rw-r--r--
Updated copyright date
slouken@739
     1
/*
slouken@739
     2
    SDL - Simple DirectMedia Layer
slouken@4159
     3
    Copyright (C) 1997-2009 Sam Lantinga
slouken@739
     4
slouken@739
     5
    This library is free software; you can redistribute it and/or
slouken@1312
     6
    modify it under the terms of the GNU Lesser General Public
slouken@739
     7
    License as published by the Free Software Foundation; either
slouken@1312
     8
    version 2.1 of the License, or (at your option) any later version.
slouken@739
     9
slouken@739
    10
    This library is distributed in the hope that it will be useful,
slouken@739
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@739
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@1312
    13
    Lesser General Public License for more details.
slouken@739
    14
slouken@1312
    15
    You should have received a copy of the GNU Lesser General Public
slouken@1312
    16
    License along with this library; if not, write to the Free Software
slouken@1312
    17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
slouken@739
    18
slouken@739
    19
    Sam Lantinga
slouken@739
    20
    slouken@libsdl.org
slouken@739
    21
*/
slouken@739
    22
slouken@739
    23
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
slouken@739
    24
/* CPU feature detection for SDL                                       */
slouken@739
    25
slouken@739
    26
#ifndef _SDL_cpuinfo_h
slouken@739
    27
#define _SDL_cpuinfo_h
slouken@739
    28
slouken@1402
    29
#include "SDL_stdinc.h"
slouken@1402
    30
slouken@739
    31
#include "begin_code.h"
slouken@739
    32
/* Set up for C function definitions, even when using C++ */
slouken@739
    33
#ifdef __cplusplus
slouken@739
    34
extern "C" {
slouken@739
    35
#endif
slouken@739
    36
slouken@745
    37
/* This function returns true if the CPU has the RDTSC instruction
slouken@745
    38
 */
slouken@1426
    39
extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void);
slouken@745
    40
slouken@739
    41
/* This function returns true if the CPU has MMX features
slouken@739
    42
 */
slouken@1426
    43
extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);
slouken@739
    44
slouken@785
    45
/* This function returns true if the CPU has MMX Ext. features
slouken@785
    46
 */
slouken@1426
    47
extern DECLSPEC SDL_bool SDLCALL SDL_HasMMXExt(void);
slouken@785
    48
slouken@739
    49
/* This function returns true if the CPU has 3DNow features
slouken@739
    50
 */
slouken@1426
    51
extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void);
slouken@739
    52
slouken@785
    53
/* This function returns true if the CPU has 3DNow! Ext. features
slouken@785
    54
 */
slouken@1426
    55
extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNowExt(void);
slouken@785
    56
slouken@739
    57
/* This function returns true if the CPU has SSE features
slouken@739
    58
 */
slouken@1426
    59
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void);
slouken@739
    60
slouken@785
    61
/* This function returns true if the CPU has SSE2 features
slouken@785
    62
 */
slouken@1426
    63
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void);
slouken@785
    64
slouken@778
    65
/* This function returns true if the CPU has AltiVec features
slouken@778
    66
 */
slouken@1426
    67
extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void);
slouken@778
    68
slouken@739
    69
/* Ends C function definitions when using C++ */
slouken@739
    70
#ifdef __cplusplus
slouken@739
    71
}
slouken@739
    72
#endif
slouken@739
    73
#include "close_code.h"
slouken@739
    74
slouken@739
    75
#endif /* _SDL_cpuinfo_h */