AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
Namespaces | |
ArrayOptions | |
detail | |
experimental | |
inlet | |
internal | |
klee | |
lumberjack | |
mint | |
mir | |
multimat | |
numerics | |
primal | |
quest | |
runtime_policy | |
sidre | |
sina | |
slam | |
slic | |
sol | |
spin | |
utilities | |
Classes | |
class | Array |
Provides a generic multidimensional array container. More... | |
class | ArrayBase |
class | ArrayBase< T, 1, ArrayType > |
Array implementation specific to 1D Arrays. More... | |
class | ArrayIteratorBase |
An iterator type for Array-like types. Each increment operation advances the iterator to the next element in the Array-like. More... | |
class | ArrayView |
Provides a view over a generic array container. More... | |
class | FlatMap |
Provides a generic associative key-value container. More... | |
class | IndexedCollection |
IndexedCollection is a container for a collection of pointers to items of template parameter type T, each with a corresponding index. More... | |
class | ItemCollection |
ItemCollection is an abstract base class template for holding a collection of items of template parameter type T. Derived child classes can determine how to specifically store the items. More... | |
class | IteratorBase |
Base class for a random access iterator over positions in a set. More... | |
class | ListCollection |
ListCollection is a container class template for holding a collection of items of template parameter type T, using a list container. More... | |
class | MapCollection |
MapCollection is a container class template for holding a collection of items of template parameter type T. More... | |
class | MDMapping |
For indexing multidimensional arrays. More... | |
class | Path |
Path class for performing basic path operations with a user-selectable delimiter character. More... | |
class | RangeAdapter |
Simple adapter class that converts a pair of iterators into a range that can be iterated over in a range-based for-loop. More... | |
class | StackArray |
Provides a wrapper for a compile time sized array, similar to std::array. This class is needed because NVCC doesn't capture standard stack arrays in device lambdas. Furthermore we can't use std::array because it is not host-device decorated. More... | |
class | StaticArray |
This class extends StackArray with some std::vector-like convenience methods. More... | |
struct | execution_space |
The execution_space is a traits class that binds the execution space to a corresponding RAJA execution policies and default memory allocator. More... | |
Typedefs | |
template<typename T > | |
using | MCArray = Array< T, 2 > |
Helper alias for multi-component arrays. More... | |
template<typename T > | |
using | numeric_limits = std::numeric_limits< T > |
using | float32 = float |
using | float64 = double |
using | IndexType = std::int32_t |
ArrayView to wrap a pointer and provide indexing semantics | |
template<typename T > | |
using | MCArrayView = ArrayView< T, 2 > |
Helper alias for multi-component arrays. More... | |
Enumerations | |
enum class | ArrayStrideOrder : int { ARBITRARY = 0 , ROW = 1 , COLUMN = 2 , BOTH = ROW | COLUMN } |
Indicator for stride ordering. More... | |
enum class | MemorySpace { Dynamic } |
Memory spaces supported by Array-like types. More... | |
Functions | |
template<typename T , int DIM, typename ArrayType > | |
std::ostream & | print (std::ostream &os, const ArrayBase< T, DIM, ArrayType > &array) |
Free functions implementing ArrayBase's operator(s) More... | |
template<typename T > | |
T * | allocate (std::size_t n, int allocID=getDefaultAllocatorID()) noexcept |
Allocates a chunk of memory of type T. More... | |
template<typename T > | |
void | deallocate (T *&p) noexcept |
Frees the chunk of memory pointed to by the supplied pointer, p. More... | |
template<typename T > | |
T * | reallocate (T *p, std::size_t n, int allocID=getDefaultAllocatorID()) noexcept |
Reallocates the chunk of memory pointed to by the supplied pointer. More... | |
void | copy (void *dst, const void *src, std::size_t numbytes) noexcept |
Copies memory from the source to the destination. More... | |
bool | isDeviceAllocator (int AXOM_UNUSED_PARAM(allocator_id)) |
Determines whether an allocator id is on device. More... | |
bool | operator== (const Path &lhs, const Path &rhs) |
Equality operator (equals) More... | |
bool | operator!= (const Path &lhs, const Path &rhs) |
Equality operator (not equals) More... | |
template<typename T , int N> | |
AXOM_HOST_DEVICE bool | operator== (const StackArray< T, N > &lhs, const StackArray< T, N > &rhs) |
Equality comparison operator for StackArray. More... | |
template<typename T , int N> | |
AXOM_HOST_DEVICE bool | operator!= (const StackArray< T, N > &lhs, const StackArray< T, N > &rhs) |
Inequality comparison operator for StackArray. More... | |
template<typename T , int N> | |
AXOM_HOST_DEVICE bool | operator< (const StackArray< T, N > &lhs, const StackArray< T, N > &rhs) |
Less than operator for StackArray. More... | |
template<typename T , int N> | |
std::ostream & | operator<< (std::ostream &os, const StackArray< T, N > &obj) |
Print the StackArray to a stream. More... | |
std::string | gitSHA () |
Returns the Git SHA if Axom was built in Git repository, empty if not. More... | |
void | about () |
Prints info about how Axom was configured and built to stdout. More... | |
void | about (std::ostream &oss) |
Prints info about how Axom was configured and built to a stream. More... | |
std::string | getVersion () |
Returns a string consisting of the Axom version. More... | |
template<typename ExecSpace > | |
void | synchronize () noexcept |
Synchronizes all execution threads when using an ASYNC policy with the specified execution space. More... | |
template<> | |
void | synchronize< SEQ_EXEC > () noexcept |
Overloaded ArrayBase Operator(s) | |
template<typename T , int DIM, typename ArrayType > | |
std::ostream & | operator<< (std::ostream &os, const ArrayBase< T, DIM, ArrayType > &arr) |
Overloaded output stream operator. Outputs the Array-like to the given output stream. More... | |
template<typename T1 , typename T2 , int DIM, typename LArrayType , typename RArrayType > | |
bool | operator== (const ArrayBase< T1, DIM, LArrayType > &lhs, const ArrayBase< T2, DIM, RArrayType > &rhs) |
Equality comparison operator for Array-likes. More... | |
template<typename T1 , typename T2 , int DIM, typename LArrayType , typename RArrayType > | |
bool | operator!= (const ArrayBase< T1, DIM, LArrayType > &lhs, const ArrayBase< T2, DIM, RArrayType > &rhs) |
Inequality comparison operator for Arrays. More... | |
Memory Management Routines | |
void | setDefaultAllocator (int allocId) |
Sets the default memory allocator to use. More... | |
int | getDefaultAllocatorID () |
Returns the ID of the current default allocator. More... | |
int | getAllocatorIDForAddress (void *AXOM_UNUSED_PARAM(ptr)) |
Returns the ID of the allocator that allocated the memory pointed to by ptr. More... | |
int | getAllocatorIDForAddress (const void *AXOM_UNUSED_PARAM(ptr)) |
Generic Loop Traversal Functions | |
template<typename ExecSpace , typename KernelType > | |
void | for_all (const IndexType &begin, const IndexType &end, KernelType &&kernel) noexcept |
Loops over a specified contiguous range, I:[begin,end-1]. More... | |
template<typename ExecSpace , typename KernelType > | |
void | for_all (const IndexType &N, KernelType &&kernel) noexcept |
Loops over the contiguous range, I:[0,N-1], given by its length, N. More... | |
Scans | |
template<typename ExecSpace , typename ContiguousMemoryContainer > | |
void | exclusive_scan (const ContiguousMemoryContainer &input, ContiguousMemoryContainer &output) |
Performs exclusive scan over input view and stores result in output. More... | |
template<typename ExecSpace , typename ContiguousMemoryContainer > | |
void | inclusive_scan (const ContiguousMemoryContainer &input, ContiguousMemoryContainer &output) |
Performs inclusive scan over input view and stores result in output. More... | |
Variables | |
constexpr int | INVALID_ALLOCATOR_ID = -1 |
static constexpr IndexType | InvalidIndex = -1 |
using axom::MCArray = typedef Array<T, 2> |
Helper alias for multi-component arrays.
using axom::MCArrayView = typedef ArrayView<T, 2> |
Helper alias for multi-component arrays.
using axom::numeric_limits = typedef std::numeric_limits<T> |
using axom::float32 = typedef float |
using axom::float64 = typedef double |
using axom::IndexType = typedef std::int32_t |
|
strong |
|
strong |
Memory spaces supported by Array-like types.
This abstraction is not implemented using Umpire's MemoryResourceType enum in order to also include a "Dynamic" option as a default template parameter for Array-like types
Enumerator | |
---|---|
Dynamic |
std::ostream & axom::operator<< | ( | std::ostream & | os, |
const ArrayBase< T, DIM, ArrayType > & | arr | ||
) |
Overloaded output stream operator. Outputs the Array-like to the given output stream.
[in,out] | os | output stream object. |
[in] | arr | user-supplied Array-like instance. |
References print().
bool axom::operator== | ( | const ArrayBase< T1, DIM, LArrayType > & | lhs, |
const ArrayBase< T2, DIM, RArrayType > & | rhs | ||
) |
Equality comparison operator for Array-likes.
[in] | lhs | left Array-like to compare |
[in] | rhs | right Array-like to compare |
References axom::ArrayBase< T, DIM, ArrayType >::flatIndex(), axom::detail::getAllocatorID(), and axom::ArrayBase< T, DIM, ArrayType >::shape().
|
inline |
Free functions implementing ArrayBase's operator(s)
References axom::detail::getAllocatorID(), and axom::utilities::processAbort().
|
inline |
Sets the default memory allocator to use.
[in] | allocId | the Umpire allocator id |
References AXOM_UNUSED_VAR.
|
inline |
Returns the ID of the current default allocator.
|
inline |
Returns the ID of the allocator that allocated the memory pointed to by ptr.
ptr | A pointer to memory. |
References getDefaultAllocatorID().
|
inline |
References getDefaultAllocatorID().
|
inlinenoexcept |
Allocates a chunk of memory of type T.
[in] | n | the number of elements to allocate. |
[in] | allocID | the Umpire allocator to use (optional) |
T | the type of pointer returned. |
References AXOM_UNUSED_VAR.
|
inlinenoexcept |
Frees the chunk of memory pointed to by the supplied pointer, p.
[in/out] | p a pointer to memory allocated with allocate/reallocate or a nullptr. |
|
inlinenoexcept |
Reallocates the chunk of memory pointed to by the supplied pointer.
[in] | p | pointer to memory allocated with allocate/reallocate, or a nullptr. |
[in] | n | the number of elements to allocate. |
[in] | allocID | the ID of the allocator to use if pointer is null (optional) |
T | the type pointer p points to. |
References AXOM_UNUSED_VAR.
|
inlinenoexcept |
Copies memory from the source to the destination.
[in/out] | dst the destination to copy to. | |
[in] | src | the source to copy from. |
[in] | numbytes | the number of bytes to copy. |
|
inline |
Determines whether an allocator id is on device.
allocator_id | An allocator id. |
AXOM_HOST_DEVICE bool axom::operator== | ( | const StackArray< T, N > & | lhs, |
const StackArray< T, N > & | rhs | ||
) |
Equality comparison operator for StackArray.
[in] | lhs | left StackArray to compare |
[in] | rhs | right StackArray to compare |
AXOM_HOST_DEVICE bool axom::operator!= | ( | const StackArray< T, N > & | lhs, |
const StackArray< T, N > & | rhs | ||
) |
Inequality comparison operator for StackArray.
[in] | lhs | left StackArray to compare |
[in] | rhs | right StackArray to compare |
AXOM_HOST_DEVICE bool axom::operator< | ( | const StackArray< T, N > & | lhs, |
const StackArray< T, N > & | rhs | ||
) |
Less than operator for StackArray.
[in] | lhs | left StackArray to compare |
[in] | rhs | right StackArray to compare |
std::ostream& axom::operator<< | ( | std::ostream & | os, |
const StackArray< T, N > & | obj | ||
) |
Print the StackArray to a stream.
os | The stream to use. |
obj | The StackArray to print. |
References axom::StackArray< T, N >::m_data.
std::string axom::gitSHA | ( | ) |
Returns the Git SHA if Axom was built in Git repository, empty if not.
Note: This will not update unless you re-run CMake between commits.
void axom::about | ( | ) |
Prints info about how Axom was configured and built to stdout.
void axom::about | ( | std::ostream & | oss | ) |
Prints info about how Axom was configured and built to a stream.
[in,out] | oss | the target stream where to append the Axom info |
std::string axom::getVersion | ( | ) |
Returns a string consisting of the Axom version.
|
inlinenoexcept |
Loops over a specified contiguous range, I:[begin,end-1].
[in] | begin | start index of the iteration. |
[in] | end | length of the iteration space. |
[in] | kernel | user-supplied kernel, i.e., a lambda or functor. |
ExecSpace | the execution space where to run the supplied kernel |
KernelType | the type of the supplied kernel (detected by the compiler) |
Usage Example:
References AXOM_STATIC_ASSERT, axom::utilities::annotations::begin(), and axom::utilities::annotations::end().
|
inlinenoexcept |
Loops over the contiguous range, I:[0,N-1], given by its length, N.
[in] | N | the length of the contiguous range. |
[in] | kernel | user-supplied kernel, i.e., a lambda or functor. |
ExecSpace | the execution space where to run the supplied kernel |
KernelType | the type of the supplied kernel (detected by the compiler) |
Usage Example:
References AXOM_STATIC_ASSERT.
|
inline |
Performs exclusive scan over input view and stores result in output.
[in] | input | The input container to be scanned. |
[out] | output | The container that will contain the output scan data. This must have the same number of elements as input. |
ExecSpace | the execution space where to run the supplied kernel |
ContiguousMemoryContainer | The container type that holds the data |
Usage Example:
References AXOM_STATIC_ASSERT.
|
inline |
Performs inclusive scan over input view and stores result in output.
[in] | input | The input container to be scanned. |
[out] | output | The container that will contain the output scan data. This must have the same number of elements as input. |
ExecSpace | the execution space where to run the supplied kernel |
ContiguousMemoryContainer | The container type that holds the data |
Usage Example:
References AXOM_STATIC_ASSERT.
|
inlinenoexcept |
Synchronizes all execution threads when using an ASYNC policy with the specified execution space.
ExecSpace | the execution space |
References AXOM_STATIC_ASSERT.
|
inlinenoexcept |
|
constexpr |
|
staticconstexpr |