Vector< T, Allocator > Class Template Reference
Inheritance diagram for Vector< T, Allocator >:

Public Types

typedef Vector< T, Allocator > VectorType
 
typedef std::vector< T, Allocator > vectorType
 
typedef vectorType::iterator iterator
 
typedef vectorType::const_iterator constIterator
 
typedef vectorType::reference reference
 
typedef vectorType::const_reference constReference
 
typedef T valueType
 
typedef T * pointer
 
typedef std::initializer_list< T > initList
 

Public Member Functions

 TypeInfoTemplateNV2 ("Vector", T, memoerySpaceName())
 
 Vector ()
 
 Vector (const word &name)
 
 Vector (const size_t len)
 
 Vector (const word &name, size_t len)
 
 Vector (size_t len, const T &val)
 
 Vector (const word &name, size_t len, const T &val)
 
 Vector (const size_t cap, RESERVE)
 
 Vector (const size_t cap, const size_t len, RESERVE)
 
 Vector (const word &name, size_t cap, size_t len, RESERVE)
 
 Vector (const size_t cap, const size_t len, const T &val, RESERVE)
 
 Vector (const initList &l)
 
 Vector (const word name, const Vector< T > &src)
 
 Vector (const VectorType &src)=default
 
 Vector (VectorType &&mv)=default
 
 Vector (const vectorType &src)
 
VectorTypeoperator= (const VectorType &rhs)=default
 
VectorTypeoperator= (const vectorType &rhs)
 
VectorTypeoperator= (VectorType &&mv)=default
 
void operator= (const T &val)
 
 ~Vector ()
 
uniquePtr< VectorTypeclone () const
 
VectorTypeclonePtr () const
 
auto clear ()
 
const VectorTypeVectorField () const
 
VectorTypeVectorField ()
 
const vectorTypevectorField () const
 
vectorTypevectorField ()
 
auto & deviceVectorAll ()
 
const auto & deviceVectorAll () const
 
auto & deviceVector ()
 
const auto & deviceVector () const
 
const wordname () const
 
auto size () const
 
auto capacity () const
 
auto reserve (label len)
 
bool deleteElement_sorted (const Vector< label > &indices)
 
bool deleteElement (const Vector< label > &indices)
 
bool deleteElement (label index)
 
bool insertSetElement (const int32IndexContainer &indices, const T &val)
 
bool insertSetElement (const int32IndexContainer &indices, const Vector< T > &vals)
 
bool insertSetElement (const Vector< int32 > &indices, const T &val)
 
bool insertSetElement (const Vector< int32 > &indices, const Vector< T > &vals)
 
bool insertSetElement (int32 idx, const T &val)
 
void fill (const T &val)
 
void operator+= (const T &val)
 
void operator-= (const T &val)
 
void operator*= (const T &val)
 
void operator/= (const T &val)
 
void operator+= (const VectorType &v)
 
void operator-= (const VectorType &v)
 
void operator/= (const VectorType &v)
 
void operator*= (const VectorType &v)
 
VectorType operator- () const
 
 Vector (iIstream &is)
 
bool readVector (iIstream &is)
 
bool writeVector (iOstream &os) const
 
bool read (iIstream &is)
 
bool write (iOstream &os) const
 

Static Public Member Functions

static constexpr bool isHostAccessible ()
 

Public Attributes

const typedef T * constPointer
 

Static Protected Member Functions

static size_t getVectorStride (const size_t &len)
 
constexpr static const char * memoerySpaceName ()
 

Protected Attributes

word name_
 

Static Protected Attributes

static constexpr bool isHostAccessible_ = true
 

Detailed Description

template<typename T, typename Allocator = vecAllocator<T>>
class pFlow::Vector< T, Allocator >

Definition at line 46 of file Vector.hpp.

Member Typedef Documentation

◆ VectorType

typedef Vector<T, Allocator> VectorType

Definition at line 71 of file Vector.hpp.

◆ vectorType

typedef std::vector<T, Allocator> vectorType

Definition at line 73 of file Vector.hpp.

◆ iterator

typedef vectorType::iterator iterator

Definition at line 75 of file Vector.hpp.

◆ constIterator

typedef vectorType::const_iterator constIterator

Definition at line 77 of file Vector.hpp.

◆ reference

typedef vectorType::reference reference

Definition at line 79 of file Vector.hpp.

◆ constReference

typedef vectorType::const_reference constReference

Definition at line 81 of file Vector.hpp.

◆ valueType

typedef T valueType

Definition at line 83 of file Vector.hpp.

◆ pointer

typedef T* pointer

Definition at line 85 of file Vector.hpp.

◆ initList

typedef std::initializer_list<T> initList

Definition at line 89 of file Vector.hpp.

Constructor & Destructor Documentation

◆ Vector() [1/16]

Vector ( )
inline

Definition at line 123 of file Vector.hpp.

◆ Vector() [2/16]

Vector ( const word name)
inline

Definition at line 128 of file Vector.hpp.

◆ Vector() [3/16]

Vector ( const size_t  len)
inline

Definition at line 133 of file Vector.hpp.

