Classes | Public Types | Public Member Functions | Private Types | List of all members
blaze::DynamicVector< Type, TF > Class Template Reference

Efficient implementation of an arbitrary sized vector.The DynamicVector class template is the representation of an arbitrary sized vector with dynamically allocated elements of arbitrary type. The type of the elements and the transpose flag of the vector can be specified via the two template parameters: More...

#include <DynamicVector.h>

Inherits blaze::DenseVector< DynamicVector< Type, TF >, TF >.

Classes

struct  Rebind
 Rebind mechanism to obtain a DynamicVector with different data/element type. More...
 
struct  Resize
 Resize mechanism to obtain a DynamicVector with a different fixed number of elements. More...
 

Public Types

enum  : bool { simdEnabled = IsVectorizable<Type>::value }
 Compilation flag for SIMD optimization. More...
 
enum  : bool { smpAssignable = !IsSMPAssignable<Type>::value }
 Compilation flag for SMP assignments. More...
 
using This = DynamicVector< Type, TF >
 Type of this DynamicVector instance.
 
using BaseType = DenseVector< This, TF >
 Base type of this DynamicVector instance.
 
using ResultType = This
 Result type for expression template evaluations.
 
using TransposeType = DynamicVector< Type,!TF >
 Transpose type for expression template evaluations.
 
using ElementType = Type
 Type of the vector elements.
 
using SIMDType = SIMDTrait_< ElementType >
 SIMD type of the vector elements.
 
using ReturnType = const Type &
 Return type for expression template evaluations.
 
using CompositeType = const DynamicVector &
 Data type for composite expression templates.
 
using Reference = Type &
 Reference to a non-constant vector value.
 
using ConstReference = const Type &
 Reference to a constant vector value.
 
using Pointer = Type *
 Pointer to a non-constant vector value.
 
using ConstPointer = const Type *
 Pointer to a constant vector value.
 
using Iterator = DenseIterator< Type, aligned >
 Iterator over non-constant elements.
 
using ConstIterator = DenseIterator< const Type, aligned >
 Iterator over constant elements.
 
using VectorType = VT
 Type of the vector.
 

Public Member Functions

template<typename Other , size_t Dim>
DynamicVector< Type, TF > & operator= (const Other(&array)[Dim])
 Array assignment to all vector elements. More...
 
template<typename VT >
DynamicVector< Type, TF > & operator= (const Vector< VT, TF > &rhs)
 Assignment operator for different vectors. More...
 
template<typename VT >
DynamicVector< Type, TF > & operator+= (const Vector< VT, TF > &rhs)
 Addition assignment operator for the addition of a vector ( $ \vec{a}+=\vec{b} $). More...
 
template<typename VT >
DynamicVector< Type, TF > & operator-= (const Vector< VT, TF > &rhs)
 Subtraction assignment operator for the subtraction of a vector ( $ \vec{a}-=\vec{b} $). More...
 
template<typename VT >
DynamicVector< Type, TF > & operator*= (const Vector< VT, TF > &rhs)
 Multiplication assignment operator for the multiplication of a vector ( $ \vec{a}*=\vec{b} $). More...
 
template<typename VT >
DynamicVector< Type, TF > & operator/= (const DenseVector< VT, TF > &rhs)
 Division assignment operator for the division of a dense vector ( $ \vec{a}/=\vec{b} $). More...
 
template<typename VT >
DynamicVector< Type, TF > & operator%= (const Vector< VT, TF > &rhs)
 Cross product assignment operator for the multiplication of a vector ( $ \vec{a}\times=\vec{b} $). More...
 
template<typename Other >
EnableIf_< IsNumeric< Other >, DynamicVector< Type, TF > > & operator*= (Other rhs)
 Multiplication assignment operator for the multiplication between a vector and a scalar value ( $ \vec{a}*=s $). More...
 
template<typename Other >
EnableIf_< IsNumeric< Other >, DynamicVector< Type, TF > > & operator/= (Other rhs)
 Division assignment operator for the division of a vector by a scalar value ( $ \vec{a}/=s $). More...
 
template<typename Other >
DynamicVector< Type, TF > & scale (const Other &scalar)
 Scaling of the vector by the scalar value scalar ( $ \vec{a}=\vec{b}*s $). More...
 
template<typename VT >
DisableIf_< typename DynamicVector< Type, TF >::BLAZE_TEMPLATE VectorizedAssign< VT > > assign (const DenseVector< VT, TF > &rhs)
 Default implementation of the assignment of a dense vector. More...
 
template<typename VT >
EnableIf_< typename DynamicVector< Type, TF >::BLAZE_TEMPLATE VectorizedAssign< VT > > assign (const DenseVector< VT, TF > &rhs)
 SIMD optimized implementation of the assignment of a dense vector. More...
 
template<typename VT >
DisableIf_< typename DynamicVector< Type, TF >::BLAZE_TEMPLATE VectorizedAddAssign< VT > > addAssign (const DenseVector< VT, TF > &rhs)
 Default implementation of the addition assignment of a dense vector. More...
 
template<typename VT >
EnableIf_< typename DynamicVector< Type, TF >::BLAZE_TEMPLATE VectorizedAddAssign< VT > > addAssign (const DenseVector< VT, TF > &rhs)
 SIMD optimized implementation of the addition assignment of a dense vector. More...
 
template<typename VT >
DisableIf_< typename DynamicVector< Type, TF >::BLAZE_TEMPLATE VectorizedSubAssign< VT > > subAssign (const DenseVector< VT, TF > &rhs)
 Default implementation of the subtraction assignment of a dense vector. More...
 
template<typename VT >
EnableIf_< typename DynamicVector< Type, TF >::BLAZE_TEMPLATE VectorizedSubAssign< VT > > subAssign (const DenseVector< VT, TF > &rhs)
 SIMD optimized implementation of the subtraction assignment of a dense vector. More...
 
template<typename VT >
DisableIf_< typename DynamicVector< Type, TF >::BLAZE_TEMPLATE VectorizedMultAssign< VT > > multAssign (const DenseVector< VT, TF > &rhs)
 Default implementation of the multiplication assignment of a dense vector. More...
 
template<typename VT >
EnableIf_< typename DynamicVector< Type, TF >::BLAZE_TEMPLATE VectorizedMultAssign< VT > > multAssign (const DenseVector< VT, TF > &rhs)
 SIMD optimized implementation of the multiplication assignment of a dense vector. More...
 
