Botan 3.14.1
Crypto and TLS for C&
Botan::SIMD_16x32 Class Referencefinal

#include <simd_avx512.h>

Public Member Functions

BOTAN_FN_ISA_AVX512 SIMD_16x32 andc (const SIMD_16x32 &other) const
BOTAN_FN_ISA_AVX512 SIMD_16x32 bswap () const
BOTAN_FN_ISA_AVX512 SIMD_16x32 operator& (const SIMD_16x32 &other) const
BOTAN_FN_ISA_AVX512 void operator&= (const SIMD_16x32 &other)
BOTAN_FN_ISA_AVX512 SIMD_16x32 operator+ (const SIMD_16x32 &other) const
BOTAN_FN_ISA_AVX512 void operator+= (const SIMD_16x32 &other)
BOTAN_FN_ISA_AVX512 SIMD_16x32 operator- (const SIMD_16x32 &other) const
BOTAN_FN_ISA_AVX512 void operator-= (const SIMD_16x32 &other)
SIMD_16x32 & operator= (const SIMD_16x32 &other)=default
SIMD_16x32 & operator= (SIMD_16x32 &&other)=default
BOTAN_FN_ISA_AVX512 SIMD_16x32 operator^ (const SIMD_16x32 &other) const
BOTAN_FN_ISA_AVX512 void operator^= (const SIMD_16x32 &other)
BOTAN_FN_ISA_AVX512 void operator^= (uint32_t other)
BOTAN_FN_ISA_AVX512 SIMD_16x32 operator| (const SIMD_16x32 &other) const
BOTAN_FN_ISA_AVX512 void operator|= (const SIMD_16x32 &other)
BOTAN_FN_ISA_AVX512 SIMD_16x32 operator~ () const
__m512i BOTAN_FN_ISA_AVX512 raw () const
BOTAN_FN_ISA_AVX512 SIMD_16x32 rev_words () const noexcept
template<size_t ROT>
requires (ROT > 0 && ROT < 32)
BOTAN_FN_ISA_AVX512 SIMD_16x32 rotl () const
template<size_t ROT>
BOTAN_FN_ISA_AVX512 SIMD_16x32 rotr () const
template<int SHIFT>
BOTAN_FN_ISA_AVX512 SIMD_16x32 shl () const
template<int SHIFT>
BOTAN_FN_ISA_AVX512 SIMD_16x32 shr () const
SIMD_16x32 BOTAN_FN_ISA_AVX512 sigma0 () const
SIMD_16x32 BOTAN_FN_ISA_AVX512 sigma1 () const
BOTAN_FN_ISA_AVX512 BOTAN_FORCE_INLINE SIMD_16x32 ()
BOTAN_FN_ISA_AVX512 SIMD_16x32 (__m512i x) noexcept
 SIMD_16x32 (const SIMD_16x32 &other)=default
BOTAN_FN_ISA_AVX512 SIMD_16x32 (const uint32_t B[16])
 SIMD_16x32 (SIMD_16x32 &&other)=default
BOTAN_FN_ISA_AVX512 SIMD_16x32 (uint32_t B0, uint32_t B1, uint32_t B2, uint32_t B3, uint32_t B4, uint32_t B5, uint32_t B6, uint32_t B7, uint32_t B8, uint32_t B9, uint32_t BA, uint32_t BB, uint32_t BC, uint32_t BD, uint32_t BE, uint32_t BF)
BOTAN_FN_ISA_AVX512 void store_be (uint8_t out[]) const
BOTAN_FN_ISA_AVX512 void store_le (uint8_t out[]) const
SIMD_16x32 BOTAN_FN_ISA_AVX512 unsigned_lt (const SIMD_16x32 &other) const noexcept
 ~SIMD_16x32 ()=default

Static Public Member Functions

