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

#include <simd_4x64.h>

Public Member Functions

SIMD_4x64 BOTAN_FN_ISA_SIMD_4X64 andc (const SIMD_4x64 &other) const
SIMD_4x64 BOTAN_FN_ISA_SIMD_4X64 bswap () const
SIMD_4x64 BOTAN_FN_ISA_SIMD_4X64 operator& (const SIMD_4x64 &other) const
BOTAN_FN_ISA_SIMD_4X64 void operator&= (const SIMD_4x64 &other)
SIMD_4x64 BOTAN_FN_ISA_SIMD_4X64 operator+ (const SIMD_4x64 &other) const
BOTAN_FN_ISA_SIMD_4X64 void operator+= (const SIMD_4x64 &other)
SIMD_4x64 & operator= (const SIMD_4x64 &other)=default
SIMD_4x64 & operator= (SIMD_4x64 &&other)=default
SIMD_4x64 BOTAN_FN_ISA_SIMD_4X64 operator^ (const SIMD_4x64 &other) const
BOTAN_FN_ISA_SIMD_4X64 void operator^= (const SIMD_4x64 &other)
SIMD_4x64 BOTAN_FN_ISA_SIMD_4X64 operator| (const SIMD_4x64 &other) const
BOTAN_FN_ISA_SIMD_4X64 void operator|= (const SIMD_4x64 &other)
__m256i BOTAN_FN_ISA_SIMD_4X64 raw () const noexcept
template<size_t ROT>
SIMD_4x64 BOTAN_FN_ISA_SIMD_4X64 rotl () const
template<size_t ROT>
requires (ROT > 0 && ROT < 64)
BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 rotr () const
template<int SHIFT>
SIMD_4x64 BOTAN_FN_ISA_SIMD_4X64 shl () const noexcept
template<int SHIFT>
SIMD_4x64 BOTAN_FN_ISA_SIMD_4X64 shr () const noexcept
SIMD_4x64 BOTAN_FN_ISA_SIMD_4X64 sigma0 () const
SIMD_4x64 BOTAN_FN_ISA_SIMD_4X64 sigma1 () const
BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 ()
BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 (__m256i x)
 SIMD_4x64 (const SIMD_4x64 &other)=default
 SIMD_4x64 (SIMD_4x64 &&other)=default
BOTAN_FN_ISA_SIMD_4X64 void store_be (uint8_t out[]) const
void BOTAN_FN_ISA_SIMD_4X64 store_le (uint64_t out[4]) const
BOTAN_FN_ISA_SIMD_4X64 void store_le (uint8_t out[]) const
BOTAN_FN_ISA_SIMD_4X64 void store_le2 (void *outh, void *outl)
 ~SIMD_4x64 ()=default

Static Public Member Functions

static SIMD_4x64 BOTAN_FN_ISA_SIMD_4X64 alignr8 (const SIMD_4x64 &a, const SIMD_4x64 &b)
static BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 broadcast_2x64 (const uint64_t *in)
static BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 chi (const SIMD_4x64 &x, const SIMD_4x64 &y, const SIMD_4x64 &z)
static BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 choose (const SIMD_4x64 &mask, const SIMD_4x64 &a, const SIMD_4x64 &b)
template<size_t Stride>
static BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 load_be (const uint8_t *const *ptrs, size_t i, size_t n, size_t offset=0)
static BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 load_be (const void *in)
static BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 load_be2 (const void *lo, const void *hi)
static BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 load_le (const void *in)
static BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 load_le2 (const void *lo, const void *hi)
static BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 majority (const SIMD_4x64 &x, const SIMD_4x64 &y, const SIMD_4x64 &z)
static BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 mul2_32 (SIMD_4x64 x, SIMD_4x64 y)
template<uint8_t CTRL>
static BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 permute_4x64 (SIMD_4x64 x)
static BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 splat (uint64_t v)
static BOTAN_FN_ISA_SIMD_4X64 void transpose (SIMD_4x64 &B0, SIMD_4x64 &B1, SIMD_4x64 &B2, SIMD_4x64 &B3)
static void BOTAN_FN_ISA_SIMD_4X64 twist (SIMD_4x64 &B, SIMD_4x64 &C, SIMD_4x64 &D)
static void BOTAN_FN_ISA_SIMD_4X64 untwist (SIMD_4x64 &B, SIMD_4x64 &C, SIMD_4x64 &D)