template<typename VT >
DisableIf_< typename DynamicVector< Type, TF >::BLAZE_TEMPLATE VectorizedDivAssign< VT > > divAssign (const DenseVector< VT, TF > &rhs)
 Default implementation of the division assignment of a dense vector. More...
 
template<typename VT >
EnableIf_< typename DynamicVector< Type, TF >::BLAZE_TEMPLATE VectorizedDivAssign< VT > > divAssign (const DenseVector< VT, TF > &rhs)
 SIMD optimized implementation of the division assignment of a dense vector. More...
 
BLAZE_ALWAYS_INLINE VectorTypeoperator~ () noexcept
 Conversion operator for non-constant vectors. More...
 
BLAZE_ALWAYS_INLINE const VectorTypeoperator~ () const noexcept
 Conversion operator for constant vectors. More...
 
Constructors
 DynamicVector () noexcept
 The default constructor for DynamicVector.
 
 DynamicVector (size_t n)
 Constructor for a vector of size n. No element initialization is performed! More...
 
 DynamicVector (size_t n, const Type &init)
 Constructor for a homogeneous initialization of all n vector elements. More...
 
 DynamicVector (initializer_list< Type > list)
 List initialization of all vector elements. More...
 
template<typename Other >
 DynamicVector (size_t n, const Other *array)
 Array initialization of all vector elements. More...
 
template<typename Other , size_t Dim>
 DynamicVector (const Other(&array)[Dim])
 Array initialization of all vector elements. More...
 
 DynamicVector (const DynamicVector &v)
 The copy constructor for DynamicVector. More...
 
 DynamicVector (DynamicVector &&v) noexcept
 The move constructor for DynamicVector. More...
 
template<typename VT >
 DynamicVector (const Vector< VT, TF > &v)
 Conversion constructor from different vectors. More...
 
Destructor
 ~DynamicVector ()
 The destructor for DynamicVector.
 
Data access functions
Reference operator[] (size_t index) noexcept
 Subscript operator for the direct access to the vector elements. More...
 
ConstReference operator[] (size_t index) const noexcept
 Subscript operator for the direct access to the vector elements. More...
 
Reference at (size_t index)
 Checked access to the vector elements. More...
 
ConstReference at (size_t index) const
 Checked access to the vector elements. More...
 
Pointer data () noexcept
 Low-level data access to the vector elements. More...
 
ConstPointer data () const noexcept
 Low-level data access to the vector elements. More...
 
Iterator begin () noexcept
 Returns an iterator to the first element of the dynamic vector. More...
 
ConstIterator begin () const noexcept
 Returns an iterator to the first element of the dynamic vector. More...
 
ConstIterator cbegin () const noexcept
 Returns an iterator to the first element of the dynamic vector. More...
 
Iterator end () noexcept
 Returns an iterator just past the last element of the dynamic vector. More...
 
ConstIterator end () const noexcept
 Returns an iterator just past the last element of the dynamic vector. More...
 
ConstIterator cend () const noexcept
 Returns an iterator just past the last element of the dynamic vector. More...
 
Assignment operators
DynamicVectoroperator= (const Type &rhs)
 Homogenous assignment to all vector elements. More...
 
DynamicVectoroperator= (initializer_list< Type > list)
 List assignment to all vector elements. More...
 
template<typename Other , size_t Dim>
DynamicVectoroperator= (const Other(&array)[Dim])
 
DynamicVectoroperator= (const DynamicVector &rhs)
 Copy assignment operator for DynamicVector. More...
 
DynamicVectoroperator= (DynamicVector &&rhs) noexcept
 Move assignment operator for DynamicVector. More...
 
template<typename VT >
DynamicVectoroperator= (const Vector< VT, TF > &rhs)
 
template<typename VT >
DynamicVectoroperator+= (const Vector< VT, TF > &rhs)
 
template<typename VT >
DynamicVectoroperator-= (const Vector< VT, TF > &rhs)
 
template<typename VT >
DynamicVectoroperator*= (const Vector< VT, TF > &rhs)
 
template<typename VT >
DynamicVectoroperator/= (const DenseVector< VT, TF > &rhs)
 
template<typename VT >
DynamicVectoroperator%= (const Vector< VT, TF > &rhs)
 
template<typename Other >
EnableIf_< IsNumeric< Other >, DynamicVector > & operator*= (Other rhs)
 
template<typename Other >
EnableIf_< IsNumeric< Other >, DynamicVector > & operator/= (Other rhs)
 
Numeric functions
template<typename Other >
DynamicVectorscale (const Other &scalar)
 
Debugging functions
bool isIntact () const noexcept
 Returns whether the invariants of the dynamic vector are intact. More...
 
Expression template evaluation functions
template<typename Other >
bool canAlias (const Other *alias) const noexcept
 Returns whether the vector can alias with the given address alias. More...
 
template<typename Other >
bool isAliased (const Other *alias) const noexcept
 Returns whether the vector is aliased with the given address alias. More...
 
bool isAligned () const noexcept
 Returns whether the vector is properly aligned in memory. More...
 
bool canSMPAssign () const noexcept
 Returns whether the vector can be used in SMP assignments. More...
 
BLAZE_ALWAYS_INLINE SIMDType load (size_t index) const noexcept
 Load of a SIMD element of the vector. More...
 
BLAZE_ALWAYS_INLINE SIMDType loada (size_t index) const noexcept
 Aligned load of a SIMD element of the vector. More...
 
BLAZE_ALWAYS_INLINE SIMDType loadu (size_t index) const noexcept
 Unaligned load of a SIMD element of the vector. More...
 
BLAZE_ALWAYS_INLINE void store (size_t index, const SIMDType &value) noexcept
 Store of a SIMD element of the vector. More...
 
BLAZE_ALWAYS_INLINE void storea (size_t index, const SIMDType &value) noexcept
 Aligned store of a SIMD element of the vector. More...
 
BLAZE_ALWAYS_INLINE void storeu (size_t index, const SIMDType &value) noexcept
 Unaligned store of a SIMD element of the vector. More...
 
BLAZE_ALWAYS_INLINE void stream (size_t index, const SIMDType &value) noexcept
 Aligned, non-temporal store of a SIMD element of the vector. More...
 
template<typename VT >
DisableIf_< VectorizedAssign< VT > > assign (const DenseVector< VT, TF > &rhs)
 
template<typename VT >
EnableIf_< VectorizedAssign< VT > > assign (const DenseVector< VT, TF > &rhs)
 
