Go to the documentation of this file.
22 #ifndef __Vector_hpp__
23 #define __Vector_hpp__
45 template<
typename T,
typename Allocator>
53 :
public std::allocator<T>
56 using std::allocator<T>::allocator;
58 template <
class U,
class... Args>
void construct(U*, Args&&...) {}
64 template<
typename T,
typename Allocator = vecAllocator<T> >
67 public std::vector<T, Allocator>
75 typedef typename vectorType::iterator
iterator;
89 typedef typename std::initializer_list<T>
initList;
99 if( len < 6 ) stride = len;
100 else if( len <16 ) stride = 3;
101 else if( len < 31) stride = 2;
150 Vector(
"Vector", len, val)
157 this->assign(len, val);
185 this->assign(len, val);
220 Vector::assign(rhs.begin(), rhs.end());
240 return makeUnique<VectorType>(*
this);
250 return vectorType::clear();
301 return vectorType::size();
306 return vectorType::capacity();
311 return vectorType::reserve(len);
347 inline void fill(
const T& val);
391 template<
typename T,
typename Allocator>
402 template<
typename T,
typename Allocator>
Vector(const vectorType &src)
std::initializer_list< T > initList
VectorType operator-() const
vectorType::const_reference constReference
VectorType & VectorField()
Vector(const size_t cap, RESERVE)
VectorType & operator=(const VectorType &rhs)=default
const vectorType & vectorField() const
const auto & deviceVectorAll() const
VectorType * clonePtr() const
VectorType & operator=(const vectorType &rhs)
void operator*=(const T &val)
void construct(U *, Args &&...)
void operator/=(const T &val)
Vector(const word &name, size_t len)
const VectorType & VectorField() const
vectorType::const_iterator constIterator
Vector(const word &name, size_t cap, size_t len, RESERVE)
Vector(size_t len, const T &val)
static constexpr bool isHostAccessible()
void operator=(const T &val)
bool deleteElement(const Vector< label > &indices)
std::allocator< T > vecAllocator
bool writeVector(iOstream &os) const
Vector(const size_t cap, const size_t len, RESERVE)
bool deleteElement_sorted(const Vector< label > &indices)
static size_t getVectorStride(const size_t &len)
Vector(const word name, const Vector< T > &src)
Vector(const initList &l)
vectorType::reference reference
INLINE_FUNCTION iIstream & operator>>(iIstream &str, AB3History &ab3)
void operator+=(const T &val)
vectorType::iterator iterator
INLINE_FUNCTION iOstream & operator<<(iOstream &str, const AB3History &ab3)
void operator-=(const T &val)
const typedef T * constPointer
bool readVector(iIstream &is)
constexpr static const char * memoerySpaceName()
virtual const word & name() const
static constexpr bool isHostAccessible_
Vector< T, Allocator > VectorType
Vector(const size_t cap, const size_t len, const T &val, RESERVE)
bool write(iOstream &os) const
TypeInfoTemplateNV2("Vector", T, memoerySpaceName())
const word & name() const
const auto & deviceVector() const
#define ioErrorInFile(fileName, lineNumber)
Vector(const word &name, size_t len, const T &val)
std::vector< T, Allocator > vectorType
vectorType & vectorField()
uniquePtr< VectorType > clone() const
bool insertSetElement(const int32IndexContainer &indices, const T &val)