◆ Vector() [4/16]

Vector ( const word name,
size_t  len 
)
inline

Definition at line 139 of file Vector.hpp.

◆ Vector() [5/16]

Vector ( size_t  len,
const T &  val 
)
inline

Definition at line 148 of file Vector.hpp.

◆ Vector() [6/16]

Vector ( const word name,
size_t  len,
const T &  val 
)
inline

Definition at line 153 of file Vector.hpp.

◆ Vector() [7/16]

Vector ( const size_t  cap,
RESERVE   
)
inline

Definition at line 162 of file Vector.hpp.

◆ Vector() [8/16]

Vector ( const size_t  cap,
const size_t  len,
RESERVE   
)
inline

Definition at line 167 of file Vector.hpp.

◆ Vector() [9/16]

Vector ( const word name,
size_t  cap,
size_t  len,
RESERVE   
)
inline

Definition at line 174 of file Vector.hpp.

◆ Vector() [10/16]

Vector ( const size_t  cap,
const size_t  len,
const T &  val,
RESERVE   
)
inline

Definition at line 181 of file Vector.hpp.

◆ Vector() [11/16]

Vector ( const initList l)
inline

Definition at line 190 of file Vector.hpp.

◆ Vector() [12/16]

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

Definition at line 196 of file Vector.hpp.

◆ Vector() [13/16]

Vector ( const VectorType src)
inlinedefault

◆ Vector() [14/16]

Vector ( VectorType &&  mv)
inlinedefault

◆ Vector() [15/16]

Vector ( const vectorType src)
inline

Definition at line 207 of file Vector.hpp.

◆ ~Vector()

~Vector ( )
inline

Definition at line 233 of file Vector.hpp.

◆ Vector() [16/16]

Vector ( iIstream is)

Definition at line 23 of file Vector.cpp.

Member Function Documentation

◆ getVectorStride()

static size_t getVectorStride ( const size_t &  len)
inlinestaticprotected

Definition at line 96 of file Vector.hpp.

◆ memoerySpaceName()

constexpr static const char* memoerySpaceName ( )
inlinestaticconstexprprotected

Definition at line 109 of file Vector.hpp.

◆ TypeInfoTemplateNV2()

TypeInfoTemplateNV2 ( "Vector< T, Allocator >"  ,
,
memoerySpaceName()   
)

◆ operator=() [1/4]

VectorType& operator= ( const VectorType rhs)
inlinedefault

◆ operator=() [2/4]

VectorType& operator= ( const vectorType rhs)
inline

Definition at line 218 of file Vector.hpp.

◆ operator=() [3/4]

VectorType& operator= ( VectorType &&  mv)
inlinedefault

◆ operator=() [4/4]

void operator= ( const T &  val)
inline

Definition at line 228 of file Vector.hpp.

◆ clone()

uniquePtr<VectorType> clone ( ) const
inline

Definition at line 238 of file Vector.hpp.

◆ clonePtr()

VectorType* clonePtr ( ) const
inline

Definition at line 243 of file Vector.hpp.

◆ clear()

◆ VectorField() [1/2]

const VectorType& VectorField ( ) const
inline

Definition at line 254 of file Vector.hpp.

◆ VectorField() [2/2]

VectorType& VectorField ( )
inline

Definition at line 259 of file Vector.hpp.

◆ vectorField() [1/2]

const vectorType& vectorField ( ) const
inline

Definition at line 264 of file Vector.hpp.

◆ vectorField() [2/2]

vectorType& vectorField ( )
inline

Definition at line 269 of file Vector.hpp.

◆ deviceVectorAll() [1/2]

auto& deviceVectorAll ( )
inline

Definition at line 274 of file Vector.hpp.

◆ deviceVectorAll() [2/2]

const auto& deviceVectorAll ( ) const
inline

Definition at line 279 of file Vector.hpp.

◆ deviceVector() [1/2]

auto& deviceVector ( )
inline

Definition at line 284 of file Vector.hpp.

◆ deviceVector() [2/2]

const auto& deviceVector ( ) const
inline

Definition at line 289 of file Vector.hpp.

◆ name()

const word& name ( ) const
inline

Definition at line 294 of file Vector.hpp.

◆ size()

auto size ( ) const
inline

Definition at line 299 of file Vector.hpp.

