AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::detail Namespace Reference

Classes

struct  ArrayTraits< Array< T, DIM, SPACE, StoragePolicy > >
 
class  DefaultStoragePolicy
 Default storage policy for axom::Array. Uses Umpire to reallocate buffers. More...
 
struct  ArrayTraits
 
class  ArraySubslice
 Proxy class for efficiently constructing slice ArrayViews by using the generic ArrayBase constructor in ArrayView. This avoids the cost of looking up the correct allocator ID from the other ArrayView constructors. More...
 
struct  SubsliceProxy
 
struct  SubsliceProxy< T, SliceDim, ArraySubslice< T, OldSliceDim, BaseArray > >
 
struct  SubsliceProxy< T, SliceDim, const ArraySubslice< T, OldSliceDim, BaseArray > >
 
struct  all_types_are_integral_impl
 Indirection needed to dodge an MSVC compiler bug. More...
 
struct  all_types_are_integral_impl< First, Rest... >
 
struct  all_types_are_integral
 Checks if all types in a parameter pack are integral. More...
 
struct  DeviceStagingBuffer
 
struct  ArrayOps
 
struct  ArrayTraits< ArraySubslice< T, SliceDim, BaseArray > >
 
struct  ArrayTraits< ArrayView< T, DIM, SPACE > >
 
struct  DeviceHashHelper
 Default catch-all specialization. Passes through to std::hash. More...
 
struct  DeviceHashHelper< T, std::enable_if_t< std::is_integral< T >::value > >
 Specialization for integral types. More...
 
struct  DeviceHashHelper< T, std::enable_if_t< std::is_floating_point< T >::value > >
 Specialization for floating-point types. More...
 
struct  DeviceHashHelper< T, std::enable_if_t< std::is_enum< T >::value > >
 SFINAE specialization for enum types. More...
 
struct  DeviceHashHelper< T *, void >
 Specialization for pointer types. More...
 
struct  SpinLock
 
class  KVPairIterator
 Implements a zip-iterator concept for a key-value pair. More...
 
class  FlatMapOffsetIterator
 Iterator helper for iterating over filled buckets given an array of bucket indices. More...
 
struct  TimedForAll
 Default implementation for timing axom::for_all. More...
 

Enumerations

enum class  AllocationBackend { Malloc , Invalid }
 

Functions

template<typename T , int N>
AXOM_HOST_DEVICEpackProduct (const T(&arr)[N])
 
template<typename T , int N>
bool allNonNegative (const T(&arr)[N])
 
template<int N, typename T , int DIM>
AXOM_HOST_DEVICE StackArray< T, N > takeLastElems (const StackArray< T, DIM > &arr)
 Takes the last N elements from an array. More...
 
template<typename ExecSpace >
void gatherFilledBuckets (ArrayView< flat_map::GroupBucket > group_metadata, ArrayView< IndexType > filled_bucket_indexes, IndexType num_buckets, int allocator_id)
 Helper function to gather filled buckets within a FlatMap. More...
 
void registerMallocAllocation (const void *pointer, std::size_t numbytes) noexcept
 
void updateMallocAllocation (const void *oldPointer, const void *newPointer, std::size_t numbytes) noexcept
 
void unregisterMallocAllocation (const void *pointer) noexcept
 
bool tryGetMallocAllocationSize (const void *pointer, std::size_t &numbytes) noexcept
 
AllocationBackend getAllocatorBackend (int allocID) noexcept
 
template<typename T >
AllocationBackend getPointerBackend (T *pointer) noexcept
 
void abortOnInvalidAllocatorID (int allocID)
 
void abortOnInvalidReallocateState ()
 
void abortOnUntrackedMallocMigration (const void *pointer, int allocID)
 
template<typename T >
T * normalizeZeroSizeReallocateResult (T *pointer, std::size_t n, int allocID) noexcept
 
template<typename T >
T * reallocateWithinMalloc (T *pointer, std::size_t numbytes) noexcept
 
template<MemorySpace SPACE>
int getAllocatorID ()
 Translates between the MemorySpace enum and Umpire allocator IDs. More...
 
template<>
int getAllocatorID< MemorySpace::Dynamic > ()
 
