VectorSingle< T, MemorySpace > Class Template Reference
Inheritance diagram for VectorSingle< T, MemorySpace >:

Public Types

using VectorType = VectorSingle< T, MemorySpace >
 
using iterator = T *
 
using constIterator = const T *
 
using reference = T &
 
using constReference = const T &
 
using valueType = T
 
using pointer = T *
 
using constPointer = const T *
 
using viewType = ViewType1D< T, MemorySpace >
 
using deviceType = typename viewType::device_type
 
using memory_space = typename viewType::memory_space
 
using execution_space = typename viewType::execution_space
 

Public Member Functions

 TypeInfoTemplateNV2 ("VectorSingle", T, memoerySpaceName())
 
 VectorSingle ()
 
 VectorSingle (const word &name)
 
 VectorSingle (size_t n)
 
 VectorSingle (const word &name, size_t n)
 
 VectorSingle (size_t n, const T &val)
 
 VectorSingle (const word &name, size_t n, const T &val)
 
 VectorSingle (size_t cap, size_t n, RESERVE)
 
 VectorSingle (const word &name, size_t cap, size_t n, RESERVE)
 
 VectorSingle (const Vector< T > &src)
 
 VectorSingle (const word &name, const Vector< T > &src)
 
 VectorSingle (const VectorSingle &src)
 
 VectorSingle (const word &name, const VectorSingle &src)
 
VectorSingleoperator= (const VectorSingle &rhs)
 
 VectorSingle (VectorSingle &&)=delete
 
VectorSingleoperator= (VectorSingle &&)=delete
 
INLINE_FUNCTION_H uniquePtr< VectorSingleclone () const
 
INLINE_FUNCTION_H VectorSingleclonePtr () const
 
INLINE_FUNCTION_H VectorTypeVectorField ()
 
const INLINE_FUNCTION_H VectorTypeVectorField () const
 
INLINE_FUNCTION_H viewTypedeviceVectorAll ()
 
const INLINE_FUNCTION_H viewTypedeviceVectorAll () const
 
INLINE_FUNCTION_H viewTypedeviceVector ()
 
const INLINE_FUNCTION_H viewTypedeviceVector () const
 
const INLINE_FUNCTION_H auto hostVectorAll () const
 
INLINE_FUNCTION_H auto hostVectorAll ()
 
const INLINE_FUNCTION_H auto hostVector () const
 
INLINE_FUNCTION_H auto hostVector ()
 
const INLINE_FUNCTION_H word name () const
 
INLINE_FUNCTION_H size_t size () const
 
INLINE_FUNCTION_H size_t capacity () const
 
INLINE_FUNCTION_H bool empty () const
 
INLINE_FUNCTION_H void reserve (size_t cap)
 
INLINE_FUNCTION_H void reallocate (size_t cap)
 
INLINE_FUNCTION_H void reallocate (size_t cap, size_t size)
 
INLINE_FUNCTION_H void resize (size_t n)
 
INLINE_FUNCTION_H void resize (size_t n, const T &val)
 
INLINE_FUNCTION_H void clear ()
 
INLINE_FUNCTION_H void fill (const T &val)
 
INLINE_FUNCTION_H void assign (size_t n, const T &val)
 
INLINE_FUNCTION_H void assign (const Vector< T > &src)
 
INLINE_FUNCTION_H bool insertSetElement (const int32IndexContainer &indices, const T &val)
 
INLINE_FUNCTION_H bool insertSetElement (const int32IndexContainer &indices, const Vector< T > &vals)
 
INLINE_FUNCTION_H bool insertSetElement (const Vector< int32 > &indices, const T &val)
 
INLINE_FUNCTION_H bool insertSetElement (const Vector< int32 > &indices, const Vector< T > &vals)
 
INLINE_FUNCTION_H bool append (const deviceViewType1D< T > &dVec, size_t numElems)
 
INLINE_FUNCTION_H bool append (const VectorSingle &Vec)
 
template<bool Enable = true>
std::enable_if< isHostAccessible_ &&Enable, void >::type push_back (const T &val)
 
INLINE_FUNCTION_H pointer data ()
 