template<typename VT >
void assign (const SparseVector< VT, TF > &rhs)
 Default implementation of the assignment of a sparse vector. More...
 
template<typename VT >
DisableIf_< VectorizedAddAssign< VT > > addAssign (const DenseVector< VT, TF > &rhs)
 
template<typename VT >
EnableIf_< VectorizedAddAssign< VT > > addAssign (const DenseVector< VT, TF > &rhs)
 
template<typename VT >
void addAssign (const SparseVector< VT, TF > &rhs)
 Default implementation of the addition assignment of a sparse vector. More...
 
template<typename VT >
DisableIf_< VectorizedSubAssign< VT > > subAssign (const DenseVector< VT, TF > &rhs)
 
template<typename VT >
EnableIf_< VectorizedSubAssign< VT > > subAssign (const DenseVector< VT, TF > &rhs)
 
template<typename VT >
void subAssign (const SparseVector< VT, TF > &rhs)
 Default implementation of the subtraction assignment of a sparse vector. More...
 
template<typename VT >
DisableIf_< VectorizedMultAssign< VT > > multAssign (const DenseVector< VT, TF > &rhs)
 
template<typename VT >
EnableIf_< VectorizedMultAssign< VT > > multAssign (const DenseVector< VT, TF > &rhs)
 
template<typename VT >
void multAssign (const SparseVector< VT, TF > &rhs)
 Default implementation of the multiplication assignment of a sparse vector. More...
 
template<typename VT >
DisableIf_< VectorizedDivAssign< VT > > divAssign (const DenseVector< VT, TF > &rhs)
 
template<typename VT >
EnableIf_< VectorizedDivAssign< VT > > divAssign (const DenseVector< VT, TF > &rhs)
 

Private Types

enum  : size_t { SIMDSIZE = SIMDTrait<ElementType>::size }
 The number of elements packed within a single SIMD element.
 

Private Attributes

Member variables
size_t size_
 The current size/dimension of the vector.
 
size_t capacity_
 The maximum capacity of the vector.
 
Type *BLAZE_RESTRICT v_
 The dynamically allocated vector elements. More...
 

Utility functions

size_t size () const noexcept
 Returns the current size/dimension of the vector. More...
 
size_t spacing () const noexcept
 Returns the minimum capacity of the vector. More...
 
size_t capacity () const noexcept
 Returns the maximum capacity of the vector. More...
 
size_t nonZeros () const
 Returns the number of non-zero elements in the vector. More...
 
void reset ()
 Reset to the default initial values. More...
 
void clear ()
 Clearing the vector. More...
 
void resize (size_t n, bool preserve=true)
 Changing the size of the vector. More...
 
void extend (size_t n, bool preserve=true)
 Extending the size of the vector. More...
 
void reserve (size_t n)
 Setting the minimum capacity of the vector. More...
 
void shrinkToFit ()
 Requesting the removal of unused capacity. More...
 
void swap (DynamicVector &v) noexcept
 Swapping the contents of two vectors. More...
 
size_t addPadding (size_t value) const noexcept
 Add the necessary amount of padding to the given value. More...
 

Detailed Description

template<typename Type, bool TF = defaultTransposeFlag>
class blaze::DynamicVector< Type, TF >

Efficient implementation of an arbitrary sized vector.

The DynamicVector class template is the representation of an arbitrary sized vector with dynamically allocated elements of arbitrary type. The type of the elements and the transpose flag of the vector can be specified via the two template parameters:

template< typename Type, bool TF >

These contiguously stored elements can be directly accessed with the subscript operator. The numbering of the vector elements is

\[\left(\begin{array}{*{5}{c}} 0 & 1 & 2 & \cdots & N-1 \\ \end{array}\right)\]

The use of DynamicVector is very natural and intuitive. All operations (addition, subtraction, multiplication, scaling, ...) can be performed on all possible combinations of dense and sparse vectors with fitting element types. The following example gives an impression of the use of DynamicVector:

DynamicVector<double> a( 2 ); // Non-initialized 2D vector of size 2
a[0] = 1.0; // Initialization of the first element
a[1] = 2.0; // Initialization of the second element
DynamicVector<double> b( 2, 2.0 ); // Directly, homogeneously initialized 2D vector
CompressedVector<float> c( 2 ); // Empty sparse single precision vector
DynamicVector<double> d; // Default constructed dynamic vector
DynamicMatrix<double> A; // Default constructed row-major matrix
d = a + b; // Vector addition between vectors of equal element type
d = a - c; // Vector subtraction between a dense and sparse vector with different element types
d = a * b; // Component-wise vector multiplication
a *= 2.0; // In-place scaling of vector
d = a * 2.0; // Scaling of vector a
d = 2.0 * a; // Scaling of vector a
d += a - b; // Addition assignment
d -= a + c; // Subtraction assignment
d *= a * b; // Multiplication assignment
double scalar = trans( a ) * b; // Scalar/dot/inner product between two vectors
A = a * trans( b ); // Outer product between two vectors

Member Enumeration Documentation

◆ anonymous enum

template<typename Type, bool TF = defaultTransposeFlag>
anonymous enum : bool

Compilation flag for SIMD optimization.

The simdEnabled compilation flag indicates whether expressions the vector is involved in can be optimized via SIMD operationss. In case the element type of the vector is a vectorizable data type, the simdEnabled compilation flag is set to true, otherwise it is set to false.

◆ anonymous enum

template<typename Type, bool TF = defaultTransposeFlag>
anonymous enum : bool

Compilation flag for SMP assignments.

The smpAssignable compilation flag indicates whether the vector can be used in SMP (shared memory parallel) assignments (both on the left-hand and right-hand side of the assignment).

Constructor & Destructor Documentation

◆ DynamicVector() [1/8]

template<typename Type , bool TF>
blaze::DynamicVector< Type, TF >::DynamicVector ( size_t  n)
inlineexplicit

Constructor for a vector of size n. No element initialization is performed!

Parameters
nThe size of the vector.
Note
This constructor is only responsible to allocate the required dynamic memory. No element initialization is performed!

◆ DynamicVector() [2/8]

template<typename Type , bool TF>
blaze::DynamicVector< Type, TF >::DynamicVector ( size_t  n,
const Type &  init 
)
inlineexplicit

Constructor for a homogeneous initialization of all n vector elements.

Parameters
nThe size of the vector.
initThe initial value of the vector elements.

