Debian Codegraph @

sources/ippcp/gfpec/ecnist/ifma_alias_avx512.h

raw symbols SCIP
1 /*************************************************************************
2 * Copyright (C) 2021 Intel Corporation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *************************************************************************/
16
17 #ifndef IFMA_MATH_AVX512_H
18 #define IFMA_MATH_AVX512_H
19
20 #include "owndefs.h"
21
22 #if (_IPP32E >= _IPP32E_K1)
23
24 #include <immintrin.h>
25
26 typedef __m512i m512;
27 typedef __mmask8 mask8;
28 typedef __mmask64 mask64;
29
30 /* set */
31 #define setzero_i64 _mm512_setzero_si512
32 #define set1_i64 _mm512_set1_epi64
33
34 #if 0
35 /* Note: intrinsics below not available in GCC 8.4 */
36 #define set_i8 _mm512_set_epi8
37 #define set_i16 _mm512_set_epi16
38 #endif
39
40 #define set_i64 _mm512_set_epi64
41
42 /* load/store */
43 #define loadu_i64 _mm512_loadu_si512
44 #define maskz_loadu_i64 _mm512_maskz_loadu_epi64
45 #define storeu_i64 _mm512_storeu_si512
46 #define mask_storeu_i64 _mm512_mask_storeu_epi64
47
48 /* logical shift */
49 #define srli_i64 _mm512_srli_epi64
50 #define srlv_i64 _mm512_srlv_epi64
51 #define slli_i64 _mm512_slli_epi64
52 #define sllv_i64 _mm512_sllv_epi64
53
54 /* arithmetic shift */
55 #define srai_i64 _mm512_srai_epi64
56 #define maskz_srai_i64 _mm512_maskz_srai_epi64
57 #define maskz_srli_i64 _mm512_maskz_srli_epi64
58
59 /* logical */
60 #define and_i64 _mm512_and_epi64
61 #define or_i64 _mm512_or_si512
62
63 /* add */
64 #define add_i64 _mm512_add_epi64
65 #define mask_add_i64 _mm512_mask_add_epi64
66
67 /* sub */
68 #define sub_i64 _mm512_sub_epi64
69 #define mask_sub_i64 _mm512_mask_sub_epi64
70
71 /* cmp */
72 #define cmp_i64_mask _mm512_cmp_epi64_mask
73 #define cmp_u64_mask _mm512_cmp_epu64_mask
74
75 /* perm */
76 #define maskz_permutexvar_i8 _mm512_maskz_permutexvar_epi8
77 #define permutexvar_i8 _mm512_permutexvar_epi8
78 #define permutexvar_i16 _mm512_permutexvar_epi16
79
80 /* move */
81 #define mask_mov_i64 _mm512_mask_mov_epi64
82
83 /* ifma */
84 #define madd52lo_i64 _mm512_madd52lo_epu64
85 #define madd52hi_i64 _mm512_madd52hi_epu64
86
87 #define alignr_i64 _mm512_alignr_epi64
88
89 #endif // if (_IPP32E >= _IPP32E_K1)
90
91 #endif