ttg::MultiIndex< Rank, Int > Struct Template Reference

Documentation

template<std::size_t Rank, typename Int = int>
struct ttg::MultiIndex< Rank, Int >

Definition at line 13 of file multiindex.h.

Public Member Functions

 MultiIndex ()=default
 
template<typename Integer , typename = std::enable_if_t<std::is_integral_v<Int>>>
 MultiIndex (std::initializer_list< Integer > ilist)
 
template<typename... Ints, typename = std::enable_if_t<(std::is_integral_v<Ints> && ...)>>
 MultiIndex (Ints... ilist)
 
 MultiIndex (std::size_t hash)
 
std::size_t hash () const
 
const auto & operator[] (std::size_t idx) const
 
template<typename Archive >
void serialize (Archive &ar, const unsigned int version=0)
 

Static Public Attributes

static constexpr const std::size_t max_index = 1 << 21
 
static constexpr const std::size_t max_index_square = max_index * max_index
 

Friends

bool operator== (const MultiIndex< Rank > &lhs, const MultiIndex< Rank > &rhs)
 
bool operator!= (const MultiIndex< Rank > &lhs, const MultiIndex< Rank > &rhs)
 

Constructor & Destructor Documentation

◆ MultiIndex() [1/4]

template<std::size_t Rank, typename Int = int>
ttg::MultiIndex< Rank, Int >::MultiIndex ( )
default

◆ MultiIndex() [2/4]

template<std::size_t Rank, typename Int = int>
template<typename Integer , typename = std::enable_if_t<std::is_integral_v<Int>>>
ttg::MultiIndex< Rank, Int >::MultiIndex ( std::initializer_list< Integer >  ilist)
inline

Definition at line 18 of file multiindex.h.

◆ MultiIndex() [3/4]

template<std::size_t Rank, typename Int = int>
template<typename... Ints, typename = std::enable_if_t<(std::is_integral_v<Ints> && ...)>>
ttg::MultiIndex< Rank, Int >::MultiIndex ( Ints...  ilist)
inline

Definition at line 23 of file multiindex.h.

◆ MultiIndex() [4/4]

template<std::size_t Rank, typename Int = int>
ttg::MultiIndex< Rank, Int >::MultiIndex ( std::size_t  hash)
inlineexplicit

Definition at line 26 of file multiindex.h.

Member Function Documentation

◆ hash()

template<std::size_t Rank, typename Int = int>
std::size_t ttg::MultiIndex< Rank, Int >::hash ( ) const
inline

Definition at line 42 of file multiindex.h.

◆ operator[]()

template<std::size_t Rank, typename Int = int>
const auto& ttg::MultiIndex< Rank, Int >::operator[] ( std::size_t  idx) const
inline

Definition at line 53 of file multiindex.h.

◆ serialize()

template<std::size_t Rank, typename Int = int>
template<typename Archive >
void ttg::MultiIndex< Rank, Int >::serialize ( Archive &  ar,
const unsigned int  version = 0 
)
inline

Definition at line 59 of file multiindex.h.

Friends And Related Function Documentation

◆ operator!=

template<std::size_t Rank, typename Int = int>
bool operator!= ( const MultiIndex< Rank > &  lhs,
const MultiIndex< Rank > &  rhs 
)
friend

Definition at line 77 of file multiindex.h.

◆ operator==

template<std::size_t Rank, typename Int = int>
bool operator== ( const MultiIndex< Rank > &  lhs,
const MultiIndex< Rank > &  rhs 
)
friend

Definition at line 74 of file multiindex.h.

Member Data Documentation

◆ max_index

template<std::size_t Rank, typename Int = int>
constexpr const std::size_t ttg::MultiIndex< Rank, Int >::max_index = 1 << 21
staticconstexpr

Definition at line 14 of file multiindex.h.

◆ max_index_square

template<std::size_t Rank, typename Int = int>
constexpr const std::size_t ttg::MultiIndex< Rank, Int >::max_index_square = max_index * max_index
staticconstexpr

Definition at line 15 of file multiindex.h.


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