cpu_detect.h (2071B)
1 //////////////////////////////////////////////////////////////////////////////// 2 /// 3 /// A header file for detecting the Intel MMX instructions set extension. 4 /// 5 /// Please see 'mmx_win.cpp', 'mmx_cpp.cpp' and 'mmx_non_x86.cpp' for the 6 /// routine implementations for x86 Windows, x86 gnu version and non-x86 7 /// platforms, respectively. 8 /// 9 /// Author : Copyright (c) Olli Parviainen 10 /// Author e-mail : oparviai 'at' iki.fi 11 /// SoundTouch WWW: http://www.surina.net/soundtouch 12 /// 13 //////////////////////////////////////////////////////////////////////////////// 14 // 15 // License : 16 // 17 // SoundTouch audio processing library 18 // Copyright (c) Olli Parviainen 19 // 20 // This library is free software; you can redistribute it and/or 21 // modify it under the terms of the GNU Lesser General Public 22 // License as published by the Free Software Foundation; either 23 // version 2.1 of the License, or (at your option) any later version. 24 // 25 // This library is distributed in the hope that it will be useful, 26 // but WITHOUT ANY WARRANTY; without even the implied warranty of 27 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 28 // Lesser General Public License for more details. 29 // 30 // You should have received a copy of the GNU Lesser General Public 31 // License along with this library; if not, write to the Free Software 32 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 33 // 34 //////////////////////////////////////////////////////////////////////////////// 35 36 #ifndef _CPU_DETECT_H_ 37 #define _CPU_DETECT_H_ 38 39 #include "STTypes.h" 40 41 #define SUPPORT_MMX 0x0001 42 #define SUPPORT_3DNOW 0x0002 43 #define SUPPORT_ALTIVEC 0x0004 44 #define SUPPORT_SSE 0x0008 45 #define SUPPORT_SSE2 0x0010 46 47 /// Checks which instruction set extensions are supported by the CPU. 48 /// 49 /// \return A bitmask of supported extensions, see SUPPORT_... defines. 50 uint detectCPUextensions(void); 51 52 /// Disables given set of instruction extensions. See SUPPORT_... defines. 53 void disableExtensions(uint wDisableMask); 54 55 #endif // _CPU_DETECT_H_