Botan 3.14.1
Crypto and TLS for C&
simd_8x64.h
Go to the documentation of this file.
1/*
2* (C) 2022,2025 Jack Lloyd
3*
4* Botan is released under the Simplified BSD License (see license.txt)
5*/
6
7#ifndef BOTAN_SIMD_8X64_H_
8#define BOTAN_SIMD_8X64_H_
9
10#include <botan/types.h>
11#include <botan/internal/isa_extn.h>
12#include <immintrin.h>
13
14namespace Botan {
15
16// NOLINTBEGIN(portability-simd-intrinsics)
17
18class SIMD_8x64 final {
19 public:
20 SIMD_8x64& operator=(const SIMD_8x64& other) = default;
21 SIMD_8x64(const SIMD_8x64& other) = default;
22
23 SIMD_8x64& operator=(SIMD_8x64&& other) = default;
24 SIMD_8x64(SIMD_8x64&& other) = default;
25
26 ~SIMD_8x64() = default;
27
28 // zero initialized
29 BOTAN_FN_ISA_SIMD_8X64 SIMD_8x64() : m_simd(_mm512_setzero_si512()) {}
30
31 // Load two halves at different addresses
32 static BOTAN_FN_ISA_SIMD_8X64 SIMD_8x64 load_le4(const void* in0,
33 const void* in1,
34 const void* in2,
35 const void* in3) {
36 auto r = _mm512_setzero_si512();
37 r = _mm512_inserti32x4(r, _mm_loadu_si128(reinterpret_cast<const __m128i*>(in0)), 3);
38 r = _mm512_inserti32x4(r, _mm_loadu_si128(reinterpret_cast<const __m128i*>(in1)), 2);
39 r = _mm512_inserti32x4(r, _mm_loadu_si128(reinterpret_cast<const __m128i*>(in2)), 1);
40 r = _mm512_inserti32x4(r, _mm_loadu_si128(reinterpret_cast<const __m128i*>(in3)), 0);
41 return SIMD_8x64(r);
42 }
43
44 static BOTAN_FN_ISA_SIMD_8X64 SIMD_8x64 load_be4(const void* in0,
45 const void* in1,
46 const void* in2,
47 const void* in3) {
48 return SIMD_8x64::load_le4(in0, in1, in2, in3).bswap();
49 }
50
51 static BOTAN_FN_ISA_SIMD_8X64 SIMD_8x64 load_le(const void* in) {
52 return SIMD_8x64(_mm512_loadu_si512(reinterpret_cast<const __m512i*>(in)));
53 }
54
55 BOTAN_FN_ISA_AVX512
56 static SIMD_8x64 broadcast_2x64(const uint64_t* in) {
57 return SIMD_8x64(_mm512_broadcast_i64x2(_mm_loadu_si128(reinterpret_cast<const __m128i*>(in))));
58 }
59
60 static BOTAN_FN_ISA_SIMD_8X64 SIMD_8x64 load_be(const void* in) { return SIMD_8x64::load_le(in).bswap(); }
61
62 /**
63 * Load in big endian order from ptrs[i] + Stride * n + offset,
64 * gathering lane i's n'th block out of a set of per lane buffers
65 */
66 template <size_t Stride>
67 static BOTAN_FN_ISA_SIMD_8X64 SIMD_8x64
68 load_be(const uint8_t* const* ptrs, size_t i, size_t n, size_t offset = 0) {
69 return load_be(ptrs[i] + Stride * n + offset);
70 }
71
72 SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 bswap() const {
73 // clang-format off
74 const auto idx = _mm512_set_epi8(
75 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,
76 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);
77 // clang-format on
78
79 return SIMD_8x64(_mm512_shuffle_epi8(m_simd, idx));
80 }
81
82 void store_le(uint64_t out[8]) const { this->store_le(reinterpret_cast<uint8_t*>(out)); }
83
84 BOTAN_FN_ISA_SIMD_8X64 void store_le(uint8_t out[]) const {
85 _mm512_storeu_si512(reinterpret_cast<__m512i*>(out), m_simd);
86 }
87
88 BOTAN_FN_ISA_SIMD_8X64 void store_be(uint8_t out[]) const { bswap().store_le(out); }
89
90 BOTAN_FN_ISA_SIMD_8X64 void store_le4(void* out0, void* out1, void* out2, void* out3) {
91 _mm_storeu_si128(reinterpret_cast<__m128i*>(out0), _mm512_extracti32x4_epi32(m_simd, 3));
92 _mm_storeu_si128(reinterpret_cast<__m128i*>(out1), _mm512_extracti32x4_epi32(m_simd, 2));
93 _mm_storeu_si128(reinterpret_cast<__m128i*>(out2), _mm512_extracti32x4_epi32(m_simd, 1));
94 _mm_storeu_si128(reinterpret_cast<__m128i*>(out3), _mm512_extracti32x4_epi32(m_simd, 0));
95 }
96
97 SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 operator+(const SIMD_8x64& other) const {
98 SIMD_8x64 retval(*this);
99 retval += other;
100 return retval;
101 }
102
103 SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 operator^(const SIMD_8x64& other) const {
104 SIMD_8x64 retval(*this);
105 retval ^= other;
106 return retval;
107 }
108
109 SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 operator&(const SIMD_8x64& other) const {
110 SIMD_8x64 retval(*this);
111 retval &= other;
112 return retval;
113 }
114
115 SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 operator|(const SIMD_8x64& other) const {
116 SIMD_8x64 retval(*this);
117 retval |= other;
118 return retval;
119 }
120
121 BOTAN_FN_ISA_SIMD_8X64 void operator+=(const SIMD_8x64& other) {
122 m_simd = _mm512_add_epi64(m_simd, other.m_simd);
123 }
124
125 BOTAN_FN_ISA_SIMD_8X64 void operator^=(const SIMD_8x64& other) {
126 m_simd = _mm512_xor_si512(m_simd, other.m_simd);
127 }
128
129 BOTAN_FN_ISA_SIMD_8X64 void operator&=(const SIMD_8x64& other) {
130 m_simd = _mm512_and_si512(m_simd, other.m_simd);
131 }
132
133 BOTAN_FN_ISA_SIMD_8X64 void operator|=(const SIMD_8x64& other) { m_simd = _mm512_or_si512(m_simd, other.m_simd); }
134
135 // (~reg) & other
136 SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 andc(const SIMD_8x64& other) const {
137 return SIMD_8x64(_mm512_andnot_si512(m_simd, other.m_simd));
138 }
139
140 /**
141 * The Keccak chi operation, x ^ (~y & z)
142 */
143 static BOTAN_FN_ISA_SIMD_8X64 SIMD_8x64 chi(const SIMD_8x64& x, const SIMD_8x64& y, const SIMD_8x64& z) {
144 constexpr uint8_t xor_not_and = 0b11010010;
145 return SIMD_8x64(_mm512_ternarylogic_epi64(x.m_simd, y.m_simd, z.m_simd, xor_not_and));
146 }
147
148 template <size_t ROT>
149 BOTAN_FN_ISA_SIMD_8X64 SIMD_8x64 rotr() const
150 requires(ROT > 0 && ROT < 64)
151 {
152 return SIMD_8x64(_mm512_ror_epi64(m_simd, ROT));
153 }
154
155 template <size_t ROT>
156 BOTAN_FN_ISA_SIMD_8X64 SIMD_8x64 rotl() const {
157 return this->rotr<64 - ROT>();
158 }
159
160 SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 sigma0() const {
161 const SIMD_8x64 r1 = this->rotr<28>();
162 const SIMD_8x64 r2 = this->rotr<34>();
163 const SIMD_8x64 r3 = this->rotr<39>();
164 return r1 ^ r2 ^ r3;
165 }
166
167 SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 sigma1() const {
168 const SIMD_8x64 r1 = this->rotr<14>();
169 const SIMD_8x64 r2 = this->rotr<18>();
170 const SIMD_8x64 r3 = this->rotr<41>();
171 return r1 ^ r2 ^ r3;
172 }
173
174 BOTAN_FN_ISA_SIMD_8X64
175 static SIMD_8x64 choose(const SIMD_8x64& mask, const SIMD_8x64& a, const SIMD_8x64& b) {
176 return SIMD_8x64(_mm512_ternarylogic_epi64(mask.raw(), a.raw(), b.raw(), 0xca));
177 }
178
179 BOTAN_FN_ISA_SIMD_8X64
180 static SIMD_8x64 majority(const SIMD_8x64& x, const SIMD_8x64& y, const SIMD_8x64& z) {
181 return SIMD_8x64(_mm512_ternarylogic_epi64(x.raw(), y.raw(), z.raw(), 0xe8));
182 }
183
184 BOTAN_FN_ISA_SIMD_8X64
185 static void transpose(SIMD_8x64& B0,
186 SIMD_8x64& B1,
187 SIMD_8x64& B2,
188 SIMD_8x64& B3,
189 SIMD_8x64& B4,
190 SIMD_8x64& B5,
191 SIMD_8x64& B6,
192 SIMD_8x64& B7) {
193 const auto t0 = _mm512_unpacklo_epi64(B0.m_simd, B1.m_simd);
194 const auto t1 = _mm512_unpackhi_epi64(B0.m_simd, B1.m_simd);
195 const auto t2 = _mm512_unpacklo_epi64(B2.m_simd, B3.m_simd);
196 const auto t3 = _mm512_unpackhi_epi64(B2.m_simd, B3.m_simd);
197 const auto t4 = _mm512_unpacklo_epi64(B4.m_simd, B5.m_simd);
198 const auto t5 = _mm512_unpackhi_epi64(B4.m_simd, B5.m_simd);
199 const auto t6 = _mm512_unpacklo_epi64(B6.m_simd, B7.m_simd);
200 const auto t7 = _mm512_unpackhi_epi64(B6.m_simd, B7.m_simd);
201
202 const auto s0 = _mm512_shuffle_i64x2(t0, t2, 0x88);
203 const auto s1 = _mm512_shuffle_i64x2(t1, t3, 0x88);
204 const auto s2 = _mm512_shuffle_i64x2(t0, t2, 0xdd);
205 const auto s3 = _mm512_shuffle_i64x2(t1, t3, 0xdd);
206 const auto s4 = _mm512_shuffle_i64x2(t4, t6, 0x88);
207 const auto s5 = _mm512_shuffle_i64x2(t5, t7, 0x88);
208 const auto s6 = _mm512_shuffle_i64x2(t4, t6, 0xdd);
209 const auto s7 = _mm512_shuffle_i64x2(t5, t7, 0xdd);
210
211 B0.m_simd = _mm512_shuffle_i64x2(s0, s4, 0x88);
212 B1.m_simd = _mm512_shuffle_i64x2(s1, s5, 0x88);
213 B2.m_simd = _mm512_shuffle_i64x2(s2, s6, 0x88);
214 B3.m_simd = _mm512_shuffle_i64x2(s3, s7, 0x88);
215 B4.m_simd = _mm512_shuffle_i64x2(s0, s4, 0xdd);
216 B5.m_simd = _mm512_shuffle_i64x2(s1, s5, 0xdd);
217 B6.m_simd = _mm512_shuffle_i64x2(s2, s6, 0xdd);
218 B7.m_simd = _mm512_shuffle_i64x2(s3, s7, 0xdd);
219 }
220
221 template <int SHIFT>
222 SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 shr() const noexcept {
223 return SIMD_8x64(_mm512_srli_epi64(m_simd, SHIFT));
224 }
225
226 template <int SHIFT>
227 SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 shl() const noexcept {
228 return SIMD_8x64(_mm512_slli_epi64(m_simd, SHIFT));
229 }
230
231 static SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 alignr8(const SIMD_8x64& a, const SIMD_8x64& b) {
232 return SIMD_8x64(_mm512_alignr_epi8(a.m_simd, b.m_simd, 8));
233 }
234
235 /**
236 * Shift the concatenation hi:lo right by LANES lanes, returning the low 8 lanes
237 */
238 template <int LANES>
239 static SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 alignr(const SIMD_8x64& hi, const SIMD_8x64& lo)
240 requires(LANES > 0 && LANES < 8)
241 {
242 return SIMD_8x64(_mm512_alignr_epi64(hi.m_simd, lo.m_simd, LANES));
243 }
244
245 template <int LANE>
246 uint64_t BOTAN_FN_ISA_SIMD_8X64 extract() const
247 requires(LANE >= 0 && LANE < 8)
248 {
249 const __m128i v = _mm512_extracti64x2_epi64(m_simd, LANE / 2);
250 return static_cast<uint64_t>(_mm_extract_epi64(v, LANE % 2));
251 }
252
253 /**
254 * IFMA: this + low 52 bits of (a * b), using the low 52 bits of each lane of a and b
255 */
256 SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 madd52lo(const SIMD_8x64& a, const SIMD_8x64& b) const {
257 return SIMD_8x64(_mm512_madd52lo_epu64(m_simd, a.m_simd, b.m_simd));
258 }
259
260 /**
261 * IFMA: this + high 52 bits of (a * b), using the low 52 bits of each lane of a and b
262 */
263 SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 madd52hi(const SIMD_8x64& a, const SIMD_8x64& b) const {
264 return SIMD_8x64(_mm512_madd52hi_epu64(m_simd, a.m_simd, b.m_simd));
265 }
266
267 /**
268 * As madd52lo, but only in the lanes selected by the bitmask; the other lanes are unchanged
269 */
270 SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 masked_madd52lo(uint8_t lanes, const SIMD_8x64& a, const SIMD_8x64& b) const {
271 return SIMD_8x64(_mm512_mask_madd52lo_epu64(m_simd, lanes, a.m_simd, b.m_simd));
272 }
273
274 /**
275 * As madd52hi, but only in the lanes selected by the bitmask; the other lanes are unchanged
276 */
277 SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 masked_madd52hi(uint8_t lanes, const SIMD_8x64& a, const SIMD_8x64& b) const {
278 return SIMD_8x64(_mm512_mask_madd52hi_epu64(m_simd, lanes, a.m_simd, b.m_simd));
279 }
280
281 /**
282 * Interleave the low halves of a and b: a0 b0 a1 b1 a2 b2 a3 b3
283 */
284 static SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 interleave_lo(const SIMD_8x64& a, const SIMD_8x64& b) {
285 const auto idx = _mm512_set_epi64(11, 3, 10, 2, 9, 1, 8, 0);
286 return SIMD_8x64(_mm512_permutex2var_epi64(a.m_simd, idx, b.m_simd));
287 }
288
289 /**
290 * Interleave the high halves of a and b: a4 b4 a5 b5 a6 b6 a7 b7
291 */
292 static SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 interleave_hi(const SIMD_8x64& a, const SIMD_8x64& b) {
293 const auto idx = _mm512_set_epi64(15, 7, 14, 6, 13, 5, 12, 4);
294 return SIMD_8x64(_mm512_permutex2var_epi64(a.m_simd, idx, b.m_simd));
295 }
296
297 /**
298 * Return a bitmask of the lanes where this == other
299 */
300 uint8_t BOTAN_FN_ISA_SIMD_8X64 lanes_eq(const SIMD_8x64& other) const {
301 return _mm512_cmpeq_epi64_mask(m_simd, other.m_simd);
302 }
303
304 /**
305 * Return a bitmask of the lanes where this > other (unsigned)
306 */
307 uint8_t BOTAN_FN_ISA_SIMD_8X64 lanes_gt(const SIMD_8x64& other) const {
308 return _mm512_cmpgt_epu64_mask(m_simd, other.m_simd);
309 }
310
311 /**
312 * Return a + b in the lanes selected by the bitmask, and a elsewhere
313 */
314 static SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 masked_add(uint8_t lanes, const SIMD_8x64& a, const SIMD_8x64& b) {
315 return SIMD_8x64(_mm512_mask_add_epi64(a.m_simd, lanes, a.m_simd, b.m_simd));
316 }
317
318 BOTAN_FN_ISA_SIMD_8X64
319 static SIMD_8x64 splat(uint64_t v) { return SIMD_8x64(_mm512_set1_epi64(v)); }
320
321 // Argon2 specific operation
322 static BOTAN_FN_ISA_SIMD_8X64 SIMD_8x64 mul2_32(SIMD_8x64 x, SIMD_8x64 y) {
323 const __m512i m = _mm512_mul_epu32(x.m_simd, y.m_simd);
324 return SIMD_8x64(_mm512_add_epi64(m, m));
325 }
326
327 // Argon2 specific - twist/untwist permutes within two independent 4-lane groups
328 static void BOTAN_FN_ISA_SIMD_8X64 twist(SIMD_8x64& B, SIMD_8x64& C, SIMD_8x64& D) {
329 const auto b_perm = _mm512_set_epi64(4, 7, 6, 5, 0, 3, 2, 1);
330 const auto c_perm = _mm512_set_epi64(5, 4, 7, 6, 1, 0, 3, 2);
331 const auto d_perm = _mm512_set_epi64(6, 5, 4, 7, 2, 1, 0, 3);
332 B = SIMD_8x64(_mm512_permutexvar_epi64(b_perm, B.m_simd));
333 C = SIMD_8x64(_mm512_permutexvar_epi64(c_perm, C.m_simd));
334 D = SIMD_8x64(_mm512_permutexvar_epi64(d_perm, D.m_simd));
335 }
336
337 static void BOTAN_FN_ISA_SIMD_8X64 untwist(SIMD_8x64& B, SIMD_8x64& C, SIMD_8x64& D) {
338 const auto b_perm = _mm512_set_epi64(6, 5, 4, 7, 2, 1, 0, 3);
339 const auto c_perm = _mm512_set_epi64(5, 4, 7, 6, 1, 0, 3, 2);
340 const auto d_perm = _mm512_set_epi64(4, 7, 6, 5, 0, 3, 2, 1);
341 B = SIMD_8x64(_mm512_permutexvar_epi64(b_perm, B.m_simd));
342 C = SIMD_8x64(_mm512_permutexvar_epi64(c_perm, C.m_simd));
343 D = SIMD_8x64(_mm512_permutexvar_epi64(d_perm, D.m_simd));
344 }
345
346 __m512i BOTAN_FN_ISA_SIMD_8X64 raw() const noexcept { return m_simd; }
347
348 explicit BOTAN_FN_ISA_SIMD_8X64 SIMD_8x64(__m512i x) : m_simd(x) {}
349
350 private:
351 __m512i m_simd;
352};
353
354// NOLINTEND(portability-simd-intrinsics)
355
356} // namespace Botan
357
358#endif
BOTAN_FN_ISA_SIMD_8X64 void operator+=(const SIMD_8x64 &other)
Definition simd_8x64.h:121
BOTAN_FN_ISA_SIMD_8X64 void operator&=(const SIMD_8x64 &other)
Definition simd_8x64.h:129
SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 andc(const SIMD_8x64 &other) const
Definition simd_8x64.h:136
static void BOTAN_FN_ISA_SIMD_8X64 untwist(SIMD_8x64 &B, SIMD_8x64 &C, SIMD_8x64 &D)
Definition simd_8x64.h:337
static SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 masked_add(uint8_t lanes, const SIMD_8x64 &a, const SIMD_8x64 &b)
Definition simd_8x64.h:314
BOTAN_FN_ISA_SIMD_8X64 void store_le(uint8_t out[]) const
Definition simd_8x64.h:84
SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 madd52hi(const SIMD_8x64 &a, const SIMD_8x64 &b) const
Definition simd_8x64.h:263
SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 bswap() const
Definition simd_8x64.h:72
static BOTAN_FN_ISA_SIMD_8X64 SIMD_8x64 load_le4(const void *in0, const void *in1, const void *in2, const void *in3)
Definition simd_8x64.h:32
SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 sigma0() const
Definition simd_8x64.h:160
static SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 interleave_lo(const SIMD_8x64 &a, const SIMD_8x64 &b)
Definition simd_8x64.h:284
static void BOTAN_FN_ISA_SIMD_8X64 twist(SIMD_8x64 &B, SIMD_8x64 &C, SIMD_8x64 &D)
Definition simd_8x64.h:328
SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 sigma1() const
Definition simd_8x64.h:167
uint64_t BOTAN_FN_ISA_SIMD_8X64 extract() const
Definition simd_8x64.h:246
SIMD_8x64(SIMD_8x64 &&other)=default
void store_le(uint64_t out[8]) const
Definition simd_8x64.h:82
~SIMD_8x64()=default
static BOTAN_FN_ISA_SIMD_8X64 SIMD_8x64 choose(const SIMD_8x64 &mask, const SIMD_8x64 &a, const SIMD_8x64 &b)
Definition simd_8x64.h:175
SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 masked_madd52hi(uint8_t lanes, const SIMD_8x64 &a, const SIMD_8x64 &b) const
Definition simd_8x64.h:277
static BOTAN_FN_ISA_SIMD_8X64 SIMD_8x64 chi(const SIMD_8x64 &x, const SIMD_8x64 &y, const SIMD_8x64 &z)
Definition simd_8x64.h:143
static BOTAN_FN_ISA_SIMD_8X64 SIMD_8x64 mul2_32(SIMD_8x64 x, SIMD_8x64 y)
Definition simd_8x64.h:322
static BOTAN_FN_ISA_SIMD_8X64 SIMD_8x64 load_be4(const void *in0, const void *in1, const void *in2, const void *in3)
Definition simd_8x64.h:44
SIMD_8x64(const SIMD_8x64 &other)=default
SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 operator&(const SIMD_8x64 &other) const
Definition simd_8x64.h:109
BOTAN_FN_ISA_SIMD_8X64 void operator|=(const SIMD_8x64 &other)
Definition simd_8x64.h:133
static BOTAN_FN_ISA_SIMD_8X64 SIMD_8x64 load_le(const void *in)
Definition simd_8x64.h:51
static BOTAN_FN_ISA_SIMD_8X64 SIMD_8x64 majority(const SIMD_8x64 &x, const SIMD_8x64 &y, const SIMD_8x64 &z)
Definition simd_8x64.h:180
SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 madd52lo(const SIMD_8x64 &a, const SIMD_8x64 &b) const
Definition simd_8x64.h:256
SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 masked_madd52lo(uint8_t lanes, const SIMD_8x64 &a, const SIMD_8x64 &b) const
Definition simd_8x64.h:270
SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 operator|(const SIMD_8x64 &other) const
Definition simd_8x64.h:115
static BOTAN_FN_ISA_SIMD_8X64 SIMD_8x64 splat(uint64_t v)
Definition simd_8x64.h:319
__m512i BOTAN_FN_ISA_SIMD_8X64 raw() const noexcept
Definition simd_8x64.h:346
static BOTAN_FN_ISA_AVX512 SIMD_8x64 broadcast_2x64(const uint64_t *in)
Definition simd_8x64.h:56
static BOTAN_FN_ISA_SIMD_8X64 SIMD_8x64 load_be(const uint8_t *const *ptrs, size_t i, size_t n, size_t offset=0)
Definition simd_8x64.h:68
static SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 alignr(const SIMD_8x64 &hi, const SIMD_8x64 &lo)
Definition simd_8x64.h:239
static SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 alignr8(const SIMD_8x64 &a, const SIMD_8x64 &b)
Definition simd_8x64.h:231
BOTAN_FN_ISA_SIMD_8X64 SIMD_8x64()
Definition simd_8x64.h:29
uint8_t BOTAN_FN_ISA_SIMD_8X64 lanes_gt(const SIMD_8x64 &other) const
Definition simd_8x64.h:307
SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 shl() const noexcept
Definition simd_8x64.h:227
BOTAN_FN_ISA_SIMD_8X64 SIMD_8x64 rotr() const
Definition simd_8x64.h:149
static SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 interleave_hi(const SIMD_8x64 &a, const SIMD_8x64 &b)
Definition simd_8x64.h:292
BOTAN_FN_ISA_SIMD_8X64 SIMD_8x64 rotl() const
Definition simd_8x64.h:156
BOTAN_FN_ISA_SIMD_8X64 void store_be(uint8_t out[]) const
Definition simd_8x64.h:88
BOTAN_FN_ISA_SIMD_8X64 SIMD_8x64(__m512i x)
Definition simd_8x64.h:348
BOTAN_FN_ISA_SIMD_8X64 void store_le4(void *out0, void *out1, void *out2, void *out3)
Definition simd_8x64.h:90
SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 operator+(const SIMD_8x64 &other) const
Definition simd_8x64.h:97
BOTAN_FN_ISA_SIMD_8X64 void operator^=(const SIMD_8x64 &other)
Definition simd_8x64.h:125
SIMD_8x64 & operator=(SIMD_8x64 &&other)=default
static BOTAN_FN_ISA_SIMD_8X64 SIMD_8x64 load_be(const void *in)
Definition simd_8x64.h:60
uint8_t BOTAN_FN_ISA_SIMD_8X64 lanes_eq(const SIMD_8x64 &other) const
Definition simd_8x64.h:300
SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 operator^(const SIMD_8x64 &other) const
Definition simd_8x64.h:103
static BOTAN_FN_ISA_SIMD_8X64 void transpose(SIMD_8x64 &B0, SIMD_8x64 &B1, SIMD_8x64 &B2, SIMD_8x64 &B3, SIMD_8x64 &B4, SIMD_8x64 &B5, SIMD_8x64 &B6, SIMD_8x64 &B7)
Definition simd_8x64.h:185
SIMD_8x64 BOTAN_FN_ISA_SIMD_8X64 shr() const noexcept
Definition simd_8x64.h:222
SIMD_8x64 & operator=(const SIMD_8x64 &other)=default