Botan
3.11.1
Crypto and TLS for C&
src
lib
utils
simd
simd_avx512
simd_avx512_gfni.h
Go to the documentation of this file.
1
/*
2
* (C) 2024 Jack Lloyd
3
*
4
* Botan is released under the Simplified BSD License (see license.txt)
5
*/
6
7
#ifndef BOTAN_SIMD_AVX512_GFNI_H_
8
#define BOTAN_SIMD_AVX512_GFNI_H_
9
10
#include <botan/internal/simd_avx512.h>
11
12
#include <botan/internal/gfni_utils.h>
13
#include <botan/internal/isa_extn.h>
14
15
namespace
Botan
{
16
17
template
<u
int
64_t A, u
int
8_t B>
18
BOTAN_FORCE_INLINE
BOTAN_FN_ISA_AVX512_GFNI
SIMD_16x32
gf2p8affine
(
const
SIMD_16x32
& x) {
19
return
SIMD_16x32
(_mm512_gf2p8affine_epi64_epi8(x.
raw
(), _mm512_set1_epi64(A), B));
20
}
21
22
template
<u
int
64_t A, u
int
8_t B>
23
BOTAN_FORCE_INLINE
BOTAN_FN_ISA_AVX512_GFNI
SIMD_16x32
gf2p8affineinv
(
const
SIMD_16x32
& x) {
24
return
SIMD_16x32
(_mm512_gf2p8affineinv_epi64_epi8(x.
raw
(), _mm512_set1_epi64(A), B));
25
}
26
27
}
// namespace Botan
28
29
#endif
Botan::SIMD_16x32
Definition
simd_avx512.h:19
Botan::SIMD_16x32::raw
__m512i BOTAN_FN_ISA_AVX512 raw() const
Definition
simd_avx512.h:311
BOTAN_FORCE_INLINE
#define BOTAN_FORCE_INLINE
Definition
compiler.h:87
Botan
Definition
alg_id.cpp:13
Botan::gf2p8affineinv
BOTAN_FORCE_INLINE BOTAN_FN_ISA_AVX2_GFNI SIMD_8x32 gf2p8affineinv(const SIMD_8x32 &x)
Definition
simd_avx2_gfni.h:23
Botan::gf2p8affine
BOTAN_FORCE_INLINE BOTAN_FN_ISA_AVX2_GFNI SIMD_8x32 gf2p8affine(const SIMD_8x32 &x)
Definition
simd_avx2_gfni.h:18
Generated by
1.15.0