static BOTAN_FN_ISA_AVX512 SIMD_16x32 choose (const SIMD_16x32 &mask, const SIMD_16x32 &a, const SIMD_16x32 &b)
template<size_t Stride>
static BOTAN_FN_ISA_AVX512 SIMD_16x32 load_be (const uint8_t *const *ptrs, size_t i, size_t n, size_t offset=0)
static BOTAN_FN_ISA_AVX512 SIMD_16x32 load_be (const uint8_t *in)
static BOTAN_FN_ISA_AVX512 SIMD_16x32 load_le (const uint8_t *in)
static BOTAN_FN_ISA_AVX512 SIMD_16x32 majority (const SIMD_16x32 &x, const SIMD_16x32 &y, const SIMD_16x32 &z)
static BOTAN_FN_ISA_AVX512 SIMD_16x32 splat (uint32_t B)
template<uint8_t TBL>
static BOTAN_FN_ISA_AVX512 SIMD_16x32 ternary_fn (const SIMD_16x32 &a, const SIMD_16x32 &b, const SIMD_16x32 &c)
static BOTAN_FN_ISA_AVX512 void transpose (SIMD_16x32 &B0, SIMD_16x32 &B1, SIMD_16x32 &B2, SIMD_16x32 &B3)
static BOTAN_FN_ISA_AVX512 void transpose (SIMD_16x32 &B0, SIMD_16x32 &B1, SIMD_16x32 &B2, SIMD_16x32 &B3, SIMD_16x32 &B4, SIMD_16x32 &B5, SIMD_16x32 &B6, SIMD_16x32 &B7, SIMD_16x32 &B8, SIMD_16x32 &B9, SIMD_16x32 &BA, SIMD_16x32 &BB, SIMD_16x32 &BC, SIMD_16x32 &BD, SIMD_16x32 &BE, SIMD_16x32 &BF)
static BOTAN_FN_ISA_AVX512 void zero_registers ()

Detailed Description

Definition at line 19 of file simd_avx512.h.

Constructor & Destructor Documentation

◆ SIMD_16x32() [1/6]

◆ SIMD_16x32() [2/6]

Botan::SIMD_16x32::SIMD_16x32 ( SIMD_16x32 && other)
default

References SIMD_16x32().

◆ ~SIMD_16x32()

Botan::SIMD_16x32::~SIMD_16x32 ( )
default

◆ SIMD_16x32() [3/6]

BOTAN_FN_ISA_AVX512 BOTAN_FORCE_INLINE Botan::SIMD_16x32::SIMD_16x32 ( )
inline

Definition at line 30 of file simd_avx512.h.

30: m_avx512(_mm512_setzero_si512()) {}

References BOTAN_FORCE_INLINE.

Referenced by andc(), bswap(), load_le(), operator~(), rev_words(), rotl(), shl(), shr(), splat(), ternary_fn(), and unsigned_lt().

◆ SIMD_16x32() [4/6]

BOTAN_FN_ISA_AVX512 Botan::SIMD_16x32::SIMD_16x32 ( const uint32_t B[16])
inlineexplicit

Definition at line 33 of file simd_avx512.h.

33 {
34 // NOLINTNEXTLINE(*-prefer-member-initializer)
35 m_avx512 = _mm512_loadu_si512(reinterpret_cast<const __m512i*>(B));
36 }

◆ SIMD_16x32() [5/6]

BOTAN_FN_ISA_AVX512 Botan::SIMD_16x32::SIMD_16x32 ( uint32_t B0,
uint32_t B1,
uint32_t B2,
uint32_t B3,
uint32_t B4,
uint32_t B5,
uint32_t B6,
uint32_t B7,
uint32_t B8,
uint32_t B9,
uint32_t BA,
uint32_t BB,
uint32_t BC,
uint32_t BD,
uint32_t BE,
uint32_t BF )
inlineexplicit

Definition at line 39 of file simd_avx512.h.

54 {
55 // NOLINTNEXTLINE(*-prefer-member-initializer)
56 m_avx512 = _mm512_set_epi32(BF, BE, BD, BC, BB, BA, B9, B8, B7, B6, B5, B4, B3, B2, B1, B0);
57 }

◆ SIMD_16x32() [6/6]

