GEOSX
Classes | Public Member Functions | List of all members
LvArray::ArrayOfSets< T, INDEX_TYPE, BUFFER_TYPE > Class Template Reference

This class implements an array of sets like object with contiguous storage. More...

#include <ArrayOfSets.hpp>

Inheritance diagram for LvArray::ArrayOfSets< T, INDEX_TYPE, BUFFER_TYPE >:
Inheritance graph
[legend]

Public Member Functions

void setName (std::string const &name)
 Set the name to be displayed whenever the underlying Buffer's user call back is called. More...
 
Constructors and the destructor.
 ArrayOfSets (INDEX_TYPE const nsets=0, INDEX_TYPE defaultSetCapacity=0)
 Constructor. More...
 
 ArrayOfSets (ArrayOfSets const &src)
 Copy constructor, performs a deep copy. More...
 
 ArrayOfSets (ArrayOfSets &&)=default
 Default move constructor, performs a shallow copy.
 
 ~ArrayOfSets ()
 Destructor, frees the values, sizes and offsets Buffers.
 
Methods to construct the array from scratch.
ArrayOfSetsoperator= (ArrayOfSets const &src)
 Copy assignment operator, performs a deep copy. More...
 
ArrayOfSetsoperator= (ArrayOfSets &&src)
 Default move assignment operator, performs a shallow copy. More...
 
void assimilate (ArrayOfArrays< T, INDEX_TYPE, BUFFER_TYPE > &&src, sortedArrayManipulation::Description const desc)
 Steal the resources from an ArrayOfArrays and convert it to an ArrayOfSets. More...
 
ArrayOfArraysView creation methods
constexpr ArrayOfSetsView< T, INDEX_TYPE const, BUFFER_TYPE > toView () const &
 
constexpr ArrayOfSetsView< T, INDEX_TYPE const, BUFFER_TYPE > toView () const &&=delete
 Overload for rvalues that is deleted. More...
 
constexpr ArrayOfSetsView< T const, INDEX_TYPE const, BUFFER_TYPE > toViewConst () const &
 
constexpr ArrayOfSetsView< T const, INDEX_TYPE const, BUFFER_TYPE > toViewConst () const &&=delete
 Overload for rvalues that is deleted. More...
 
constexpr ArrayOfArraysView< T const, INDEX_TYPE const, true, BUFFER_TYPE > toArrayOfArraysView () const &
 
constexpr ArrayOfArraysView< T const, INDEX_TYPE const, true, BUFFER_TYPE > toArrayOfArraysView () const &&=delete
 Overload for rvalues that is deleted. More...
 
Attribute querying methods
INDEX_TYPE size () const
 
Methods to modify the outer array.
void resize (INDEX_TYPE const newSize, INDEX_TYPE const defaultArrayCapacity=0)
 Set the number of arrays. More...
 
Methods to create or remove an inner set.
void appendSet (INDEX_TYPE const setCapacity=0)
 Append a set with capacity setCapacity. More...
 
void insertSet (INDEX_TYPE const i, INDEX_TYPE const setCapacity=0)
 Insert a set at position i with capacity setCapacity. More...
 
void eraseSet (INDEX_TYPE const i)
 Erase a set. More...
 
Methods to modify an inner set.
bool insertIntoSet (INDEX_TYPE const i, T const &val)
 Insert a value into the given set. More...
 
template<typename ITER >
INDEX_TYPE insertIntoSet (INDEX_TYPE const i, ITER const first, ITER const last)
 Inserts multiple values into the given set. More...
 
bool removeFromSet (INDEX_TYPE const i, T const &value) const
 Remove a value from the given set. More...
 
template<typename ITER >
INDEX_TYPE removeFromSet (INDEX_TYPE const i, ITER const first, ITER const last) const
 Removes multiple values from the given set. More...
 
void clearSet (INDEX_TYPE const i)
 Clear a set. More...
 
void setCapacityOfSet (INDEX_TYPE const i, INDEX_TYPE newCapacity)
 Set the capacity of a set. More...
 
void reserveCapacityOfSet (INDEX_TYPE const i, INDEX_TYPE newCapacity)
 Reserve space in a set. More...
 
