AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::bump::HashNaming< IndexT, MAXIDS > Class Template Reference

This class implements a naming policy that uses some hashing functions to produce a "name" for an array of ids. More...

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/main/src/axom/bump/HashNaming.hpp>

Classes

class  View
 A view for making names, suitable for use in device code. More...
 

Public Types

using KeyType = std::uint64_t
 
using IndexType = IndexT
 

Public Member Functions

KeyType makeName (const IndexType *p, int n) const
 Make a name from the array of ids. More...
 
void setMaxId (IndexType n)
 Set the max number of nodes, which can help with id packing/narrowing. More...
 
View view ()
 Return a view that can be used on device. More...
 

Static Public Member Functions

static std::string toString (KeyType key)
 Turn name into a string. More...
 

Public Attributes

View m_view {}
 

Static Public Attributes

constexpr static KeyType KeyIDSingle = 0
 
constexpr static KeyType KeyIDPair = KeyType(1) << 62
 
constexpr static KeyType KeyIDPack = KeyType(2) << 62
 
constexpr static KeyType KeyIDHash = KeyType(3) << 62
 
constexpr static KeyType KeyMask = KeyType(3) << 62
 
constexpr static KeyType PayloadMask = ~KeyMask
 
constexpr static KeyType Max15Bit = (KeyType(1) << 15) - 1
 
constexpr static KeyType Max16Bit = (KeyType(1) << 16) - 1
 
constexpr static KeyType Max20Bit = (KeyType(1) << 20) - 1
 
constexpr static KeyType Max31Bit = (KeyType(1) << 31) - 1
 
constexpr static KeyType Max32Bit = (KeyType(1) << 32) - 1
 

Detailed Description

template<typename IndexT, int MAXIDS = 14>
class axom::bump::HashNaming< IndexT, MAXIDS >

This class implements a naming policy that uses some hashing functions to produce a "name" for an array of ids.

Template Parameters
IndexTThe index type that gets hashed.
MAXIDSThe max number of ids that get hashed.

Member Typedef Documentation

◆ KeyType

template<typename IndexT , int MAXIDS = 14>
using axom::bump::HashNaming< IndexT, MAXIDS >::KeyType = std::uint64_t

◆ IndexType

template<typename IndexT , int MAXIDS = 14>
using axom::bump::HashNaming< IndexT, MAXIDS >::IndexType = IndexT

Member Function Documentation

◆ makeName()

template<typename IndexT , int MAXIDS = 14>
KeyType axom::bump::HashNaming< IndexT, MAXIDS >::makeName ( const IndexType p,
int  n 
) const
inline

◆ setMaxId()

template<typename IndexT , int MAXIDS = 14>
void axom::bump::HashNaming< IndexT, MAXIDS >::setMaxId ( IndexType  n)
inline

Set the max number of nodes, which can help with id packing/narrowing.

Parameters
nThe number of nodes.

References axom::bump::HashNaming< IndexT, MAXIDS >::m_view, and axom::bump::HashNaming< IndexT, MAXIDS >::View::setMaxId().

◆ view()

template<typename IndexT , int MAXIDS = 14>
View axom::bump::HashNaming< IndexT, MAXIDS >::view ( )
inline

Return a view that can be used on device.

References axom::bump::HashNaming< IndexT, MAXIDS >::m_view.

◆ toString()

Member Data Documentation

◆ KeyIDSingle

template<typename IndexT , int MAXIDS = 14>
constexpr static KeyType axom::bump::HashNaming< IndexT, MAXIDS >::KeyIDSingle = 0
staticconstexpr

◆ KeyIDPair

template<typename IndexT , int MAXIDS = 14>
constexpr static KeyType axom::bump::HashNaming< IndexT, MAXIDS >::KeyIDPair = KeyType(1) << 62
staticconstexpr

◆ KeyIDPack

template<typename IndexT , int MAXIDS = 14>
constexpr static KeyType axom::bump::HashNaming< IndexT, MAXIDS >::KeyIDPack = KeyType(2) << 62
staticconstexpr

◆ KeyIDHash

template<typename IndexT , int MAXIDS = 14>
constexpr static KeyType axom::bump::HashNaming< IndexT, MAXIDS >::KeyIDHash = KeyType(3) << 62
staticconstexpr

◆ KeyMask

template<typename IndexT , int MAXIDS = 14>
constexpr static KeyType axom::bump::HashNaming< IndexT, MAXIDS >::KeyMask = KeyType(3) << 62
staticconstexpr

◆ PayloadMask

template<typename IndexT , int MAXIDS = 14>
constexpr static KeyType axom::bump::HashNaming< IndexT, MAXIDS >::PayloadMask = ~KeyMask
staticconstexpr

◆ Max15Bit

template<typename IndexT , int MAXIDS = 14>
constexpr static KeyType axom::bump::HashNaming< IndexT, MAXIDS >::Max15Bit = (KeyType(1) << 15) - 1
staticconstexpr

◆ Max16Bit

template<typename IndexT , int MAXIDS = 14>
constexpr static KeyType axom::bump::HashNaming< IndexT, MAXIDS >::Max16Bit = (KeyType(1) << 16) - 1
staticconstexpr

◆ Max20Bit

template<typename IndexT , int MAXIDS = 14>
constexpr static KeyType axom::bump::HashNaming< IndexT, MAXIDS >::Max20Bit = (KeyType(1) << 20) - 1
staticconstexpr

◆ Max31Bit

template<typename IndexT , int MAXIDS = 14>
constexpr static KeyType axom::bump::HashNaming< IndexT, MAXIDS >::Max31Bit = (KeyType(1) << 31) - 1
staticconstexpr

◆ Max32Bit

template<typename IndexT , int MAXIDS = 14>
constexpr static KeyType axom::bump::HashNaming< IndexT, MAXIDS >::Max32Bit = (KeyType(1) << 32) - 1
staticconstexpr

◆ m_view

template<typename IndexT , int MAXIDS = 14>
View axom::bump::HashNaming< IndexT, MAXIDS >::m_view {}

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