Detailed Description

Definition at line 22 of file simd_4x64.h.

Constructor & Destructor Documentation

◆ SIMD_4x64() [1/4]

◆ SIMD_4x64() [2/4]

Botan::SIMD_4x64::SIMD_4x64 ( SIMD_4x64 && other)
default

References SIMD_4x64().

◆ ~SIMD_4x64()

Botan::SIMD_4x64::~SIMD_4x64 ( )
default

◆ SIMD_4x64() [3/4]

BOTAN_FN_ISA_SIMD_4X64 Botan::SIMD_4x64::SIMD_4x64 ( )
inline

Definition at line 33 of file simd_4x64.h.

33: m_simd(_mm256_setzero_si256()) {}

Referenced by alignr8(), andc(), broadcast_2x64(), bswap(), chi(), choose(), load_le(), load_le2(), majority(), mul2_32(), permute_4x64(), rotr(), shl(), shr(), and splat().

◆ SIMD_4x64() [4/4]

BOTAN_FN_ISA_SIMD_4X64 Botan::SIMD_4x64::SIMD_4x64 ( __m256i x)
inlineexplicit

Definition at line 267 of file simd_4x64.h.

267: m_simd(x) {}

Member Function Documentation

◆ alignr8()

SIMD_4x64 BOTAN_FN_ISA_SIMD_4X64 Botan::SIMD_4x64::alignr8 ( const SIMD_4x64 & a,
const SIMD_4x64 & b )
inlinestatic

Definition at line 233 of file simd_4x64.h.

233 {
234 return SIMD_4x64(_mm256_alignr_epi8(a.m_simd, b.m_simd, 8));
235 }
BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64()
Definition simd_4x64.h:33

References SIMD_4x64(), and SIMD_4x64().

◆ andc()

SIMD_4x64 BOTAN_FN_ISA_SIMD_4X64 Botan::SIMD_4x64::andc ( const SIMD_4x64 & other) const
inline

Definition at line 123 of file simd_4x64.h.

123 {
124 return SIMD_4x64(_mm256_andnot_si256(m_simd, other.m_simd));
125 }

References SIMD_4x64(), and SIMD_4x64().

Referenced by chi(), and choose().

◆ broadcast_2x64()

BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 Botan::SIMD_4x64::broadcast_2x64 ( const uint64_t * in)
inlinestatic

Definition at line 61 of file simd_4x64.h.

61 {
62 return SIMD_4x64(_mm256_broadcastsi128_si256(_mm_loadu_si128(reinterpret_cast<const __m128i*>(in))));
63 }

References SIMD_4x64(), and SIMD_4x64().

◆ bswap()

SIMD_4x64 BOTAN_FN_ISA_SIMD_4X64 Botan::SIMD_4x64::bswap ( ) const
inline

Definition at line 65 of file simd_4x64.h.

65 {
66 const auto idx = _mm256_set_epi8(
67 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7);
68
69 return SIMD_4x64(_mm256_shuffle_epi8(m_simd, idx));
70 }

References SIMD_4x64(), and SIMD_4x64().

Referenced by load_be(), load_be2(), and store_be().

◆ chi()

BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 Botan::SIMD_4x64::chi ( const SIMD_4x64 & x,
const SIMD_4x64 & y,
const SIMD_4x64 & z )
inlinestatic

The Keccak chi operation, x ^ (~y & z)

Definition at line 183 of file simd_4x64.h.

183 {
184#if defined(__AVX512VL__)
185 constexpr uint8_t xor_not_and = 0b11010010;
186 return SIMD_4x64(_mm256_ternarylogic_epi64(x.raw(), y.raw(), z.raw(), xor_not_and));
187#else
188 return x ^ y.andc(z);
189#endif
190 }

References andc(), raw(), SIMD_4x64(), and SIMD_4x64().