Methods dealing with memory spaces
void move (MemorySpace const space, bool const touch=true) const
 Move this ArrayOfSets to the given memory space. More...
 

Additional Inherited Members

- Protected Types inherited from LvArray::ArrayOfSetsView< T, INDEX_TYPE, BUFFER_TYPE >
using ParentClass = ArrayOfArraysView< T, INDEX_TYPE, std::is_const< T >::value, BUFFER_TYPE >
 Alias for the parent class.
 
using INDEX_TYPE_NC = typename ParentClass::INDEX_TYPE_NC
 Since INDEX_TYPE should always be const we need an alias for the non const version.
 
using SIZE_TYPE = std::conditional_t< CONST_SIZES, INDEX_TYPE const, INDEX_TYPE_NC >
 The type contained by the m_sizes buffer.
 
using ValueType = T
 An alias for the type contained in the inner arrays.
 
using IndexType = INDEX_TYPE
 The integer type used for indexing.
 
using value_type = T
 An alias for the type contained in the inner arrays, here for stl compatability.
 
using size_type = INDEX_TYPE
 The integer type used for indexing, here for stl compatability.
 
- Protected Types inherited from LvArray::ArrayOfArraysView< T, INDEX_TYPE, std::is_const< T >::value, BUFFER_TYPE >
using INDEX_TYPE_NC = std::remove_const_t< INDEX_TYPE >
 Since INDEX_TYPE should always be const we need an alias for the non const version.
 
using SIZE_TYPE = std::conditional_t< CONST_SIZES, INDEX_TYPE const, INDEX_TYPE_NC >
 The type contained by the m_sizes buffer.
 
using PairOfBuffers = std::pair< BUFFER_TYPE< U > &, BUFFER_TYPE< U > const & >
 Alias for a std::pair of buffers. More...
 
using ValueType = T
 An alias for the type contained in the inner arrays.
 
using IndexType = INDEX_TYPE
 The integer type used for indexing.
 
using value_type = T
 An alias for the type contained in the inner arrays, here for stl compatability.
 
using size_type = INDEX_TYPE
 The integer type used for indexing, here for stl compatability.
 
- Protected Member Functions inherited from LvArray::ArrayOfSetsView< T, INDEX_TYPE, BUFFER_TYPE >
 ArrayOfSetsView (bool)
 Protected constructor to be used by parent classes. More...
 
constexpr ArraySlice< T, 1, 0, INDEX_TYPE_NCgetSetValues (INDEX_TYPE const i) const
 
template<typename CALLBACKS >
bool insertIntoSetImpl (INDEX_TYPE const i, T const &value, CALLBACKS &&cbacks) const
 Helper function to insert a value into the given set. More...
 
template<typename ITER , typename CALLBACKS >
INDEX_TYPE_NC insertIntoSetImpl (INDEX_TYPE const i, ITER const first, ITER const last, CALLBACKS &&cbacks) const
 Inserts multiple values into the given set. More...
 
template<typename CALLBACKS >
bool removeFromSetImpl (INDEX_TYPE const i, T const &value, CALLBACKS &&cbacks) const
 Helper function to remove a value from the given set. More...
 
template<typename ITER , typename CALLBACKS >
INDEX_TYPE_NC removeFromSetImpl (INDEX_TYPE const i, ITER const first, ITER const last, CALLBACKS &&cbacks) const
 Removes multiple values from the given set. More...
 
 ArrayOfSetsView ()=default
 A constructor to create an uninitialized ArrayOfSetsView. More...
 
 ArrayOfSetsView (ArrayOfSetsView const &)=default
 Default copy constructor. Performs a shallow copy and calls the chai::ManagedArray copy constructor.
 
 ArrayOfSetsView (ArrayOfSetsView &&)=default
 Default move constructor.
 
constexpr ArrayOfSetsView (INDEX_TYPE const numArrays, BUFFER_TYPE< INDEX_TYPE > const &offsets, BUFFER_TYPE< SIZE_TYPE > const &sizes, BUFFER_TYPE< T > const &values)
 Construct a new ArrayOfArraysView from the given buffers. More...
 
