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 // Includes
40 //*************************************************************************************************
41 
44 
45 
46 
47 
48 //=================================================================================================
49 //
50 // SSE/AVX/MIC MODE CONFIGURATION
51 //
52 //=================================================================================================
53 
54 //*************************************************************************************************
63 #if BLAZE_USE_VECTORIZATION && ( defined(__SSE__) || ( _M_IX86_FP > 0 ) )
64 # define BLAZE_SSE_MODE 1
65 #else
66 # define BLAZE_SSE_MODE 0
67 #endif
68 //*************************************************************************************************
69 
70 
71 //*************************************************************************************************
80 #if BLAZE_USE_VECTORIZATION && ( defined(__SSE2__) || ( _M_IX86_FP > 1 ) )
81 # define BLAZE_SSE2_MODE 1
82 #else
83 # define BLAZE_SSE2_MODE 0
84 #endif
85 //*************************************************************************************************
86 
87 
88 //*************************************************************************************************
97 #if BLAZE_USE_VECTORIZATION && defined(__SSE3__)
98 # define BLAZE_SSE3_MODE 1
99 #else
100 # define BLAZE_SSE3_MODE 0
101 #endif
102 //*************************************************************************************************
103 
104 
105 //*************************************************************************************************
114 #if BLAZE_USE_VECTORIZATION && defined(__SSSE3__)
115 # define BLAZE_SSSE3_MODE 1
116 #else
117 # define BLAZE_SSSE3_MODE 0
118 #endif
119 //*************************************************************************************************
120 
121 
122 //*************************************************************************************************
131 #if BLAZE_USE_VECTORIZATION && ( defined(__SSE4_2__) || defined(__SSE4_1__) )
132 # define BLAZE_SSE4_MODE 1
133 #else
134 # define BLAZE_SSE4_MODE 0
135 #endif
136 //*************************************************************************************************
137 
138 
139 //*************************************************************************************************
148 #if BLAZE_USE_VECTORIZATION && defined(__AVX__)
149 # define BLAZE_AVX_MODE 1
150 #else
151 # define BLAZE_AVX_MODE 0
152 #endif
153 //*************************************************************************************************
154 
155 
156 //*************************************************************************************************
165 #if BLAZE_USE_VECTORIZATION && defined(__AVX2__)
166 # define BLAZE_AVX2_MODE 1
167 #else
168 # define BLAZE_AVX2_MODE 0
169 #endif
170 //*************************************************************************************************
171 
172 
173 //*************************************************************************************************
182 #if BLAZE_USE_VECTORIZATION && defined(__MIC__)
183 # define BLAZE_MIC_MODE 1
184 #else
185 # define BLAZE_MIC_MODE 0
186 #endif
187 //*************************************************************************************************
188 
189 
190 
191 
192 //=================================================================================================
193 //
194 // COMPILE TIME CONSTRAINTS
195 //
196 //=================================================================================================
197 
198 //*************************************************************************************************
200 namespace {
201 
208 
209 }
211 //*************************************************************************************************
212 
213 
214 
215 
216 //=================================================================================================
217 //
218 // SSE/AVX/MIC INCLUDE FILE CONFIGURATION
219 //
220 //=================================================================================================
221 
222 #if BLAZE_MIC_MODE || BLAZE_AVX_MODE || BLAZE_AVX2_MODE
223 # include <immintrin.h>
224 #elif BLAZE_SSE4_MODE
225 # include <smmintrin.h>
226 #elif BLAZE_SSSE3_MODE
227 # include <tmmintrin.h>
228 #elif BLAZE_SSE3_MODE
229 # include <pmmintrin.h>
230 #elif BLAZE_SSE2_MODE
231 # include <emmintrin.h>
232 #elif BLAZE_SSE_MODE
233 # include <xmmintrin.h>
234 #endif
235 
236 #endif
#define BLAZE_AVX2_MODE
Compilation switch for the AVX2 mode.This compilation switch enables/disables the AVX2 mode...
Definition: Vectorization.h:168
#define BLAZE_SSE3_MODE
Compilation switch for the SSE3 mode.This compilation switch enables/disables the SSE3 mode...
Definition: Vectorization.h:100
#define BLAZE_SSSE3_MODE
Compilation switch for the SSSE3 mode.This compilation switch enables/disables the SSSE3 mode...
Definition: Vectorization.h:117
Compile time assertion.
#define BLAZE_SSE_MODE
Compilation switch for the SSE mode.This compilation switch enables/disables the SSE mode...
Definition: Vectorization.h:66
#define BLAZE_SSE4_MODE
Compilation switch for the SSE4 mode.This compilation switch enables/disables the SSE4 mode...
Definition: Vectorization.h:134
#define BLAZE_AVX_MODE
Compilation switch for the AVX mode.This compilation switch enables/disables the AVX mode...
Definition: Vectorization.h:151
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:83
#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