All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Vectorization.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_SYSTEM_VECTORIZATION_H_
23 #define _BLAZE_SYSTEM_VECTORIZATION_H_
24 
25 //*************************************************************************************************
26 // Includes
27 //*************************************************************************************************
28 
30 
31 
32 
33 
34 //=================================================================================================
35 //
36 // SSE/AVX/MIC MODE CONFIGURATION
37 //
38 //=================================================================================================
39 
40 //*************************************************************************************************
49 #if BLAZE_USE_VECTORIZATION && ( defined(__SSE__) || ( _M_IX86_FP > 0 ) )
50 # define BLAZE_SSE_MODE 1
51 #else
52 # define BLAZE_SSE_MODE 0
53 #endif
54 //*************************************************************************************************
55 
56 
57 //*************************************************************************************************
66 #if BLAZE_USE_VECTORIZATION && ( defined(__SSE2__) || ( _M_IX86_FP > 1 ) )
67 # define BLAZE_SSE2_MODE 1
68 #else
69 # define BLAZE_SSE2_MODE 0
70 #endif
71 //*************************************************************************************************
72 
73 
74 //*************************************************************************************************
83 #if BLAZE_USE_VECTORIZATION && defined(__SSE3__)
84 # define BLAZE_SSE3_MODE 1
85 #else
86 # define BLAZE_SSE3_MODE 0
87 #endif
88 //*************************************************************************************************
89 
90 
91 //*************************************************************************************************
100 #if BLAZE_USE_VECTORIZATION && defined(__SSSE3__)
101 # define BLAZE_SSSE3_MODE 1
102 #else
103 # define BLAZE_SSSE3_MODE 0
104 #endif
105 //*************************************************************************************************
106 
107 
108 //*************************************************************************************************
117 #if BLAZE_USE_VECTORIZATION && ( defined(__SSE4_2__) || defined(__SSE4_1__) )
118 # define BLAZE_SSE4_MODE 1
119 #else
120 # define BLAZE_SSE4_MODE 0
121 #endif
122 //*************************************************************************************************
123 
124 
125 //*************************************************************************************************
134 #if BLAZE_USE_VECTORIZATION && defined(__AVX__)
135 # define BLAZE_AVX_MODE 1
136 #else
137 # define BLAZE_AVX_MODE 0
138 #endif
139 //*************************************************************************************************
140 
141 
142 //*************************************************************************************************
151 #if BLAZE_USE_VECTORIZATION && defined(__MIC__)
152 # define BLAZE_MIC_MODE 1
153 #else
154 # define BLAZE_MIC_MODE 0
155 #endif
156 //*************************************************************************************************
157 
158 
159 
160 
161 //=================================================================================================
162 //
163 // SSE/AVX/MIC INCLUDE FILE CONFIGURATION
164 //
165 //=================================================================================================
166 
167 #if BLAZE_MIC_MODE || BLAZE_AVX_MODE
168 # include <immintrin.h>
169 #elif BLAZE_SSE4_MODE
170 # include <smmintrin.h>
171 #elif BLAZE_SSSE3_MODE
172 # include <tmmintrin.h>
173 #elif BLAZE_SSE3_MODE
174 # include <pmmintrin.h>
175 #elif BLAZE_SSE2_MODE
176 # include <emmintrin.h>
177 #elif BLAZE_SSE_MODE
178 # include <xmmintrin.h>
179 #endif
180 
181 #endif