xref: /haiku/src/add-ons/media/media-add-ons/video_mixer/CpuCapabilities.h (revision 1deede7388b04dbeec5af85cae7164735ea9e70d)
1 /*
2  * Copyright (C) 2009 David McPaul
3  *
4  * All rights reserved. Distributed under the terms of the MIT License.
5  */
6 
7 #ifndef __CPU_CAPABILITIES__
8 #define __CPU_CAPABILITIES__
9 
10 #define CAPABILITY_MMX 1
11 #define CAPABILITY_SSE1 2
12 #define CAPABILITY_SSE2 3
13 #define CAPABILITY_SSE3 4
14 #define CAPABILITY_SSSE3 5
15 #define CAPABILITY_SSE41 6
16 #define CAPABILITY_SSE42 7
17 
18 
19 class CPUCapabilities {
20 	public:
21 		CPUCapabilities();
22 		~CPUCapabilities();
23 
24 		bool HasMMX();
25 		bool HasSSE1();
26 		bool HasSSE2();
27 		bool HasSSE3();
28 		bool HasSSSE3();
29 		bool HasSSE41();
30 		bool HasSSE42();
31 
32 		void PrintCapabilities();
33 
34 	private:
35 		uint32		capabilities;
36 
37 #ifdef __i386__
38 		void setIntelCapabilities();
39 #endif
40 };
41 
42 #endif	//__CPU_CAPABILITIES__
43