INLINE_FUNCTION_H constPointer data () const
 
template<bool Enable = true>
INLINE_FUNCTION_H std::enable_if_t< isHostAccessible_ &&Enable, iteratorbegin ()
 
template<bool Enable = true>
INLINE_FUNCTION_H std::enable_if< isHostAccessible_ &&Enable, constIterator >::type begin () const
 
template<bool Enable = true>
INLINE_FUNCTION_H std::enable_if< isHostAccessible_ &&Enable, iterator >::type end ()
 
template<bool Enable = true>
INLINE_FUNCTION_H std::enable_if< isHostAccessible_ &&Enable, constIterator >::type end () const
 
template<bool Enable = true>
INLINE_FUNCTION_H std::enable_if< isHostAccessible_ &&Enable, reference >::type operator[] (label i)
 
template<bool Enable = true>
INLINE_FUNCTION_H std::enable_if< isHostAccessible_ &&Enable, constReference >::type operator[] (label i) const
 
FUNCTION_H bool read (iIstream &is)
 
FUNCTION_H bool write (iOstream &os) const
 

Protected Member Functions

INLINE_FUNCTION_H void changeSize (size_t n, bool actualCap=false)
 
INLINE_FUNCTION_H void setSize (size_t n)
 
INLINE_FUNCTION_H void updateSubView () const
 

Static Protected Member Functions

constexpr static const char * memoerySpaceName ()
 
static INLINE_FUNCTION_H size_t evalCapacity (size_t n)
 

Protected Attributes

size_t size_ = 0
 
size_t capacity_ = 0
 
viewType view_
 
viewType subView_
 
bool subViewUpdated_ = false
 

Static Protected Attributes

static const real growthFactor_ = vectorGrowthFactor__
 
static constexpr bool isHostAccessible_
 

Detailed Description

template<typename T, typename MemorySpace = void>
class pFlow::VectorSingle< T, MemorySpace >

Definition at line 45 of file VectorSingle.hpp.

Member Typedef Documentation

◆ VectorType

using VectorType = VectorSingle<T, MemorySpace>

Definition at line 54 of file VectorSingle.hpp.

◆ iterator

using iterator = T*

Definition at line 56 of file VectorSingle.hpp.

◆ constIterator

using constIterator = const T*

Definition at line 58 of file VectorSingle.hpp.

◆ reference

using reference = T&

Definition at line 60 of file VectorSingle.hpp.

◆ constReference

using constReference = const T&

Definition at line 62 of file VectorSingle.hpp.

◆ valueType

using valueType = T

Definition at line 64 of file VectorSingle.hpp.

◆ pointer

using pointer = T*

Definition at line 66 of file VectorSingle.hpp.

◆ constPointer

using constPointer = const T*

Definition at line 68 of file VectorSingle.hpp.

◆ viewType

using viewType = ViewType1D<T, MemorySpace>

Definition at line 71 of file VectorSingle.hpp.

◆ deviceType

using deviceType = typename viewType::device_type

Definition at line 73 of file VectorSingle.hpp.

◆ memory_space

using memory_space = typename viewType::memory_space

Definition at line 75 of file VectorSingle.hpp.

◆ execution_space

using execution_space = typename viewType::execution_space

Definition at line 77 of file VectorSingle.hpp.

Constructor & Destructor Documentation

◆ VectorSingle() [1/13]

VectorSingle ( )
inline

Definition at line 149 of file VectorSingle.hpp.

Referenced by VectorSingle< realx3, void >::clonePtr().

Here is the caller graph for this function:

◆ VectorSingle() [2/13]

VectorSingle ( const word name)
inline

Definition at line 155 of file VectorSingle.hpp.

◆ VectorSingle() [3/13]

VectorSingle ( size_t  n)
inline

Definition at line 165 of file VectorSingle.hpp.

◆ VectorSingle() [4/13]

VectorSingle ( const word name,
size_t  n 
)
inline

Definition at line 171 of file VectorSingle.hpp.

◆ VectorSingle() [5/13]

VectorSingle ( size_t  n,
const T &  val 
)
inline