ArrayOfSetsViewoperator= (ArrayOfSetsView const &)=default
 Default copy assignment operator, this does a shallow copy. More...
 
ArrayOfSetsViewoperator= (ArrayOfSetsView &&)=default
 Default move assignment operator, this does a shallow copy. More...
 
constexpr ArrayOfSetsView< T, INDEX_TYPE const, BUFFER_TYPE > toView () const
 
constexpr ArrayOfSetsView< T const, INDEX_TYPE const, BUFFER_TYPE > toViewConst () const
 
constexpr ArrayOfArraysView< T const, INDEX_TYPE const, true, BUFFER_TYPE > toArrayOfArraysView () const
 
constexpr INDEX_TYPE_NC sizeOfSet (INDEX_TYPE const i) const
 
constexpr INDEX_TYPE_NC capacityOfSet (INDEX_TYPE const i) const
 
bool contains (INDEX_TYPE const i, T const &value) const
 
void consistencyCheck () const
 Verify that the capacity of each set is greater than or equal to the size and that each set is sorted unique. More...
 
constexpr ArraySlice< T const, 1, 0, INDEX_TYPE_NCoperator[] (INDEX_TYPE const i) const
 
constexpr T const & operator() (INDEX_TYPE const i, INDEX_TYPE const j) const
 
bool insertIntoSet (INDEX_TYPE const i, T const &value) const
 Insert a value into the given set. More...
 
template<typename ITER >
INDEX_TYPE_NC insertIntoSet (INDEX_TYPE const i, ITER const first, ITER const last) const
 Inserts multiple values into the given set. More...
 
bool removeFromSet (INDEX_TYPE const i, T const &value) const
 Remove a value from the given set. More...
 
template<typename ITER >
INDEX_TYPE_NC removeFromSet (INDEX_TYPE const i, ITER const first, ITER const last) const
 Removes multiple values from the given set. More...
 
void move (MemorySpace const space, bool const touch=true) const
 Move this ArrayOfSets to the given memory space. More...
 
- Protected Member Functions inherited from LvArray::ArrayOfArraysView< T, INDEX_TYPE, std::is_const< T >::value, BUFFER_TYPE >
 ArrayOfArraysView (bool)
 Protected constructor to be used by parent classes. More...
 
void resize (INDEX_TYPE const newSize, INDEX_TYPE const defaultArrayCapacity=0)
 Set the number of arrays. More...
 
void reserve (INDEX_TYPE const newCapacity)
 Reserve space for the given number of arrays. More...
 
void reserveValues (INDEX_TYPE const newValueCapacity, BUFFERS &... buffers)
 Reserve space for the given number of values. More...
 
void compress (BUFFERS &... buffers)
 Compress the arrays so that the values of each array are contiguous with no extra capacity in between. More...
 
void resizeFromCapacities (INDEX_TYPE const numSubArrays, INDEX_TYPE const *const capacities, BUFFERS &... buffers)
 Clears the array and creates a new array with the given number of sub-arrays. More...
 
void assimilate (ArrayOfArraysView< T, INDEX_TYPE, CONST_SIZES, BUFFER_TYPE > &&src)
 Steal the resources of src, clearing it in the process. More...
 
void resizeImpl (INDEX_TYPE const newSize, INDEX_TYPE const defaultArrayCapacity, BUFFERS &... buffers)
 Set the number of arrays. More...
 
void free (BUFFERS &... buffers)
 Destroy all the objects held by this array and free all associated memory. More...
 
void setEqualTo (INDEX_TYPE const srcNumArrays, INDEX_TYPE const srcMaxOffset, BUFFER_TYPE< INDEX_TYPE > const &srcOffsets, BUFFER_TYPE< INDEX_TYPE > const &srcSizes, BUFFER_TYPE< T > const &srcValues, PAIRS_OF_BUFFERS &&... pairs)
 Set this ArrayOfArraysView equal to the provided arrays. More...
 
void setCapacityOfArray (INDEX_TYPE const i, INDEX_TYPE const newCapacity, BUFFERS &... buffers)
 Set the capacity of the given array. More...
 