BOTAN_FN_ISA_AVX512 Botan::SIMD_16x32::SIMD_16x32 ( __m512i x)
inlineexplicitnoexcept

Definition at line 332 of file simd_avx512.h.

332: m_avx512(x) {}

Member Function Documentation

◆ andc()

BOTAN_FN_ISA_AVX512 SIMD_16x32 Botan::SIMD_16x32::andc ( const SIMD_16x32 & other) const
inline

Definition at line 179 of file simd_avx512.h.

179 {
180 return SIMD_16x32(_mm512_andnot_si512(m_avx512, other.m_avx512));
181 }
BOTAN_FN_ISA_AVX512 BOTAN_FORCE_INLINE SIMD_16x32()
Definition simd_avx512.h:30

References SIMD_16x32(), and SIMD_16x32().

◆ bswap()

BOTAN_FN_ISA_AVX512 SIMD_16x32 Botan::SIMD_16x32::bswap ( ) const
inline

Definition at line 189 of file simd_avx512.h.

189 {
190 const uint8_t BSWAP_MASK[64] = {
191 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12, 19, 18, 17, 16, 23, 22,
192 21, 20, 27, 26, 25, 24, 31, 30, 29, 28, 35, 34, 33, 32, 39, 38, 37, 36, 43, 42, 41, 40,
193 47, 46, 45, 44, 51, 50, 49, 48, 55, 54, 53, 52, 59, 58, 57, 56, 63, 62, 61, 60,
194 };
195
196 const __m512i bswap = _mm512_loadu_si512(reinterpret_cast<const __m512i*>(BSWAP_MASK));
197
198 const __m512i output = _mm512_shuffle_epi8(m_avx512, bswap);
199
200 return SIMD_16x32(output);
201 }
BOTAN_FN_ISA_AVX512 SIMD_16x32 bswap() const

References bswap(), SIMD_16x32(), and SIMD_16x32().

Referenced by bswap(), load_be(), Botan::sha2_32_mb_extract_x16(), and store_be().

◆ choose()

BOTAN_FN_ISA_AVX512 SIMD_16x32 Botan::SIMD_16x32::choose ( const SIMD_16x32 & mask,
const SIMD_16x32 & a,
const SIMD_16x32 & b )
inlinestatic

Definition at line 315 of file simd_avx512.h.

315 {
316 return SIMD_16x32::ternary_fn<0xca>(mask, a, b);
317 }
static BOTAN_FN_ISA_AVX512 SIMD_16x32 ternary_fn(const SIMD_16x32 &a, const SIMD_16x32 &b, const SIMD_16x32 &c)

References SIMD_16x32(), and ternary_fn().

◆ load_be() [1/2]

template<size_t Stride>
BOTAN_FN_ISA_AVX512 SIMD_16x32 Botan::SIMD_16x32::load_be ( const uint8_t *const * ptrs,
size_t i,
size_t n,
size_t offset = 0 )
inlinestatic

Load in big endian order from ptrs[i] + Stride * n + offset, gathering lane i's n'th block out of a set of per lane buffers

Definition at line 75 of file simd_avx512.h.

75 {
76 return load_be(ptrs[i] + Stride * n + offset);
77 }
static BOTAN_FN_ISA_AVX512 SIMD_16x32 load_be(const uint8_t *in)
Definition simd_avx512.h:68

References load_be(), and SIMD_16x32().

◆ load_be() [2/2]

BOTAN_FN_ISA_AVX512 SIMD_16x32 Botan::SIMD_16x32::load_be ( const uint8_t * in)
inlinestatic

Definition at line 68 of file simd_avx512.h.

68{ return load_le(in).bswap(); }
static BOTAN_FN_ISA_AVX512 SIMD_16x32 load_le(const uint8_t *in)
Definition simd_avx512.h:63

References bswap(), load_le(), and SIMD_16x32().

Referenced by load_be(), and Botan::sha2_32_mb_compress_x16().

◆ load_le()

