All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SSE.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_SYSTEM_SSE_H_
23 #define _BLAZE_SYSTEM_SSE_H_
24 
25 
26 //=================================================================================================
27 //
28 // SSE MODE CONFIGURATION
29 //
30 //=================================================================================================
31 
32 //*************************************************************************************************
41 #if defined(__SSE__) || ( _M_IX86_FP > 0 )
42 # define BLAZE_SSE_MODE 1
43 #else
44 # define BLAZE_SSE_MODE 0
45 #endif
46 //*************************************************************************************************
47 
48 
49 //*************************************************************************************************
58 #if defined(__SSE2__) || ( _M_IX86_FP > 1 )
59 # define BLAZE_SSE2_MODE 1
60 #else
61 # define BLAZE_SSE2_MODE 0
62 #endif
63 //*************************************************************************************************
64 
65 
66 //*************************************************************************************************
75 #if defined(__SSE3__)
76 # define BLAZE_SSE3_MODE 1
77 #else
78 # define BLAZE_SSE3_MODE 0
79 #endif
80 //*************************************************************************************************
81 
82 
83 //*************************************************************************************************
92 #if defined(__SSSE3__)
93 # define BLAZE_SSSE3_MODE 1
94 #else
95 # define BLAZE_SSSE3_MODE 0
96 #endif
97 //*************************************************************************************************
98 
99 
100 //*************************************************************************************************
109 #if defined(__SSE4_2__) || defined(__SSE4_1__)
110 # define BLAZE_SSE4_MODE 1
111 #else
112 # define BLAZE_SSE4_MODE 0
113 #endif
114 //*************************************************************************************************
115 
116 
117 //*************************************************************************************************
126 #if defined(__AVX__)
127 # define BLAZE_AVX_MODE 1
128 #else
129 # define BLAZE_AVX_MODE 0
130 #endif
131 //*************************************************************************************************
132 
133 
134 //*************************************************************************************************
143 #if defined(__MIC__)
144 # define BLAZE_MIC_MODE 1
145 #else
146 # define BLAZE_MIC_MODE 0
147 #endif
148 //*************************************************************************************************
149 
150 
151 
152 
153 //=================================================================================================
154 //
155 // SSE INCLUDE FILE CONFIGURATION
156 //
157 //=================================================================================================
158 
159 #if BLAZE_MIC_MODE || BLAZE_AVX_MODE
160 # include <immintrin.h>
161 #elif BLAZE_SSE4_MODE
162 # include <smmintrin.h>
163 #elif BLAZE_SSSE3_MODE
164 # include <tmmintrin.h>
165 #elif BLAZE_SSE3_MODE
166 # include <pmmintrin.h>
167 #elif BLAZE_SSE2_MODE
168 # include <emmintrin.h>
169 #elif BLAZE_SSE_MODE
170 # include <xmmintrin.h>
171 #endif
172 
173 #endif