void setName (std::string const &name)
 Set the name to be displayed whenever the underlying Buffer's user call back is called. More...
 
 ArrayOfArraysView ()=default
 A constructor to create an uninitialized ArrayOfArraysView. More...
 
 ArrayOfArraysView (ArrayOfArraysView const &)=default
 Default copy constructor. More...
 
constexpr ArrayOfArraysView (ArrayOfArraysView &&src)
 Default move constructor. More...
 
constexpr ArrayOfArraysView (INDEX_TYPE const numArrays, BUFFER_TYPE< INDEX_TYPE > const &offsets, BUFFER_TYPE< SIZE_TYPE > const &sizes, BUFFER_TYPE< T > const &values)
 Construct a new ArrayOfArraysView from the given buffers. More...
 
ArrayOfArraysViewoperator= (ArrayOfArraysView const &)=default
 Default copy assignment operator. More...
 
ArrayOfArraysViewoperator= (ArrayOfArraysView &&src)
 Move assignment operator.. More...
 
constexpr ArrayOfArraysView< T, INDEX_TYPE const, CONST_SIZES, BUFFER_TYPE > toView () const
 
constexpr ArrayOfArraysView< T, INDEX_TYPE const, true, BUFFER_TYPE > toViewConstSizes () const
 
constexpr ArrayOfArraysView< T const, INDEX_TYPE const, true, BUFFER_TYPE > toViewConst () const
 
constexpr INDEX_TYPE_NC size () const
 
constexpr INDEX_TYPE_NC sizeOfArray (INDEX_TYPE const i) const
 
CONSTEXPR_WITH_NDEBUG INDEX_TYPE_NC capacity () const
 
constexpr INDEX_TYPE_NC capacityOfArray (INDEX_TYPE const i) const
 
constexpr INDEX_TYPE_NC valueCapacity () const
 
constexpr ArraySlice< T, 1, 0, INDEX_TYPE_NCoperator[] (INDEX_TYPE const i) const
 
constexpr T & operator() (INDEX_TYPE const i, INDEX_TYPE const j) const
 
void emplaceBack (INDEX_TYPE const i, ARGS &&... args) const
 Append a value to an array. More...
 
void emplaceBackAtomic (INDEX_TYPE const i, ARGS &&... args) const
 Append a value to an array in a thread safe manner. More...
 
void appendToArray (INDEX_TYPE const i, ITER const first, ITER const last) const
 Append values to an array. More...
 
void emplace (INDEX_TYPE const i, INDEX_TYPE const j, ARGS &&... args) const
 Insert a value into an array. More...
 
void insertIntoArray (INDEX_TYPE const i, INDEX_TYPE const j, ITER const first, ITER const last) const
 Insert values into an array. More...
 
void eraseFromArray (INDEX_TYPE const i, INDEX_TYPE const j, INDEX_TYPE const n=1) const
 Erase values from an array. More...
 
void registerTouch (MemorySpace const space) const
 Touch the memory in space. More...
 
void move (MemorySpace const space, bool touch=true) const
 Move this ArrayOfArrays to the given memory space. More...
 
- Protected Attributes inherited from LvArray::ArrayOfArraysView< T, INDEX_TYPE, std::is_const< T >::value, BUFFER_TYPE >
INDEX_TYPE_NC m_numArrays
 The number of arrays contained.
 
BUFFER_TYPE< INDEX_TYPE > m_offsets
 
BUFFER_TYPE< SIZE_TYPEm_sizes
 Holds the size of each array.
 
BUFFER_TYPE< T > m_values
 

Detailed Description

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
class LvArray::ArrayOfSets< T, INDEX_TYPE, BUFFER_TYPE >

This class implements an array of sets like object with contiguous storage.

Template Parameters
Tthe type stored in the sets.
INDEX_TYPEthe integer to use for indexing.

Definition at line 22 of file ArrayOfArrays.hpp.

Constructor & Destructor Documentation

◆ ArrayOfSets() [1/2]

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
LvArray::ArrayOfSets< T, INDEX_TYPE, BUFFER_TYPE >::ArrayOfSets ( INDEX_TYPE const  nsets = 0,
INDEX_TYPE  defaultSetCapacity = 0 
)
inline

Constructor.

Parameters
nsetsthe number of sets.
defaultSetCapacitythe initial capacity of each set.