BOTAN_FN_ISA_AVX512 SIMD_16x32 Botan::SIMD_16x32::load_le ( const uint8_t * in)
inlinestatic

Definition at line 63 of file simd_avx512.h.

63 {
64 return SIMD_16x32(_mm512_loadu_si512(reinterpret_cast<const __m512i*>(in)));
65 }

References SIMD_16x32(), and SIMD_16x32().

Referenced by load_be(), Botan::sha2_32_mb_compress_x16(), and Botan::sha2_32_mb_extract_x16().

◆ majority()

BOTAN_FN_ISA_AVX512 SIMD_16x32 Botan::SIMD_16x32::majority ( const SIMD_16x32 & x,
const SIMD_16x32 & y,
const SIMD_16x32 & z )
inlinestatic

Definition at line 320 of file simd_avx512.h.

320 {
321 return SIMD_16x32::ternary_fn<0xe8>(x, y, z);
322 }

References SIMD_16x32(), and ternary_fn().

◆ operator&()

BOTAN_FN_ISA_AVX512 SIMD_16x32 Botan::SIMD_16x32::operator& ( const SIMD_16x32 & other) const
inline

Definition at line 140 of file simd_avx512.h.

140 {
141 SIMD_16x32 retval(*this);
142 retval &= other;
143 return retval;
144 }
SIMD_16x32(const SIMD_16x32 &other)=default

References SIMD_16x32().

◆ operator&=()

BOTAN_FN_ISA_AVX512 void Botan::SIMD_16x32::operator&= ( const SIMD_16x32 & other)
inline

Definition at line 162 of file simd_avx512.h.

162{ m_avx512 = _mm512_and_si512(m_avx512, other.m_avx512); }

References SIMD_16x32().

◆ operator+()

BOTAN_FN_ISA_AVX512 SIMD_16x32 Botan::SIMD_16x32::operator+ ( const SIMD_16x32 & other) const
inline

Definition at line 112 of file simd_avx512.h.

112 {
113 SIMD_16x32 retval(*this);
114 retval += other;
115 return retval;
116 }

References SIMD_16x32().

◆ operator+=()

BOTAN_FN_ISA_AVX512 void Botan::SIMD_16x32::operator+= ( const SIMD_16x32 & other)
inline

Definition at line 147 of file simd_avx512.h.

147{ m_avx512 = _mm512_add_epi32(m_avx512, other.m_avx512); }

References SIMD_16x32().

◆ operator-()

BOTAN_FN_ISA_AVX512 SIMD_16x32 Botan::SIMD_16x32::operator- ( const SIMD_16x32 & other) const
inline

Definition at line 119 of file simd_avx512.h.

119 {
120 SIMD_16x32 retval(*this);
121 retval -= other;
122 return retval;
123 }

References SIMD_16x32().

◆ operator-=()

BOTAN_FN_ISA_AVX512 void Botan::SIMD_16x32::operator-= ( const SIMD_16x32 & other)
inline

Definition at line 150 of file simd_avx512.h.

150{ m_avx512 = _mm512_sub_epi32(m_avx512, other.m_avx512); }

References SIMD_16x32().

◆ operator=() [1/2]

SIMD_16x32 & Botan::SIMD_16x32::operator= ( const SIMD_16x32 & other)
default

References SIMD_16x32().

◆ operator=() [2/2]

SIMD_16x32 & Botan::SIMD_16x32::operator= ( SIMD_16x32 && other)
default

References SIMD_16x32().

◆ operator^()

BOTAN_FN_ISA_AVX512 SIMD_16x32 Botan::SIMD_16x32::operator^ ( const SIMD_16x32 & other) const
inline

Definition at line 126 of file simd_avx512.h.

126 {
127 SIMD_16x32 retval(*this);
128 retval ^= other;
129 return retval;
130 }

References SIMD_16x32().

◆ operator^=() [1/2]

BOTAN_FN_ISA_AVX512 void Botan::SIMD_16x32::operator^= ( const SIMD_16x32 & other)
inline

