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

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

#include <ArrayOfArrays.hpp>

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

Public Types

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.
 

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 destructor.
 ArrayOfArrays (INDEX_TYPE const numArrays=0, INDEX_TYPE const defaultArrayCapacity=0)
 Constructor. More...
 
 ArrayOfArrays (ArrayOfArrays const &src)
 Copy constructor, performs a deep copy. More...
 
 ArrayOfArrays (ArrayOfArrays &&)=default
 Default move constructor, performs a shallow copy.
 
 ~ArrayOfArrays ()
 Destructor, frees the values, sizes and offsets buffers.
 
ArrayOfArraysView creation methods
constexpr ArrayOfArraysView< T, INDEX_TYPE const, false, BUFFER_TYPE > toView () const &
 
constexpr ArrayOfArraysView< T, INDEX_TYPE const, false, BUFFER_TYPE > toView () const &&=delete
 Overload for rvalues that is deleted. More...
 
constexpr ArrayOfArraysView< T, INDEX_TYPE const, true, BUFFER_TYPE > toViewConstSizes () const &
 
constexpr ArrayOfArraysView< T, INDEX_TYPE const, true, BUFFER_TYPE > toViewConstSizes () const &&=delete
 Overload for rvalues that is deleted. More...
 
constexpr ArrayOfArraysView< T const, INDEX_TYPE const, true, BUFFER_TYPE > toViewConst () const &
 
constexpr ArrayOfArraysView< T const, INDEX_TYPE const, true, BUFFER_TYPE > toViewConst () const &&=delete
 Overload for rvalues that is deleted. More...
 
Methods to construct the array from scratch.
ArrayOfArraysoperator= (ArrayOfArrays const &src)
 Copy assignment operator, performs a deep copy. More...
 
ArrayOfArraysoperator= (ArrayOfArrays &&src)
 Default move assignment operator, performs a shallow copy. More...
 
void assimilate (ArrayOfSets< T, INDEX_TYPE, BUFFER_TYPE > &&src)
 Steal the resources from an ArrayOfSets and convert it to an ArrayOfArrays. 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 array.
void appendArray (INDEX_TYPE const n)
 Append an array. More...
 
template<typename ITER >
void appendArray (ITER const first, ITER const last)
 Append an array. More...
 
template<typename ITER >
void insertArray (INDEX_TYPE const i, ITER const first, ITER const last)
 Insert an array. More...
 
void eraseArray (INDEX_TYPE const i)
 Erase an array. More...
 
Methods to modify an inner array.
template<typename ... ARGS>
void emplaceBack (INDEX_TYPE const i, ARGS &&... args)
 Append a value to an array constructing it in place with the given arguments. More...
 
template<typename ITER >
void appendToArray (INDEX_TYPE const i, ITER const first, ITER const last)
 Append values to an array. More...
 
template<typename ... ARGS>
void emplace (INDEX_TYPE const i, INDEX_TYPE const j, ARGS &&... args)
 Insert a value into an array constructing it in place. More...
 
template<typename ITER >
void insertIntoArray (INDEX_TYPE const i, INDEX_TYPE const j, ITER const first, ITER const last)
 Insert values into an array. More...
 
template<class ... ARGS>
void resizeArray (INDEX_TYPE const i, INDEX_TYPE const newSize, ARGS &&... args)
 Set the number of values in an array. More...
 
void clearArray (INDEX_TYPE const i)
 Clear the given array. More...
 
void setCapacityOfArray (INDEX_TYPE const i, INDEX_TYPE const newCapacity)
 Set the capacity of an array. More...
 
Methods dealing with memory spaces
void move (MemorySpace const space, bool touch=true) const
 Move this ArrayOfArrays to the given memory space. More...
 

Additional Inherited Members

- Protected Types inherited from LvArray::ArrayOfArraysView< T, INDEX_TYPE, false, 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::ArrayOfArraysView< T, INDEX_TYPE, false, 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, false, 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::ArrayOfArrays< T, INDEX_TYPE, BUFFER_TYPE >

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

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

Definition at line 33 of file ArrayOfArrays.hpp.

Constructor & Destructor Documentation

◆ ArrayOfArrays() [1/2]

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
LvArray::ArrayOfArrays< T, INDEX_TYPE, BUFFER_TYPE >::ArrayOfArrays ( INDEX_TYPE const  numArrays = 0,
INDEX_TYPE const  defaultArrayCapacity = 0 
)
inline

Constructor.

Parameters
numArraysthe number of arrays.
defaultArrayCapacitythe initial capacity of each array.

Definition at line 55 of file ArrayOfArrays.hpp.

◆ ArrayOfArrays() [2/2]

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

Copy constructor, performs a deep copy.

Parameters
srcthe ArrayOfArrays to copy.

Definition at line 67 of file ArrayOfArrays.hpp.

Member Function Documentation

◆ appendArray() [1/2]

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
void LvArray::ArrayOfArrays< T, INDEX_TYPE, BUFFER_TYPE >::appendArray ( INDEX_TYPE const  n)
inline

Append an array.

Parameters
nthe size of the array.

Definition at line 269 of file ArrayOfArrays.hpp.

◆ appendArray() [2/2]

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
template<typename ITER >
void LvArray::ArrayOfArrays< T, INDEX_TYPE, BUFFER_TYPE >::appendArray ( ITER const  first,
ITER const  last 
)
inline

Append an array.

Template Parameters
ITERAn iterator, the type of first and last.
Parameters
firstAn iterator to the first value of the array to append.
lastAn iterator to the end of the array to append.

Definition at line 288 of file ArrayOfArrays.hpp.

◆ appendToArray()

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
template<typename ITER >
void LvArray::ArrayOfArrays< T, INDEX_TYPE, BUFFER_TYPE >::appendToArray ( INDEX_TYPE const  i,
ITER const  first,
ITER const  last 
)
inline

Append values to an array.

Template Parameters
ITERAn iterator, the type of first and last.
Parameters
ithe array to append to.
firstAn iterator to the first value to append.
lastAn iterator to the end of the values to append.

Definition at line 362 of file ArrayOfArrays.hpp.

◆ assimilate()

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

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

Parameters
srcthe ArrayOfSets to convert.

Definition at line 197 of file ArrayOfArrays.hpp.

◆ clearArray()

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

Clear the given array.

Parameters
iThe index of the array to clear.

Definition at line 431 of file ArrayOfArrays.hpp.

◆ emplace()

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
template<typename ... ARGS>
void LvArray::ArrayOfArrays< T, INDEX_TYPE, BUFFER_TYPE >::emplace ( INDEX_TYPE const  i,
INDEX_TYPE const  j,
ARGS &&...  args 
)
inline

Insert a value into an array constructing it in place.

Template Parameters
ARGSVariadic pack of types used to construct T.
Parameters
ithe array to insert into.
jthe position at which to insert.
argsA variadic pack of arguments that are forwarded to construct the new value.

Definition at line 379 of file ArrayOfArrays.hpp.

◆ emplaceBack()

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
template<typename ... ARGS>
void LvArray::ArrayOfArrays< T, INDEX_TYPE, BUFFER_TYPE >::emplaceBack ( INDEX_TYPE const  i,
ARGS &&...  args 
)
inline

Append a value to an array constructing it in place with the given arguments.

Template Parameters
ARGSVariadic pack of types used to construct T.
Parameters
ithe array to append to.
argsA variadic pack of arguments that are forwarded to construct the new value.

Definition at line 348 of file ArrayOfArrays.hpp.

◆ eraseArray()

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

Erase an array.

Parameters
ithe position of the array to erase.

Definition at line 324 of file ArrayOfArrays.hpp.

◆ insertArray()

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
template<typename ITER >
void LvArray::ArrayOfArrays< T, INDEX_TYPE, BUFFER_TYPE >::insertArray ( INDEX_TYPE const  i,
ITER const  first,
ITER const  last 
)
inline

Insert an array.

Template Parameters
ITERAn iterator, the type of first and last.
Parameters
ithe position to insert the array.
firstAn iterator to the first value of the array to insert.
lastAn iterator to the end of the array to insert.

Definition at line 306 of file ArrayOfArrays.hpp.

◆ insertIntoArray()

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
template<typename ITER >
void LvArray::ArrayOfArrays< T, INDEX_TYPE, BUFFER_TYPE >::insertIntoArray ( INDEX_TYPE const  i,
INDEX_TYPE const  j,
ITER const  first,
ITER const  last 
)
inline

Insert values into an array.

Template Parameters
ITERAn iterator, the type of first and last.
Parameters
ithe array to insert into.
jthe position at which to insert.
firstAn iterator to the first value to insert.
lastAn iterator to the end of the values to insert.

Definition at line 394 of file ArrayOfArrays.hpp.

◆ move()

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

Move this ArrayOfArrays 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.

Definition at line 455 of file ArrayOfArrays.hpp.

◆ operator=() [1/2]

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

Copy assignment operator, performs a deep copy.

Parameters
srcthe ArrayOfArrays to copy.
Returns
*this.

Definition at line 169 of file ArrayOfArrays.hpp.

◆ operator=() [2/2]

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

Default move assignment operator, performs a shallow copy.

Parameters
srcThe ArrayOfArrays to be moved from.
Returns
*this

Definition at line 185 of file ArrayOfArrays.hpp.

◆ resize()

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
void LvArray::ArrayOfArrays< 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 253 of file ArrayOfArrays.hpp.

◆ resizeArray()

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
template<class ... ARGS>
void LvArray::ArrayOfArrays< T, INDEX_TYPE, BUFFER_TYPE >::resizeArray ( INDEX_TYPE const  i,
INDEX_TYPE const  newSize,
ARGS &&...  args 
)
inline

Set the number of values in an array.

Template Parameters
ARGSvariadic template parameter of the types used to initialize any new values with.
Parameters
ithe array to resize.
newSizethe value to set the size of the array to.
argsvariadic parameter pack of the arguments used to initialize any new values with.

Definition at line 411 of file ArrayOfArrays.hpp.

◆ setCapacityOfArray()

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

Set the capacity of an array.

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

Definition at line 439 of file ArrayOfArrays.hpp.

◆ setName()

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
void LvArray::ArrayOfArrays< 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 464 of file ArrayOfArrays.hpp.

◆ size()

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

Returns
Return the number of arrays.
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 219 of file ArrayOfArrays.hpp.

◆ toView() [1/2]

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
constexpr ArrayOfArraysView< T, INDEX_TYPE const, false, BUFFER_TYPE > LvArray::ArrayOfArrays< T, INDEX_TYPE, BUFFER_TYPE >::toView ( ) const &
inline

Returns
Return a new ArrayOfArraysView<T, INDEX_TYPE const, CONST_SIZES>.
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 98 of file ArrayOfArrays.hpp.

◆ toView() [2/2]

template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
constexpr ArrayOfArraysView< T, INDEX_TYPE const, false, BUFFER_TYPE > LvArray::ArrayOfArrays< T, INDEX_TYPE, BUFFER_TYPE >::toView ( ) const &&
inlinedelete

Overload for rvalues that is deleted.

Returns
A null ArrayOfArraysView.
Note
This cannot be called on a rvalue since the ArrayOfArraysView would contain the buffer of the current ArrayOfArrays 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 ArrayOfArraysView< T const, INDEX_TYPE const, true, BUFFER_TYPE > LvArray::ArrayOfArrays< T, INDEX_TYPE, BUFFER_TYPE >::toViewConst ( ) const &
inline

Returns
Return a new ArrayOfArraysView<T const, INDEX_TYPE const, true>.
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 142 of file ArrayOfArrays.hpp.

◆ toViewConst() [2/2]

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

Overload for rvalues that is deleted.

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

◆ toViewConstSizes() [1/2]

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

Returns
Return a new ArrayOfArraysView<T, INDEX_TYPE const, true>.
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 120 of file ArrayOfArrays.hpp.

◆ toViewConstSizes() [2/2]

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

Overload for rvalues that is deleted.

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

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