template<>
int getAllocatorID< MemorySpace::Malloc > ()
 
MemorySpace getAllocatorSpace (int allocatorId)
 Return the Axom MemorySpace for the given Axom allocator id. More...
 
template<>
int getAllocatorID< MemorySpace::Host > ()
 

Enumeration Type Documentation

◆ AllocationBackend

Enumerator
Malloc 
Invalid 

Function Documentation

◆ packProduct()

template<typename T , int N>
AXOM_HOST_DEVICE T axom::detail::packProduct ( const T(&)  arr[N])

◆ allNonNegative()

template<typename T , int N>
bool axom::detail::allNonNegative ( const T(&)  arr[N])

◆ takeLastElems()

template<int N, typename T , int DIM>
AXOM_HOST_DEVICE StackArray<T, N> axom::detail::takeLastElems ( const StackArray< T, DIM > &  arr)

Takes the last N elements from an array.

◆ gatherFilledBuckets()

template<typename ExecSpace >
void axom::detail::gatherFilledBuckets ( ArrayView< flat_map::GroupBucket >  group_metadata,
ArrayView< IndexType filled_bucket_indexes,
IndexType  num_buckets,
int  allocator_id 
)

Helper function to gather filled buckets within a FlatMap.

Workaround for a limitation within CUDA where a lambda cannot be defined in a protected or private member function.

References AXOM_LAMBDA, and getAllocatorSpace().

◆ registerMallocAllocation()

void axom::detail::registerMallocAllocation ( const void *  pointer,
std::size_t  numbytes 
)
noexcept

◆ updateMallocAllocation()

void axom::detail::updateMallocAllocation ( const void *  oldPointer,
const void *  newPointer,
std::size_t  numbytes 
)
noexcept

◆ unregisterMallocAllocation()

void axom::detail::unregisterMallocAllocation ( const void *  pointer)
noexcept

◆ tryGetMallocAllocationSize()

bool axom::detail::tryGetMallocAllocationSize ( const void *  pointer,
std::size_t &  numbytes 
)
noexcept

◆ getAllocatorBackend()

AllocationBackend axom::detail::getAllocatorBackend ( int  allocID)
inlinenoexcept

◆ getPointerBackend()

template<typename T >
AllocationBackend axom::detail::getPointerBackend ( T *  pointer)
inlinenoexcept

References AXOM_UNUSED_VAR, and Malloc.

◆ abortOnInvalidAllocatorID()

void axom::detail::abortOnInvalidAllocatorID ( int  allocID)
inline

◆ abortOnInvalidReallocateState()

void axom::detail::abortOnInvalidReallocateState ( )
inline

◆ abortOnUntrackedMallocMigration()

void axom::detail::abortOnUntrackedMallocMigration ( const void *  pointer,
int  allocID 
)
inline

◆ normalizeZeroSizeReallocateResult()

template<typename T >
T* axom::detail::normalizeZeroSizeReallocateResult ( T *  pointer,
std::size_t  n,
int  allocID 
)
inlinenoexcept

◆ reallocateWithinMalloc()

template<typename T >
T* axom::detail::reallocateWithinMalloc ( T *  pointer,
std::size_t  numbytes 
)
inlinenoexcept

◆ getAllocatorID()

template<MemorySpace SPACE>
int axom::detail::getAllocatorID ( )
inline

Translates between the MemorySpace enum and Umpire allocator IDs.

◆ getAllocatorID< MemorySpace::Dynamic >()

◆ getAllocatorID< MemorySpace::Malloc >()

◆ getAllocatorSpace()

MemorySpace axom::detail::getAllocatorSpace ( int  allocatorId)
inline

Return the Axom MemorySpace for the given Axom allocator id.

For Umpire allocator ids, the MemorySpace is the corresponding Axom memory space. For MALLOC_ALLOCATOR_ID, the MemorySpace is MemorySpace::Malloc. Other values have no corresponding MemorySpace and will cause an abort.

References axom::Dynamic, axom::Host, axom::Malloc, axom::MALLOC_ALLOCATOR_ID, and axom::utilities::processAbort().

◆ getAllocatorID< MemorySpace::Host >()