Definition at line 153 of file simd_avx512.h.

153{ m_avx512 = _mm512_xor_si512(m_avx512, other.m_avx512); }

References SIMD_16x32().

◆ operator^=() [2/2]

BOTAN_FN_ISA_AVX512 void Botan::SIMD_16x32::operator^= ( uint32_t other)
inline

Definition at line 156 of file simd_avx512.h.

156{ *this ^= SIMD_16x32::splat(other); }
static BOTAN_FN_ISA_AVX512 SIMD_16x32 splat(uint32_t B)
Definition simd_avx512.h:60

References splat().

◆ operator|()

BOTAN_FN_ISA_AVX512 SIMD_16x32 Botan::SIMD_16x32::operator| ( const SIMD_16x32 & other) const
inline

Definition at line 133 of file simd_avx512.h.

133 {
134 SIMD_16x32 retval(*this);
135 retval |= other;
136 return retval;
137 }

References SIMD_16x32().

◆ operator|=()

BOTAN_FN_ISA_AVX512 void Botan::SIMD_16x32::operator|= ( const SIMD_16x32 & other)
inline

Definition at line 159 of file simd_avx512.h.

159{ m_avx512 = _mm512_or_si512(m_avx512, other.m_avx512); }

References SIMD_16x32().

◆ operator~()

BOTAN_FN_ISA_AVX512 SIMD_16x32 Botan::SIMD_16x32::operator~ ( ) const
inline

Definition at line 175 of file simd_avx512.h.

175{ return SIMD_16x32(_mm512_xor_si512(m_avx512, _mm512_set1_epi32(0xFFFFFFFF))); }

References SIMD_16x32(), and SIMD_16x32().

◆ raw()

__m512i BOTAN_FN_ISA_AVX512 Botan::SIMD_16x32::raw ( ) const
inline

Definition at line 329 of file simd_avx512.h.

329{ return m_avx512; }

Referenced by Botan::gf2p8affine(), Botan::gf2p8affineinv(), rev_words(), ternary_fn(), transpose(), and unsigned_lt().

◆ rev_words()

BOTAN_FN_ISA_AVX512 SIMD_16x32 Botan::SIMD_16x32::rev_words ( ) const
inlinenoexcept

Definition at line 204 of file simd_avx512.h.

204{ return SIMD_16x32(_mm512_shuffle_epi32(raw(), _MM_PERM_ABCD)); }
__m512i BOTAN_FN_ISA_AVX512 raw() const

References raw(), SIMD_16x32(), and SIMD_16x32().

◆ rotl()

template<size_t ROT>
requires (ROT > 0 && ROT < 32)
BOTAN_FN_ISA_AVX512 SIMD_16x32 Botan::SIMD_16x32::rotl ( ) const
inline

Definition at line 86 of file simd_avx512.h.

88 {
89 return SIMD_16x32(_mm512_rol_epi32(m_avx512, ROT));
90 }

References SIMD_16x32(), and SIMD_16x32().

Referenced by Botan::rotl(), and rotr().

◆ rotr()

template<size_t ROT>
BOTAN_FN_ISA_AVX512 SIMD_16x32 Botan::SIMD_16x32::rotr ( ) const
inline

Definition at line 93 of file simd_avx512.h.

93 {
94 return this->rotl<32 - ROT>();
95 }
BOTAN_FN_ISA_AVX512 SIMD_16x32 rotl() const
Definition simd_avx512.h:86

References rotl(), and SIMD_16x32().

Referenced by Botan::rotr(), sigma0(), and sigma1().

◆ shl()

template<int SHIFT>
BOTAN_FN_ISA_AVX512 SIMD_16x32 Botan::SIMD_16x32::shl ( ) const
inline

Definition at line 165 of file simd_avx512.h.

165 {
166 return SIMD_16x32(_mm512_slli_epi32(m_avx512, SHIFT));
167 }

References SIMD_16x32(), and SIMD_16x32().

Referenced by Botan::shl().

◆ shr()

