All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Vectorization.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_SYSTEM_VECTORIZATION_H_
36 #define _BLAZE_SYSTEM_VECTORIZATION_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
45 
46 
47 
48 
49 //=================================================================================================
50 //
51 // SSE/AVX/MIC MODE CONFIGURATION
52 //
53 //=================================================================================================
54 
55 //*************************************************************************************************
64 #if BLAZE_USE_VECTORIZATION && ( defined(__SSE__) || ( _M_IX86_FP > 0 ) )
65 # define BLAZE_SSE_MODE 1
66 #else
67 # define BLAZE_SSE_MODE 0
68 #endif
69 //*************************************************************************************************
70 
71 
72 //*************************************************************************************************
81 #if BLAZE_USE_VECTORIZATION && ( defined(__SSE2__) || ( _M_IX86_FP > 1 ) )
82 # define BLAZE_SSE2_MODE 1
83 #else
84 # define BLAZE_SSE2_MODE 0
85 #endif
86 //*************************************************************************************************
87 
88 
89 //*************************************************************************************************
98 #if BLAZE_USE_VECTORIZATION && defined(__SSE3__)
99 # define BLAZE_SSE3_MODE 1
100 #else
101 # define BLAZE_SSE3_MODE 0
102 #endif
103 //*************************************************************************************************
104 
105 
106 //*************************************************************************************************
115 #if BLAZE_USE_VECTORIZATION && defined(__SSSE3__)
116 # define BLAZE_SSSE3_MODE 1
117 #else
118 # define BLAZE_SSSE3_MODE 0
119 #endif
120 //*************************************************************************************************
121 
122 
123 //*************************************************************************************************
132 #if BLAZE_USE_VECTORIZATION && ( defined(__SSE4_2__) || defined(__SSE4_1__) )
133 # define BLAZE_SSE4_MODE 1
134 #else
135 # define BLAZE_SSE4_MODE 0
136 #endif
137 //*************************************************************************************************
138 
139 
140 //*************************************************************************************************
149 #if BLAZE_USE_VECTORIZATION && defined(__AVX__)
150 # define BLAZE_AVX_MODE 1
151 #else
152 # define BLAZE_AVX_MODE 0
153 #endif
154 //*************************************************************************************************
155 
156 
157 //*************************************************************************************************
166 #if BLAZE_USE_VECTORIZATION && defined(__AVX2__)
167 # define BLAZE_AVX2_MODE 1
168 #else
169 # define BLAZE_AVX2_MODE 0
170 #endif
171 //*************************************************************************************************
172 
173 
174 //*************************************************************************************************
183 #if BLAZE_USE_VECTORIZATION && defined(__MIC__)
184 # define BLAZE_MIC_MODE 1
185 #else
186 # define BLAZE_MIC_MODE 0
187 #endif
188 //*************************************************************************************************
189 
190 
191 
192 
193 //=================================================================================================
194 //
195 // COMPILE TIME CONSTRAINTS
196 //
197 //=================================================================================================
198 
199 //*************************************************************************************************
201 namespace {
202 
209 
210 }
212 //*************************************************************************************************
213 
214 
215 
216 
217 //=================================================================================================
218 //
219 // SSE/AVX/MIC INCLUDE FILE CONFIGURATION
220 //
221 //=================================================================================================
222 
223 #if BLAZE_MIC_MODE || BLAZE_AVX_MODE || BLAZE_AVX2_MODE
224 # include <immintrin.h>
225 #elif BLAZE_SSE4_MODE
226 # include <smmintrin.h>
227 #elif BLAZE_SSSE3_MODE
228 # include <tmmintrin.h>
229 #elif BLAZE_SSE3_MODE
230 # include <pmmintrin.h>
231 #elif BLAZE_SSE2_MODE
232 # include <emmintrin.h>
233 #elif BLAZE_SSE_MODE
234 # include <xmmintrin.h>
235 #endif
236 
237 #endif
#define BLAZE_AVX2_MODE
Compilation switch for the AVX2 mode.This compilation switch enables/disables the AVX2 mode...
Definition: Vectorization.h:169
#define BLAZE_SSE3_MODE
Compilation switch for the SSE3 mode.This compilation switch enables/disables the SSE3 mode...
Definition: Vectorization.h:101
#define BLAZE_SSSE3_MODE
Compilation switch for the SSSE3 mode.This compilation switch enables/disables the SSSE3 mode...
Definition: Vectorization.h:118
Compile time assertion.
#define BLAZE_SSE_MODE
Compilation switch for the SSE mode.This compilation switch enables/disables the SSE mode...
Definition: Vectorization.h:67
#define BLAZE_SSE4_MODE
Compilation switch for the SSE4 mode.This compilation switch enables/disables the SSE4 mode...
Definition: Vectorization.h:135
#define BLAZE_AVX_MODE
Compilation switch for the AVX mode.This compilation switch enables/disables the AVX mode...
Definition: Vectorization.h:152
Configuration of the vectorization policy of the Blaze library.
#define BLAZE_SSE2_MODE
Compilation switch for the SSE2 mode.This compilation switch enables/disables the SSE2 mode...
Definition: Vectorization.h:84
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.In case of an invalid compile time expression, a compilation error is cr...
Definition: StaticAssert.h:143