All vector elements are initialized with the specified value.

◆ DynamicVector() [3/8]

template<typename Type , bool TF>
blaze::DynamicVector< Type, TF >::DynamicVector ( initializer_list< Type >  list)
inlineexplicit

List initialization of all vector elements.

Parameters
listThe initializer list.

This assignment operator provides the option to explicitly initialize the elements of the vector within a constructor call:

blaze::DynamicVector<double> v1{ 4.2, 6.3, -1.2 };

The vector is sized according to the size of the initializer list and all its elements are initialized by the values of the given initializer list.

◆ DynamicVector() [4/8]

template<typename Type , bool TF>
template<typename Other >
blaze::DynamicVector< Type, TF >::DynamicVector ( size_t  n,
const Other *  array 
)
inlineexplicit

Array initialization of all vector elements.

Parameters
nThe size of the vector.
arrayDynamic array for the initialization.

This assignment operator offers the option to directly initialize the elements of the vector with a dynamic array:

double* array = new double[4];
// ... Initialization of the dynamic array
delete[] array;

The vector is sized according to the specified size of the array and initialized with the values from the given array. Note that it is expected that the given array has at least n elements. Providing an array with less elements results in undefined behavior!

◆ DynamicVector() [5/8]

template<typename Type , bool TF>
template<typename Other , size_t Dim>
blaze::DynamicVector< Type, TF >::DynamicVector ( const Other(&)  array[Dim])
inlineexplicit

Array initialization of all vector elements.

Parameters
arrayN-dimensional array for the initialization.

This constructor offers the option to directly initialize the elements of the vector with a static array:

const int init[4] = { 1, 2, 3 };

The vector is sized according to the size of the array and initialized with the values from the given array. Missing values are initialized with default values (as e.g. the fourth element in the example).

◆ DynamicVector() [6/8]

template<typename Type , bool TF>
blaze::DynamicVector< Type, TF >::DynamicVector ( const DynamicVector< Type, TF > &  v)
inline

The copy constructor for DynamicVector.

Parameters
vVector to be copied.

The copy constructor is explicitly defined due to the required dynamic memory management and in order to enable/facilitate NRV optimization.

◆ DynamicVector() [7/8]

template<typename Type , bool TF>
blaze::DynamicVector< Type, TF >::DynamicVector ( DynamicVector< Type, TF > &&  v)
inlinenoexcept

The move constructor for DynamicVector.

Parameters
vThe vector to be moved into this instance.

◆ DynamicVector() [8/8]

template<typename Type , bool TF>
template<typename VT >
blaze::DynamicVector< Type, TF >::DynamicVector ( const Vector< VT, TF > &  v)
inline

Conversion constructor from different vectors.

Parameters
vVector to be copied.

Member Function Documentation

◆ addAssign() [1/3]

template<typename Type , bool TF>
template<typename VT >
void blaze::DynamicVector< Type, TF >::addAssign ( const SparseVector< VT, TF > &  rhs)
inline

Default implementation of the addition assignment of a sparse vector.

Parameters
rhsThe right-hand side sparse vector to be added.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.

◆ addAssign() [2/3]

template<typename Type, bool TF = defaultTransposeFlag>
template<typename VT >
DisableIf_<typename DynamicVector<Type,TF>::BLAZE_TEMPLATE VectorizedAddAssign<VT> > blaze::DynamicVector< Type, TF >::addAssign ( const DenseVector< VT, TF > &  rhs)
inline

Default implementation of the addition assignment of a dense vector.

Parameters
rhsThe right-hand side dense vector to be added.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.

◆ addAssign() [3/3]

template<typename Type, bool TF = defaultTransposeFlag>
template<typename VT >
EnableIf_<typename DynamicVector<Type,TF>::BLAZE_TEMPLATE VectorizedAddAssign<VT> > blaze::DynamicVector< Type, TF >::addAssign ( const DenseVector< VT, TF > &  rhs)
inline

SIMD optimized implementation of the addition assignment of a dense vector.

Parameters
rhsThe right-hand side dense vector to be added.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.

◆ addPadding()

template<typename Type , bool TF>
size_t blaze::DynamicVector< Type, TF >::addPadding ( size_t  value) const
inlineprivatenoexcept

Add the necessary amount of padding to the given value.

Parameters
valueThe value to be padded.
Returns
The padded value.

This function increments the given value by the necessary amount of padding based on the vector's data type Type.

◆ assign() [1/3]

template<typename Type , bool TF>
template<typename VT >
void blaze::DynamicVector< Type, TF >::assign ( const SparseVector< VT, TF > &  rhs)
inline

Default implementation of the assignment of a sparse vector.

Parameters
rhsThe right-hand side sparse vector to be assigned.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.

◆ assign() [2/3]

template<typename Type, bool TF = defaultTransposeFlag>
template<typename VT >
DisableIf_<typename DynamicVector<Type,TF>::BLAZE_TEMPLATE VectorizedAssign<VT> > blaze::DynamicVector< Type, TF >::assign ( const DenseVector< VT, TF > &  rhs)
inline

Default implementation of the assignment of a dense vector.

Parameters
rhsThe right-hand side dense vector to be assigned.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.

◆ assign() [3/3]

template<typename Type, bool TF = defaultTransposeFlag>
template<typename VT >
EnableIf_<typename DynamicVector<Type,TF>::BLAZE_TEMPLATE VectorizedAssign<VT> > blaze::DynamicVector< Type, TF >::assign ( const DenseVector< VT, TF > &  rhs)
inline

SIMD optimized implementation of the assignment of a dense vector.

Parameters
rhsThe right-hand side dense vector to be assigned.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.

◆ at() [1/2]

template<typename Type , bool TF>
DynamicVector< Type, TF >::Reference blaze::DynamicVector< Type, TF >::at ( size_t  index)
inline

Checked access to the vector elements.

Parameters
indexAccess index. The index has to be in the range $[0..N-1]$.
Returns
Reference to the accessed value.
Exceptions
std::out_of_rangeInvalid vector access index.

In contrast to the subscript operator this function always performs a check of the given access index.

◆ at() [2/2]

template<typename Type , bool TF>
DynamicVector< Type, TF >::ConstReference blaze::DynamicVector< Type, TF >::at ( size_t  index) const
inline

Checked access to the vector elements.

Parameters
indexAccess index. The index has to be in the range $[0..N-1]$.
Returns
Reference to the accessed value.
Exceptions
std::out_of_rangeInvalid vector access index.