template<int SHIFT>
BOTAN_FN_ISA_AVX512 SIMD_16x32 Botan::SIMD_16x32::shr ( ) const
inline

Definition at line 170 of file simd_avx512.h.

170 {
171 return SIMD_16x32(_mm512_srli_epi32(m_avx512, SHIFT));
172 }

References SIMD_16x32(), and SIMD_16x32().

◆ sigma0()

SIMD_16x32 BOTAN_FN_ISA_AVX512 Botan::SIMD_16x32::sigma0 ( ) const
inline

Definition at line 97 of file simd_avx512.h.

97 {
98 const SIMD_16x32 r1 = this->rotr<2>();
99 const SIMD_16x32 r2 = this->rotr<13>();
100 const SIMD_16x32 r3 = this->rotr<22>();
101 return r1 ^ r2 ^ r3;
102 }
BOTAN_FN_ISA_AVX512 SIMD_16x32 rotr() const
Definition simd_avx512.h:93

References rotr(), and SIMD_16x32().

◆ sigma1()

SIMD_16x32 BOTAN_FN_ISA_AVX512 Botan::SIMD_16x32::sigma1 ( ) const
inline

Definition at line 104 of file simd_avx512.h.

104 {
105 const SIMD_16x32 r1 = this->rotr<6>();
106 const SIMD_16x32 r2 = this->rotr<11>();
107 const SIMD_16x32 r3 = this->rotr<25>();
108 return r1 ^ r2 ^ r3;
109 }

References rotr(), and SIMD_16x32().

◆ splat()

BOTAN_FN_ISA_AVX512 SIMD_16x32 Botan::SIMD_16x32::splat ( uint32_t B)
inlinestatic

Definition at line 60 of file simd_avx512.h.

60{ return SIMD_16x32(_mm512_set1_epi32(B)); }

References SIMD_16x32(), and SIMD_16x32().

Referenced by operator^=().

◆ store_be()

BOTAN_FN_ISA_AVX512 void Botan::SIMD_16x32::store_be ( uint8_t out[]) const
inline

Definition at line 83 of file simd_avx512.h.

83{ bswap().store_le(out); }
BOTAN_FN_ISA_AVX512 void store_le(uint8_t out[]) const
Definition simd_avx512.h:80

References bswap(), and store_le().

◆ store_le()

BOTAN_FN_ISA_AVX512 void Botan::SIMD_16x32::store_le ( uint8_t out[]) const
inline

Definition at line 80 of file simd_avx512.h.

80{ _mm512_storeu_si512(reinterpret_cast<__m512i*>(out), m_avx512); }

Referenced by Botan::sha2_32_mb_compress_x16(), and store_be().

◆ ternary_fn()

template<uint8_t TBL>
BOTAN_FN_ISA_AVX512 SIMD_16x32 Botan::SIMD_16x32::ternary_fn ( const SIMD_16x32 & a,
const SIMD_16x32 & b,
const SIMD_16x32 & c )
inlinestatic

Definition at line 184 of file simd_avx512.h.

184 {
185 return SIMD_16x32(_mm512_ternarylogic_epi32(a.raw(), b.raw(), c.raw(), TBL));
186 }

References raw(), SIMD_16x32(), and SIMD_16x32().

Referenced by choose(), and majority().

◆ transpose() [1/2]

BOTAN_FN_ISA_AVX512 void Botan::SIMD_16x32::transpose ( SIMD_16x32 & B0,
SIMD_16x32 & B1,
SIMD_16x32 & B2,
SIMD_16x32 & B3 )
inlinestatic

Definition at line 207 of file simd_avx512.h.

207 {
208 const __m512i T0 = _mm512_unpacklo_epi32(B0.m_avx512, B1.m_avx512);
209 const __m512i T1 = _mm512_unpacklo_epi32(B2.m_avx512, B3.m_avx512);
210 const __m512i T2 = _mm512_unpackhi_epi32(B0.m_avx512, B1.m_avx512);
211 const __m512i T3 = _mm512_unpackhi_epi32(B2.m_avx512, B3.m_avx512);
212
213 B0.m_avx512 = _mm512_unpacklo_epi64(T0, T1);
214 B1.m_avx512 = _mm512_unpackhi_epi64(T0, T1);
215 B2.m_avx512 = _mm512_unpacklo_epi64(T2, T3);
216 B3.m_avx512 = _mm512_unpackhi_epi64(T2, T3);
217 }