Definition at line 181 of file VectorSingle.hpp.

◆ VectorSingle() [6/13]

VectorSingle ( const word name,
size_t  n,
const T &  val 
)
inline

Definition at line 187 of file VectorSingle.hpp.

◆ VectorSingle() [7/13]

VectorSingle ( size_t  cap,
size_t  n,
RESERVE   
)
inline

Definition at line 195 of file VectorSingle.hpp.

◆ VectorSingle() [8/13]

VectorSingle ( const word name,
size_t  cap,
size_t  n,
RESERVE   
)
inline

Definition at line 202 of file VectorSingle.hpp.

◆ VectorSingle() [9/13]

VectorSingle ( const Vector< T > &  src)
inline

Definition at line 211 of file VectorSingle.hpp.

◆ VectorSingle() [10/13]

VectorSingle ( const word name,
const Vector< T > &  src 
)
inline

Definition at line 217 of file VectorSingle.hpp.

◆ VectorSingle() [11/13]

VectorSingle ( const VectorSingle< T, MemorySpace > &  src)
inline

Definition at line 225 of file VectorSingle.hpp.

◆ VectorSingle() [12/13]

VectorSingle ( const word name,
const VectorSingle< T, MemorySpace > &  src 
)
inline

Definition at line 234 of file VectorSingle.hpp.

◆ VectorSingle() [13/13]

VectorSingle ( VectorSingle< T, MemorySpace > &&  )
delete

Member Function Documentation

◆ memoerySpaceName()

constexpr static const char* memoerySpaceName ( )
inlinestaticconstexprprotected

Definition at line 96 of file VectorSingle.hpp.

◆ evalCapacity()

static INLINE_FUNCTION_H size_t evalCapacity ( size_t  n)
inlinestaticprotected

Definition at line 101 of file VectorSingle.hpp.

Referenced by VectorSingle< realx3, void >::assign(), and VectorSingle< realx3, void >::changeSize().

Here is the caller graph for this function:

◆ changeSize()

INLINE_FUNCTION_H void changeSize ( size_t  n,
bool  actualCap = false 
)
inlineprotected

◆ setSize()

INLINE_FUNCTION_H void setSize ( size_t  n)
inlineprotected

Definition at line 125 of file VectorSingle.hpp.

Referenced by VectorSingle< realx3, void >::changeSize().

Here is the caller graph for this function:

◆ updateSubView()

INLINE_FUNCTION_H void updateSubView ( ) const
inlineprotected

Definition at line 132 of file VectorSingle.hpp.

Referenced by VectorSingle< realx3, void >::deviceVector().

Here is the caller graph for this function:

◆ TypeInfoTemplateNV2()

TypeInfoTemplateNV2 ( "VectorSingle< T, MemorySpace >"  ,
,
memoerySpaceName()   
)

◆ operator=() [1/2]

VectorSingle& operator= ( const VectorSingle< T, MemorySpace > &  rhs)
inline

Definition at line 243 of file VectorSingle.hpp.

◆ operator=() [2/2]

VectorSingle& operator= ( VectorSingle< T, MemorySpace > &&  )
delete

◆ clone()

INLINE_FUNCTION_H uniquePtr<VectorSingle> clone ( ) const
inline

Definition at line 264 of file VectorSingle.hpp.

◆ clonePtr()

INLINE_FUNCTION_H VectorSingle* clonePtr ( ) const
inline

Definition at line 271 of file VectorSingle.hpp.

◆ VectorField() [1/2]

INLINE_FUNCTION_H VectorType& VectorField ( )
inline

Definition at line 280 of file VectorSingle.hpp.

◆ VectorField() [2/2]

const INLINE_FUNCTION_H VectorType& VectorField ( ) const
inline

Definition at line 287 of file VectorSingle.hpp.

◆ deviceVectorAll() [1/2]

◆ deviceVectorAll() [2/2]

const INLINE_FUNCTION_H viewType& deviceVectorAll ( ) const
inline

Definition at line 301 of file VectorSingle.hpp.

◆ deviceVector() [1/2]

◆ deviceVector() [2/2]