Definition at line 57 of file ArrayOfSets.hpp.

◆ ArrayOfSets() [2/2]

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
LvArray::ArrayOfSets< T, INDEX_TYPE, BUFFER_TYPE >::ArrayOfSets ( ArrayOfSets< T, INDEX_TYPE, BUFFER_TYPE > const &  src)
inline

Copy constructor, performs a deep copy.

Parameters
srcthe ArrayOfSets to copy.

Definition at line 69 of file ArrayOfSets.hpp.

Member Function Documentation

◆ appendSet()

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
void LvArray::ArrayOfSets< T, INDEX_TYPE, BUFFER_TYPE >::appendSet ( INDEX_TYPE const  setCapacity = 0)
inline

Append a set with capacity setCapacity.

Parameters
setCapacityThe capacity of the set.

Definition at line 318 of file ArrayOfSets.hpp.

◆ assimilate()

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
void LvArray::ArrayOfSets< T, INDEX_TYPE, BUFFER_TYPE >::assimilate ( ArrayOfArrays< T, INDEX_TYPE, BUFFER_TYPE > &&  src,
sortedArrayManipulation::Description const  desc 
)
inline

Steal the resources from an ArrayOfArrays and convert it to an ArrayOfSets.

Parameters
srcthe ArrayOfArrays to convert.
descdescribes the type of data in the source. TODO: Add a RAJA policy template parameter.

Definition at line 129 of file ArrayOfSets.hpp.

◆ clearSet()

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
void LvArray::ArrayOfSets< T, INDEX_TYPE, BUFFER_TYPE >::clearSet ( INDEX_TYPE const  i)
inline

Clear a set.

Parameters
ithe index of the set to clear.

Definition at line 423 of file ArrayOfSets.hpp.

◆ eraseSet()

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
void LvArray::ArrayOfSets< T, INDEX_TYPE, BUFFER_TYPE >::eraseSet ( INDEX_TYPE const  i)
inline

Erase a set.

Parameters
ithe position of the set to erase.

Definition at line 354 of file ArrayOfSets.hpp.

◆ insertIntoSet() [1/2]

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
bool LvArray::ArrayOfSets< T, INDEX_TYPE, BUFFER_TYPE >::insertIntoSet ( INDEX_TYPE const  i,
T const &  val 
)
inline

Insert a value into the given set.

Parameters
ithe set to insert into.
valthe value to insert.
Returns
True iff the value was inserted (the set did not already contain the value).

Definition at line 378 of file ArrayOfSets.hpp.

◆ insertIntoSet() [2/2]

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
template<typename ITER >
INDEX_TYPE LvArray::ArrayOfSets< T, INDEX_TYPE, BUFFER_TYPE >::insertIntoSet ( INDEX_TYPE const  i,
ITER const  first,
ITER const  last 
)
inline

Inserts multiple values into the given set.

Template Parameters
ITERAn iterator type.
Parameters
iThe set to insert into.
firstAn iterator to the first value to insert.
lastAn iterator to the end of the values to insert.
Returns
The number of values inserted.
Precondition
The values to insert [first, last) must be sorted and contain no duplicates.

Definition at line 392 of file ArrayOfSets.hpp.

◆ insertSet()

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
void LvArray::ArrayOfSets< T, INDEX_TYPE, BUFFER_TYPE >::insertSet ( INDEX_TYPE const  i,
INDEX_TYPE const  setCapacity = 0 
)
inline

Insert a set at position i with capacity setCapacity.

Parameters
iThe position to insert the set.
setCapacityThe capacity of the set.

Definition at line 334 of file ArrayOfSets.hpp.

◆ move()

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
void LvArray::ArrayOfSets< T, INDEX_TYPE, BUFFER_TYPE >::move ( MemorySpace const  space,
bool const  touch = true 
) const
inline

Move this ArrayOfSets to the given memory space.

