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

Namespaces

 ArrayOptions
 
 bump
 
 detail
 
 experimental
 
 fmt
 
 inlet
 
 internal
 
 klee
 
 lumberjack
 
 mint
 
 mir
 
 multimat
 
 numerics
 
 primal
 
 quest
 
 runtime_policy
 
 serial
 
 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  DeviceHash
 Implements a host/device-callable hash function for supported types, and passes through to std::hash otherwise. More...
 
class  FlatMapView
 Forward declaration of FlatMapView. 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...
 
struct  Allocator
 Wrapper type representing an Umpire allocator ID. More...
 
class  NumericArray
 A simple statically sized array of data with component-wise operators. More...
 
struct  NonChar
 Type trait to avoid outputting chars when a value is expected This avoids unintentionally outputting system beeps. More...
 
struct  NonChar< char >
 
struct  NonChar< unsigned char >
 
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  auto_atomic
 
struct  is_serial_atomic_exec
 
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
 
template<typename ExecSpace , typename T >
using ReduceSum = axom::serial::reductions::ReduceSum< ExecSpace, T >
 
template<typename ExecSpace , typename T >
using ReduceMin = axom::serial::reductions::ReduceMin< ExecSpace, T >
 
template<typename ExecSpace , typename T >
using ReduceMinLoc = axom::serial::reductions::ReduceMinLoc< ExecSpace, T >
 
template<typename ExecSpace , typename T >
using ReduceMax = axom::serial::reductions::ReduceMax< ExecSpace, T >
 
template<typename ExecSpace , typename T >
using ReduceMaxLoc = axom::serial::reductions::ReduceMaxLoc< ExecSpace, T >
 
template<typename ExecSpace , typename T >
using ReduceBitAnd = axom::serial::reductions::ReduceBitAnd< ExecSpace, T >
 