const INLINE_FUNCTION_H viewType& deviceVector ( ) const
inline

Definition at line 314 of file VectorSingle.hpp.

◆ hostVectorAll() [1/2]

const INLINE_FUNCTION_H auto hostVectorAll ( ) const
inline

◆ hostVectorAll() [2/2]

INLINE_FUNCTION_H auto hostVectorAll ( )
inline

Definition at line 328 of file VectorSingle.hpp.

◆ hostVector() [1/2]

const INLINE_FUNCTION_H auto hostVector ( ) const
inline

Definition at line 336 of file VectorSingle.hpp.

Referenced by pFlow::dataToVTK(), selectBox::selectAllPointsInBox(), pFlow::TSFtoVTK::triDataToVTK(), and dynamicPointStructure::update().

Here is the caller graph for this function:

◆ hostVector() [2/2]

INLINE_FUNCTION_H auto hostVector ( )
inline

Definition at line 344 of file VectorSingle.hpp.

◆ name()

const INLINE_FUNCTION_H word name ( ) const
inline

Definition at line 353 of file VectorSingle.hpp.

◆ size()

◆ capacity()

INLINE_FUNCTION_H size_t capacity ( ) const
inline

◆ empty()

INLINE_FUNCTION_H bool empty ( ) const
inline

Definition at line 374 of file VectorSingle.hpp.

Referenced by VectorSingle< realx3, void >::append(), VectorSingle< realx3, void >::fill(), and VectorSingle< realx3, void >::insertSetElement().

Here is the caller graph for this function:

◆ reserve()

INLINE_FUNCTION_H void reserve ( size_t  cap)
inline

Definition at line 382 of file VectorSingle.hpp.

◆ reallocate() [1/2]

INLINE_FUNCTION_H void reallocate ( size_t  cap)
inline

Definition at line 388 of file VectorSingle.hpp.

Referenced by VectorSingle< realx3, void >::assign(), and VectorSingle< realx3, void >::VectorSingle().

Here is the caller graph for this function:

◆ reallocate() [2/2]

INLINE_FUNCTION_H void reallocate ( size_t  cap,
size_t  size 
)
inline

Definition at line 396 of file VectorSingle.hpp.

◆ resize() [1/2]

INLINE_FUNCTION_H void resize ( size_t  n)
inline

Definition at line 406 of file VectorSingle.hpp.

Referenced by VectorSingle< realx3, void >::append(), and VectorSingle< realx3, void >::insertSetElement().

Here is the caller graph for this function:

◆ resize() [2/2]

INLINE_FUNCTION_H void resize ( size_t  n,
const T &  val 
)
inline

Definition at line 412 of file VectorSingle.hpp.

◆ clear()

INLINE_FUNCTION_H void clear ( )
inline

Definition at line 418 of file VectorSingle.hpp.

Referenced by triSurface::clear().

Here is the caller graph for this function:

◆ fill()

INLINE_FUNCTION_H void fill ( const T &  val)
inline

Definition at line 426 of file VectorSingle.hpp.

Referenced by VectorSingle< realx3, void >::assign().

Here is the caller graph for this function:

◆ assign() [1/2]

INLINE_FUNCTION_H void assign ( size_t  n,
const T &  val 
)
inline

Definition at line 437 of file VectorSingle.hpp.

Referenced by VectorSingle< realx3, void >::read(), VectorSingle< realx3, void >::resize(), and VectorSingle< realx3, void >::VectorSingle().

Here is the caller graph for this function:

◆ assign() [2/2]

INLINE_FUNCTION_H void assign ( const Vector< T > &  src)
inline

Definition at line 451 of file VectorSingle.hpp.

◆ insertSetElement() [1/4]

INLINE_FUNCTION_H bool insertSetElement ( const int32IndexContainer indices,
const T &  val 
)
inline

Definition at line 535 of file VectorSingle.hpp.

◆ insertSetElement() [2/4]

INLINE_FUNCTION_H bool insertSetElement ( const int32IndexContainer indices,
const Vector< T > &  vals 
)
inline

Definition at line 560 of file VectorSingle.hpp.