Parameters
spaceThe memory space to move to.
touchIf true touch the values, sizes and offsets in the new space.
Note
When moving to the GPU since the offsets can't be modified on device they are not touched.
This is just a wrapper around the ArrayOfArraysView method. The reason it isn't pulled in with a using statement is that it is detected using IS_VALID_EXPRESSION and this fails with NVCC.
This is just a wrapper around the ArrayOfSetsView method. The reason it isn't pulled in with a using statement is that it is detected using IS_VALID_EXPRESSION and this fails with NVCC.

Definition at line 467 of file ArrayOfSets.hpp.

◆ operator=() [1/2]

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
ArrayOfSets& LvArray::ArrayOfSets< T, INDEX_TYPE, BUFFER_TYPE >::operator= ( ArrayOfSets< T, INDEX_TYPE, BUFFER_TYPE > const &  src)
inline

Copy assignment operator, performs a deep copy.

Parameters
srcthe ArrayOfSets to copy.
Returns
*this.

Definition at line 99 of file ArrayOfSets.hpp.

◆ operator=() [2/2]

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
ArrayOfSets& LvArray::ArrayOfSets< T, INDEX_TYPE, BUFFER_TYPE >::operator= ( ArrayOfSets< T, INDEX_TYPE, BUFFER_TYPE > &&  src)
inline

Default move assignment operator, performs a shallow copy.

Parameters
srcThe ArrayOfSets to be moved from.
Returns
*this.

Definition at line 115 of file ArrayOfSets.hpp.

◆ removeFromSet() [1/2]

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
bool LvArray::ArrayOfSets< T, INDEX_TYPE, BUFFER_TYPE >::removeFromSet ( INDEX_TYPE const  i,
T const &  value 
) const
inline

Remove a value from the given set.

Parameters
iThe set to remove from.
valueThe value to remove.
Returns
True iff the value was removed (the set previously contained the value).
Note
This is not brought in with a using statement because it breaks doxygen.

Definition at line 400 of file ArrayOfSets.hpp.

◆ removeFromSet() [2/2]

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
template<typename ITER >
INDEX_TYPE LvArray::ArrayOfSets< T, INDEX_TYPE, BUFFER_TYPE >::removeFromSet ( INDEX_TYPE const  i,
ITER const  first,
ITER const  last 
) const
inline

Removes multiple values from the given set.

Template Parameters
ITERAn iterator type.
Parameters
iThe set to remove from.
firstAn iterator to the first value to remove.
lastAn iterator to the end of the values to remove.
Returns
The number of values removed.
Precondition
The values to remove [ first, last ) must be sorted and contain no duplicates.
Note
This is not brought in with a using statement because it breaks doxygen. Furthermore I'm not sure how to get copydoc to work with an overloaded template like this.

Definition at line 416 of file ArrayOfSets.hpp.

◆ reserveCapacityOfSet()

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
void LvArray::ArrayOfSets< T, INDEX_TYPE, BUFFER_TYPE >::reserveCapacityOfSet ( INDEX_TYPE const  i,
INDEX_TYPE  newCapacity 
)
inline

Reserve space in a set.

Parameters
ithe set to reserve space in.
newCapacitythe number of values to reserve space for.

Definition at line 448 of file ArrayOfSets.hpp.

◆ resize()

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
void LvArray::ArrayOfSets< T, INDEX_TYPE, BUFFER_TYPE >::resize ( INDEX_TYPE const  newSize,
INDEX_TYPE const  defaultArrayCapacity = 0 
)
inline

Set the number of arrays.

Parameters
newSizethe new number of arrays.
defaultArrayCapacitythe default capacity for each new array.
Note
This is just a wrapper around the ArrayOfArraysView method. The reason it isn't pulled in with a using statement is that it is detected using IS_VALID_EXPRESSION and this fails with NVCC.

Definition at line 301 of file ArrayOfSets.hpp.

◆ setCapacityOfSet()

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
void LvArray::ArrayOfSets< T, INDEX_TYPE, BUFFER_TYPE >::setCapacityOfSet ( INDEX_TYPE const  i,
INDEX_TYPE  newCapacity 
)
inline

Set the capacity of a set.

Parameters
ithe set to set the capacity of.
newCapacitythe value to set the capacity of the set to.

Definition at line 439 of file ArrayOfSets.hpp.

◆ setName()

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
void LvArray::ArrayOfSets< T, INDEX_TYPE, BUFFER_TYPE >::setName ( std::string const &  name)
inline