◆ choose()

BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 Botan::SIMD_4x64::choose ( const SIMD_4x64 & mask,
const SIMD_4x64 & a,
const SIMD_4x64 & b )
inlinestatic

Definition at line 193 of file simd_4x64.h.

193 {
194#if defined(__AVX512VL__)
195 return SIMD_4x64(_mm256_ternarylogic_epi64(mask.raw(), a.raw(), b.raw(), 0xca));
196#else
197 return (mask & a) ^ mask.andc(b);
198#endif
199 }

References andc(), raw(), SIMD_4x64(), and SIMD_4x64().

Referenced by majority().

◆ load_be() [1/2]

template<size_t Stride>
BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 Botan::SIMD_4x64::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 57 of file simd_4x64.h.

57 {
58 return load_be(ptrs[i] + Stride * n + offset);
59 }
static BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 load_be(const void *in)
Definition simd_4x64.h:49

References load_be().

◆ load_be() [2/2]

BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 Botan::SIMD_4x64::load_be ( const void * in)
inlinestatic

Definition at line 49 of file simd_4x64.h.

49{ return SIMD_4x64::load_le(in).bswap(); }
SIMD_4x64 BOTAN_FN_ISA_SIMD_4X64 bswap() const
Definition simd_4x64.h:65
static BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 load_le(const void *in)
Definition simd_4x64.h:45

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

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

◆ load_be2()

BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 Botan::SIMD_4x64::load_be2 ( const void * lo,
const void * hi )
inlinestatic

Definition at line 41 of file simd_4x64.h.

41 {
42 return SIMD_4x64::load_le2(lo, hi).bswap();
43 }
static BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 load_le2(const void *lo, const void *hi)
Definition simd_4x64.h:36

References bswap(), load_le2(), and SIMD_4x64().

◆ load_le()

BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 Botan::SIMD_4x64::load_le ( const void * in)
inlinestatic

Definition at line 45 of file simd_4x64.h.

45 {
46 return SIMD_4x64(_mm256_loadu_si256(reinterpret_cast<const __m256i*>(in)));
47 }

References SIMD_4x64(), and SIMD_4x64().

Referenced by Botan::keccak_mb_absorb_x4(), Botan::keccak_mb_permute_x4(), load_be(), Botan::sha2_64_mb_compress_x4(), and Botan::sha2_64_mb_extract_x4().

◆ load_le2()

BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 Botan::SIMD_4x64::load_le2 ( const void * lo,
const void * hi )
inlinestatic

Definition at line 36 of file simd_4x64.h.

36 {
37 return SIMD_4x64(
38 _mm256_loadu2_m128i(reinterpret_cast<const __m128i*>(lo), reinterpret_cast<const __m128i*>(hi)));
39 }

References SIMD_4x64(), and SIMD_4x64().

Referenced by load_be2().

◆ majority()

BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 Botan::SIMD_4x64::majority ( const SIMD_4x64 & x,
const SIMD_4x64 & y,
const SIMD_4x64 & z )
inlinestatic

Definition at line 202 of file simd_4x64.h.

202 {
203#if defined(__AVX512VL__)
204 return SIMD_4x64(_mm256_ternarylogic_epi64(x.raw(), y.raw(), z.raw(), 0xe8));
205#else
206 return SIMD_4x64::choose(x ^ y, z, y);
207#endif
208 }
static BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 choose(const SIMD_4x64 &mask, const SIMD_4x64 &a, const SIMD_4x64 &b)
Definition simd_4x64.h:193

References choose(), raw(), SIMD_4x64(), and SIMD_4x64().

◆ mul2_32()

BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 Botan::SIMD_4x64::mul2_32 ( SIMD_4x64 x,
SIMD_4x64 y )
inlinestatic

Definition at line 238 of file simd_4x64.h.

238 {
239 const __m256i m = _mm256_mul_epu32(x.m_simd, y.m_simd);
240 return SIMD_4x64(_mm256_add_epi64(m, m));
241 }

References SIMD_4x64(), and SIMD_4x64().

◆ operator&()