In contrast to the subscript operator this function always performs a check of the given access index.

◆ begin() [1/2]

template<typename Type , bool TF>
DynamicVector< Type, TF >::Iterator blaze::DynamicVector< Type, TF >::begin ( )
inlinenoexcept

Returns an iterator to the first element of the dynamic vector.

Returns
Iterator to the first element of the dynamic vector.

◆ begin() [2/2]

template<typename Type , bool TF>
DynamicVector< Type, TF >::ConstIterator blaze::DynamicVector< Type, TF >::begin ( ) const
inlinenoexcept

Returns an iterator to the first element of the dynamic vector.

Returns
Iterator to the first element of the dynamic vector.

◆ canAlias()

template<typename Type , bool TF>
template<typename Other >
bool blaze::DynamicVector< Type, TF >::canAlias ( const Other *  alias) const
inlinenoexcept

Returns whether the vector can alias with the given address alias.

Parameters
aliasThe alias to be checked.
Returns
true in case the alias corresponds to this vector, false if not.

This function returns whether the given address can alias with the vector. In contrast to the isAliased() function this function is allowed to use compile time expressions to optimize the evaluation.

◆ canSMPAssign()

template<typename Type , bool TF>
bool blaze::DynamicVector< Type, TF >::canSMPAssign ( ) const
inlinenoexcept

Returns whether the vector can be used in SMP assignments.

Returns
true in case the vector can be used in SMP assignments, false if not.

This function returns whether the vector can be used in SMP assignments. In contrast to the smpAssignable member enumeration, which is based solely on compile time information, this function additionally provides runtime information (as for instance the current size of the vector).

◆ capacity()

template<typename Type , bool TF>
size_t blaze::DynamicVector< Type, TF >::capacity ( ) const
inlinenoexcept

Returns the maximum capacity of the vector.

Returns
The maximum capacity of the vector.

◆ cbegin()

template<typename Type , bool TF>
DynamicVector< Type, TF >::ConstIterator blaze::DynamicVector< Type, TF >::cbegin ( ) const
inlinenoexcept

Returns an iterator to the first element of the dynamic vector.

Returns
Iterator to the first element of the dynamic vector.

◆ cend()

template<typename Type , bool TF>
DynamicVector< Type, TF >::ConstIterator blaze::DynamicVector< Type, TF >::cend ( ) const
inlinenoexcept

Returns an iterator just past the last element of the dynamic vector.

Returns
Iterator just past the last element of the dynamic vector.

◆ clear()

template<typename Type , bool TF>
void blaze::DynamicVector< Type, TF >::clear ( )
inline

Clearing the vector.

Returns
void

After the clear() function, the size of the vector is 0.

◆ data() [1/2]

template<typename Type , bool TF>
DynamicVector< Type, TF >::Pointer blaze::DynamicVector< Type, TF >::data ( )
inlinenoexcept

Low-level data access to the vector elements.

Returns
Pointer to the internal element storage.

This function returns a pointer to the internal storage of the dynamic vector.

◆ data() [2/2]

template<typename Type , bool TF>
DynamicVector< Type, TF >::ConstPointer blaze::DynamicVector< Type, TF >::data ( ) const
inlinenoexcept

Low-level data access to the vector elements.

Returns
Pointer to the internal element storage.

This function returns a pointer to the internal storage of the dynamic vector.

◆ divAssign() [1/2]

template<typename Type, bool TF = defaultTransposeFlag>
template<typename VT >
DisableIf_<typename DynamicVector<Type,TF>::BLAZE_TEMPLATE VectorizedDivAssign<VT> > blaze::DynamicVector< Type, TF >::divAssign ( const DenseVector< VT, TF > &  rhs)
inline

Default implementation of the division assignment of a dense vector.

Parameters
rhsThe right-hand side dense vector divisior.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.

◆ divAssign() [2/2]

template<typename Type, bool TF = defaultTransposeFlag>
template<typename VT >
EnableIf_<typename DynamicVector<Type,TF>::BLAZE_TEMPLATE VectorizedDivAssign<VT> > blaze::DynamicVector< Type, TF >::divAssign ( const DenseVector< VT, TF > &  rhs)
inline

SIMD optimized implementation of the division assignment of a dense vector.

Parameters
rhsThe right-hand side dense vector divisor.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.

◆ end() [1/2]

template<typename Type , bool TF>
DynamicVector< Type, TF >::Iterator blaze::DynamicVector< Type, TF >::end ( )
inlinenoexcept

Returns an iterator just past the last element of the dynamic vector.

Returns
Iterator just past the last element of the dynamic vector.

◆ end() [2/2]

template<typename Type , bool TF>
DynamicVector< Type, TF >::ConstIterator blaze::DynamicVector< Type, TF >::end ( ) const
inlinenoexcept

Returns an iterator just past the last element of the dynamic vector.

Returns
Iterator just past the last element of the dynamic vector.

◆ extend()

template<typename Type , bool TF>
void blaze::DynamicVector< Type, TF >::extend ( size_t  n,
bool  preserve = true 
)
inline

Extending the size of the vector.

Parameters
nNumber of additional vector elements.
preservetrue if the old values of the vector should be preserved, false if not.
Returns
void

This function increases the vector size by n elements. During this operation, new dynamic memory may be allocated in case the capacity of the vector is too small. Therefore this function potentially changes all vector elements. In order to preserve the old vector values, the preserve flag can be set to true. However, new vector elements are not initialized!

◆ isAliased()

template<typename Type , bool TF>
template<typename Other >
bool blaze::DynamicVector< Type, TF >::isAliased ( const Other *  alias) const
inlinenoexcept

Returns whether the vector is aliased with the given address alias.

Parameters
aliasThe alias to be checked.
Returns
true in case the alias corresponds to this vector, false if not.

This function returns whether the given address is aliased with the vector. In contrast to the canAlias() function this function is not allowed to use compile time expressions to optimize the evaluation.

◆ isAligned()

template<typename Type , bool TF>
bool blaze::DynamicVector< Type, TF >::isAligned ( ) const
inlinenoexcept

Returns whether the vector is properly aligned in memory.

Returns
true in case the vector is aligned, false if not.

This function returns whether the vector is guaranteed to be properly aligned in memory, i.e. whether the beginning and the end of the vector are guaranteed to conform to the alignment restrictions of the element type Type.

◆ isIntact()

