Blaze  3.6
Classes | Public Types | Public Member Functions | Static Public Attributes | Static Private Attributes | List of all members
blaze::UniformVector< Type, TF > Class Template Reference

Efficient implementation of a uniform vector.The UniformVector class template is the representation of an arbitrary sized uniform vector with 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 <UniformVector.h>

Inherits blaze::Expression< DenseVector< UniformVector< Type, TF >, TF > >.

Classes

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

Public Types

using This = UniformVector< Type, TF >
 Type of this UniformVector instance.
 
using BaseType = DenseVector< This, TF >
 Base type of this UniformVector instance.
 
using ResultType = This
 Result type for expression template evaluations.
 
using TransposeType = UniformVector< Type,!TF >
 Transpose type for expression template evaluations.
 
using ElementType = Type
 Type of the vector elements.
 
using SIMDType = SIMDTrait_t< ElementType >
 SIMD type of the vector elements.
 
using ReturnType = const Type &
 Return type for expression template evaluations.
 
using CompositeType = const UniformVector &
 Data type for composite expression templates.
 
using Reference = const Type &
 Reference to a non-constant vector value.
 
using ConstReference = const Type &
 Reference to a constant vector value.
 
using Pointer = const Type *
 Pointer to a non-constant vector value.
 
using ConstPointer = const Type *
 Pointer to a constant vector value.
 
using Iterator = UniformIterator< const Type, aligned >
 Iterator over non-constant elements.
 
using ConstIterator = UniformIterator< const Type, aligned >
 Iterator over constant elements.
 
using VectorType = VT
 Type of the vector.
 

Public Member Functions

template<typename VT >
UniformVector< Type, TF > & operator= (const Vector< VT, TF > &rhs)
 Assignment operator for different vectors. More...
 
template<typename VT >
UniformVector< 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 >
UniformVector< 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 >
UniformVector< Type, TF > & operator *= (const Vector< VT, TF > &rhs)
 Multiplication assignment operator for the subtraction of a vector ( $ \vec{a}*=\vec{b} $). More...
 
template<typename VT >
UniformVector< 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 Other >
UniformVector< Type, TF > & scale (const Other &scalar)
 Scaling of the vector by the scalar value scalar ( $ \vec{a}=\vec{b}*s $). More...
 
BLAZE_ALWAYS_INLINE constexpr VectorTypeoperator~ () noexcept
 Conversion operator for non-constant vectors. More...
 
BLAZE_ALWAYS_INLINE constexpr const VectorTypeoperator~ () const noexcept
 Conversion operator for constant vectors. More...
 
Constructors
constexpr UniformVector () noexcept
 The default constructor for UniformVector.
 
constexpr UniformVector (size_t n)
 Constructor for a vector of size n. More...
 
constexpr UniformVector (size_t n, const Type &init)
 Constructor for a homogeneous initialization of all n vector elements. More...
 
template<typename VT >
 UniformVector (const Vector< VT, TF > &v)
 Conversion constructor for different uniform vectors. More...
 
 UniformVector (const UniformVector &)=default
 
 UniformVector (UniformVector &&)=default
 
Destructor
 ~UniformVector ()=default
 
Data access functions
constexpr ConstReference operator[] (size_t index) const noexcept
 Subscript operator for the direct access to the vector elements. More...
 
ConstReference at (size_t index) const
 Checked access to the vector elements. More...
 
constexpr ConstPointer data () const noexcept
 Low-level data access to the vector elements. More...
 
constexpr ConstIterator begin () const noexcept
 Returns an iterator to the first element of the uniform vector. More...
 
constexpr ConstIterator cbegin () const noexcept
 Returns an iterator to the first element of the uniform vector. More...
 
constexpr ConstIterator end () const noexcept
 Returns an iterator just past the last element of the uniform vector. More...
 
constexpr ConstIterator cend () const noexcept
 Returns an iterator just past the last element of the uniform vector. More...
 
Assignment operators
constexpr UniformVectoroperator= (const Type &rhs)
 Homogenous assignment to all vector elements. More...
 