template<typename ExecSpace , typename T >
using ReduceBitOr = axom::serial::reductions::ReduceBitOr< ExecSpace, 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 { Malloc , 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...
 
bool isValidAllocatorID (int allocatorId) noexcept
 Returns whether allocatorId is a valid Axom allocator id. 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 , typename T >
AXOM_HOST_DEVICEatomicAdd (T *address, T value)
 
template<typename ExecSpace , typename T >
AXOM_HOST_DEVICEatomicSub (T *address, T value)
 
template<typename ExecSpace , typename T >
AXOM_HOST_DEVICEatomicMin (T *address, T value)
 
template<typename ExecSpace , typename T >
AXOM_HOST_DEVICEatomicMax (T *address, T value)
 
template<typename ExecSpace , typename T >
AXOM_HOST_DEVICEatomicAnd (T *address, T value)
 
template<typename ExecSpace , typename T >
AXOM_HOST_DEVICEatomicOr (T *address, T value)
 
template<typename ExecSpace , typename T >
AXOM_HOST_DEVICEatomicXor (T *address, T value)
 
template<typename ExecSpace , typename T >
AXOM_HOST_DEVICEatomicExchange (T *address, T value)
 
template<typename ExecSpace , typename T >
AXOM_HOST_DEVICEatomicLoad (T *address)
 
template<typename ExecSpace , typename T >
AXOM_HOST_DEVICE void atomicStore (T *address, T value)
 
int policyToDefaultAllocatorID (axom::runtime_policy::Policy policy)
 Return default allocator id for a runtime policy. More...
 
template<typename ExecSpace , typename T >
void sort (T *input, axom::IndexType size)
 Sort an array. More...
 
template<typename ExecSpace , typename ContiguousMemoryContainer >
void sort (ContiguousMemoryContainer &input)
 Sort a container. More...
 
template<typename ExecSpace , typename Container1 , typename Container2 >
void sort_pairs (Container1 &input1, Container2 &input2)
 Sort a pair of containers using the first container's elements as the values to sort. The second container is sorted the same way. More...
 
template<typename ExecSpace , typename T , typename U >
void stable_sort_pairs (T *input1, U *input2, axom::IndexType size)
 Sort a pair of arrays using the first array's elements as the values to sort. The second array is sorted the same way. This sort is stable. More...
 
template<typename ExecSpace , typename Container1 , typename Container2 >
void stable_sort_pairs (Container1 &input1, Container2 &input2)
 Sort a pair of containers using the first container's elements as the values to sort. The second container is sorted the same way. This sort is stable. 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 Umpire allocator or MALLOC_ALLOCATOR_ID if Umpire is not used. More...
 
int getAllocatorIDFromPointer (const void *ptr)
 Get the allocator id from which data has been allocated. More...
 
bool isSharedMemoryAllocator (int allocID)
 Determines whether an allocator id is for shared memory. More...
 
int getSharedMemoryAllocatorID (std::size_t minSegmentSize=0)
 Get the allocator ID for Axom's shared memory allocator. 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 >
T * allocate (std::size_t n, const std::string &name, int allocID=getDefaultAllocatorID()) noexcept
 Allocates a chunk of memory of type T with a user-supplied allocation name. 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...
 
template<typename T >
void fill (void *dst, std::size_t n, const T &value) noexcept
 Fills memory with a value. More...
 
Forward Declared Overloaded Operators
template<typename T , int SIZE>
AXOM_HOST_DEVICE bool operator== (const NumericArray< T, SIZE > &lhs, const NumericArray< T, SIZE > &rhs)
 Checks if two numeric arrays are component-wise equal. More...
 
template<typename T , int SIZE>
AXOM_HOST_DEVICE bool operator!= (const NumericArray< T, SIZE > &lhs, const NumericArray< T, SIZE > &rhs)
 Checks if two numeric arrays are not component-wise equal. More...
 
template<typename T , int SIZE>
AXOM_HOST_DEVICE NumericArray< T, SIZE > operator+ (const NumericArray< T, SIZE > &lhs, const NumericArray< T, SIZE > &rhs)
 Performs component-wise addition of two numeric arrays. More...
 
template<typename T , int SIZE>
AXOM_HOST_DEVICE NumericArray< T, SIZE > operator- (const NumericArray< T, SIZE > &lhs, const NumericArray< T, SIZE > &rhs)
 Performs component-wise subtraction of two numeric arrays. More...
 
template<typename T , int SIZE>
AXOM_HOST_DEVICE NumericArray< T, SIZE > operator- (const NumericArray< T, SIZE > &arr)
 Unary negation of a numeric array instance. More...
 
template<typename T , int SIZE>
AXOM_HOST_DEVICE NumericArray< T, SIZE > operator* (const NumericArray< T, SIZE > &arr, double scalar)
 Scalar multiplication a numeric array; Scalar on rhs. More...
 
template<typename T , int SIZE>
AXOM_HOST_DEVICE NumericArray< T, SIZE > operator* (double scalar, const NumericArray< T, SIZE > &arr)
 Scalar multiplication a numeric array; Scalar on lhs. More...
 
template<typename T , int SIZE>
AXOM_HOST_DEVICE NumericArray< T, SIZE > operator* (const NumericArray< T, SIZE > &lhs, const NumericArray< T, SIZE > &rhs)
 Component-wise multiplication of NumericArrays. More...
 
template<typename T , int SIZE>
AXOM_HOST_DEVICE NumericArray< T, SIZE > operator/ (const NumericArray< T, SIZE > &lhs, const NumericArray< T, SIZE > &rhs)
 Component-wise division of NumericArrays. More...
 
template<typename T , int SIZE>
AXOM_HOST_DEVICE NumericArray< T, SIZE > operator/ (const NumericArray< T, SIZE > &arr, double scalar)
 Scalar division of NumericArray; Scalar on rhs. More...
 
template<typename T , int SIZE>
AXOM_HOST_DEVICE NumericArray< T, SIZE > abs (const NumericArray< T, SIZE > &arr)
 Coordinate-wise absolute value on the NumericArray. More...
 
template<typename T , int SIZE>
std::ostream & operator<< (std::ostream &os, const NumericArray< T, SIZE > &arr)
 Overloaded output operator for numeric arrays. More...
 
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...
 
template<typename ExecSpace , typename KernelType >
void for_all (const axom::StackArray< IndexType, 2 > &iRange, const axom::StackArray< IndexType, 2 > &jRange, KernelType &&kernel) noexcept
 Loops over a 2D specified contiguous range. More...
 
template<typename ExecSpace , typename KernelType >
void for_all (const axom::StackArray< IndexType, 2 > &shape, KernelType &&kernel) noexcept
 Loops over a 2D specified contiguous range. More...
 
template<typename ExecSpace , typename KernelType >
void for_all (const axom::StackArray< IndexType, 2 > &iRange, const axom::StackArray< IndexType, 2 > &jRange, const axom::StackArray< IndexType, 2 > &kRange, KernelType &&kernel) noexcept
 Loops over a 3D specified contiguous range. More...
 
template<typename ExecSpace , typename KernelType >
void for_all (const StackArray< IndexType, 3 > &shape, KernelType &&kernel) noexcept
 Loops over a 3D specified contiguous range. More...
 
Scans
template<typename ExecSpace , typename Container1 , typename Container2 >
void exclusive_scan (const Container1 &input, Container2 &&output)
 Performs exclusive scan over input view and stores result in output. More...
 
template<typename ExecSpace , typename Container >
void exclusive_scan_inplace (Container &&input)
 Performs exclusive scan over input view and stores result also in input. More...
 
template<typename ExecSpace , typename Container1 , typename Container2 >
void inclusive_scan (const Container1 &input, Container2 &&output)
 Performs inclusive scan over input view and stores result in output. More...
 
template<typename ExecSpace , typename Container >
void inclusive_scan_inplace (Container &&input)
 Performs inclusive scan over input view and stores result in input. More...
 
Generic Timed Loop Traversal Functions
template<typename ExecSpace , typename KernelType >
void timed_for_all (const std::string &name, axom::IndexType n, KernelType &&kernel)
 Execute axom::for_all and add a caliper timer (if enabled). Certain ExecSpace types may output additional timing information. More...
 

Variables

constexpr int INVALID_ALLOCATOR_ID = -1
 Place holder for no/unknown allocator. More...
 
constexpr int MALLOC_ALLOCATOR_ID = -3
 Refers to MemorySpace::Malloc. More...
 
static constexpr IndexType InvalidIndex = -1
 
template<typename ExecSpace >
constexpr bool is_serial_atomic_exec_v = is_serial_atomic_exec<ExecSpace>::value
 

Typedef Documentation

◆ MCArray

template<typename T >
using axom::MCArray = typedef Array<T, 2>

Helper alias for multi-component arrays.

◆ MCArrayView

template<typename T >
using axom::MCArrayView = typedef ArrayView<T, 2>

Helper alias for multi-component arrays.

◆ numeric_limits

template<typename T >
using axom::numeric_limits = typedef std::numeric_limits<T>

◆ float32

using axom::float32 = typedef float

◆ float64

using axom::float64 = typedef double

◆ IndexType

using axom::IndexType = typedef std::int32_t

◆ ReduceSum

template<typename ExecSpace , typename T >
using axom::ReduceSum = typedef axom::serial::reductions::ReduceSum<ExecSpace, T>

◆ ReduceMin

template<typename ExecSpace , typename T >
using axom::ReduceMin = typedef axom::serial::reductions::ReduceMin<ExecSpace, T>

◆ ReduceMinLoc

template<typename ExecSpace , typename T >
using axom::ReduceMinLoc = typedef axom::serial::reductions::ReduceMinLoc<ExecSpace, T>

◆ ReduceMax

template<typename ExecSpace , typename T >
using axom::ReduceMax = typedef axom::serial::reductions::ReduceMax<ExecSpace, T>

◆ ReduceMaxLoc

template<typename ExecSpace , typename T >
using axom::ReduceMaxLoc = typedef axom::serial::reductions::ReduceMaxLoc<ExecSpace, T>

◆ ReduceBitAnd

template<typename ExecSpace , typename T >
using axom::ReduceBitAnd = typedef axom::serial::reductions::ReduceBitAnd<ExecSpace, T>

◆ ReduceBitOr

template<typename ExecSpace , typename T >
using axom::ReduceBitOr = typedef axom::serial::reductions::ReduceBitOr<ExecSpace, T>

Enumeration Type Documentation

◆ ArrayStrideOrder

enum axom::ArrayStrideOrder : int
strong

Indicator for stride ordering.

Multidimensional array data can be in row-major order, column-major order, or some arbitrarily permuted order. Row- and column-major ordering are the same if the array is 1D.

Enumerator
ARBITRARY 
ROW 
COLUMN 
BOTH 

◆ MemorySpace

enum axom::MemorySpace
strong

Memory spaces supported by Array-like types.

This abstraction is not implemented using Umpire's MemoryResourceType enum in order to also include

  • a "Malloc" option that uses malloc and free.
  • a "Dynamic" option as a default template parameter for use in Array-like types (see axom::Array). If using Umpire, "Dynamic" refers to the default Umpire allocator. If not using Umpire, "Dynamic" falls back on "Malloc". (See axom::setDefaultAllocator() and axom::getDefaultAllocator().)
Enumerator
Malloc 

Host memory using malloc, free and realloc.

Dynamic 

Refers to Umpire's current default allocator.

Function Documentation

◆ operator<<() [1/3]

template<typename T , int DIM, typename ArrayType >
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.

Parameters
[in,out]osoutput stream object.
[in]arruser-supplied Array-like instance.
Returns
os the updated output stream object.

References print().

◆ operator==() [1/4]

template<typename T1 , typename T2 , int DIM, typename LArrayType , typename RArrayType >
bool axom::operator== ( const ArrayBase< T1, DIM, LArrayType > &  lhs,
const ArrayBase< T2, DIM, RArrayType > &  rhs 
)

Equality comparison operator for Array-likes.

Parameters
[in]lhsleft Array-like to compare
[in]rhsright Array-like to compare
Returns
true if the Arrays have the same allocator ID, are of equal shape, and have the same elements.

References axom::ArrayBase< T, DIM, ArrayType >::flatIndex(), axom::detail::getAllocatorID(), and axom::ArrayBase< T, DIM, ArrayType >::shape().

◆ operator!=() [1/4]

template<typename T1 , typename T2 , int DIM, typename LArrayType , typename RArrayType >
bool axom::operator!= ( const ArrayBase< T1, DIM, LArrayType > &  lhs,
const ArrayBase< T2, DIM, RArrayType > &  rhs 
)

Inequality comparison operator for Arrays.

Parameters
[in]lhsleft Array to compare
[in]rhsright Array to compare
Returns
true if the Arrays do not have the same allocator ID, are not of equal shape, or do not have the same elements.

◆ print()

template<typename T , int DIM, typename ArrayType >
std::ostream& axom::print ( std::ostream &  os,
const ArrayBase< T, DIM, ArrayType > &  array 
)
inline

Free functions implementing ArrayBase's operator(s)

References axom::detail::getAllocatorID(), and axom::utilities::processAbort().

◆ isValidAllocatorID()

bool axom::isValidAllocatorID ( int  allocatorId)
inlinenoexcept

Returns whether allocatorId is a valid Axom allocator id.

Note
When built without Umpire, the only valid allocator id is axom::MALLOC_ALLOCATOR_ID.

References INVALID_ALLOCATOR_ID, and MALLOC_ALLOCATOR_ID.

◆ setDefaultAllocator()

void axom::setDefaultAllocator ( int  allocId)
inline

Sets the default memory allocator to use.

Parameters
[in]allocIdthe Umpire allocator id
Note
This function has no effect when Axom is not compiled with Umpire.

References AXOM_UNUSED_VAR.

◆ getDefaultAllocatorID()

int axom::getDefaultAllocatorID ( )
inline

Returns the ID of the current default Umpire allocator or MALLOC_ALLOCATOR_ID if Umpire is not used.

Returns
ID of the current Umpire default allocator or MALLOC_ALLOCATOR_ID.

References MALLOC_ALLOCATOR_ID.

◆ getAllocatorIDFromPointer()

int axom::getAllocatorIDFromPointer ( const void *  ptr)
inline

Get the allocator id from which data has been allocated.

Returns
Allocator id. If Umpire doesn't have an allocator for the pointer, or if Axom wasn't configured with Umpire, assume the non-null pointers are from a malloc and return axom::MALLOC_ALLOCATOR_ID.
Precondition
ptr has a valid pointer value.

References INVALID_ALLOCATOR_ID, and MALLOC_ALLOCATOR_ID.

◆ isSharedMemoryAllocator()

bool axom::isSharedMemoryAllocator ( int  allocID)

Determines whether an allocator id is for shared memory.

Parameters
allocIDAn allocator id.
Returns
True if the allocator id is for shared memory; false otherwise.

◆ getSharedMemoryAllocatorID()

int axom::getSharedMemoryAllocatorID ( std::size_t  minSegmentSize = 0)

Get the allocator ID for Axom's shared memory allocator.

Parameters
[in]minSegmentSizeMinimum desired shared-memory segment size in bytes (0 to use defaults). This value is treated as a minimum; the implementation will use the maximum of this value and Umpire's default shared-memory segment size when creating the allocator. This minimum is applied when creating the allocator and is ignored if the allocator already exists (except for validation).
Note
The shared-memory segment size cannot be increased after creation. If the allocator already exists and minSegmentSize is larger than its existing segment size, this function aborts with an explanatory message.
Returns
The allocator ID for Axom's shared memory allocator (if Axom is built with Umpire shared memory support), or INVALID_ALLOCATOR_ID otherwise.

◆ allocate() [1/2]

template<typename T >
T * axom::allocate ( std::size_t  n,
int  allocID = getDefaultAllocatorID() 
)
inlinenoexcept

Allocates a chunk of memory of type T.

Parameters
[in]nthe number of elements to allocate.
[in]allocIDthe Umpire allocator to use (optional)
Template Parameters
Tthe type of pointer returned.
Note
By default allocate() will use the current default allocator. The caller may explicitly specify a different allocator to use by supplying the second, optional argument, or change the default allocator by calling axom::setDefaultAllocator().
Returns
p pointer to the new allocation or a nullptr if allocation failed.

References MALLOC_ALLOCATOR_ID, and axom::utilities::processAbort().

◆ allocate() [2/2]

template<typename T >
T * axom::allocate ( std::size_t  n,
const std::string &  name,
int  allocID = getDefaultAllocatorID() 
)
inlinenoexcept

Allocates a chunk of memory of type T with a user-supplied allocation name.

Parameters
[in]nthe number of elements to allocate.
[in]nameallocation name (must be non-empty for shared memory allocators)
[in]allocIDthe Umpire allocator to use (optional)
Returns
pointer to the new allocation or a nullptr if allocation failed.

References AXOM_UNUSED_VAR, MALLOC_ALLOCATOR_ID, and axom::utilities::processAbort().

◆ deallocate()

template<typename T >
void axom::deallocate ( T *&  p)
inlinenoexcept

Frees the chunk of memory pointed to by the supplied pointer, p.

Parameters
[in/out]p a pointer to memory allocated with allocate/reallocate or a nullptr.
Postcondition
p == nullptr

◆ reallocate()

template<typename T >
T * axom::reallocate ( T *  p,
std::size_t  n,
int  allocID = getDefaultAllocatorID() 
)
inlinenoexcept

Reallocates the chunk of memory pointed to by the supplied pointer.

Parameters
[in]ppointer to memory allocated with allocate/reallocate, or a nullptr.
[in]nthe number of elements to allocate.
[in]allocIDthe ID of the allocator to use if pointer is null (optional)
Template Parameters
Tthe type pointer p points to.
Returns
p pointer to the new allocation or a nullptr if allocation failed.
Note
When n == 0, this function returns a valid pointer (of size 0) in the current allocator's memory space. This follows the semantics of Umpire's reallocate function.
When p is a null pointer, allocID is used to allocate the data. Otherwise, it is unused.

References copy(), deallocate(), INVALID_ALLOCATOR_ID, MALLOC_ALLOCATOR_ID, and axom::utilities::processAbort().

◆ copy()

void axom::copy ( void *  dst,
const void *  src,
std::size_t  numbytes 
)
inlinenoexcept

Copies memory from the source to the destination.

Parameters
[in/out]dst the destination to copy to.
[in]srcthe source to copy from.
[in]numbytesthe number of bytes to copy.
Note
When using Umpire if either src or dst is not registered with the ResourceManager then the default host allocation strategy is assumed for that pointer.

◆ fill()

template<typename T >
void axom::fill ( void *  dst,
std::size_t  n,
const T &  value 
)
inlinenoexcept

Fills memory with a value.

Parameters
[in/out]dst the destination to copy to.
[in]nthe number of items to copy.
[in]Thevalue to copy. It must be trivially copyable for use with GPU.
Note
When using Umpire if dst is not registered with the ResourceManager then the default host allocation strategy is assumed for that pointer.

◆ isDeviceAllocator()

bool axom::isDeviceAllocator ( int   AXOM_UNUSED_PARAMallocator_id)
inline

Determines whether an allocator id is on device.

Parameters
allocator_idAn allocator id.
Returns
True if the allocator id is for a device; false otherwise.

◆ operator==() [2/4]

template<typename T , int SIZE>
AXOM_HOST_DEVICE bool axom::operator== ( const NumericArray< T, SIZE > &  lhs,
const NumericArray< T, SIZE > &  rhs 
)

Checks if two numeric arrays are component-wise equal.

Free functions implementing comparison and arithmetic operators.

Parameters
[in]lhsnumeric array instance on the left-hand side.
[in]rhsnumeric array instance on the right-hand side.
Returns
status true if lhs==rhs, otherwise, false.

◆ operator!=() [2/4]

template<typename T , int SIZE>
AXOM_HOST_DEVICE bool axom::operator!= ( const NumericArray< T, SIZE > &  lhs,
const NumericArray< T, SIZE > &  rhs 
)

Checks if two numeric arrays are not component-wise equal.

Parameters
[in]lhsnumeric array instance on the left-hand side.
[in]rhsnumeric array instance on the right-hand side.
Returns
status true if lhs!=rhs, otherwise, false.

◆ operator+()

template<typename T , int SIZE>
AXOM_HOST_DEVICE NumericArray< T, SIZE > axom::operator+ ( const NumericArray< T, SIZE > &  lhs,
const NumericArray< T, SIZE > &  rhs 
)
inline

Performs component-wise addition of two numeric arrays.

Parameters
[in]lhsnumeric array instance on the left-hand side.
[in]rhsnumeric array instance on the right-hand side.
Returns
C resulting numeric array from the component-wise addition.

◆ operator-() [1/2]

template<typename T , int SIZE>
AXOM_HOST_DEVICE NumericArray< T, SIZE > axom::operator- ( const NumericArray< T, SIZE > &  lhs,
const NumericArray< T, SIZE > &  rhs 
)
inline

Performs component-wise subtraction of two numeric arrays.

Parameters
[in]lhsnumeric array instance on the left-hand side.
[in]rhsnumeric array instance on the right-hand side.
Returns
C resulting numeric array from component-wise subtraction.

◆ operator-() [2/2]

template<typename T , int SIZE>
AXOM_HOST_DEVICE NumericArray< T, SIZE > axom::operator- ( const NumericArray< T, SIZE > &  arr)
inline

Unary negation of a numeric array instance.

Parameters
[in]arrnumeric array instance on the left-hand side.
Returns
C resulting numeric array from unary negation.

◆ operator*() [1/3]

template<typename T , int SIZE>
AXOM_HOST_DEVICE NumericArray< T, SIZE > axom::operator* ( const NumericArray< T, SIZE > &  arr,
double  scalar 
)
inline

Scalar multiplication a numeric array; Scalar on rhs.

Parameters
[in]arrnumeric array instance.
[in]scalaruser-supplied scalar.
Returns
C resutling numeric array, \( \ni: C_i = scalar*arr_i, \forall i\)

◆ operator*() [2/3]

template<typename T , int SIZE>
AXOM_HOST_DEVICE NumericArray< T, SIZE > axom::operator* ( double  scalar,
const NumericArray< T, SIZE > &  arr 
)
inline

Scalar multiplication a numeric array; Scalar on lhs.

Parameters
[in]scalaruser-supplied scalar.
[in]arrnumeric array instance.
Returns
C resulting numeric array, \( \ni: C_i = scalar*arr_i, \forall i\)

◆ operator*() [3/3]

template<typename T , int SIZE>
AXOM_HOST_DEVICE NumericArray< T, SIZE > axom::operator* ( const NumericArray< T, SIZE > &  lhs,
const NumericArray< T, SIZE > &  rhs 
)
inline

Component-wise multiplication of NumericArrays.

Parameters
[in]lhsnumeric array instance on the left-hand side.
[in]rhsnumeric array instance on the right-hand side.
Returns
C resulting numeric array, \( \ni: C_i = lhs_i * rhs_i, \forall i\)

◆ operator/() [1/2]

template<typename T , int SIZE>
AXOM_HOST_DEVICE NumericArray< T, SIZE > axom::operator/ ( const NumericArray< T, SIZE > &  lhs,
const NumericArray< T, SIZE > &  rhs 
)
inline

Component-wise division of NumericArrays.

Parameters
[in]lhsnumeric array instance on the left-hand side.
[in]rhsnumeric array instance on the right-hand side.
Returns
C resulting numeric array, \( \ni: C_i = lhs_i / rhs_i, \forall i\)
Precondition
\( rhs_i != 0.0, \forall i \)

◆ operator/() [2/2]

template<typename T , int SIZE>
AXOM_HOST_DEVICE NumericArray< T, SIZE > axom::operator/ ( const NumericArray< T, SIZE > &  arr,
double  scalar 
)
inline

Scalar division of NumericArray; Scalar on rhs.

Parameters
[in]arrnumeric array instance
[in]scalaruser-supplied scalar
Returns
C resulting numeric array, \( \ni: C_i = arr_i/scalar, \forall i\)
Precondition
scalar != 0.0

◆ abs()

template<typename T , int SIZE>
AXOM_HOST_DEVICE NumericArray< T, SIZE > axom::abs ( const NumericArray< T, SIZE > &  arr)
inline

Coordinate-wise absolute value on the NumericArray.

Parameters
[in]arrnumeric array instance
Precondition
std::abs is defined for template type T
Returns
A NumericArray whose coordinates are the absolute value of arr

References axom::utilities::abs().

◆ operator<<() [2/3]

template<typename T , int SIZE>
std::ostream & axom::operator<< ( std::ostream &  os,
const NumericArray< T, SIZE > &  arr 
)

Overloaded output operator for numeric arrays.

Parameters
[in]osC++ output stream
[in]arrnumeric array instance.

References axom::NumericArray< T, SIZE >::print().

◆ operator==() [3/4]

bool axom::operator== ( const Path lhs,
const Path rhs 
)

Equality operator (equals)

Parameters
[in]lhsThe first Path to compare
[in]rhsThe second Path to compare Two paths are equal if they use the same delimiter and contain the same components

◆ operator!=() [3/4]

bool axom::operator!= ( const Path lhs,
const Path rhs 
)
inline

Equality operator (not equals)

Parameters
[in]lhsThe first Path to compare
[in]rhsThe second Path to compare Two paths are equal if they use the same delimiter and contain the same components

◆ operator==() [4/4]

template<typename T , int N>
AXOM_HOST_DEVICE bool axom::operator== ( const StackArray< T, N > &  lhs,
const StackArray< T, N > &  rhs 
)

Equality comparison operator for StackArray.

Parameters
[in]lhsleft StackArray to compare
[in]rhsright StackArray to compare
Returns
true if the StackArrays have the same element values

◆ operator!=() [4/4]

template<typename T , int N>
AXOM_HOST_DEVICE bool axom::operator!= ( const StackArray< T, N > &  lhs,
const StackArray< T, N > &  rhs 
)

Inequality comparison operator for StackArray.

Parameters
[in]lhsleft StackArray to compare
[in]rhsright StackArray to compare
Returns
true if the StackArrays have different element values

◆ operator<()

template<typename T , int N>
AXOM_HOST_DEVICE bool axom::operator< ( const StackArray< T, N > &  lhs,
const StackArray< T, N > &  rhs 
)

Less than operator for StackArray.

Parameters
[in]lhsleft StackArray to compare
[in]rhsright StackArray to compare
Returns
true if lhs is lexicographically less than rhs, false otherwise
Note
It is only valid to call this function when values of type T are comparable, e.g. when T has an operator<()

◆ operator<<() [3/3]

template<typename T , int N>
std::ostream& axom::operator<< ( std::ostream &  os,
const StackArray< T, N > &  obj 
)

Print the StackArray to a stream.

Parameters
osThe stream to use.
objThe StackArray to print.
Returns
The input stream.

References axom::StackArray< T, N >::m_data.

◆ gitSHA()

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.

◆ about() [1/2]

void axom::about ( )

Prints info about how Axom was configured and built to stdout.

◆ about() [2/2]

void axom::about ( std::ostream &  oss)

Prints info about how Axom was configured and built to a stream.

Parameters
[in,out]ossthe target stream where to append the Axom info

◆ getVersion()

std::string axom::getVersion ( )

Returns a string consisting of the Axom version.

Returns
string corresponding to the Axom version

◆ atomicAdd()

template<typename ExecSpace , typename T >
AXOM_HOST_DEVICE T axom::atomicAdd ( T *  address,
value 
)
inline

◆ atomicSub()

template<typename ExecSpace , typename T >
AXOM_HOST_DEVICE T axom::atomicSub ( T *  address,
value 
)
inline

◆ atomicMin()

template<typename ExecSpace , typename T >
AXOM_HOST_DEVICE T axom::atomicMin ( T *  address,
value 
)
inline

◆ atomicMax()

template<typename ExecSpace , typename T >
AXOM_HOST_DEVICE T axom::atomicMax ( T *  address,
value 
)
inline

◆ atomicAnd()

template<typename ExecSpace , typename T >
AXOM_HOST_DEVICE T axom::atomicAnd ( T *  address,
value 
)
inline

◆ atomicOr()

template<typename ExecSpace , typename T >
AXOM_HOST_DEVICE T axom::atomicOr ( T *  address,
value 
)
inline

◆ atomicXor()

template<typename ExecSpace , typename T >
AXOM_HOST_DEVICE T axom::atomicXor ( T *  address,
value 
)
inline

◆ atomicExchange()

template<typename ExecSpace , typename T >
AXOM_HOST_DEVICE T axom::atomicExchange ( T *  address,
value 
)
inline

◆ atomicLoad()

template<typename ExecSpace , typename T >
AXOM_HOST_DEVICE T axom::atomicLoad ( T *  address)
inline

◆ atomicStore()

template<typename ExecSpace , typename T >
AXOM_HOST_DEVICE void axom::atomicStore ( T *  address,
value 
)
inline

◆ policyToDefaultAllocatorID()

int axom::policyToDefaultAllocatorID ( axom::runtime_policy::Policy  policy)
inline

◆ for_all() [1/6]

template<typename ExecSpace , typename KernelType >
void axom::for_all ( const IndexType begin,
const IndexType end,
KernelType &&  kernel 
)
inlinenoexcept

Loops over a specified contiguous range, I:[begin,end-1].

Parameters
[in]beginstart index of the iteration.
[in]endlength of the iteration space.
[in]kerneluser-supplied kernel, i.e., a lambda or functor.
Template Parameters
ExecSpacethe execution space where to run the supplied kernel
KernelTypethe type of the supplied kernel (detected by the compiler)
See also
axom::execution_space

Usage Example:

double* A = ...
double* B = ...
double* C = ...
// compute C[ idx ] for all entries in [100-499]
axom::for_all< axom::OMP_EXEC >( 100, 500, AXOM_LAMBDA( IndexType idx ) {
C[ idx ] = A[ idx ] + B[ idx ];
} );
#define AXOM_LAMBDA
Convenience macro used for lambda capture by value.
Definition: Macros.hpp:87
std::int32_t IndexType
Definition: Types.hpp:66

References AXOM_STATIC_ASSERT, axom::utilities::annotations::begin(), and axom::utilities::annotations::end().

◆ for_all() [2/6]

template<typename ExecSpace , typename KernelType >
void axom::for_all ( const IndexType N,
KernelType &&  kernel 
)
inlinenoexcept

Loops over the contiguous range, I:[0,N-1], given by its length, N.

Parameters
[in]Nthe length of the contiguous range.
[in]kerneluser-supplied kernel, i.e., a lambda or functor.
Template Parameters
ExecSpacethe execution space where to run the supplied kernel
KernelTypethe type of the supplied kernel (detected by the compiler)
See also
axom::execution_space

Usage Example:

double* A = ...
double* B = ...
double* C = ...
axom::for_all< axom::OMP_EXEC >( 500, AXOM_LAMBDA( IndexType idx ) {
C[ idx ] = A[ idx ] + B[ idx ];
} );

References AXOM_STATIC_ASSERT.

◆ for_all() [3/6]

template<typename ExecSpace , typename KernelType >
void axom::for_all ( const axom::StackArray< IndexType, 2 > &  iRange,
const axom::StackArray< IndexType, 2 > &  jRange,
KernelType &&  kernel 
)
inlinenoexcept

Loops over a 2D specified contiguous range.

Parameters
[in]iRangeThe start/end values for the inner loop.
[in]jRangeThe start/end values for the outer loop.
[in]kerneluser-supplied kernel, i.e., a lambda or functor.
Template Parameters
ExecSpacethe execution space where to run the supplied kernel
KernelTypethe type of the supplied kernel (detected by the compiler)
See also
axom::execution_space

Usage Example:

double* A = ...
double* B = ...
double* C = ...
// compute C[ idx ] for all entries in i:[0-99],j:[0-299]
IndexType NX = 100;
IndexType NY = 300;
StackArray<IndexType, 2> iRange{{0, NX}};
StackArray<IndexType, 2> jRange{{0, NY}};
axom::for_all< axom::OMP_EXEC >( iRange, jRange, AXOM_LAMBDA( IndexType i, IndexType j ) {
const auto idx = j * NX + i;
C[ idx ] = A[ idx ] + B[ idx ];
} );

References AXOM_STATIC_ASSERT.

◆ for_all() [4/6]

template<typename ExecSpace , typename KernelType >
void axom::for_all ( const axom::StackArray< IndexType, 2 > &  shape,
KernelType &&  kernel 
)
inlinenoexcept

Loops over a 2D specified contiguous range.

Parameters
[in]shape2 values that indicate the range of the inner, outer loops, respectively.
[in]kerneluser-supplied kernel, i.e., a lambda or functor.
Template Parameters
ExecSpacethe execution space where to run the supplied kernel
KernelTypethe type of the supplied kernel (detected by the compiler)
See also
axom::execution_space

Usage Example:

double* A = ...
double* B = ...
double* C = ...
// compute C[ idx ] for all entries in i:[0-99],j:[0-299]
IndexType NX = 100;
IndexType NY = 300;
StackArray<IndexType, 2> shape{{NX, NY}};
axom::for_all< axom::OMP_EXEC >( shape, AXOM_LAMBDA( IndexType i, IndexType j ) {
const auto idx = j * NX + i;
C[ idx ] = A[ idx ] + B[ idx ];
} );

◆ for_all() [5/6]

template<typename ExecSpace , typename KernelType >
void axom::for_all ( const axom::StackArray< IndexType, 2 > &  iRange,
const axom::StackArray< IndexType, 2 > &  jRange,
const axom::StackArray< IndexType, 2 > &  kRange,
KernelType &&  kernel 
)
inlinenoexcept

Loops over a 3D specified contiguous range.

Parameters
[in]iRangeThe start/end values for the inner loop.
[in]jRangeThe start/end values for the middle loop.
[in]kRangeThe start/end values for the outer loop.
[in]kerneluser-supplied kernel, i.e., a lambda or functor.
Template Parameters
ExecSpacethe execution space where to run the supplied kernel
KernelTypethe type of the supplied kernel (detected by the compiler)
See also
axom::execution_space

Usage Example:

double* A = ...
double* B = ...
double* C = ...
// compute C[ idx ] for all entries in i:[0-99],j:[0-299],k:[0-49]
IndexType NX = 100;
IndexType NY = 300;
IndexType NZ = 50;
StackArray<IndexType, 2> iRange{{0, NX}};
StackArray<IndexType, 2> kRange{{0, NY}};
StackArray<IndexType, 2> kRange{{0, NZ}};
axom::for_all< axom::OMP_EXEC >(iRange, jRange, kRange, AXOM_LAMBDA( IndexType i, IndexType j, IndexType k ) {
const auto idx = (k * NX * NY) + (j * NX) + i;
C[ idx ] = A[ idx ] + B[ idx ];
} );

References AXOM_STATIC_ASSERT.

◆ for_all() [6/6]

template<typename ExecSpace , typename KernelType >
void axom::for_all ( const StackArray< IndexType, 3 > &  shape,
KernelType &&  kernel 
)
inlinenoexcept

Loops over a 3D specified contiguous range.

Parameters
[in]shapeAn array containing the x,y,z sizes of the loops.
[in]kerneluser-supplied kernel, i.e., a lambda or functor.
Template Parameters
ExecSpacethe execution space where to run the supplied kernel
KernelTypethe type of the supplied kernel (detected by the compiler)
See also
axom::execution_space

Usage Example:

double* A = ...
double* B = ...
double* C = ...
// compute C[ idx ] for all entries in i:[0-99],j:[0-299],k:[0-49]
IndexType NX = 100;
IndexType NY = 300;
IndexType NZ = 50;
StackArray<IndexType, 3> shape{{NX, NY, NZ}};
axom::for_all< axom::OMP_EXEC >(shape, AXOM_LAMBDA( IndexType i, IndexType j, IndexType k ) {
const auto idx = (k * NX * NY) + (j * NX) + i;
C[ idx ] = A[ idx ] + B[ idx ];
} );

◆ exclusive_scan()

template<typename ExecSpace , typename Container1 , typename Container2 >
void axom::exclusive_scan ( const Container1 &  input,
Container2 &&  output 
)
inline

Performs exclusive scan over input view and stores result in output.

Parameters
[in]inputThe input container to be scanned.
[out]outputThe container that will contain the output scan data. This must have the same number of elements as input.
Template Parameters
ExecSpacethe execution space where to run the supplied kernel
Container1The container type that holds the input data.
Container2The container type that holds the output data.
Note
The container types Container1 and Container2 work with Axom's Array, ArrayView types as well as std::vector or any other type that provides a similar interface with these characteristics: 1) size() method, 2) data() method to return container memory pointer, 3) operator[] to return element access, 4) a "value_type" sub-type that indicates the type of data stored in the container.
See also
axom::execution_space

Usage Example:

axom::ArrayView<int> sizesView = sizes.view();
axom::ArrayView<int> offsetsView = offsets.view();
// Compute the scan for all elements in sizesView, store scan in offsetsView.
axom::exclusive_scan<ExecSpace>(sizesView, offsetsView);
Provides a view over a generic array container.
Definition: ArrayView.hpp:47

References AXOM_STATIC_ASSERT.

◆ exclusive_scan_inplace()

template<typename ExecSpace , typename Container >
void axom::exclusive_scan_inplace ( Container &&  input)
inline

Performs exclusive scan over input view and stores result also in input.

Parameters
[in,out]inputThe container to be scanned.
Template Parameters
ExecSpacethe execution space where to run the supplied kernel
ContainerThe container type that holds the data
Note
The Container type works with Axom's Array, ArrayView types as well as std::vector or any other type that provides a similar interface with these characteristics: 1) size() method, 2) data() method to return container memory pointer, 3) operator[] to return element access, 4) a "value_type" sub-type that indicates the type of data stored in the container.

References AXOM_STATIC_ASSERT.

◆ inclusive_scan()

template<typename ExecSpace , typename Container1 , typename Container2 >
void axom::inclusive_scan ( const Container1 &  input,
Container2 &&  output 
)
inline

Performs inclusive scan over input view and stores result in output.

Parameters
[in]inputThe input container to be scanned.
[out]outputThe container that will contain the output scan data. This must have the same number of elements as input.
Template Parameters
ExecSpacethe execution space where to run the supplied kernel
Container1The container type that holds the input data
Container2The container type that holds the output data
Note
The container types Container1 and Container2 work with Axom's Array, ArrayView types as well as std::vector or any other type that provides a similar interface with these characteristics: 1) size() method, 2) data() method to return container memory pointer, 3) operator[] to return element access, 4) a "value_type" sub-type that indicates the type of data stored in the container.
See also
axom::execution_space

Usage Example:

axom::ArrayView<int> sizesView = sizes.view();
axom::ArrayView<int> totalView = totals.view();
// Compute the scan for all elements in sizesView, store scan in totalView.
axom::inclusive_scan<ExecSpace>(sizesView, totalView);

References AXOM_STATIC_ASSERT.

◆ inclusive_scan_inplace()

template<typename ExecSpace , typename Container >
void axom::inclusive_scan_inplace ( Container &&  input)
inline

Performs inclusive scan over input view and stores result in input.

Parameters
[in,out]inputThe container to be scanned.
Template Parameters
ExecSpacethe execution space where to run the supplied kernel
ContainerThe container type that holds the data
Note
The Container type works with Axom's Array, ArrayView types as well as std::vector or any other type that provides a similar interface with these characteristics: 1) size() method, 2) data() method to return container memory pointer, 3) operator[] to return element access, 4) a "value_type" sub-type that indicates the type of data stored in the container.

References AXOM_STATIC_ASSERT.

◆ sort() [1/2]

template<typename ExecSpace , typename T >
void axom::sort ( T *  input,
axom::IndexType  size 
)
inline

Sort an array.

Template Parameters
ExecSpaceThe execution space where the sort occurs.
TThe type of data to sort.
Parameters
inputThe data array to sort.
sizeThe number of elements to sort.

References AXOM_STATIC_ASSERT, and axom::utilities::Sorting< T, N >::sort().

◆ sort() [2/2]

template<typename ExecSpace , typename ContiguousMemoryContainer >
void axom::sort ( ContiguousMemoryContainer &  input)
inline

Sort a container.

Template Parameters
ExecSpaceThe execution space where the sort occurs.
ContiguousMemoryContainerContainer type for the data to sort.
Parameters
inputThe container to sort.

◆ sort_pairs()

template<typename ExecSpace , typename Container1 , typename Container2 >
void axom::sort_pairs ( Container1 &  input1,
Container2 &  input2 
)
inline

Sort a pair of containers using the first container's elements as the values to sort. The second container is sorted the same way.

Template Parameters
ExecSpaceThe execution space where the sort occurs.
Container1The container type to sort.
Container2The second container type to sort.
Parameters
input1The container to sort (used as sorting key values).
input2A second container to sort (according to input1's sort order).

References AXOM_STATIC_ASSERT, and axom::utilities::sort_multiple().

◆ stable_sort_pairs() [1/2]

template<typename ExecSpace , typename T , typename U >
void axom::stable_sort_pairs ( T *  input1,
U *  input2,
axom::IndexType  size 
)
inline

Sort a pair of arrays using the first array's elements as the values to sort. The second array is sorted the same way. This sort is stable.

Template Parameters
ExecSpaceThe execution space where the sort occurs.
TType for the first data array to sort.
UType for the second data array to sort.
Parameters
input1The data array to sort (used as sorting key values).
input2A second array to sort (according to input1's sort order).
sizeThe number of elements in input1 and input2.

References AXOM_STATIC_ASSERT.

◆ stable_sort_pairs() [2/2]

template<typename ExecSpace , typename Container1 , typename Container2 >
void axom::stable_sort_pairs ( Container1 &  input1,
Container2 &  input2 
)
inline

Sort a pair of containers using the first container's elements as the values to sort. The second container is sorted the same way. This sort is stable.

Template Parameters
ExecSpaceThe execution space where the sort occurs.
Container1The container type to sort.
Container2The second container type to sort.
Parameters
input1The data container to sort (used as sorting key values).
input2A second container to sort (according to input1's sort order).
sizeThe number of elements in input1 and input2.

◆ synchronize()

template<typename ExecSpace >
void axom::synchronize ( )
inlinenoexcept

Synchronizes all execution threads when using an ASYNC policy with the specified execution space.

Template Parameters
ExecSpacethe execution space

References AXOM_STATIC_ASSERT.

◆ synchronize< SEQ_EXEC >()

template<>
void axom::synchronize< SEQ_EXEC > ( )
inlinenoexcept

◆ timed_for_all()

template<typename ExecSpace , typename KernelType >
void axom::timed_for_all ( const std::string &  name,
axom::IndexType  n,
KernelType &&  kernel 
)

Execute axom::for_all and add a caliper timer (if enabled). Certain ExecSpace types may output additional timing information.

Parameters
nameThe name of the loop being timed.
nThe number it items in the loop.
kernelThe kernel to execute.

References axom::detail::TimedForAll< ExecSpace, KernelType >::execute().

Variable Documentation

◆ INVALID_ALLOCATOR_ID

constexpr int axom::INVALID_ALLOCATOR_ID = -1
constexpr

Place holder for no/unknown allocator.

◆ MALLOC_ALLOCATOR_ID

constexpr int axom::MALLOC_ALLOCATOR_ID = -3
constexpr

Refers to MemorySpace::Malloc.

◆ InvalidIndex

constexpr IndexType axom::InvalidIndex = -1
staticconstexpr

◆ is_serial_atomic_exec_v

template<typename ExecSpace >
constexpr bool axom::is_serial_atomic_exec_v = is_serial_atomic_exec<ExecSpace>::value
constexpr