NeoN
A framework for CFD software
Loading...
Searching...
No Matches
Public Member Functions | List of all members
NeoN::SegmentedVector< ValueType, IndexType > Class Template Reference

Data structure that stores a segmented fields or a vector of vectors. More...

#include <segmentedVector.hpp>

Public Member Functions

 SegmentedVector (const Executor &exec, localIdx size, localIdx numSegments)
 Create a segmented vector with a given size and number of segments.
 
 SegmentedVector (const Vector< IndexType > &intervals)
 
 SegmentedVector (const Vector< ValueType > &values, const Vector< IndexType > &segments)
 Constructor to create a segmentedVector from values and the segments.
 
const Executorexec () const
 Get the executor associated with the segmented vector.
 
localIdx size () const
 Get the size of the segmented vector.
 
localIdx numSegments () const
 Get the number of segments in the segmented vector.
 
SegmentedVector< ValueType, IndexType > copyToHost () const
 Returns a copy of the segmentedVector on the host.
 
SegmentedVectorView< ValueType, IndexType > view () &
 get a view of the segmented vector
 
SegmentedVectorView< ValueType, IndexType > view () &&=delete
 
std::pair< View< ValueType >, View< IndexType > > views () &
 get the combined value and range views of the segmented vector
 
std::pair< View< ValueType >, View< IndexType > > views () &&=delete
 
const Vector< ValueType > & values () const
 
const Vector< IndexType > & segments () const
 

Detailed Description

template<typename ValueType, typename IndexType>
class NeoN::SegmentedVector< ValueType, IndexType >

Data structure that stores a segmented fields or a vector of vectors.

Definition at line 128 of file segmentedVector.hpp.

Constructor & Destructor Documentation

◆ SegmentedVector() [1/3]

template<typename ValueType , typename IndexType >
NeoN::SegmentedVector< ValueType, IndexType >::SegmentedVector ( const Executor exec,
localIdx  size,
localIdx  numSegments 
)
inline

Create a segmented vector with a given size and number of segments.

Parameters
execExecutor associated to the matrix
sizesize of the matrix
numSegmentsnumber of segments

Definition at line 139 of file segmentedVector.hpp.

◆ SegmentedVector() [2/3]

template<typename ValueType , typename IndexType >
NeoN::SegmentedVector< ValueType, IndexType >::SegmentedVector ( const Vector< IndexType > &  intervals)
inline

Definition at line 148 of file segmentedVector.hpp.

◆ SegmentedVector() [3/3]

template<typename ValueType , typename IndexType >
NeoN::SegmentedVector< ValueType, IndexType >::SegmentedVector ( const Vector< ValueType > &  values,
const Vector< IndexType > &  segments 
)
inline

Constructor to create a segmentedVector from values and the segments.

Parameters
valuesThe values of the segmented vector.
segmentsThe segments of the segmented vector.

Definition at line 162 of file segmentedVector.hpp.

Member Function Documentation

◆ copyToHost()

template<typename ValueType , typename IndexType >
SegmentedVector< ValueType, IndexType > NeoN::SegmentedVector< ValueType, IndexType >::copyToHost ( ) const
inline

Returns a copy of the segmentedVector on the host.

Returns
copy of the segmentedVector on the host

Definition at line 191 of file segmentedVector.hpp.

◆ exec()

template<typename ValueType , typename IndexType >
const Executor & NeoN::SegmentedVector< ValueType, IndexType >::exec ( ) const
inline

Get the executor associated with the segmented vector.

Returns
Reference to the executor.

Definition at line 173 of file segmentedVector.hpp.

◆ numSegments()

template<typename ValueType , typename IndexType >
localIdx NeoN::SegmentedVector< ValueType, IndexType >::numSegments ( ) const
inline

Get the number of segments in the segmented vector.

Returns
The number of segments.

Definition at line 185 of file segmentedVector.hpp.

◆ segments()

template<typename ValueType , typename IndexType >
const Vector< IndexType > & NeoN::SegmentedVector< ValueType, IndexType >::segments ( ) const
inline

Definition at line 225 of file segmentedVector.hpp.

◆ size()

template<typename ValueType , typename IndexType >
localIdx NeoN::SegmentedVector< ValueType, IndexType >::size ( ) const
inline

Get the size of the segmented vector.

Returns
The size of the segmented vector.

Definition at line 179 of file segmentedVector.hpp.

◆ values()

template<typename ValueType , typename IndexType >
const Vector< ValueType > & NeoN::SegmentedVector< ValueType, IndexType >::values ( ) const
inline

Definition at line 223 of file segmentedVector.hpp.

◆ view() [1/2]

template<typename ValueType , typename IndexType >
SegmentedVectorView< ValueType, IndexType > NeoN::SegmentedVector< ValueType, IndexType >::view ( ) &
inline

get a view of the segmented vector

Returns
View of the fields

Definition at line 202 of file segmentedVector.hpp.

◆ view() [2/2]

template<typename ValueType , typename IndexType >
SegmentedVectorView< ValueType, IndexType > NeoN::SegmentedVector< ValueType, IndexType >::view ( ) &&
delete

◆ views() [1/2]

template<typename ValueType , typename IndexType >
std::pair< View< ValueType >, View< IndexType > > NeoN::SegmentedVector< ValueType, IndexType >::views ( ) &
inline

get the combined value and range views of the segmented vector

Returns
Combined value and range views of the fields

Definition at line 214 of file segmentedVector.hpp.

◆ views() [2/2]

template<typename ValueType , typename IndexType >
std::pair< View< ValueType >, View< IndexType > > NeoN::SegmentedVector< ValueType, IndexType >::views ( ) &&
delete

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