SIMD_4x64 BOTAN_FN_ISA_SIMD_4X64 Botan::SIMD_4x64::operator& ( const SIMD_4x64 & other) const
inline

Definition at line 96 of file simd_4x64.h.

96 {
97 SIMD_4x64 retval(*this);
98 retval &= other;
99 return retval;
100 }
SIMD_4x64(const SIMD_4x64 &other)=default

References SIMD_4x64().

◆ operator&=()

BOTAN_FN_ISA_SIMD_4X64 void Botan::SIMD_4x64::operator&= ( const SIMD_4x64 & other)
inline

Definition at line 116 of file simd_4x64.h.

116 {
117 m_simd = _mm256_and_si256(m_simd, other.m_simd);
118 }

References SIMD_4x64().

◆ operator+()

SIMD_4x64 BOTAN_FN_ISA_SIMD_4X64 Botan::SIMD_4x64::operator+ ( const SIMD_4x64 & other) const
inline

Definition at line 84 of file simd_4x64.h.

84 {
85 SIMD_4x64 retval(*this);
86 retval += other;
87 return retval;
88 }

References SIMD_4x64().

◆ operator+=()

BOTAN_FN_ISA_SIMD_4X64 void Botan::SIMD_4x64::operator+= ( const SIMD_4x64 & other)
inline

Definition at line 108 of file simd_4x64.h.

108 {
109 m_simd = _mm256_add_epi64(m_simd, other.m_simd);
110 }

References SIMD_4x64().

◆ operator=() [1/2]

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

References SIMD_4x64().

◆ operator=() [2/2]

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

References SIMD_4x64().

◆ operator^()

SIMD_4x64 BOTAN_FN_ISA_SIMD_4X64 Botan::SIMD_4x64::operator^ ( const SIMD_4x64 & other) const
inline

Definition at line 90 of file simd_4x64.h.

90 {
91 SIMD_4x64 retval(*this);
92 retval ^= other;
93 return retval;
94 }

References SIMD_4x64().

◆ operator^=()

BOTAN_FN_ISA_SIMD_4X64 void Botan::SIMD_4x64::operator^= ( const SIMD_4x64 & other)
inline

Definition at line 112 of file simd_4x64.h.

112 {
113 m_simd = _mm256_xor_si256(m_simd, other.m_simd);
114 }

References SIMD_4x64().

◆ operator|()

SIMD_4x64 BOTAN_FN_ISA_SIMD_4X64 Botan::SIMD_4x64::operator| ( const SIMD_4x64 & other) const
inline

Definition at line 102 of file simd_4x64.h.

102 {
103 SIMD_4x64 retval(*this);
104 retval |= other;
105 return retval;
106 }

References SIMD_4x64().

◆ operator|=()

BOTAN_FN_ISA_SIMD_4X64 void Botan::SIMD_4x64::operator|= ( const SIMD_4x64 & other)
inline

Definition at line 120 of file simd_4x64.h.

120{ m_simd = _mm256_or_si256(m_simd, other.m_simd); }

References SIMD_4x64().

◆ permute_4x64()

template<uint8_t CTRL>
BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 Botan::SIMD_4x64::permute_4x64 ( SIMD_4x64 x)
inlinestatic

Definition at line 244 of file simd_4x64.h.

244 {
245 return SIMD_4x64(_mm256_permute4x64_epi64(x.m_simd, CTRL));
246 }

References SIMD_4x64(), and SIMD_4x64().

Referenced by twist(), and untwist().

◆ raw()

__m256i BOTAN_FN_ISA_SIMD_4X64 Botan::SIMD_4x64::raw ( ) const
inlinenoexcept

Definition at line 265 of file simd_4x64.h.

265{ return m_simd; }

Referenced by chi(), choose(), and majority().

◆ rotl()

template<size_t ROT>
SIMD_4x64 BOTAN_FN_ISA_SIMD_4X64 Botan::SIMD_4x64::rotl ( ) const
inline

Definition at line 162 of file simd_4x64.h.

162 {
163 return this->rotr<64 - ROT>();
164 }
BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 rotr() const
Definition simd_4x64.h:128

References rotr(), and SIMD_4x64().

