Universal Numbers Library C++ API
sw::universal -- header-only custom arithmetic types (posit, cfloat, lns, fixpnt, dd/qd, and more)
Loading...
Searching...
No Matches
sw::universal::mxblock< ElementType, BlockSize > Class Template Reference

#include <mxblock_impl.hpp>

Public Member Functions

 mxblock ()=default
constexpr mxblock (const mxblock &)=default
constexpr mxblock (mxblock &&)=default
constexpr mxblock & operator= (const mxblock &)=default
constexpr mxblock & operator= (mxblock &&)=default
constexpr void quantize (const float *src, size_t n=BlockSize) noexcept
constexpr void dequantize (float *dst, size_t n=BlockSize) const noexcept
constexpr float operator[] (size_t i) const noexcept
constexpr float dot (const mxblock &rhs) const noexcept
constexpr const e8m0 & scale () const noexcept
constexpr e8m0 & scale () noexcept
constexpr const ElementType & element (size_t i) const noexcept
constexpr ElementType & element (size_t i) noexcept
constexpr void clear () noexcept
constexpr void setbits (unsigned scaleBits) noexcept

Static Public Member Functions

static constexpr size_t size () noexcept
static constexpr size_t byte_size () noexcept

Static Public Attributes

static constexpr size_t blockSize = BlockSize
static constexpr int elemMaxExp = max_elem_exponent<ElementType>

Constructor & Destructor Documentation

◆ mxblock() [1/3]

template<typename ElementType, size_t BlockSize>
sw::universal::mxblock< ElementType, BlockSize >::mxblock ( )
default

◆ mxblock() [2/3]

template<typename ElementType, size_t BlockSize>
sw::universal::mxblock< ElementType, BlockSize >::mxblock ( const mxblock< ElementType, BlockSize > & )
constexprdefault

◆ mxblock() [3/3]

template<typename ElementType, size_t BlockSize>
sw::universal::mxblock< ElementType, BlockSize >::mxblock ( mxblock< ElementType, BlockSize > && )
constexprdefault

Member Function Documentation

◆ byte_size()

template<typename ElementType, size_t BlockSize>
constexpr size_t sw::universal::mxblock< ElementType, BlockSize >::byte_size ( )
inlinestaticconstexprnoexcept

◆ clear()

template<typename ElementType, size_t BlockSize>
void sw::universal::mxblock< ElementType, BlockSize >::clear ( )
inlineconstexprnoexcept

◆ dequantize()

template<typename ElementType, size_t BlockSize>
void sw::universal::mxblock< ElementType, BlockSize >::dequantize ( float * dst,
size_t n = BlockSize ) const
inlineconstexprnoexcept

◆ dot()

template<typename ElementType, size_t BlockSize>
float sw::universal::mxblock< ElementType, BlockSize >::dot ( const mxblock< ElementType, BlockSize > & rhs) const
inlineconstexprnoexcept

◆ element() [1/2]

template<typename ElementType, size_t BlockSize>
const ElementType & sw::universal::mxblock< ElementType, BlockSize >::element ( size_t i) const
inlineconstexprnoexcept

◆ element() [2/2]

template<typename ElementType, size_t BlockSize>
ElementType & sw::universal::mxblock< ElementType, BlockSize >::element ( size_t i)
inlineconstexprnoexcept

◆ operator=() [1/2]

template<typename ElementType, size_t BlockSize>
mxblock & sw::universal::mxblock< ElementType, BlockSize >::operator= ( const mxblock< ElementType, BlockSize > & )
constexprdefault

◆ operator=() [2/2]

template<typename ElementType, size_t BlockSize>
mxblock & sw::universal::mxblock< ElementType, BlockSize >::operator= ( mxblock< ElementType, BlockSize > && )
constexprdefault

◆ operator[]()

template<typename ElementType, size_t BlockSize>
float sw::universal::mxblock< ElementType, BlockSize >::operator[] ( size_t i) const
inlineconstexprnoexcept

◆ quantize()

template<typename ElementType, size_t BlockSize>
void sw::universal::mxblock< ElementType, BlockSize >::quantize ( const float * src,
size_t n = BlockSize )
inlineconstexprnoexcept

◆ scale() [1/2]

template<typename ElementType, size_t BlockSize>
const e8m0 & sw::universal::mxblock< ElementType, BlockSize >::scale ( ) const
inlineconstexprnoexcept

◆ scale() [2/2]

template<typename ElementType, size_t BlockSize>
e8m0 & sw::universal::mxblock< ElementType, BlockSize >::scale ( )
inlineconstexprnoexcept

◆ setbits()

template<typename ElementType, size_t BlockSize>
void sw::universal::mxblock< ElementType, BlockSize >::setbits ( unsigned scaleBits)
inlineconstexprnoexcept

◆ size()

template<typename ElementType, size_t BlockSize>
constexpr size_t sw::universal::mxblock< ElementType, BlockSize >::size ( )
inlinestaticconstexprnoexcept

Member Data Documentation

◆ blockSize

template<typename ElementType, size_t BlockSize>
size_t sw::universal::mxblock< ElementType, BlockSize >::blockSize = BlockSize
staticconstexpr

◆ elemMaxExp

template<typename ElementType, size_t BlockSize>
int sw::universal::mxblock< ElementType, BlockSize >::elemMaxExp = max_elem_exponent<ElementType>
staticconstexpr

The documentation for this class was generated from the following file:
  • /home/runner/work/universal/universal/include/sw/universal/number/mxfloat/mxblock_impl.hpp