template<typename Type , bool TF>
bool blaze::DynamicVector< Type, TF >::isIntact ( ) const
inlinenoexcept

Returns whether the invariants of the dynamic vector are intact.

Returns
true in case the dynamic vector's invariants are intact, false otherwise.

This function checks whether the invariants of the dynamic vector are intact, i.e. if its state is valid. In case the invariants are intact, the function returns true, else it will return false.

◆ load()

template<typename Type , bool TF>
BLAZE_ALWAYS_INLINE DynamicVector< Type, TF >::SIMDType blaze::DynamicVector< Type, TF >::load ( size_t  index) const
noexcept

Load of a SIMD element of the vector.

Parameters
indexAccess index. The index must be smaller than the number of vector elements.
Returns
The loaded SIMD element.

This function performs a load of a specific SIMD element of the dense vector. The index must be smaller than the number of vector elements and it must be a multiple of the number of values inside the SIMD element. This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors.

◆ loada()

template<typename Type , bool TF>
BLAZE_ALWAYS_INLINE DynamicVector< Type, TF >::SIMDType blaze::DynamicVector< Type, TF >::loada ( size_t  index) const
noexcept

Aligned load of a SIMD element of the vector.

Parameters
indexAccess index. The index must be smaller than the number of vector elements.
Returns
The loaded SIMD element.

This function performs an aligned load of a specific SIMD element of the dense vector. The index must be smaller than the number of vector elements and it must be a multiple of the number of values inside the SIMD element. This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors.

◆ loadu()

template<typename Type , bool TF>
BLAZE_ALWAYS_INLINE DynamicVector< Type, TF >::SIMDType blaze::DynamicVector< Type, TF >::loadu ( size_t  index) const
noexcept

Unaligned load of a SIMD element of the vector.

Parameters
indexAccess index. The index must be smaller than the number of vector elements.
Returns
The loaded SIMD element.

This function performs an unaligned load of a specific SIMD element of the dense vector. The index must be smaller than the number of vector elements and it must be a multiple of the number of values inside the SIMD element. This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors.

◆ multAssign() [1/3]

template<typename Type , bool TF>
template<typename VT >
void blaze::DynamicVector< Type, TF >::multAssign ( const SparseVector< VT, TF > &  rhs)
inline

Default implementation of the multiplication assignment of a sparse vector.

Parameters
rhsThe right-hand side sparse vector to be multiplied.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.

◆ multAssign() [2/3]

template<typename Type, bool TF = defaultTransposeFlag>
template<typename VT >
DisableIf_<typename DynamicVector<Type,TF>::BLAZE_TEMPLATE VectorizedMultAssign<VT> > blaze::DynamicVector< Type, TF >::multAssign ( const DenseVector< VT, TF > &  rhs)
inline

Default implementation of the multiplication assignment of a dense vector.

Parameters
rhsThe right-hand side dense vector to be multiplied.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.

◆ multAssign() [3/3]

template<typename Type, bool TF = defaultTransposeFlag>
template<typename VT >
EnableIf_<typename DynamicVector<Type,TF>::BLAZE_TEMPLATE VectorizedMultAssign<VT> > blaze::DynamicVector< Type, TF >::multAssign ( const DenseVector< VT, TF > &  rhs)
inline

SIMD optimized implementation of the multiplication assignment of a dense vector.

Parameters
rhsThe right-hand side dense vector to be multiplied.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.

◆ nonZeros()

template<typename Type , bool TF>
size_t blaze::DynamicVector< Type, TF >::nonZeros ( ) const
inline

Returns the number of non-zero elements in the vector.

Returns
The number of non-zero elements in the vector.

Note that the number of non-zero elements is always less than or equal to the current size of the vector.

◆ operator%=()

template<typename Type, bool TF = defaultTransposeFlag>
template<typename VT >
DynamicVector<Type,TF>& blaze::DynamicVector< Type, TF >::operator%= ( const Vector< VT, TF > &  rhs)
inline

Cross product assignment operator for the multiplication of a vector ( $ \vec{a}\times=\vec{b} $).

Parameters
rhsThe right-hand side vector for the cross product.
Returns
Reference to the vector.
Exceptions
std::invalid_argumentInvalid vector size for cross product.

In case the current size of any of the two vectors is not equal to 3, a std::invalid_argument exception is thrown.

◆ operator*=() [1/2]

template<typename Type, bool TF = defaultTransposeFlag>
template<typename VT >
DynamicVector<Type,TF>& blaze::DynamicVector< Type, TF >::operator*= ( const Vector< VT, TF > &  rhs)
inline

Multiplication assignment operator for the multiplication of a vector ( $ \vec{a}*=\vec{b} $).

Parameters
rhsThe right-hand side vector to be multiplied with the vector.
Returns
Reference to the vector.
Exceptions
std::invalid_argumentVector sizes do not match.

In case the current sizes of the two vectors don't match, a std::invalid_argument exception is thrown.

◆ operator*=() [2/2]

template<typename Type, bool TF = defaultTransposeFlag>
template<typename Other >
EnableIf_<IsNumeric<Other>, DynamicVector<Type,TF> >& blaze::DynamicVector< Type, TF >::operator*= ( Other  rhs)
inline

Multiplication assignment operator for the multiplication between a vector and a scalar value ( $ \vec{a}*=s $).

Parameters
rhsThe right-hand side scalar value for the multiplication.
Returns
Reference to the vector.

◆ operator+=()

template<typename Type, bool TF = defaultTransposeFlag>
template<typename VT >
DynamicVector<Type,TF>& blaze::DynamicVector< Type, TF >::operator+= ( const Vector< VT, TF > &  rhs)
inline

Addition assignment operator for the addition of a vector ( $ \vec{a}+=\vec{b} $).

Parameters
rhsThe right-hand side vector to be added to the vector.
Returns
Reference to the vector.
Exceptions
std::invalid_argumentVector sizes do not match.

In case the current sizes of the two vectors don't match, a std::invalid_argument exception is thrown.

◆ operator-=()

template<typename Type, bool TF = defaultTransposeFlag>
template<typename VT >
DynamicVector<Type,TF>& blaze::DynamicVector< Type, TF >::operator-= ( const Vector< VT, TF > &  rhs)
inline

Subtraction assignment operator for the subtraction of a vector ( $ \vec{a}-=\vec{b} $).

Parameters
rhsThe right-hand side vector to be subtracted from the vector.
Returns
Reference to the vector.
Exceptions
std::invalid_argumentVector sizes do not match.

In case the current sizes of the two vectors don't match, a std::invalid_argument exception is thrown.

◆ operator/=() [1/2]

template<typename Type, bool TF = defaultTransposeFlag>
template<typename VT >
DynamicVector<Type,TF>& blaze::DynamicVector< Type, TF >::operator/= ( const DenseVector< VT, TF > &  rhs)
inline

Division assignment operator for the division of a dense vector ( $ \vec{a}/=\vec{b} $).

Parameters
rhsThe right-hand side dense vector divisor.
Returns
Reference to the vector.
Exceptions
std::invalid_argumentVector sizes do not match.

In case the current sizes of the two vectors don't match, a std::invalid_argument exception is thrown.

◆ operator/=() [2/2]

template<typename Type, bool TF = defaultTransposeFlag>
template<typename Other >
EnableIf_<IsNumeric<Other>, DynamicVector<Type,TF> >& blaze::DynamicVector< Type, TF >::operator/= ( Other  rhs)
inline

Division assignment operator for the division of a vector by a scalar value ( $ \vec{a}/=s $).

Parameters
rhsThe right-hand side scalar value for the division.
Returns
Reference to the vector.
Note
A division by zero is only checked by an user assert.

◆ operator=() [1/6]

template<typename Type , bool TF>
DynamicVector< Type, TF > & blaze::DynamicVector< Type, TF >::operator= ( const Type &  rhs)
inline

Homogenous assignment to all vector elements.

Parameters
rhsScalar value to be assigned to all vector elements.
Returns
Reference to the assigned vector.

◆ operator=() [2/6]

template<typename Type , bool TF>
DynamicVector< Type, TF > & blaze::DynamicVector< Type, TF >::operator= ( initializer_list< Type >  list)
inline

List assignment to all vector elements.

Parameters
listThe initializer list.

This assignment operator offers the option to directly assign to all elements of the vector by means of an initializer list:

v = { 4.2, 6.3, -1.2 };

The vector is resized according to the size of the initializer list and all its elements are assigned the values from the given initializer list.

◆ operator=() [3/6]

template<typename Type , bool TF>
DynamicVector< Type, TF > & blaze::DynamicVector< Type, TF >::operator= ( const DynamicVector< Type, TF > &  rhs)
inline

Copy assignment operator for DynamicVector.

Parameters
rhsVector to be copied.
Returns
Reference to the assigned vector.

The vector is resized according to the given N-dimensional vector and initialized as a copy of this vector.

◆ operator=() [4/6]

template<typename Type , bool TF>
DynamicVector< Type, TF > & blaze::DynamicVector< Type, TF >::operator= ( DynamicVector< Type, TF > &&  rhs)
inlinenoexcept

Move assignment operator for DynamicVector.

Parameters
rhsThe vector to be moved into this instance.
Returns
Reference to the assigned vector.

◆ operator=() [5/6]

template<typename Type, bool TF = defaultTransposeFlag>
template<typename Other , size_t Dim>
DynamicVector<Type,TF>& blaze::DynamicVector< Type, TF >::operator= ( const Other(&)  array[Dim])
inline

Array assignment to all vector elements.

Parameters
arrayN-dimensional array for the assignment.
Returns
Reference to the assigned vector.

This assignment operator offers the option to directly set all elements of the vector:

const int init[4] = { 1, 2, 3 };
v = init;

The vector is resized according to the size of the array and assigned the values from the given array. Missing values are initialized with default values (as e.g. the fourth element in the example).

◆ operator=() [6/6]

template<typename Type, bool TF = defaultTransposeFlag>
template<typename VT >
DynamicVector<Type,TF>& blaze::DynamicVector< Type, TF >::operator= ( const Vector< VT, TF > &  rhs)
inline

Assignment operator for different vectors.

Parameters
rhsVector to be copied.
Returns
Reference to the assigned vector.

The vector is resized according to the given vector and initialized as a copy of this vector.

◆ operator[]() [1/2]

template<typename Type , bool TF>
DynamicVector< Type, TF >::Reference blaze::DynamicVector< Type, TF >::operator[] ( size_t  index)
inlinenoexcept

Subscript operator for the direct access to the vector elements.

Parameters
indexAccess index. The index has to be in the range $[0..N-1]$.
Returns
Reference to the accessed value.

This function only performs an index check in case BLAZE_USER_ASSERT() is active. In contrast, the at() function is guaranteed to perform a check of the given access index.

◆ operator[]() [2/2]

template<typename Type , bool TF>
DynamicVector< Type, TF >::ConstReference blaze::DynamicVector< Type, TF >::operator[] ( size_t  index) const
inlinenoexcept

Subscript operator for the direct access to the vector elements.

Parameters
indexAccess index. The index has to be in the range $[0..N-1]$.
Returns
Reference to the accessed value.

This function only performs an index check in case BLAZE_USER_ASSERT() is active. In contrast, the at() function is guaranteed to perform a check of the given access index.

◆ operator~() [1/2]

template<typename VT, bool TF>
BLAZE_ALWAYS_INLINE VectorType& blaze::Vector< VT, TF >::operator~ ( )
inlinenoexceptinherited

Conversion operator for non-constant vectors.

Returns
Reference of the actual type of the vector.

◆ operator~() [2/2]

template<typename VT, bool TF>
BLAZE_ALWAYS_INLINE const VectorType& blaze::Vector< VT, TF >::operator~ ( ) const
inlinenoexceptinherited

Conversion operator for constant vectors.

Returns
Const reference of the actual type of the vector.

◆ reserve()

template<typename Type , bool TF>
void blaze::DynamicVector< Type, TF >::reserve ( size_t  n)
inline

Setting the minimum capacity of the vector.

Parameters
nThe new minimum capacity of the vector.
Returns
void

This function increases the capacity of the vector to at least n elements. The current values of the vector elements are preserved.

◆ reset()

template<typename Type , bool TF>
void blaze::DynamicVector< Type, TF >::reset ( )
inline

Reset to the default initial values.

Returns
void

◆ resize()

template<typename Type , bool TF>
void blaze::DynamicVector< Type, TF >::resize ( size_t  n,
bool  preserve = true 
)
inline

Changing the size of the vector.

Parameters
nThe new size of the vector.
preservetrue if the old values of the vector should be preserved, false if not.
Returns
void

