@@ -50,6 +50,9 @@ AC_DEFUN([MCA_ompi_op_avx_CONFIG],[
50
50
AC_LINK_IFELSE(
51
51
[AC_LANG_PROGRAM([[# include <immintrin.h>]],
52
52
[[
53
+ # if defined(__ICC) && !defined(__AVX512F__)
54
+ # error "icc needs the -m flags to provide the AVX* detection macros
55
+ # endif
53
56
__m512 vA, vB;
54
57
_mm512_add_ps(vA, vB)
55
58
]])],
@@ -64,6 +67,9 @@ AC_DEFUN([MCA_ompi_op_avx_CONFIG],[
64
67
AC_LINK_IFELSE(
65
68
[AC_LANG_PROGRAM([[# include <immintrin.h>]],
66
69
[[
70
+ # if defined(__ICC) && !defined(__AVX512F__)
71
+ # error "icc needs the -m flags to provide the AVX* detection macros
72
+ # endif
67
73
__m512 vA, vB;
68
74
_mm512_add_ps(vA, vB)
69
75
]])],
@@ -84,6 +90,9 @@ AC_DEFUN([MCA_ompi_op_avx_CONFIG],[
84
90
AC_LINK_IFELSE(
85
91
[AC_LANG_PROGRAM([[# include <immintrin.h>]],
86
92
[[
93
+ # if defined(__ICC) && !defined(__AVX512F__)
94
+ # error "icc needs the -m flags to provide the AVX* detection macros
95
+ # endif
87
96
int A[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
88
97
__m512i vA = _mm512_loadu_si512(( __m512 i* )& (A[1 ]))
89
98
]])],
@@ -103,6 +112,9 @@ AC_DEFUN([MCA_ompi_op_avx_CONFIG],[
103
112
AC_LINK_IFELSE(
104
113
[AC_LANG_PROGRAM([[# include <immintrin.h>]],
105
114
[[
115
+ # if defined(__ICC) && !defined(__AVX512F__)
116
+ # error "icc needs the -m flags to provide the AVX* detection macros
117
+ # endif
106
118
__m512i vA, vB;
107
119
_mm512_mullo_epi64(vA, vB)
108
120
]])],
@@ -121,6 +133,9 @@ AC_DEFUN([MCA_ompi_op_avx_CONFIG],[
121
133
AC_LINK_IFELSE(
122
134
[AC_LANG_PROGRAM([[# include <immintrin.h>]],
123
135
[[
136
+ # if defined(__ICC) && !defined(__AVX2__)
137
+ # error "icc needs the -m flags to provide the AVX* detection macros
138
+ # endif
124
139
__m256i vA, vB, vC;
125
140
vC = _mm256_and_si256(vA, vB)
126
141
]])],
@@ -134,6 +149,9 @@ AC_DEFUN([MCA_ompi_op_avx_CONFIG],[
134
149
AC_LINK_IFELSE(
135
150
[AC_LANG_PROGRAM([[# include <immintrin.h>]],
136
151
[[
152
+ # if defined(__ICC) && !defined(__AVX2__)
153
+ # error "icc needs the -m flags to provide the AVX* detection macros
154
+ # endif
137
155
__m256i vA, vB, vC;
138
156
vC = _mm256_and_si256(vA, vB)
139
157
]])],
@@ -154,6 +172,9 @@ AC_DEFUN([MCA_ompi_op_avx_CONFIG],[
154
172
AC_LINK_IFELSE(
155
173
[AC_LANG_PROGRAM([[# include <immintrin.h>]],
156
174
[[
175
+ # if defined(__ICC) && !defined(__AVX2__)
176
+ # error "icc needs the -m flags to provide the AVX* detection macros
177
+ # endif
157
178
int A[8] = {0, 1, 2, 3, 4, 5, 6, 7};
158
179
__m256i vA = _mm256_loadu_si256(( __m256 i* )& A)
159
180
]])],
@@ -177,6 +198,9 @@ AC_DEFUN([MCA_ompi_op_avx_CONFIG],[
177
198
AC_LINK_IFELSE(
178
199
[AC_LANG_PROGRAM([[# include <immintrin.h>]],
179
200
[[
201
+ # if defined(__ICC) && !defined(__AVX__)
202
+ # error "icc needs the -m flags to provide the AVX* detection macros
203
+ # endif
180
204
__m256 vA, vB, vC;
181
205
vC = _mm256_add_ps(vA, vB)
182
206
]])],
@@ -192,6 +216,9 @@ AC_DEFUN([MCA_ompi_op_avx_CONFIG],[
192
216
AC_LINK_IFELSE(
193
217
[AC_LANG_PROGRAM([[# include <immintrin.h>]],
194
218
[[
219
+ # if defined(__ICC) && !defined(__SSE4_1__)
220
+ # error "icc needs the -m flags to provide the AVX* detection macros
221
+ # endif
195
222
__m128i vA, vB;
196
223
(void)_mm_max_epi8(vA, vB)
197
224
]])],
@@ -208,6 +235,9 @@ AC_DEFUN([MCA_ompi_op_avx_CONFIG],[
208
235
AC_LINK_IFELSE(
209
236
[AC_LANG_PROGRAM([[# include <immintrin.h>]],
210
237
[[
238
+ # if defined(__ICC) && !defined(__SSE3__)
239
+ # error "icc needs the -m flags to provide the AVX* detection macros
240
+ # endif
211
241
int A[4] = {0, 1, 2, 3};
212
242
__m128i vA = _mm_lddqu_si128(( __m128 i* )& A)
213
243
]])],
@@ -225,6 +255,9 @@ AC_DEFUN([MCA_ompi_op_avx_CONFIG],[
225
255
[AC_LANG_PROGRAM([[#include <immintrin.h>]],
226
256
[[
227
257
__m256 vA, vB, vC;
258
+ #if defined(__ICC) && !defined(__AVX__)
259
+ #error "icc needs the -m flags to provide the AVX* detection macros
260
+ #endif
228
261
vC = _mm256 _add_ps(vA, vB)
229
262
]])],
230
263
[op_avx_support=1
@@ -239,6 +272,9 @@ AC_DEFUN([MCA_ompi_op_avx_CONFIG],[
239
272
AC_LINK_IFELSE(
240
273
[AC_LANG_PROGRAM([[#include <immintrin.h>]],
241
274
[[
275
+ #if defined(__ICC) && !defined(__SSE4 _1 __)
276
+ #error "icc needs the -m flags to provide the AVX* detection macros
277
+ #endif
242
278
__m128 i vA, vB;
243
279
(void)_mm_max_epi8 (vA, vB)
244
280
]])],
@@ -250,6 +286,9 @@ AC_DEFUN([MCA_ompi_op_avx_CONFIG],[
250
286
AC_LINK_IFELSE(
251
287
[AC_LANG_PROGRAM([[#include <immintrin.h>]],
252
288
[[
289
+ #if defined(__ICC) && !defined(__SSE3 __)
290
+ #error "icc needs the -m flags to provide the AVX* detection macros
291
+ #endif
253
292
int A[4 ] = {0 , 1 , 2 , 3 };
254
293
__m128 i vA = _mm_lddqu_si128 ((__m128 i*)&A)
255
294
]])],
0 commit comments