References SIMD_16x32().

Referenced by Botan::sha2_32_mb_compress_x16(), and Botan::sha2_32_mb_extract_x16().

◆ transpose() [2/2]

BOTAN_FN_ISA_AVX512 void Botan::SIMD_16x32::transpose ( SIMD_16x32 & B0,
SIMD_16x32 & B1,
SIMD_16x32 & B2,
SIMD_16x32 & B3,
SIMD_16x32 & B4,
SIMD_16x32 & B5,
SIMD_16x32 & B6,
SIMD_16x32 & B7,
SIMD_16x32 & B8,
SIMD_16x32 & B9,
SIMD_16x32 & BA,
SIMD_16x32 & BB,
SIMD_16x32 & BC,
SIMD_16x32 & BD,
SIMD_16x32 & BE,
SIMD_16x32 & BF )
inlinestatic

Definition at line 220 of file simd_avx512.h.

235 {
236 auto t0 = _mm512_unpacklo_epi32(B0.raw(), B1.raw());
237 auto t1 = _mm512_unpackhi_epi32(B0.raw(), B1.raw());
238 auto t2 = _mm512_unpacklo_epi32(B2.raw(), B3.raw());
239 auto t3 = _mm512_unpackhi_epi32(B2.raw(), B3.raw());
240 auto t4 = _mm512_unpacklo_epi32(B4.raw(), B5.raw());
241 auto t5 = _mm512_unpackhi_epi32(B4.raw(), B5.raw());
242 auto t6 = _mm512_unpacklo_epi32(B6.raw(), B7.raw());
243 auto t7 = _mm512_unpackhi_epi32(B6.raw(), B7.raw());
244 auto t8 = _mm512_unpacklo_epi32(B8.raw(), B9.raw());
245 auto t9 = _mm512_unpackhi_epi32(B8.raw(), B9.raw());
246 auto ta = _mm512_unpacklo_epi32(BA.raw(), BB.raw());
247 auto tb = _mm512_unpackhi_epi32(BA.raw(), BB.raw());
248 auto tc = _mm512_unpacklo_epi32(BC.raw(), BD.raw());
249 auto td = _mm512_unpackhi_epi32(BC.raw(), BD.raw());
250 auto te = _mm512_unpacklo_epi32(BE.raw(), BF.raw());
251 auto tf = _mm512_unpackhi_epi32(BE.raw(), BF.raw());
252
253 const auto r0 = _mm512_unpacklo_epi64(t0, t2);
254 const auto r1 = _mm512_unpackhi_epi64(t0, t2);
255 const auto r2 = _mm512_unpacklo_epi64(t1, t3);
256 const auto r3 = _mm512_unpackhi_epi64(t1, t3);
257 const auto r4 = _mm512_unpacklo_epi64(t4, t6);
258 const auto r5 = _mm512_unpackhi_epi64(t4, t6);
259 const auto r6 = _mm512_unpacklo_epi64(t5, t7);
260 const auto r7 = _mm512_unpackhi_epi64(t5, t7);
261 const auto r8 = _mm512_unpacklo_epi64(t8, ta);
262 const auto r9 = _mm512_unpackhi_epi64(t8, ta);
263 const auto ra = _mm512_unpacklo_epi64(t9, tb);
264 const auto rb = _mm512_unpackhi_epi64(t9, tb);
265 const auto rc = _mm512_unpacklo_epi64(tc, te);
266 const auto rd = _mm512_unpackhi_epi64(tc, te);
267 const auto re = _mm512_unpacklo_epi64(td, tf);
268 const auto rf = _mm512_unpackhi_epi64(td, tf);
269
270 t0 = _mm512_shuffle_i32x4(r0, r4, 0x88);
271 t1 = _mm512_shuffle_i32x4(r1, r5, 0x88);
272 t2 = _mm512_shuffle_i32x4(r2, r6, 0x88);
273 t3 = _mm512_shuffle_i32x4(r3, r7, 0x88);
274 t4 = _mm512_shuffle_i32x4(r0, r4, 0xdd);
275 t5 = _mm512_shuffle_i32x4(r1, r5, 0xdd);
276 t6 = _mm512_shuffle_i32x4(r2, r6, 0xdd);
277 t7 = _mm512_shuffle_i32x4(r3, r7, 0xdd);
278 t8 = _mm512_shuffle_i32x4(r8, rc, 0x88);
279 t9 = _mm512_shuffle_i32x4(r9, rd, 0x88);
280 ta = _mm512_shuffle_i32x4(ra, re, 0x88);
281 tb = _mm512_shuffle_i32x4(rb, rf, 0x88);
282 tc = _mm512_shuffle_i32x4(r8, rc, 0xdd);
283 td = _mm512_shuffle_i32x4(r9, rd, 0xdd);
284 te = _mm512_shuffle_i32x4(ra, re, 0xdd);
285 tf = _mm512_shuffle_i32x4(rb, rf, 0xdd);
286
287 B0.m_avx512 = _mm512_shuffle_i32x4(t0, t8, 0x88);
288 B1.m_avx512 = _mm512_shuffle_i32x4(t1, t9, 0x88);
289 B2.m_avx512 = _mm512_shuffle_i32x4(t2, ta, 0x88);
290 B3.m_avx512 = _mm512_shuffle_i32x4(t3, tb, 0x88);
291 B4.m_avx512 = _mm512_shuffle_i32x4(t4, tc, 0x88);
292 B5.m_avx512 = _mm512_shuffle_i32x4(t5, td, 0x88);
293 B6.m_avx512 = _mm512_shuffle_i32x4(t6, te, 0x88);
294 B7.m_avx512 = _mm512_shuffle_i32x4(t7, tf, 0x88);
295 B8.m_avx512 = _mm512_shuffle_i32x4(t0, t8, 0xdd);
296 B9.m_avx512 = _mm512_shuffle_i32x4(t1, t9, 0xdd);
297 BA.m_avx512 = _mm512_shuffle_i32x4(t2, ta, 0xdd);
298 BB.m_avx512 = _mm512_shuffle_i32x4(t3, tb, 0xdd);
299 BC.m_avx512 = _mm512_shuffle_i32x4(t4, tc, 0xdd);
300 BD.m_avx512 = _mm512_shuffle_i32x4(t5, td, 0xdd);
301 BE.m_avx512 = _mm512_shuffle_i32x4(t6, te, 0xdd);
302 BF.m_avx512 = _mm512_shuffle_i32x4(t7, tf, 0xdd);
303 }

References raw(), and SIMD_16x32().

◆ unsigned_lt()

SIMD_16x32 BOTAN_FN_ISA_AVX512 Botan::SIMD_16x32::unsigned_lt ( const SIMD_16x32 & other) const
inlinenoexcept

Unsigned lane comparison; returns a mask with all bits set in each 32-bit lane that is (unsigned) less than the corresponding lane of other, and all bits cleared otherwise.

Definition at line 310 of file simd_avx512.h.

310 {
311 return SIMD_16x32(_mm512_movm_epi32(_mm512_cmplt_epu32_mask(raw(), other.raw())));
312 }

References raw(), SIMD_16x32(), and SIMD_16x32().

◆ zero_registers()

BOTAN_FN_ISA_AVX512 void Botan::SIMD_16x32::zero_registers ( )
inlinestatic

Definition at line 324 of file simd_avx512.h.

324 {
325 // Unfortunately this only zeros zmm0-zmm15 and not zmm16-zmm32
326 _mm256_zeroall();
327 }

The documentation for this class was generated from the following file: