GEOSX
Public Types | Protected Types | Protected Member Functions | Protected Attributes | List of all members
LvArray::SparsityPatternView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE > Class Template Reference

This class provides a view into a compressed row storage sparsity pattern. More...

#include <SparsityPatternView.hpp>

Inheritance diagram for LvArray::SparsityPatternView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE >:
Inheritance graph
[legend]

Public Types

using ColType = COL_TYPE
 The integer type used to enumerate the columns.
 
using IndexType = INDEX_TYPE
 The integer type used for indexing.
 

Public Member Functions

Constructors, destructor and assignment operators
 SparsityPatternView ()=default
 A constructor to create an uninitialized SparsityPatternView. More...
 
 SparsityPatternView (SparsityPatternView const &)=default
 Default copy constructor. More...
 
 SparsityPatternView (SparsityPatternView &&src)
 Move constructor. More...
 
constexpr SparsityPatternView (INDEX_TYPE const nRows, INDEX_TYPE const nCols, BUFFER_TYPE< INDEX_TYPE > const &offsets, BUFFER_TYPE< SIZE_TYPE > const &nnz, BUFFER_TYPE< COL_TYPE > const &columns)
 Construct a new CRSMatrixView from the given buffers. More...
 
SparsityPatternViewoperator= (SparsityPatternView const &)=default
 Default copy assignment operator, this does a shallow copy. More...
 
SparsityPatternViewoperator= (SparsityPatternView &&src)
 Move assignment operator, this does a shallow copy. More...
 
SparsityPatternView creation methods
constexpr SparsityPatternView< COL_TYPE, INDEX_TYPE const, BUFFER_TYPE > toView () const
 
constexpr SparsityPatternView< COL_TYPE const, INDEX_TYPE const, BUFFER_TYPE > toViewConst () const
 
Attribute querying methods
constexpr INDEX_TYPE_NC numRows () const
 
constexpr INDEX_TYPE_NC numColumns () const
 
INDEX_TYPE_NC numNonZeros () const
 
constexpr INDEX_TYPE_NC numNonZeros (INDEX_TYPE const row) const
 
constexpr INDEX_TYPE_NC nonZeroCapacity () const
 
constexpr INDEX_TYPE_NC nonZeroCapacity (INDEX_TYPE const row) const
 
bool empty () const
 
constexpr bool empty (INDEX_TYPE const row) const
 
bool empty (INDEX_TYPE const row, COL_TYPE const col) const
 
Methods that provide access to the data
constexpr ArraySlice< COL_TYPE const, 1, 0, INDEX_TYPE_NCgetColumns (INDEX_TYPE const row) const
 
constexpr INDEX_TYPE const * getOffsets () const
 
Methods that insert or remove entries from a row.
bool insertNonZero (INDEX_TYPE const row, COL_TYPE const col) const
 Insert a non-zero entry at the given position. More...
 
template<typename ITER >
INDEX_TYPE_NC insertNonZeros (INDEX_TYPE const row, ITER const first, ITER const last) const
 Inserts multiple non-zero entries into the given row. More...
 
bool removeNonZero (INDEX_TYPE const row, COL_TYPE const col) const
 Remove a non-zero entry at the given position. More...
 
template<typename ITER >
INDEX_TYPE_NC removeNonZeros (INDEX_TYPE const row, ITER const first, ITER const last) const
 Remove multiple non-zero entries from the given row. 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...
 

Protected Types

using ParentClass = ArrayOfSetsView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE >
 An 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.
 
- Protected Types inherited from LvArray::ArrayOfSetsView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE >
using ParentClass = ArrayOfArraysView< COL_TYPE, INDEX_TYPE, std::is_const< COL_TYPE >::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 = COL_TYPE
 An alias for the type contained in the inner arrays.
 
using IndexType = INDEX_TYPE
 The integer type used for indexing.
 
using value_type = COL_TYPE
 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< COL_TYPE, INDEX_TYPE, std::is_const< COL_TYPE >::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 = COL_TYPE
 An alias for the type contained in the inner arrays.
 
using IndexType = INDEX_TYPE
 The integer type used for indexing.
 
using value_type = COL_TYPE
 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

 SparsityPatternView (bool)
 Protected constructor to be used by parent classes. More...
 
void assimilate (SparsityPatternView &&src)
 Steal the resources of src, clearing it in the process. More...
 
template<class ... BUFFERS>
void resize (INDEX_TYPE const nrows, INDEX_TYPE const ncols, INDEX_TYPE_NC initialRowCapacity, BUFFERS &... buffers)
 Resize the SparsityPattern to the given size. More...
 
- Protected Member Functions inherited from LvArray::ArrayOfSetsView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE >
 ArrayOfSetsView (bool)
 Protected constructor to be used by parent classes. More...
 
constexpr ArraySlice< COL_TYPE, 1, 0, INDEX_TYPE_NCgetSetValues (INDEX_TYPE const i) const
 
bool insertIntoSetImpl (INDEX_TYPE const i, COL_TYPE const &value, CALLBACKS &&cbacks) const
 Helper function to insert a value into the given set. More...
 
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...
 
bool removeFromSetImpl (INDEX_TYPE const i, COL_TYPE const &value, CALLBACKS &&cbacks) const
 Helper function to remove a value from the given set. More...
 
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< COL_TYPE > 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< COL_TYPE, INDEX_TYPE const, BUFFER_TYPE > toView () const
 
constexpr ArrayOfSetsView< COL_TYPE const, INDEX_TYPE const, BUFFER_TYPE > toViewConst () const
 
constexpr ArrayOfArraysView< COL_TYPE 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, COL_TYPE 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< COL_TYPE const, 1, 0, INDEX_TYPE_NCoperator[] (INDEX_TYPE const i) const
 
constexpr COL_TYPE const & operator() (INDEX_TYPE const i, INDEX_TYPE const j) const
 
bool insertIntoSet (INDEX_TYPE const i, COL_TYPE const &value) const
 Insert a value into the given set. More...
 
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, COL_TYPE const &value) const
 Remove a value from the given set. More...
 
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< COL_TYPE, INDEX_TYPE, std::is_const< COL_TYPE >::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< COL_TYPE, 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< COL_TYPE > 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< COL_TYPE > 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< COL_TYPE, INDEX_TYPE const, CONST_SIZES, BUFFER_TYPE > toView () const
 
constexpr ArrayOfArraysView< COL_TYPE, INDEX_TYPE const, true, BUFFER_TYPE > toViewConstSizes () const
 
constexpr ArrayOfArraysView< COL_TYPE 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< COL_TYPE, 1, 0, INDEX_TYPE_NCoperator[] (INDEX_TYPE const i) const
 
constexpr COL_TYPE & 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

INDEX_TYPE_NC m_numCols
 The number of columns in the matrix.
 
- Protected Attributes inherited from LvArray::ArrayOfArraysView< COL_TYPE, INDEX_TYPE, std::is_const< COL_TYPE >::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< COL_TYPE > m_values
 

Detailed Description

template<typename COL_TYPE, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
class LvArray::SparsityPatternView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE >

This class provides a view into a compressed row storage sparsity pattern.

Template Parameters
COL_TYPEthe integer used to enumerate the columns.
INDEX_TYPEthe integer to use for indexing.

When INDEX_TYPE is const m_offsets is not copied between memory spaces. INDEX_TYPE should always be const since SparsityPatternView is not allowed to modify the offsets.

When COL_TYPE is const and INDEX_TYPE is const you cannot insert or remove from the View and neither the offsets, sizes, or columns are copied between memory spaces.

Definition at line 61 of file SparsityPatternView.hpp.

Constructor & Destructor Documentation

◆ SparsityPatternView() [1/5]

template<typename COL_TYPE, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
LvArray::SparsityPatternView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE >::SparsityPatternView ( )
default

A constructor to create an uninitialized SparsityPatternView.

Note
An uninitialized SparsityPatternView should not be used until it is assigned to.

◆ SparsityPatternView() [2/5]

template<typename COL_TYPE, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
LvArray::SparsityPatternView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE >::SparsityPatternView ( SparsityPatternView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE > const &  )
inlinedefault

Default copy constructor.

Note
The copy constructor will trigger the copy constructor for
Template Parameters
BUFFER_TYPE

◆ SparsityPatternView() [3/5]

template<typename COL_TYPE, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
LvArray::SparsityPatternView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE >::SparsityPatternView ( SparsityPatternView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE > &&  src)
inline

Move constructor.

Parameters
srcThe SparsityPatternView to move from.

Definition at line 105 of file SparsityPatternView.hpp.

◆ SparsityPatternView() [4/5]

template<typename COL_TYPE, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
constexpr LvArray::SparsityPatternView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE >::SparsityPatternView ( INDEX_TYPE const  nRows,
INDEX_TYPE const  nCols,
BUFFER_TYPE< INDEX_TYPE > const &  offsets,
BUFFER_TYPE< SIZE_TYPE > const &  nnz,
BUFFER_TYPE< COL_TYPE > const &  columns 
)
inline

Construct a new CRSMatrixView from the given buffers.

