AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::bump::Unique< ExecSpace, KeyType > Struct Template Reference

Makes a unique array of values from values that could contain multiple instances of a key. More...

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

Static Public Member Functions

static void execute (const axom::ArrayView< KeyType > keys_orig_view, axom::Array< KeyType > &skeys, axom::Array< axom::IndexType > &sindices, int allocator_id=axom::execution_space< ExecSpace >::allocatorID())
 This function makes a unique array of values from an input list of keys. The output set of unique keys is sorted. More...
 

Detailed Description

template<typename ExecSpace, typename KeyType>
struct axom::bump::Unique< ExecSpace, KeyType >

Makes a unique array of values from values that could contain multiple instances of a key.

Template Parameters
ExecSpaceThe execution space.
KeyTypeThe data type for the keys.

Member Function Documentation

◆ execute()

template<typename ExecSpace , typename KeyType >
static void axom::bump::Unique< ExecSpace, KeyType >::execute ( const axom::ArrayView< KeyType >  keys_orig_view,
axom::Array< KeyType > &  skeys,
axom::Array< axom::IndexType > &  sindices,
int  allocator_id = axom::execution_space<ExecSpace>::allocatorID() 
)
inlinestatic

This function makes a unique array of values from an input list of keys. The output set of unique keys is sorted.

Parameters
[in]keys_orig_viewThe input view that contains the input keys to be made unique.
[out]skeysA sorted unique array of keys produced from keys_orig_view. If there were duplicates in keys_orig_view then the size will be smaller since duplicates will have been removed.
[out]sindicesAn array of indices that indicate where in the original view the keys came from (the index of the key that was used the unique key). This array contains the same number of elements as skeys. This array is useful when the calling algorithm needs to select data out of other arrays associated with the keys.
Note
key_orig_view is passed by value so it does not require a local copy to capture it.

References AXOM_LAMBDA, axom::serial::reductions::ReduceSum< ExecSpace, T >::get(), axom::ArrayView< T, DIM, SPACE >::size(), and axom::Array< T, DIM, SPACE, StoragePolicy >::view().


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