Set the name to be displayed whenever the underlying Buffer's user call back is called.

Parameters
namethe name to display.

Definition at line 476 of file ArrayOfSets.hpp.

◆ size()

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
INDEX_TYPE LvArray::ArrayOfSets< T, INDEX_TYPE, BUFFER_TYPE >::size ( ) const
inline

Returns
Return the number of arrays.
Note
This is just a wrapper around the ArrayOfSetsView method. The reason it isn't pulled in with a using statement is that it is detected using IS_VALID_EXPRESSION and this fails with NVCC.

Definition at line 264 of file ArrayOfSets.hpp.

◆ toArrayOfArraysView() [1/2]

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
constexpr ArrayOfArraysView< T const, INDEX_TYPE const, true, BUFFER_TYPE > LvArray::ArrayOfSets< T, INDEX_TYPE, BUFFER_TYPE >::toArrayOfArraysView ( ) const &
inline

Returns
Return a new ArrayOfArraysView< T const, INDEX_TYPE const, true >.
Note
This is just a wrapper around the ArrayOfSetsView method. The reason it isn't pulled in with a using statement is that it is detected using IS_VALID_EXPRESSION and this fails with NVCC.

Definition at line 236 of file ArrayOfSets.hpp.

◆ toArrayOfArraysView() [2/2]

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
constexpr ArrayOfArraysView< T const, INDEX_TYPE const, true, BUFFER_TYPE > LvArray::ArrayOfSets< T, INDEX_TYPE, BUFFER_TYPE >::toArrayOfArraysView ( ) const &&
inlinedelete

Overload for rvalues that is deleted.

Returns
A null ArrayOfSetsView.
Note
This cannot be called on a rvalue since the ArrayOfArraysView would contain the buffers of the current ArrayOfSets that is about to be destroyed. This overload prevents that from happening.

◆ toView() [1/2]

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
constexpr ArrayOfSetsView< T, INDEX_TYPE const, BUFFER_TYPE > LvArray::ArrayOfSets< T, INDEX_TYPE, BUFFER_TYPE >::toView ( ) const &
inline

Returns
Return a new ArrayOfSetsView< T, INDEX_TYPE const >.
Note
This is just a wrapper around the ArrayOfSetsView method. The reason it isn't pulled in with a using statement is that it is detected using IS_VALID_EXPRESSION and this fails with NVCC.

Definition at line 192 of file ArrayOfSets.hpp.

◆ toView() [2/2]

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
constexpr ArrayOfSetsView< T, INDEX_TYPE const, BUFFER_TYPE > LvArray::ArrayOfSets< T, INDEX_TYPE, BUFFER_TYPE >::toView ( ) const &&
inlinedelete

Overload for rvalues that is deleted.

Returns
A null ArrayOfSetsView.
Note
This cannot be called on a rvalue since the ArrayOfSetsView would contain the buffers of the current ArrayOfSets that is about to be destroyed. This overload prevents that from happening.

◆ toViewConst() [1/2]

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
constexpr ArrayOfSetsView< T const, INDEX_TYPE const, BUFFER_TYPE > LvArray::ArrayOfSets< T, INDEX_TYPE, BUFFER_TYPE >::toViewConst ( ) const &
inline

Returns
Return a new ArrayOfSetsView< T const, INDEX_TYPE const >.
Note
This is just a wrapper around the ArrayOfSetsView method. The reason it isn't pulled in with a using statement is that it is detected using IS_VALID_EXPRESSION and this fails with NVCC.

Definition at line 214 of file ArrayOfSets.hpp.

◆ toViewConst() [2/2]

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
constexpr ArrayOfSetsView< T const, INDEX_TYPE const, BUFFER_TYPE > LvArray::ArrayOfSets< T, INDEX_TYPE, BUFFER_TYPE >::toViewConst ( ) const &&
inlinedelete

Overload for rvalues that is deleted.

Returns
A null ArrayOfSetsView.
Note
This cannot be called on a rvalue since the ArrayOfSetsView would contain the buffers of the current ArrayOfSets that is about to be destroyed. This overload prevents that from happening.

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