Referenced by triSurface::addTriangle(), symArray< nonLinearProperties >::assign(), VectorSingle< realx3, void >::assign(), VectorDual< int8 >::assign(), multiTriSurface::calculateVars(), Vector< word, vecAllocator< word > >::deleteElement(), VectorDual< int8 >::deleteElement(), Vector< word, vecAllocator< word > >::deleteElement_sorted(), pFlow::fillSequence(), Insertion< ShapeType >::insertParticles(), InsertionRegion< ShapeType >::insertParticles(), sphereParticles::insertParticles(), pointStructure::insertPoints(), Vector< word, vecAllocator< word > >::insertSetElement(), VectorSingle< realx3, void >::insertSetElement(), VectorDual< int8 >::insertSetElement(), sphereParticles::insertSphereParticles(), property::makeNameIndex(), pFlow::max(), pFlow::min(), positionOrdered::numPoints(), positionRandom::numPoints(), Vector< word, vecAllocator< word > >::operator*=(), Vector< word, vecAllocator< word > >::operator+=(), Vector< word, vecAllocator< word > >::operator-=(), Vector< word, vecAllocator< word > >::operator/=(), pFlow::pow(), sphereShape::readDictionary(), property::readDictionary(), linear< limited >::readLinearDictionary(), nonLinear< limited >::readNonLinearDictionary(), nonLinearMod< limited >::readNonLinearDictionary(), positionOrdered::size(), positionRandom::size(), shapeMixture::size(), positionParticles::sortByMortonCode(), pFlow::sum(), symArray< nonLinearProperties >::write(), VectorSingle< realx3, void >::write(), and VectorDual< int8 >::write().

Here is the caller graph for this function:

◆ capacity()

auto capacity ( ) const
inline

Definition at line 304 of file Vector.hpp.

Referenced by VectorSingle< realx3, void >::assign(), InsertionRegion< ShapeType >::insertParticles(), pFlow::pow(), and positionParticles::sortByMortonCode().

Here is the caller graph for this function:

◆ reserve()

◆ deleteElement_sorted()

bool deleteElement_sorted ( const Vector< label > &  indices)

Definition at line 124 of file Vector.cpp.

◆ deleteElement() [1/2]

bool deleteElement ( const Vector< label > &  indices)

Definition at line 166 of file Vector.cpp.

◆ deleteElement() [2/2]

bool deleteElement ( label  index)

Definition at line 185 of file Vector.cpp.

◆ insertSetElement() [1/5]

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

Definition at line 201 of file Vector.cpp.

◆ insertSetElement() [2/5]

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

Definition at line 233 of file Vector.cpp.

◆ insertSetElement() [3/5]

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

Definition at line 266 of file Vector.cpp.

◆ insertSetElement() [4/5]

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

Definition at line 297 of file Vector.cpp.

◆ insertSetElement() [5/5]

bool insertSetElement ( int32  idx,
const T &  val 
)
inline

Definition at line 328 of file Vector.cpp.

◆ fill()

void fill ( const T &  val)
inline

Definition at line 22 of file VectorI.hpp.

Referenced by Vector< word, vecAllocator< word > >::operator=().

Here is the caller graph for this function:

◆ isHostAccessible()

static constexpr bool isHostAccessible ( )
inlinestaticconstexpr

Definition at line 349 of file Vector.hpp.

◆ operator+=() [1/2]

void operator+= ( const T &  val)
inline

Definition at line 29 of file VectorI.hpp.

◆ operator-=() [1/2]

void operator-= ( const T &  val)
inline

Definition at line 39 of file VectorI.hpp.

◆ operator*=() [1/2]

void operator*= ( const T &  val)
inline

Definition at line 49 of file VectorI.hpp.

◆ operator/=() [1/2]

void operator/= ( const T &  val)
inline

Definition at line 59 of file VectorI.hpp.

◆ operator+=() [2/2]

void operator+= ( const VectorType v)
inline

Definition at line 69 of file VectorI.hpp.

◆ operator-=() [2/2]

void operator-= ( const VectorType v)
inline

Definition at line 88 of file VectorI.hpp.

◆ operator/=() [2/2]

void operator/= ( const VectorType v)
inline

Definition at line 126 of file VectorI.hpp.

◆ operator*=() [2/2]

void operator*= ( const VectorType v)
inline

Definition at line 107 of file VectorI.hpp.

◆ operator-()

pFlow::Vector< T, Allocator > operator-
inline

Definition at line 146 of file VectorI.hpp.

◆ readVector()

bool readVector ( iIstream is)

Definition at line 30 of file Vector.cpp.

Referenced by pFlow::operator>>(), and Vector< word, vecAllocator< word > >::read().

Here is the caller graph for this function:

◆ writeVector()

bool writeVector ( iOstream os) const

Definition at line 90 of file Vector.cpp.

Referenced by pFlow::operator<<(), and Vector< word, vecAllocator< word > >::write().

Here is the caller graph for this function:

◆ read()

bool read ( iIstream is)
inline

Definition at line 378 of file Vector.hpp.

Referenced by symArray< nonLinearProperties >::read(), VectorSingle< realx3, void >::read(), and VectorDual< int8 >::read().

Here is the caller graph for this function:

◆ write()

bool write ( iOstream os) const
inline

Definition at line 383 of file Vector.hpp.

Referenced by symArray< nonLinearProperties >::write(), VectorSingle< realx3, void >::write(), and VectorDual< int8 >::write().

Here is the caller graph for this function:

Member Data Documentation

◆ constPointer

const typedef T* constPointer

Definition at line 87 of file Vector.hpp.

◆ name_

◆ isHostAccessible_

constexpr bool isHostAccessible_ = true
staticconstexprprotected

Definition at line 107 of file Vector.hpp.

Referenced by Vector< word, vecAllocator< word > >::isHostAccessible().


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