vSMC  v3.0.0
Scalable Monte Carlo
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
vsmc::AESNIGenerator< KeySeqType, Rounds, Blocks > Class Template Reference

RNG generator using AES-NI instructions. More...

#include <vsmc/rng/aes_ni.hpp>

Public Types

using ctr_type = std::array< std::uint64_t, 2 >
 
using key_type = typename KeySeqType::key_type
 

Public Member Functions

void enc (const ctr_type &ctr, ctr_type &buffer) const
 
template<typename ResultType >
void operator() (ctr_type &ctr, std::array< ResultType, size()/sizeof(ResultType)> &buffer) const
 
template<typename ResultType >
void operator() (ctr_type &ctr, std::size_t n, std::array< ResultType, size()/sizeof(ResultType)> *buffer) const
 
void reset (const key_type &key)
 

Static Public Member Functions

static constexpr std::size_t size ()
 

Friends

bool operator!= (const AESNIGenerator< KeySeqType, Rounds, Blocks > &gen1, const AESNIGenerator< KeySeqType, Rounds, Blocks > &gen2)
 
template<typename CharT , typename Traits >
std::basic_ostream< CharT, Traits > & operator<< (std::basic_ostream< CharT, Traits > &os, const AESNIGenerator< KeySeqType, Rounds, Blocks > &gen)
 
bool operator== (const AESNIGenerator< KeySeqType, Rounds, Blocks > &gen1, const AESNIGenerator< KeySeqType, Rounds, Blocks > &gen2)
 
template<typename CharT , typename Traits >
std::basic_istream< CharT, Traits > & operator>> (std::basic_istream< CharT, Traits > &is, AESNIGenerator< KeySeqType, Rounds, Blocks > &gen)
 

Detailed Description

template<typename KeySeqType, std::size_t Rounds, std::size_t Blocks>
class vsmc::AESNIGenerator< KeySeqType, Rounds, Blocks >

RNG generator using AES-NI instructions.

Definition at line 86 of file aes_ni.hpp.

Member Typedef Documentation

template<typename KeySeqType, std::size_t Rounds, std::size_t Blocks>
using vsmc::AESNIGenerator< KeySeqType, Rounds, Blocks >::ctr_type = std::array<std::uint64_t, 2>

Definition at line 95 of file aes_ni.hpp.

template<typename KeySeqType, std::size_t Rounds, std::size_t Blocks>
using vsmc::AESNIGenerator< KeySeqType, Rounds, Blocks >::key_type = typename KeySeqType::key_type

Definition at line 96 of file aes_ni.hpp.

Member Function Documentation

template<typename KeySeqType, std::size_t Rounds, std::size_t Blocks>
void vsmc::AESNIGenerator< KeySeqType, Rounds, Blocks >::enc ( const ctr_type ctr,
ctr_type buffer 
) const
inline

Definition at line 102 of file aes_ni.hpp.

template<typename KeySeqType, std::size_t Rounds, std::size_t Blocks>
template<typename ResultType >
void vsmc::AESNIGenerator< KeySeqType, Rounds, Blocks >::operator() ( ctr_type ctr,
std::array< ResultType, size()/sizeof(ResultType)> &  buffer 
) const
inline

Definition at line 118 of file aes_ni.hpp.

template<typename KeySeqType, std::size_t Rounds, std::size_t Blocks>
template<typename ResultType >
void vsmc::AESNIGenerator< KeySeqType, Rounds, Blocks >::operator() ( ctr_type ctr,
std::size_t  n,
std::array< ResultType, size()/sizeof(ResultType)> *  buffer 
) const
inline

Definition at line 136 of file aes_ni.hpp.

template<typename KeySeqType, std::size_t Rounds, std::size_t Blocks>
void vsmc::AESNIGenerator< KeySeqType, Rounds, Blocks >::reset ( const key_type key)
inline

Definition at line 100 of file aes_ni.hpp.

template<typename KeySeqType, std::size_t Rounds, std::size_t Blocks>
static constexpr std::size_t vsmc::AESNIGenerator< KeySeqType, Rounds, Blocks >::size ( )
inlinestatic

Definition at line 98 of file aes_ni.hpp.

Friends And Related Function Documentation

template<typename KeySeqType, std::size_t Rounds, std::size_t Blocks>
bool operator!= ( const AESNIGenerator< KeySeqType, Rounds, Blocks > &  gen1,
const AESNIGenerator< KeySeqType, Rounds, Blocks > &  gen2 
)
friend

Definition at line 162 of file aes_ni.hpp.

template<typename KeySeqType, std::size_t Rounds, std::size_t Blocks>
template<typename CharT , typename Traits >
std::basic_ostream<CharT, Traits>& operator<< ( std::basic_ostream< CharT, Traits > &  os,
const AESNIGenerator< KeySeqType, Rounds, Blocks > &  gen 
)
friend

Definition at line 170 of file aes_ni.hpp.

template<typename KeySeqType, std::size_t Rounds, std::size_t Blocks>
bool operator== ( const AESNIGenerator< KeySeqType, Rounds, Blocks > &  gen1,
const AESNIGenerator< KeySeqType, Rounds, Blocks > &  gen2 
)
friend

Definition at line 155 of file aes_ni.hpp.

template<typename KeySeqType, std::size_t Rounds, std::size_t Blocks>
template<typename CharT , typename Traits >
std::basic_istream<CharT, Traits>& operator>> ( std::basic_istream< CharT, Traits > &  is,
AESNIGenerator< KeySeqType, Rounds, Blocks > &  gen 
)
friend

Definition at line 183 of file aes_ni.hpp.