◆ rotr()

template<size_t ROT>
requires (ROT > 0 && ROT < 64)
BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 Botan::SIMD_4x64::rotr ( ) const
inline

Definition at line 128 of file simd_4x64.h.

130 {
131#if defined(__AVX512VL__)
132 return SIMD_4x64(_mm256_ror_epi64(m_simd, ROT));
133#else
134 if constexpr(ROT == 8) {
135 const auto shuf_rot_8 =
136 _mm256_set_epi64x(0x080f0e0d0c0b0a09, 0x0007060504030201, 0x080f0e0d0c0b0a09, 0x0007060504030201);
137
138 return SIMD_4x64(_mm256_shuffle_epi8(m_simd, shuf_rot_8));
139 } else if constexpr(ROT == 16) {
140 const auto shuf_rot_16 =
141 _mm256_set_epi64x(0x09080f0e0d0c0b0a, 0x0100070605040302, 0x09080f0e0d0c0b0a, 0x0100070605040302);
142
143 return SIMD_4x64(_mm256_shuffle_epi8(m_simd, shuf_rot_16));
144 } else if constexpr(ROT == 24) {
145 const auto shuf_rot_24 =
146 _mm256_set_epi64x(0x0a09080f0e0d0c0b, 0x0201000706050403, 0x0a09080f0e0d0c0b, 0x0201000706050403);
147
148 return SIMD_4x64(_mm256_shuffle_epi8(m_simd, shuf_rot_24));
149 } else if constexpr(ROT == 32) {
150 const auto shuf_rot_32 =
151 _mm256_set_epi64x(0x0b0a09080f0e0d0c, 0x0302010007060504, 0x0b0a09080f0e0d0c, 0x0302010007060504);
152
153 return SIMD_4x64(_mm256_shuffle_epi8(m_simd, shuf_rot_32));
154 } else {
155 return SIMD_4x64(_mm256_or_si256(_mm256_srli_epi64(m_simd, static_cast<int>(ROT)),
156 _mm256_slli_epi64(m_simd, static_cast<int>(64 - ROT))));
157 }
158#endif
159 }

References SIMD_4x64(), and SIMD_4x64().

Referenced by rotl(), sigma0(), and sigma1().

◆ shl()

template<int SHIFT>
SIMD_4x64 BOTAN_FN_ISA_SIMD_4X64 Botan::SIMD_4x64::shl ( ) const
inlinenoexcept

Definition at line 229 of file simd_4x64.h.

229 {
230 return SIMD_4x64(_mm256_slli_epi64(m_simd, SHIFT));
231 }

References SIMD_4x64(), and SIMD_4x64().

◆ shr()

template<int SHIFT>
SIMD_4x64 BOTAN_FN_ISA_SIMD_4X64 Botan::SIMD_4x64::shr ( ) const
inlinenoexcept

Definition at line 224 of file simd_4x64.h.

224 {
225 return SIMD_4x64(_mm256_srli_epi64(m_simd, SHIFT));
226 }

References SIMD_4x64(), and SIMD_4x64().

◆ sigma0()

SIMD_4x64 BOTAN_FN_ISA_SIMD_4X64 Botan::SIMD_4x64::sigma0 ( ) const
inline

Definition at line 166 of file simd_4x64.h.

166 {
167 const SIMD_4x64 r1 = this->rotr<28>();
168 const SIMD_4x64 r2 = this->rotr<34>();
169 const SIMD_4x64 r3 = this->rotr<39>();
170 return r1 ^ r2 ^ r3;
171 }

References rotr(), and SIMD_4x64().

◆ sigma1()

SIMD_4x64 BOTAN_FN_ISA_SIMD_4X64 Botan::SIMD_4x64::sigma1 ( ) const
inline

Definition at line 173 of file simd_4x64.h.

173 {
174 const SIMD_4x64 r1 = this->rotr<14>();
175 const SIMD_4x64 r2 = this->rotr<18>();
176 const SIMD_4x64 r3 = this->rotr<41>();
177 return r1 ^ r2 ^ r3;
178 }

References rotr(), and SIMD_4x64().

◆ splat()

BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 Botan::SIMD_4x64::splat ( uint64_t v)
inlinestatic

Definition at line 263 of file simd_4x64.h.

263{ return SIMD_4x64(_mm256_set1_epi64x(v)); }

References SIMD_4x64(), and SIMD_4x64().

◆ store_be()

BOTAN_FN_ISA_SIMD_4X64 void Botan::SIMD_4x64::store_be ( uint8_t out[]) const
inline

Definition at line 82 of file simd_4x64.h.

82{ bswap().store_le(out); }
void BOTAN_FN_ISA_SIMD_4X64 store_le(uint64_t out[4]) const
Definition simd_4x64.h:72

References bswap(), and store_le().

Referenced by Botan::sha2_64_mb_extract_x4().

◆ store_le() [1/2]

void BOTAN_FN_ISA_SIMD_4X64 Botan::SIMD_4x64::store_le ( uint64_t out[4]) const
inline

Definition at line 72 of file simd_4x64.h.

72{ this->store_le(reinterpret_cast<uint8_t*>(out)); }

References store_le().

Referenced by Botan::keccak_mb_absorb_x4(), Botan::keccak_mb_permute_x4(), Botan::sha2_64_mb_compress_x4(), store_be(), and store_le().

◆ store_le() [2/2]

BOTAN_FN_ISA_SIMD_4X64 void Botan::SIMD_4x64::store_le ( uint8_t out[]) const
inline

Definition at line 74 of file simd_4x64.h.

74 {
75 _mm256_storeu_si256(reinterpret_cast<__m256i*>(out), m_simd);
76 }

◆ store_le2()

BOTAN_FN_ISA_SIMD_4X64 void Botan::SIMD_4x64::store_le2 ( void * outh,
void * outl )
inline

Definition at line 78 of file simd_4x64.h.

78 {
79 _mm256_storeu2_m128i(reinterpret_cast<__m128i*>(outh), reinterpret_cast<__m128i*>(outl), m_simd);
80 }

◆ transpose()

BOTAN_FN_ISA_SIMD_4X64 void Botan::SIMD_4x64::transpose ( SIMD_4x64 & B0,
SIMD_4x64 & B1,
SIMD_4x64 & B2,
SIMD_4x64 & B3 )
inlinestatic

Definition at line 211 of file simd_4x64.h.

211 {
212 const __m256i T0 = _mm256_unpacklo_epi64(B0.m_simd, B1.m_simd);
213 const __m256i T1 = _mm256_unpackhi_epi64(B0.m_simd, B1.m_simd);
214 const __m256i T2 = _mm256_unpacklo_epi64(B2.m_simd, B3.m_simd);
215 const __m256i T3 = _mm256_unpackhi_epi64(B2.m_simd, B3.m_simd);
216
217 B0.m_simd = _mm256_permute2x128_si256(T0, T2, 0 + (2 << 4));
218 B1.m_simd = _mm256_permute2x128_si256(T1, T3, 0 + (2 << 4));
219 B2.m_simd = _mm256_permute2x128_si256(T0, T2, 1 + (3 << 4));
220 B3.m_simd = _mm256_permute2x128_si256(T1, T3, 1 + (3 << 4));
221 }

References SIMD_4x64().

Referenced by Botan::sha2_64_mb_compress_x4(), and Botan::sha2_64_mb_extract_x4().

◆ twist()

void BOTAN_FN_ISA_SIMD_4X64 Botan::SIMD_4x64::twist ( SIMD_4x64 & B,
SIMD_4x64 & C,
SIMD_4x64 & D )
inlinestatic

Definition at line 249 of file simd_4x64.h.

249 {
253 }
static BOTAN_FN_ISA_SIMD_4X64 SIMD_4x64 permute_4x64(SIMD_4x64 x)
Definition simd_4x64.h:244

References permute_4x64(), and SIMD_4x64().

◆ untwist()

void BOTAN_FN_ISA_SIMD_4X64 Botan::SIMD_4x64::untwist ( SIMD_4x64 & B,
SIMD_4x64 & C,
SIMD_4x64 & D )
inlinestatic

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