Parameters
nRowsThe number of rows.
nColsThe number of columns
offsetsThe offsets buffer, of size nRows + 1.
nnzThe buffer containing the number of non zeros in each row, of size nRows.
columnsThe columns buffer, of size offsets[ nRows ].

Definition at line 119 of file SparsityPatternView.hpp.

◆ SparsityPatternView() [5/5]

template<typename COL_TYPE, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
LvArray::SparsityPatternView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE >::SparsityPatternView ( bool  )
inlineprotected

Protected constructor to be used by parent classes.

Note
The unused boolean parameter is to distinguish this from the default constructor.

Definition at line 401 of file SparsityPatternView.hpp.

Member Function Documentation

◆ assimilate()

template<typename COL_TYPE, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
void LvArray::SparsityPatternView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE >::assimilate ( SparsityPatternView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE > &&  src)
inlineprotected

Steal the resources of src, clearing it in the process.

Parameters
srcThe SparsityPatternView to steal from.

Definition at line 409 of file SparsityPatternView.hpp.

◆ empty() [1/3]

template<typename COL_TYPE, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
bool LvArray::SparsityPatternView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE >::empty ( ) const
inline
Returns
Return true iff the matrix is all zeros.

Definition at line 249 of file SparsityPatternView.hpp.

◆ empty() [2/3]

template<typename COL_TYPE, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
constexpr bool LvArray::SparsityPatternView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE >::empty ( INDEX_TYPE const  row) const
inline
Returns
Return true iff the given row is all zeros.
Parameters
rowthe row to query.

Definition at line 257 of file SparsityPatternView.hpp.

◆ empty() [3/3]

template<typename COL_TYPE, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
bool LvArray::SparsityPatternView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE >::empty ( INDEX_TYPE const  row,
COL_TYPE const  col 
) const
inline
Returns
Return true iff the given entry is zero.
Parameters
rowthe row to query.
colthe col to query.

Definition at line 266 of file SparsityPatternView.hpp.

◆ getColumns()

template<typename COL_TYPE, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
constexpr ArraySlice< COL_TYPE const, 1, 0, INDEX_TYPE_NC > LvArray::SparsityPatternView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE >::getColumns ( INDEX_TYPE const  row) const
inline
Returns
Return an ArraySlice1d to the columns of the given row.
Parameters
rowthe row to access.

Definition at line 281 of file SparsityPatternView.hpp.

◆ getOffsets()

template<typename COL_TYPE, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
constexpr INDEX_TYPE const* LvArray::SparsityPatternView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE >::getOffsets ( ) const
inline
Returns
Return a pointer to the array of offsets, this array has length numRows() + 1.

Definition at line 288 of file SparsityPatternView.hpp.

◆ insertNonZero()

template<typename COL_TYPE, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
bool LvArray::SparsityPatternView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE >::insertNonZero ( INDEX_TYPE const  row,
COL_TYPE const  col 
) const
inline

Insert a non-zero entry at the given position.

Parameters
rowthe row to insert in.
colthe column to insert.
Returns
True iff the column was inserted (the entry was zero before).
Precondition
Since the SparsityPatternView can't do reallocation or shift the offsets it is up to the user to ensure that the given row has enough space for the new entries.

Definition at line 307 of file SparsityPatternView.hpp.

◆ insertNonZeros()

template<typename COL_TYPE, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
template<typename ITER >
INDEX_TYPE_NC LvArray::SparsityPatternView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE >::insertNonZeros ( INDEX_TYPE const  row,
ITER const  first,
ITER const  last 
) const
inline

Inserts multiple non-zero entries into the given row.

Template Parameters
ITERAn iterator type.
Parameters
rowThe row to insert into.
firstAn iterator to the first column to insert.
lastAn iterator to the end of the columns to insert.
Returns
The number of columns inserted.
Precondition
The columns to insert [ first, last ) must be sorted and contain no duplicates.
Since the SparsityPatternview can't do reallocation or shift the offsets it is up to the user to ensure that the given row has enough space for the new entries.

Definition at line 327 of file SparsityPatternView.hpp.

◆ move()

template<typename COL_TYPE, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
void LvArray::SparsityPatternView< COL_TYPE, 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.
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 390 of file SparsityPatternView.hpp.

◆ nonZeroCapacity() [1/2]

template<typename COL_TYPE, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
constexpr INDEX_TYPE_NC LvArray::SparsityPatternView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE >::nonZeroCapacity ( ) const
inline
Returns
Return the total number of non zero entries able to be stored without a reallocation.

Definition at line 233 of file SparsityPatternView.hpp.

◆ nonZeroCapacity() [2/2]

