Botan 3.11.1
Crypto and TLS for C&
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
15namespace Botan {
16
17template <uint64_t A, uint8_t B>
18BOTAN_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
22template <uint64_t A, uint8_t B>
23BOTAN_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
__m512i BOTAN_FN_ISA_AVX512 raw() const
#define BOTAN_FORCE_INLINE
Definition compiler.h:87
BOTAN_FORCE_INLINE BOTAN_FN_ISA_AVX2_GFNI SIMD_8x32 gf2p8affineinv(const SIMD_8x32 &x)
BOTAN_FORCE_INLINE BOTAN_FN_ISA_AVX2_GFNI SIMD_8x32 gf2p8affine(const SIMD_8x32 &x)