UniformVectoroperator= (const UniformVector &)=default
 
UniformVectoroperator= (UniformVector &&)=default
 
template<typename VT >
UniformVectoroperator= (const Vector< VT, TF > &rhs)
 
template<typename VT >
UniformVectoroperator+= (const Vector< VT, TF > &rhs)
 
template<typename VT >
UniformVectoroperator-= (const Vector< VT, TF > &rhs)
 
template<typename VT >
UniformVectoroperator *= (const Vector< VT, TF > &rhs)
 
template<typename VT >
UniformVectoroperator/= (const DenseVector< VT, TF > &rhs)
 
template<typename ST >
auto operator *= (ST rhs) -> EnableIf_t< IsNumeric_v< ST >, UniformVector & >
 Multiplication assignment operator for the multiplication between a vector and a scalar value ( $ \vec{a}*=s $). More...
 
template<typename ST >
auto operator/= (ST rhs) -> EnableIf_t< IsNumeric_v< ST >, UniformVector & >
 Division assignment operator for the division between a vector and a scalar value ( $ \vec{a}/=s $). More...
 
Utility functions
constexpr size_t size () const noexcept
 Returns the current size/dimension of the vector. More...
 
constexpr size_t spacing () const noexcept
 Returns the minimum capacity of the vector. More...
 
constexpr 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...
 
constexpr void reset ()
 Reset to the default initial values. More...
 
constexpr void clear ()
 Clearing the vector. More...
 
constexpr void resize (size_t n, bool preserve=true)
 Changing the size of the vector. More...
 
constexpr void extend (size_t n, bool preserve=true)
 Extending the size of the vector. More...
 
constexpr void swap (UniformVector &v) noexcept
 Swapping the contents of two vectors. More...
 
Numeric functions
template<typename Other >
UniformVectorscale (const Other &scalar)
 
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...
 

Static Public Attributes

static constexpr bool simdEnabled = IsVectorizable_v<Type>
 Compilation flag for SIMD optimization. More...
 
static constexpr bool smpAssignable = !IsSMPAssignable_v<Type>
 Compilation flag for SMP assignments. More...
 
static constexpr bool transposeFlag = TF
 Transpose flag of the vector.
 

Private Attributes

Member variables
size_t size_
 The current size/dimension of the uniform vector.
 
Type value_
 The value of all elements of the uniform vector.
 

Static Private Attributes

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

Detailed Description

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

Efficient implementation of a uniform vector.

The UniformVector class template is the representation of an arbitrary sized uniform vector with 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 uniform 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 UniformVector 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 UniformVector:

UniformVector<double> a( 2 ); // Default initialized 2D vector of size 2
a = 1.0; // Assignment to all elements of the uniform vector
UniformVector<double> b( 2, 2.0 ); // Directly, uniformly initialized 2D vector
CompressedVector<float> c( 2 ); // Empty sparse single precision vector
UniformVector<double> d; // Default constructed uniform 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

Constructor & Destructor Documentation

◆ UniformVector() [1/3]

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

Constructor for a vector of size n.

Parameters
nThe size of the vector.

◆ UniformVector() [2/3]