template<typename COL_TYPE, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
constexpr INDEX_TYPE_NC LvArray::SparsityPatternView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE >::nonZeroCapacity ( INDEX_TYPE const  row) const
inline
Returns
Return the total number of non zero entries able to be stored in a given row without increasing its capacity.
Parameters
rowthe row to query.

Definition at line 242 of file SparsityPatternView.hpp.

◆ numColumns()

template<typename COL_TYPE, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
constexpr INDEX_TYPE_NC LvArray::SparsityPatternView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE >::numColumns ( ) const
inline
Returns
Return the number of columns in the matrix.

Definition at line 203 of file SparsityPatternView.hpp.

◆ numNonZeros() [1/2]

template<typename COL_TYPE, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
INDEX_TYPE_NC LvArray::SparsityPatternView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE >::numNonZeros ( ) const
inline
Returns
Return the total number of non zero entries in the matrix.

Definition at line 210 of file SparsityPatternView.hpp.

◆ numNonZeros() [2/2]

template<typename COL_TYPE, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
constexpr INDEX_TYPE_NC LvArray::SparsityPatternView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE >::numNonZeros ( INDEX_TYPE const  row) const
inline
Returns
Return the total number of non zero entries in the given row.
Parameters
rowthe row to query.

Definition at line 226 of file SparsityPatternView.hpp.

◆ numRows()

template<typename COL_TYPE, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
constexpr INDEX_TYPE_NC LvArray::SparsityPatternView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE >::numRows ( ) const
inline
Returns
Return the number of rows in the matrix.

Definition at line 196 of file SparsityPatternView.hpp.

◆ operator=() [1/2]

template<typename COL_TYPE, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
SparsityPatternView& LvArray::SparsityPatternView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE >::operator= ( SparsityPatternView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE > const &  )
inlinedefault

Default copy assignment operator, this does a shallow copy.

Returns
*this.

◆ operator=() [2/2]

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

Move assignment operator, this does a shallow copy.

Parameters
srcThe SparsityPatternView to move from.
Returns
*this.

Definition at line 141 of file SparsityPatternView.hpp.

◆ removeNonZero()

template<typename COL_TYPE, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
bool LvArray::SparsityPatternView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE >::removeNonZero ( INDEX_TYPE const  row,
COL_TYPE const  col 
) const
inline

Remove a non-zero entry at the given position.

Parameters
rowthe row to remove from.
colthe column to remove.
Returns
True iff the column was removed (the entry was non zero before).

Definition at line 346 of file SparsityPatternView.hpp.

◆ removeNonZeros()

template<typename COL_TYPE, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
template<typename ITER >
INDEX_TYPE_NC LvArray::SparsityPatternView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE >::removeNonZeros ( INDEX_TYPE const  row,
ITER const  first,
ITER const  last 
) const
inline

Remove multiple non-zero entries from the given row.

Template Parameters
ITERAn iterator type.
Parameters
rowThe row to remove from.
firstAn iterator to the first column to remove.
lastAn iterator to the end of the columns to remove.
Returns
The number of columns removed.
Precondition
The columns to remove [ first, last ) must be sorted and contain no duplicates.

Definition at line 365 of file SparsityPatternView.hpp.

◆ resize()

template<typename COL_TYPE, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
template<class ... BUFFERS>
void LvArray::SparsityPatternView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE >::resize ( INDEX_TYPE const  nrows,
INDEX_TYPE const  ncols,
INDEX_TYPE_NC  initialRowCapacity,
BUFFERS &...  buffers 
)
inlineprotected

Resize the SparsityPattern to the given size.

Template Parameters
BUFFERSA variadic pack of buffer types.
Parameters
nrowsThe number of rows in the matrix.
ncolsThe number of columns in the matrix.
initialRowCapacityThe initial capacity of any newly created rows.
buffersA variadic pack of buffers to resize along with the columns.

Definition at line 424 of file SparsityPatternView.hpp.

◆ toView()

template<typename COL_TYPE, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
constexpr SparsityPatternView< COL_TYPE, INDEX_TYPE const, BUFFER_TYPE > LvArray::SparsityPatternView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE >::toView ( ) const
inline
Returns
A new SparsityPatternView< COL_TYPE, INDEX_TYPE const >.

Definition at line 162 of file SparsityPatternView.hpp.

◆ toViewConst()

template<typename COL_TYPE, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
constexpr SparsityPatternView< COL_TYPE const, INDEX_TYPE const, BUFFER_TYPE > LvArray::SparsityPatternView< COL_TYPE, INDEX_TYPE, BUFFER_TYPE >::toViewConst ( ) const
inline
Returns
A new SparsityPatternView< COL_TYPE const, INDEX_TYPE const >.

Definition at line 176 of file SparsityPatternView.hpp.


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