This function resizes the vector using the given size to n. During this operation, new dynamic memory may be allocated in case the capacity of the vector is too small. Note that this function may invalidate all existing views (subvectors, ...) on the vector if it is used to shrink the vector. Additionally, the resize operation potentially changes all vector elements. In order to preserve the old vector values, the preserve flag can be set to true. However, new vector elements are not initialized!

The following example illustrates the resize operation of a vector of size 2 to a vector of size 4. The new, uninitialized elements are marked with x:

\[ \left(\begin{array}{*{2}{c}} 1 & 2 \\ \end{array}\right) \Longrightarrow \left(\begin{array}{*{4}{c}} 1 & 2 & x & x \\ \end{array}\right) \]

◆ scale()

template<typename Type, bool TF = defaultTransposeFlag>
template<typename Other >
DynamicVector<Type,TF>& blaze::DynamicVector< Type, TF >::scale ( const Other &  scalar)
inline

Scaling of the vector by the scalar value scalar ( $ \vec{a}=\vec{b}*s $).

Parameters
scalarThe scalar value for the vector scaling.
Returns
Reference to the vector.

This function scales the vector by applying the given scalar value scalar to each element of the vector. For built-in and complex data types it has the same effect as using the multiplication assignment operator:

// ... Initialization
a *= 4; // Scaling of the vector
a.scale( 4 ); // Same effect as above

◆ shrinkToFit()

template<typename Type , bool TF>
void blaze::DynamicVector< Type, TF >::shrinkToFit ( )
inline

Requesting the removal of unused capacity.

Returns
void

This function minimizes the capacity of the vector by removing unused capacity. Please note that due to padding the capacity might not be reduced exactly to size(). Please also note that in case a reallocation occurs, all iterators (including end() iterators), all pointers and references to elements of this vector are invalidated.

◆ size()

template<typename Type , bool TF>
size_t blaze::DynamicVector< Type, TF >::size ( ) const
inlinenoexcept

Returns the current size/dimension of the vector.

Returns
The size of the vector.

◆ spacing()

template<typename Type , bool TF>
size_t blaze::DynamicVector< Type, TF >::spacing ( ) const
inlinenoexcept

Returns the minimum capacity of the vector.

Returns
The minimum capacity of the vector.

This function returns the minimum capacity of the vector, which corresponds to the current size plus padding.

◆ store()

template<typename Type , bool TF>
BLAZE_ALWAYS_INLINE void blaze::DynamicVector< Type, TF >::store ( size_t  index,
const SIMDType value 
)
noexcept

Store of a SIMD element of the vector.

Parameters
indexAccess index. The index must be smaller than the number of vector elements.
valueThe SIMD element to be stored.
Returns
void

This function performs a store of a specific SIMD element of the dense vector. The index must be smaller than the number of vector elements and it must be a multiple of the number of values inside the SIMD element. This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors.

◆ storea()

template<typename Type , bool TF>
BLAZE_ALWAYS_INLINE void blaze::DynamicVector< Type, TF >::storea ( size_t  index,
const SIMDType value 
)
noexcept

Aligned store of a SIMD element of the vector.

Parameters
indexAccess index. The index must be smaller than the number of vector elements.
valueThe SIMD element to be stored.
Returns
void

This function performs an aligned store of a specific SIMD element of the dense vector. The index must be smaller than the number of vector elements and it must be a multiple of the number of values inside the SIMD element. This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors.

◆ storeu()

template<typename Type , bool TF>
BLAZE_ALWAYS_INLINE void blaze::DynamicVector< Type, TF >::storeu ( size_t  index,
const SIMDType value 
)
noexcept

Unaligned store of a SIMD element of the vector.

Parameters
indexAccess index. The index must be smaller than the number of vector elements.
valueThe SIMD element to be stored.
Returns
void

This function performs an unaligned store of a specific SIMD element of the dense vector. The index must be smaller than the number of vector elements and it must be a multiple of the number of values inside the SIMD element. This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors.

◆ stream()

template<typename Type , bool TF>
BLAZE_ALWAYS_INLINE void blaze::DynamicVector< Type, TF >::stream ( size_t  index,
const SIMDType value 
)
noexcept

Aligned, non-temporal store of a SIMD element of the vector.

Parameters
indexAccess index. The index must be smaller than the number of vector elements.
valueThe SIMD element to be stored.
Returns
void

This function performs an aligned, non-temporal store of a specific SIMD element of the dense vector. The index must be smaller than the number of vector elements and it must be a multiple of the number of values inside the SIMD element. This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors.

◆ subAssign() [1/3]

template<typename Type , bool TF>
template<typename VT >
void blaze::DynamicVector< Type, TF >::subAssign ( const SparseVector< VT, TF > &  rhs)
inline

Default implementation of the subtraction assignment of a sparse vector.

Parameters
rhsThe right-hand side sparse vector to be subtracted.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.

◆ subAssign() [2/3]

template<typename Type, bool TF = defaultTransposeFlag>
template<typename VT >
DisableIf_<typename DynamicVector<Type,TF>::BLAZE_TEMPLATE VectorizedSubAssign<VT> > blaze::DynamicVector< Type, TF >::subAssign ( const DenseVector< VT, TF > &  rhs)
inline

Default implementation of the subtraction assignment of a dense vector.

Parameters
rhsThe right-hand side dense vector to be subtracted.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.

◆ subAssign() [3/3]

template<typename Type, bool TF = defaultTransposeFlag>
template<typename VT >
EnableIf_<typename DynamicVector<Type,TF>::BLAZE_TEMPLATE VectorizedSubAssign<VT> > blaze::DynamicVector< Type, TF >::subAssign ( const DenseVector< VT, TF > &  rhs)
inline

SIMD optimized implementation of the subtraction assignment of a dense vector.

Parameters
rhsThe right-hand side dense vector to be subtracted.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.

◆ swap()

template<typename Type , bool TF>
void blaze::DynamicVector< Type, TF >::swap ( DynamicVector< Type, TF > &  v)
inlinenoexcept

Swapping the contents of two vectors.

Parameters
vThe vector to be swapped.
Returns
void

Member Data Documentation

◆ v_

template<typename Type, bool TF = defaultTransposeFlag>
Type* BLAZE_RESTRICT blaze::DynamicVector< Type, TF >::v_
private

The dynamically allocated vector elements.

Access to the vector elements is gained via the subscript operator. The order of the elements is

\[\left(\begin{array}{*{5}{c}} 0 & 1 & 2 & \cdots & N-1 \\ \end{array}\right)\]


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