template<typename Type , bool TF>
constexpr blaze::UniformVector< Type, TF >::UniformVector ( 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.

◆ UniformVector() [3/3]

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

Conversion constructor for different uniform vectors.

Parameters
vUniform vector to be copied.
Exceptions
std::invalid_argumentInvalid setup of uniform vector.

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

Member Function Documentation

◆ at()

template<typename Type , bool TF>
UniformVector< Type, TF >::ConstReference blaze::UniformVector< 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()

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

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

Returns
Iterator to the first element of the uniform vector.

◆ canAlias()

template<typename Type , bool TF>
template<typename Other >
bool blaze::UniformVector< 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::UniformVector< 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>
constexpr size_t blaze::UniformVector< 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>
constexpr UniformVector< Type, TF >::ConstIterator blaze::UniformVector< Type, TF >::cbegin ( ) const
inlinenoexcept

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

Returns
Iterator to the first element of the uniform vector.

◆ cend()

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

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

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

◆ clear()

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

Clearing the vector.

Returns
void

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

◆ data()

template<typename Type , bool TF>
constexpr UniformVector< Type, TF >::ConstPointer blaze::UniformVector< 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 uniform vector. Note that you can NOT assume that elements of the uniform vector lie adjacent to each other!

◆ end()

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

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

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

◆ extend()

template<typename Type , bool TF>
constexpr void blaze::UniformVector< 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. Note that this function potentially changes all vector elements. In order to preserve the old vector values, the preserve flag can be set to true.

◆ isAliased()

template<typename Type , bool TF>
template<typename Other >
bool blaze::UniformVector< 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::UniformVector< 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.

◆ load()

template<typename Type , bool TF>
BLAZE_ALWAYS_INLINE UniformVector< Type, TF >::SIMDType blaze::UniformVector< 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 UniformVector< Type, TF >::SIMDType blaze::UniformVector< 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 UniformVector< Type, TF >::SIMDType blaze::UniformVector< 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.

◆ nonZeros()

template<typename Type , bool TF>
size_t blaze::UniformVector< 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 *=() [1/2]

template<typename Type , bool TF>
template<typename ST >
auto blaze::UniformVector< Type, TF >::operator *= ( ST  scalar) -> EnableIf_t< IsNumeric_v<ST>, UniformVector& >
inline

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

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

◆ operator *=() [2/2]

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

Multiplication assignment operator for the subtraction 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.
std::invalid_argumentInvalid multiplication assignment to uniform vector.

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 >
UniformVector<Type,TF>& blaze::UniformVector< 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.
std::invalid_argumentInvalid addition assignment to uniform vector.

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 >
UniformVector<Type,TF>& blaze::UniformVector< 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.
std::invalid_argumentInvalid subtraction assignment to uniform vector.

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>
template<typename ST >
auto blaze::UniformVector< Type, TF >::operator/= ( ST  scalar) -> EnableIf_t< IsNumeric_v<ST>, UniformVector& >
inline

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

Parameters
scalarThe right-hand side scalar value for the division.
Returns
Reference to the vector.

◆ operator/=() [2/2]

template<typename Type, bool TF = defaultTransposeFlag>
template<typename VT >
UniformVector<Type,TF>& blaze::UniformVector< 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.
std::invalid_argumentInvalid multiplication assignment to uniform vector.

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>
constexpr UniformVector< Type, TF > & blaze::UniformVector< 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/2]

template<typename Type, bool TF = defaultTransposeFlag>
template<typename VT >
UniformVector<Type,TF>& blaze::UniformVector< 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 uniform vector and initialized as a copy of this vector.

◆ operator[]()

template<typename Type , bool TF>
constexpr UniformVector< Type, TF >::ConstReference blaze::UniformVector< 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 constexpr 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 constexpr const VectorType& blaze::Vector< VT, TF >::operator~ ( ) const
inlinenoexceptinherited

Conversion operator for constant vectors.

Returns
Const reference of the actual type of the vector.

◆ reset()

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

Reset to the default initial values.

Returns
void

◆ resize()

template<typename Type , bool TF>
constexpr void blaze::UniformVector< 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. 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.

◆ scale()

template<typename Type, bool TF = defaultTransposeFlag>
template<typename Other >
UniformVector<Type,TF>& blaze::UniformVector< 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

◆ size()

template<typename Type , bool TF>
constexpr size_t blaze::UniformVector< 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>
constexpr size_t blaze::UniformVector< 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.

◆ swap()

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

Swapping the contents of two vectors.

Parameters
vThe vector to be swapped.
Returns
void

Member Data Documentation

◆ simdEnabled

template<typename Type, bool TF = defaultTransposeFlag>
constexpr bool blaze::UniformVector< Type, TF >::simdEnabled = IsVectorizable_v<Type>
static

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.

◆ smpAssignable

template<typename Type, bool TF = defaultTransposeFlag>
constexpr bool blaze::UniformVector< Type, TF >::smpAssignable = !IsSMPAssignable_v<Type>
static

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).


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