Botan 3.4.0
Crypto and TLS for C&
Public Member Functions | Public Attributes | List of all members
Botan::SIMD_16x32 Class Referencefinal

#include <simd_avx512.h>

Public Member Functions

 BOTAN_FUNC_ISA ("avx512f,avx512dq,avx512bw") BOTAN_FORCE_INLINE SIMD_16x32()
 
 BOTAN_FUNC_ISA ("avx512f,avx512dq,avx512bw") explicit SIMD_16x32(const uint32_t B[16])
 
 BOTAN_FUNC_ISA ("avx512f,avx512dq,avx512bw") explicit SIMD_16x32(uint32_t B0
 
SIMD_16x32 BOTAN_FUNC_ISA ("avx512f,avx512dq,avx512bw") sigma0() const
 
SIMD_16x32 BOTAN_FUNC_ISA ("avx512f,avx512dq,avx512bw") sigma1() const
 
 BOTAN_FUNC_ISA ("avx512f,avx512dq,avx512bw") SIMD_16x32 operator&(const SIMD_16x32 &other) const
 
 BOTAN_FUNC_ISA ("avx512f,avx512dq,avx512bw") SIMD_16x32 operator+(const SIMD_16x32 &other) const
 
 BOTAN_FUNC_ISA ("avx512f,avx512dq,avx512bw") SIMD_16x32 operator-(const SIMD_16x32 &other) const
 
 BOTAN_FUNC_ISA ("avx512f,avx512dq,avx512bw") SIMD_16x32 operator^(const SIMD_16x32 &other) const
 
 BOTAN_FUNC_ISA ("avx512f,avx512dq,avx512bw") SIMD_16x32 operator|(const SIMD_16x32 &other) const
 
template<size_t ROT>
requires (ROT > 0 && ROT < 32)
 BOTAN_FUNC_ISA ("avx512f,avx512dq,avx512bw") SIMD_16x32 rotl() const
 
template<size_t ROT>
 BOTAN_FUNC_ISA ("avx512f,avx512dq,avx512bw") SIMD_16x32 rotr() const
 
 BOTAN_FUNC_ISA ("avx512f,avx512dq,avx512bw") static SIMD_16x32 load_be(const uint8_t *in)
 
 BOTAN_FUNC_ISA ("avx512f,avx512dq,avx512bw") static SIMD_16x32 load_le(const uint8_t *in)
 
 BOTAN_FUNC_ISA ("avx512f,avx512dq,avx512bw") static SIMD_16x32 splat(uint32_t B)
 
 BOTAN_FUNC_ISA ("avx512f,avx512dq,avx512bw") void operator+
 
 BOTAN_FUNC_ISA ("avx512f,avx512dq,avx512bw") void store_be(uint8_t out[]) const
 
 BOTAN_FUNC_ISA ("avx512f,avx512dq,avx512bw") void store_le(uint8_t out[]) const
 
SIMD_16x32operator= (const SIMD_16x32 &other)=default
 
SIMD_16x32operator= (SIMD_16x32 &&other)=default
 
 SIMD_16x32 (const SIMD_16x32 &other)=default
 
 SIMD_16x32 (SIMD_16x32 &&other)=default
 

Public Attributes

uint32_t B1
 
uint32_t uint32_t B2
 
uint32_t uint32_t uint32_t B3
 
uint32_t uint32_t uint32_t uint32_t B4
 
uint32_t uint32_t uint32_t uint32_t uint32_t B5
 
uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t B6
 
uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t B7
 
uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t B8
 
uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t B9
 
uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t BA
 
uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t BB
 
uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t BC
 
uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t BD
 
uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t BE
 
uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t BF
 

Detailed Description

Definition at line 17 of file simd_avx512.h.

Constructor & Destructor Documentation

◆ SIMD_16x32() [1/2]

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

◆ SIMD_16x32() [2/2]

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

Member Function Documentation

◆ BOTAN_FUNC_ISA() [1/18]

Botan::SIMD_16x32::BOTAN_FUNC_ISA ( " avx512f,
avx512dq ,
avx512bw"  )
inline

Definition at line 25 of file simd_avx512.h.

26 { m_avx512 = _mm512_setzero_si512(); }

◆ BOTAN_FUNC_ISA() [2/18]

Botan::SIMD_16x32::BOTAN_FUNC_ISA ( " avx512f,
avx512dq ,
avx512bw"  ) const
inline

Definition at line 28 of file simd_avx512.h.

29 { m_avx512 = _mm512_loadu_si512(reinterpret_cast<const __m512i*>(B)); }

◆ BOTAN_FUNC_ISA() [3/18]

Botan::SIMD_16x32::BOTAN_FUNC_ISA ( " avx512f,
avx512dq ,
avx512bw"  )

◆ BOTAN_FUNC_ISA() [4/18]

SIMD_16x32 Botan::SIMD_16x32::BOTAN_FUNC_ISA ( " avx512f,
avx512dq ,
avx512bw"  ) const
inline

Definition at line 80 of file simd_avx512.h.

80 {
81 const SIMD_16x32 rot1 = this->rotr<2>();
82 const SIMD_16x32 rot2 = this->rotr<13>();
83 const SIMD_16x32 rot3 = this->rotr<22>();
84 return rot1 ^ rot2 ^ rot3;
85 }
SIMD_16x32(const SIMD_16x32 &other)=default

◆ BOTAN_FUNC_ISA() [5/18]

SIMD_16x32 Botan::SIMD_16x32::BOTAN_FUNC_ISA ( " avx512f,
avx512dq ,
avx512bw"  ) const
inline

Definition at line 87 of file simd_avx512.h.

87 {
88 const SIMD_16x32 rot1 = this->rotr<6>();
89 const SIMD_16x32 rot2 = this->rotr<11>();
90 const SIMD_16x32 rot3 = this->rotr<25>();
91 return rot1 ^ rot2 ^ rot3;
92 }

◆ BOTAN_FUNC_ISA() [6/18]

Botan::SIMD_16x32::BOTAN_FUNC_ISA ( " avx512f,
avx512dq ,
avx512bw"  ) const &
inline

Definition at line 122 of file simd_avx512.h.

123 {
124 SIMD_16x32 retval(*this);
125 retval &= other;
126 return retval;
127 }

◆ BOTAN_FUNC_ISA() [7/18]

Botan::SIMD_16x32::BOTAN_FUNC_ISA ( " avx512f,
avx512dq ,
avx512bw"  ) const &
inline

Definition at line 94 of file simd_avx512.h.

95 {
96 SIMD_16x32 retval(*this);
97 retval += other;
98 return retval;
99 }

◆ BOTAN_FUNC_ISA() [8/18]

Botan::SIMD_16x32::BOTAN_FUNC_ISA ( " avx512f,
avx512dq ,
avx512bw"  ) const &
inline

Definition at line 101 of file simd_avx512.h.

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

◆ BOTAN_FUNC_ISA() [9/18]

Botan::SIMD_16x32::BOTAN_FUNC_ISA ( " avx512f,
avx512dq ,
avx512bw"  ) const &
inline

Definition at line 108 of file simd_avx512.h.

109 {
110 SIMD_16x32 retval(*this);
111 retval ^= other;
112 return retval;
113 }

◆ BOTAN_FUNC_ISA() [10/18]

Botan::SIMD_16x32::BOTAN_FUNC_ISA ( " avx512f,
avx512dq ,
avx512bw"  ) const &
inline

Definition at line 115 of file simd_avx512.h.

116 {
117 SIMD_16x32 retval(*this);
118 retval |= other;
119 return retval;
120 }

◆ BOTAN_FUNC_ISA() [11/18]

template<size_t ROT>
requires (ROT > 0 && ROT < 32)
Botan::SIMD_16x32::BOTAN_FUNC_ISA ( " avx512f,
avx512dq ,
avx512bw"  ) const
inline

Definition at line 69 of file simd_avx512.h.

71 {
72 return SIMD_16x32(_mm512_rol_epi32(m_avx512, ROT));
73 }

References SIMD_16x32().

◆ BOTAN_FUNC_ISA() [12/18]

template<size_t ROT>
Botan::SIMD_16x32::BOTAN_FUNC_ISA ( " avx512f,
avx512dq ,
avx512bw"  ) const
inline

Definition at line 76 of file simd_avx512.h.

76 {
77 return this->rotl<32 - ROT>();
78 }
constexpr T rotl(T input)
Definition rotate.h:21

References Botan::rotl().

◆ BOTAN_FUNC_ISA() [13/18]

Botan::SIMD_16x32::BOTAN_FUNC_ISA ( " avx512f,
avx512dq ,
avx512bw"  ) const
inline

Definition at line 59 of file simd_avx512.h.

60 { return load_le(in).bswap(); }
constexpr auto load_le(ParamTs &&... params)
Definition loadstor.h:462

References Botan::load_le().

◆ BOTAN_FUNC_ISA() [14/18]

Botan::SIMD_16x32::BOTAN_FUNC_ISA ( " avx512f,
avx512dq ,
avx512bw"  ) const
inline

Definition at line 54 of file simd_avx512.h.

55 {
56 return SIMD_16x32(_mm512_loadu_si512(reinterpret_cast<const __m512i*>(in)));
57 }

References SIMD_16x32().

◆ BOTAN_FUNC_ISA() [15/18]

Botan::SIMD_16x32::BOTAN_FUNC_ISA ( " avx512f,
avx512dq ,
avx512bw"  )
inline

Definition at line 51 of file simd_avx512.h.

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

References SIMD_16x32().

◆ BOTAN_FUNC_ISA() [16/18]

Botan::SIMD_16x32::BOTAN_FUNC_ISA ( " avx512f,
avx512dq ,
avx512bw"  )

◆ BOTAN_FUNC_ISA() [17/18]

Botan::SIMD_16x32::BOTAN_FUNC_ISA ( " avx512f,
avx512dq ,
avx512bw"  ) const
inline

Definition at line 65 of file simd_avx512.h.

66 { bswap().store_le(out); }

◆ BOTAN_FUNC_ISA() [18/18]

Botan::SIMD_16x32::BOTAN_FUNC_ISA ( " avx512f,
avx512dq ,
avx512bw"  ) const
inline

Definition at line 62 of file simd_avx512.h.

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

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

Member Data Documentation

◆ B1

uint32_t Botan::SIMD_16x32::B1

Definition at line 33 of file simd_avx512.h.

◆ B2

uint32_t uint32_t Botan::SIMD_16x32::B2

Definition at line 34 of file simd_avx512.h.

◆ B3

uint32_t uint32_t uint32_t Botan::SIMD_16x32::B3

Definition at line 35 of file simd_avx512.h.

◆ B4

uint32_t uint32_t uint32_t uint32_t Botan::SIMD_16x32::B4

Definition at line 36 of file simd_avx512.h.

◆ B5

uint32_t uint32_t uint32_t uint32_t uint32_t Botan::SIMD_16x32::B5

Definition at line 37 of file simd_avx512.h.

◆ B6

uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t Botan::SIMD_16x32::B6

Definition at line 38 of file simd_avx512.h.

◆ B7

uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t Botan::SIMD_16x32::B7

Definition at line 39 of file simd_avx512.h.

◆ B8

uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t Botan::SIMD_16x32::B8

Definition at line 40 of file simd_avx512.h.

◆ B9

uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t Botan::SIMD_16x32::B9

Definition at line 41 of file simd_avx512.h.

◆ BA

uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t Botan::SIMD_16x32::BA

Definition at line 42 of file simd_avx512.h.

◆ BB

uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t Botan::SIMD_16x32::BB

Definition at line 43 of file simd_avx512.h.

◆ BC

uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t Botan::SIMD_16x32::BC

Definition at line 44 of file simd_avx512.h.

◆ BD

uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t Botan::SIMD_16x32::BD

Definition at line 45 of file simd_avx512.h.

◆ BE

uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t Botan::SIMD_16x32::BE

Definition at line 46 of file simd_avx512.h.

◆ BF

uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t Botan::SIMD_16x32::BF
Initial value:
{
m_avx512 = _mm512_set_epi32(BF, BE, BD, BC, BB, BA, B9, B8, B7, B6, B5, B4, B3, B2, B1, B0)
uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t BA
Definition simd_avx512.h:42
uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t B6
Definition simd_avx512.h:38
uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t BF
Definition simd_avx512.h:47
uint32_t uint32_t uint32_t B3
Definition simd_avx512.h:35
uint32_t uint32_t B2
Definition simd_avx512.h:34
uint32_t uint32_t uint32_t uint32_t B4
Definition simd_avx512.h:36
uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t BD
Definition simd_avx512.h:45
uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t BB
Definition simd_avx512.h:43
uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t B9
Definition simd_avx512.h:41
uint32_t uint32_t uint32_t uint32_t uint32_t B5
Definition simd_avx512.h:37
uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t B8
Definition simd_avx512.h:40
uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t BE
Definition simd_avx512.h:46
uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t B7
Definition simd_avx512.h:39
uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t uint32_t BC
Definition simd_avx512.h:44

Definition at line 47 of file simd_avx512.h.


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