◆ insertSetElement() [3/4]

INLINE_FUNCTION_H bool insertSetElement ( const Vector< int32 > &  indices,
const T &  val 
)
inline

Definition at line 598 of file VectorSingle.hpp.

◆ insertSetElement() [4/4]

INLINE_FUNCTION_H bool insertSetElement ( const Vector< int32 > &  indices,
const Vector< T > &  vals 
)
inline

Definition at line 630 of file VectorSingle.hpp.

◆ append() [1/2]

INLINE_FUNCTION_H bool append ( const deviceViewType1D< T > &  dVec,
size_t  numElems 
)
inline

Definition at line 672 of file VectorSingle.hpp.

Referenced by multiTriSurface::addTriSurface(), and VectorSingle< realx3, void >::append().

Here is the caller graph for this function:

◆ append() [2/2]

INLINE_FUNCTION_H bool append ( const VectorSingle< T, MemorySpace > &  Vec)
inline

Definition at line 695 of file VectorSingle.hpp.

◆ push_back()

std::enable_if< isHostAccessible_ && Enable, void>::type push_back ( const T &  val)
inline

Definition at line 708 of file VectorSingle.hpp.

◆ data() [1/2]

INLINE_FUNCTION_H pointer data ( )
inline

Definition at line 715 of file VectorSingle.hpp.

Referenced by VectorSingle< realx3, void >::begin(), VectorSingle< realx3, void >::end(), and VectorSingle< realx3, void >::push_back().

Here is the caller graph for this function:

◆ data() [2/2]

INLINE_FUNCTION_H constPointer data ( ) const
inline

Definition at line 719 of file VectorSingle.hpp.

◆ begin() [1/2]

INLINE_FUNCTION_H std::enable_if_t< isHostAccessible_ && Enable, iterator> begin ( )
inline

Definition at line 731 of file VectorSingle.hpp.

◆ begin() [2/2]

INLINE_FUNCTION_H std::enable_if< isHostAccessible_ && Enable, constIterator>::type begin ( ) const
inline

Definition at line 743 of file VectorSingle.hpp.

◆ end() [1/2]

INLINE_FUNCTION_H std::enable_if< isHostAccessible_ && Enable, iterator>::type end ( )
inline

Definition at line 755 of file VectorSingle.hpp.

◆ end() [2/2]

INLINE_FUNCTION_H std::enable_if< isHostAccessible_ && Enable, constIterator>::type end ( ) const
inline

Definition at line 766 of file VectorSingle.hpp.

◆ operator[]() [1/2]

INLINE_FUNCTION_H std::enable_if< isHostAccessible_ && Enable, reference>::type operator[] ( label  i)
inline

Definition at line 776 of file VectorSingle.hpp.

◆ operator[]() [2/2]

INLINE_FUNCTION_H std::enable_if< isHostAccessible_ && Enable, constReference>::type operator[] ( label  i) const
inline

Definition at line 785 of file VectorSingle.hpp.

◆ read()

FUNCTION_H bool read ( iIstream is)
inline

Definition at line 792 of file VectorSingle.hpp.

Referenced by pFlow::operator>>().

Here is the caller graph for this function:

◆ write()

FUNCTION_H bool write ( iOstream os) const
inline

Definition at line 803 of file VectorSingle.hpp.

Referenced by pFlow::operator<<().

Here is the caller graph for this function:

Member Data Documentation

◆ size_

◆ capacity_

◆ view_

◆ subView_

viewType subView_
mutableprotected

◆ subViewUpdated_

◆ growthFactor_

const real growthFactor_ = vectorGrowthFactor__
inlinestaticprotected

Definition at line 91 of file VectorSingle.hpp.

Referenced by VectorSingle< realx3, void >::evalCapacity().

◆ isHostAccessible_

constexpr bool isHostAccessible_
staticconstexprprotected
Initial value:
=
Kokkos::SpaceAccessibility<execution_space,Kokkos::HostSpace>::accessible

Definition at line 93 of file VectorSingle.hpp.

Referenced by VectorSingle< realx3, void >::insertSetElement().


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