26 #ifndef _BLAZE_MATH_DENSE_HYBRIDVECTOR_H_
27 #define _BLAZE_MATH_DENSE_HYBRIDVECTOR_H_
172 template<
typename Type
175 class HybridVector :
public DenseVector< HybridVector<Type,N,TF>, TF >
184 enum { NN = N + ( IT::size - ( N % IT::size ) ) % IT::size };
214 enum { smpAssignable = 0 };
222 explicit inline HybridVector(
size_t n,
const Type& init );
223 template<
typename Other >
explicit inline HybridVector(
size_t n,
const Other* array );
225 template<
typename Other,
size_t M >
226 explicit inline HybridVector(
const Other (&array)[M] );
229 template<
typename VT >
inline HybridVector(
const Vector<VT,TF>& v );
242 inline Type*
data ();
243 inline const Type*
data ()
const;
256 template<
typename Other,
size_t M >
257 inline HybridVector& operator=(
const Other (&array)[M] );
261 template<
typename VT >
inline HybridVector& operator= (
const Vector<VT,TF>& rhs );
262 template<
typename VT >
inline HybridVector& operator+=(
const Vector<VT,TF>& rhs );
263 template<
typename VT >
inline HybridVector& operator-=(
const Vector<VT,TF>& rhs );
264 template<
typename VT >
inline HybridVector& operator*=(
const Vector<VT,TF>& rhs );
266 template<
typename Other >
267 inline typename EnableIf< IsNumeric<Other>,
HybridVector >::Type&
268 operator*=( Other rhs );
270 template<
typename Other >
271 inline typename EnableIf< IsNumeric<Other>,
HybridVector >::Type&
272 operator/=( Other rhs );
279 inline size_t size()
const;
284 inline void resize(
size_t n,
bool preserve=
true );
285 inline void extend(
size_t n,
bool preserve=
true );
286 template<
typename Other >
inline HybridVector& scale( Other scalar );
294 template<
typename VT >
296 struct VectorizedAssign {
297 enum { value = vectorizable && VT::vectorizable &&
298 IsSame<Type,typename VT::ElementType>::value };
305 template<
typename VT >
307 struct VectorizedAddAssign {
308 enum { value = vectorizable && VT::vectorizable &&
309 IsSame<Type,typename VT::ElementType>::value &&
310 IntrinsicTrait<Type>::addition };
317 template<
typename VT >
319 struct VectorizedSubAssign {
320 enum { value = vectorizable && VT::vectorizable &&
321 IsSame<Type,typename VT::ElementType>::value &&
322 IntrinsicTrait<Type>::subtraction };
329 template<
typename VT >
331 struct VectorizedMultAssign {
332 enum { value = vectorizable && VT::vectorizable &&
333 IsSame<Type,typename VT::ElementType>::value &&
334 IntrinsicTrait<Type>::multiplication };
343 template<
typename Other >
inline bool canAlias (
const Other* alias )
const;
344 template<
typename Other >
inline bool isAliased(
const Other* alias )
const;
354 template<
typename VT >
355 inline typename DisableIf< VectorizedAssign<VT> >::Type
356 assign(
const DenseVector<VT,TF>& rhs );
358 template<
typename VT >
359 inline typename EnableIf< VectorizedAssign<VT> >::Type
360 assign(
const DenseVector<VT,TF>& rhs );
362 template<
typename VT >
inline void assign(
const SparseVector<VT,TF>& rhs );
364 template<
typename VT >
365 inline typename DisableIf< VectorizedAddAssign<VT> >::Type
366 addAssign(
const DenseVector<VT,TF>& rhs );
368 template<
typename VT >
369 inline typename EnableIf< VectorizedAddAssign<VT> >::Type
370 addAssign(
const DenseVector<VT,TF>& rhs );
372 template<
typename VT >
inline void addAssign(
const SparseVector<VT,TF>& rhs );
374 template<
typename VT >
375 inline typename DisableIf< VectorizedSubAssign<VT> >::Type
376 subAssign(
const DenseVector<VT,TF>& rhs );
378 template<
typename VT >
379 inline typename EnableIf< VectorizedSubAssign<VT> >::Type
380 subAssign(
const DenseVector<VT,TF>& rhs );
382 template<
typename VT >
inline void subAssign(
const SparseVector<VT,TF>& rhs );
384 template<
typename VT >
385 inline typename DisableIf< VectorizedMultAssign<VT> >::Type
386 multAssign(
const DenseVector<VT,TF>& rhs );
388 template<
typename VT >
389 inline typename EnableIf< VectorizedMultAssign<VT> >::Type
390 multAssign(
const DenseVector<VT,TF>& rhs );
392 template<
typename VT >
inline void multAssign(
const SparseVector<VT,TF>& rhs );
437 template<
typename Type
444 for(
size_t i=0UL; i<NN; ++i )
461 template<
typename Type
468 throw std::invalid_argument(
"Invalid size for hybrid vector" );
471 for(
size_t i=0UL; i<NN; ++i )
489 template<
typename Type
496 throw std::invalid_argument(
"Invalid size for hybrid vector" );
498 for(
size_t i=0UL; i<n; ++i )
502 for(
size_t i=n; i<NN; ++i )
531 template<
typename Type
534 template<
typename Other >
539 throw std::invalid_argument(
"Invalid setup of hybrid vector" );
541 for(
size_t i=0UL; i<n; ++i )
545 for(
size_t i=n; i<NN; ++i )
570 template<
typename Type
573 template<
typename Other
580 for(
size_t i=0UL; i<M; ++i )
584 for(
size_t i=M; i<NN; ++i )
598 template<
typename Type
604 for(
size_t i=0UL; i<
size_; ++i )
608 for(
size_t i=size_; i<NN; ++i )
625 template<
typename Type
628 template<
typename VT >
630 : size_( (~v).size() )
634 if( (~v).
size() > N )
635 throw std::invalid_argument(
"Invalid setup of hybrid vector" );
663 template<
typename Type
683 template<
typename Type
702 template<
typename Type
719 template<
typename Type
734 template<
typename Type
749 template<
typename Type
764 template<
typename Type
779 template<
typename Type
795 template<
typename Type
811 template<
typename Type
849 template<
typename Type
852 template<
typename Other
860 for(
size_t i=0UL; i<M; ++i )
874 template<
typename Type
881 for(
size_t i=0UL; i<size_; ++i )
896 template<
typename Type
905 resize( rhs.size() );
923 template<
typename Type
926 template<
typename VT >
931 if( (~rhs).size() > N )
932 throw std::invalid_argument(
"Invalid assignment to hybrid vector" );
934 if( (~rhs).canAlias(
this ) ) {
939 resize( (~rhs).size() );
960 template<
typename Type
963 template<
typename VT >
968 if( (~rhs).size() != size_ )
969 throw std::invalid_argument(
"Vector sizes do not match" );
971 if( (~rhs).canAlias(
this ) ) {
994 template<
typename Type
997 template<
typename VT >
1002 if( (~rhs).size() != size_ )
1003 throw std::invalid_argument(
"Vector sizes do not match" );
1005 if( (~rhs).canAlias(
this ) ) {
1029 template<
typename Type
1032 template<
typename VT >
1037 if( (~rhs).size() != size_ )
1038 throw std::invalid_argument(
"Vector sizes do not match" );
1042 this->operator=( tmp );
1045 assign( *
this, *
this * (~rhs) );
1060 template<
typename Type
1063 template<
typename Other >
1069 assign( *
this, (*
this) * rhs );
1084 template<
typename Type
1087 template<
typename Other >
1095 assign( *
this, (*
this) / rhs );
1114 template<
typename Type
1129 template<
typename Type
1147 template<
typename Type
1152 size_t nonzeros( 0 );
1154 for(
size_t i=0UL; i<size_; ++i ) {
1169 template<
typename Type
1175 for(
size_t i=0UL; i<size_; ++i )
1188 template<
typename Type
1226 template<
typename Type
1234 throw std::invalid_argument(
"Invalid size for hybrid vector" );
1237 for(
size_t i=n; i<size_; ++i )
1260 template<
typename Type
1277 template<
typename Type
1280 template<
typename Other >
1283 for(
size_t i=0; i<size_; ++i )
1297 template<
typename Type
1304 const size_t maxsize( max( size_, v.size_ ) );
1305 for(
size_t i=0UL; i<maxsize; ++i )
1306 swap( v_[i], v.v_[i] );
1307 swap( size_, v.size_ );
1330 template<
typename Type
1333 template<
typename Other >
1336 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
1351 template<
typename Type
1354 template<
typename Other >
1357 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
1371 template<
typename Type
1394 template<
typename Type
1408 return load( &v_[index] );
1426 template<
typename Type
1439 return loadu( &v_[index] );
1458 template<
typename Type
1471 store( &v_[index], value );
1490 template<
typename Type
1502 storeu( &v_[index], value );
1521 template<
typename Type
1534 stream( &v_[index], value );
1550 template<
typename Type
1553 template<
typename VT >
1559 for(
size_t i=0UL; i<size_; ++i )
1576 template<
typename Type
1579 template<
typename VT >
1589 for(
size_t i=0UL; i<size_; i+=IT::size ) {
1607 template<
typename Type
1610 template<
typename VT >
1615 for(
typename VT::ConstIterator element=(~rhs).begin(); element!=(~rhs).end(); ++element )
1616 v_[element->index()] = element->value();
1632 template<
typename Type
1635 template<
typename VT >
1641 for(
size_t i=0UL; i<size_; ++i )
1658 template<
typename Type
1661 template<
typename VT >
1672 for(
size_t i=0UL; i<size_; i+=IT::size ) {
1690 template<
typename Type
1693 template<
typename VT >
1698 for(
typename VT::ConstIterator element=(~rhs).begin(); element!=(~rhs).end(); ++element )
1699 v_[element->index()] += element->value();
1715 template<
typename Type
1718 template<
typename VT >
1724 for(
size_t i=0UL; i<size_; ++i )
1741 template<
typename Type
1744 template<
typename VT >
1755 for(
size_t i=0UL; i<size_; i+=IT::size ) {
1773 template<
typename Type
1776 template<
typename VT >
1781 for(
typename VT::ConstIterator element=(~rhs).begin(); element!=(~rhs).end(); ++element )
1782 v_[element->index()] -= element->value();
1798 template<
typename Type
1801 template<
typename VT >
1807 for(
size_t i=0UL; i<size_; ++i )
1824 template<
typename Type
1827 template<
typename VT >
1838 for(
size_t i=0UL; i<size_; i+=IT::size ) {
1856 template<
typename Type
1859 template<
typename VT >
1868 for(
typename VT::ConstIterator element=(~rhs).begin(); element!=(~rhs).end(); ++element )
1869 v_[element->index()] = tmp[element->index()] * element->value();
1894 template<
typename Type
1916 template<
typename Type,
size_t N,
bool TF >
1919 template<
typename Type,
size_t N,
bool TF >
1922 template<
typename Type,
size_t N,
bool TF >
1925 template<
typename Type,
size_t N,
bool TF >
1938 template<
typename Type
1957 template<
typename Type
1985 template<
typename Type
1990 for(
size_t i=0UL; i<v.size(); ++i )
2006 template<
typename Type
2026 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2027 struct AddTrait< HybridVector<T1,M,TF>, StaticVector<T2,N,TF> >
2029 typedef StaticVector< typename AddTrait<T1,T2>::Type, N, TF > Type;
2032 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2033 struct AddTrait< StaticVector<T1,M,TF>, HybridVector<T2,N,TF> >
2035 typedef StaticVector< typename AddTrait<T1,T2>::Type, M, TF > Type;
2038 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2039 struct AddTrait< HybridVector<T1,M,TF>, HybridVector<T2,N,TF> >
2041 typedef HybridVector< typename AddTrait<T1,T2>::Type, ( M < N )?( M ):( N ), TF > Type;
2057 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2058 struct SubTrait< HybridVector<T1,M,TF>, StaticVector<T2,N,TF> >
2060 typedef StaticVector< typename SubTrait<T1,T2>::Type, N, TF > Type;
2063 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2064 struct SubTrait< StaticVector<T1,M,TF>, HybridVector<T2,N,TF> >
2066 typedef StaticVector< typename SubTrait<T1,T2>::Type, M, TF > Type;
2069 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2070 struct SubTrait< HybridVector<T1,M,TF>, HybridVector<T2,N,TF> >
2072 typedef HybridVector< typename SubTrait<T1,T2>::Type, ( M < N )?( M ):( N ), TF > Type;
2088 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2089 struct MultTrait< HybridVector<T1,N,TF>, T2 >
2091 typedef HybridVector< typename MultTrait<T1,T2>::Type, N, TF > Type;
2095 template<
typename T1,
typename T2,
size_t N,
bool TF >
2096 struct MultTrait< T1, HybridVector<T2,N,TF> >
2098 typedef HybridVector< typename MultTrait<T1,T2>::Type, N, TF > Type;
2102 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2103 struct MultTrait< HybridVector<T1,M,TF>, StaticVector<T2,N,TF> >
2105 typedef StaticVector< typename MultTrait<T1,T2>::Type, N, TF > Type;
2108 template<
typename T1,
size_t M,
typename T2,
size_t N >
2109 struct MultTrait< HybridVector<T1,M,false>, StaticVector<T2,N,true> >
2111 typedef DynamicMatrix< typename MultTrait<T1,T2>::Type,
false > Type;
2114 template<
typename T1,
size_t M,
typename T2,
size_t N >
2115 struct MultTrait< HybridVector<T1,M,true>, StaticVector<T2,N,false> >
2117 typedef typename MultTrait<T1,T2>::Type Type;
2120 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2121 struct MultTrait< StaticVector<T1,M,TF>, HybridVector<T2,N,TF> >
2123 typedef StaticVector< typename MultTrait<T1,T2>::Type, M, TF > Type;
2126 template<
typename T1,
size_t M,
typename T2,
size_t N >
2127 struct MultTrait< StaticVector<T1,M,false>, HybridVector<T2,N,true> >
2129 typedef DynamicMatrix< typename MultTrait<T1,T2>::Type,
false > Type;
2132 template<
typename T1,
size_t M,
typename T2,
size_t N >
2133 struct MultTrait< StaticVector<T1,M,true>, HybridVector<T2,N,false> >
2135 typedef typename MultTrait<T1,T2>::Type Type;
2138 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2139 struct MultTrait< HybridVector<T1,M,TF>, HybridVector<T2,N,TF> >
2141 typedef HybridVector< typename MultTrait<T1,T2>::Type, ( M < N )?( M ):( N ), TF > Type;
2144 template<
typename T1,
size_t M,
typename T2,
size_t N >
2145 struct MultTrait< HybridVector<T1,M,false>, HybridVector<T2,N,true> >
2147 typedef DynamicMatrix< typename MultTrait<T1,T2>::Type,
false > Type;
2150 template<
typename T1,
size_t M,
typename T2,
size_t N >
2151 struct MultTrait< HybridVector<T1,M,true>, HybridVector<T2,N,false> >
2153 typedef typename MultTrait<T1,T2>::Type Type;
2169 template<
typename T1,
size_t N,
typename T2 >
2170 struct CrossTrait< HybridVector<T1,N,false>, StaticVector<T2,3UL,false> >
2173 typedef typename MultTrait<T1,T2>::Type T;
2176 typedef StaticVector< typename SubTrait<T,T>::Type, 3UL,
false > Type;
2179 template<
typename T1,
typename T2,
size_t N >
2180 struct CrossTrait< StaticVector<T1,3UL,false>, HybridVector<T2,N,false> >
2183 typedef typename MultTrait<T1,T2>::Type T;
2186 typedef StaticVector< typename SubTrait<T,T>::Type, 3UL,
false > Type;
2189 template<
typename T1,
size_t M,
typename T2,
size_t N >
2190 struct CrossTrait< HybridVector<T1,M,false>, HybridVector<T2,N,false> >
2193 typedef typename MultTrait<T1,T2>::Type T;
2196 typedef StaticVector< typename SubTrait<T,T>::Type, 3UL,
false > Type;
2212 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2213 struct DivTrait< HybridVector<T1,N,TF>, T2 >
2215 typedef HybridVector< typename DivTrait<T1,T2>::Type, N, TF > Type;
2232 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2233 struct MathTrait< HybridVector<T1,N,TF>, HybridVector<T2,N,TF> >
2235 typedef StaticVector< typename MathTrait<T1,T2>::HighType, N, TF > HighType;
2236 typedef StaticVector< typename MathTrait<T1,T2>::LowType , N, TF > LowType;
2252 template<
typename T1,
size_t N,
bool TF >
2253 struct SubvectorTrait< HybridVector<T1,N,TF> >
2255 typedef HybridVector<T1,N,TF> Type;
Compile time check for vectorizable types.Depending on the available instruction set (SSE...
Definition: IsVectorizable.h:108
Constraint on the data type.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_CONST(T)
Constraint on the data type.In case the given data type is a const-qualified type, a compilation error is created.
Definition: Const.h:116
const bool defaultTransposeFlag
The default transpose flag for all vectors of the Blaze library.This value specifies the default tran...
Definition: TransposeFlag.h:56
Compile time check for numeric types.This type trait tests whether or not the given template paramete...
Definition: IsNumeric.h:98
Constraint on the data type.
Header file for mathematical functions.
void reset(DynamicMatrix< Type, SO > &m)
Resetting the given dense matrix.
Definition: DynamicMatrix.h:4579
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_USER_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERT flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:117
EnableIf< IsIntegral< T >, Load< T, sizeof(T)> >::Type::Type load(const T *address)
Loads a vector of integral values.
Definition: Load.h:222
void extend(size_t n, bool preserve=true)
Extending the size of the vector.
Definition: HybridVector.h:1263
Header file for the UNUSED_PARAMETER function template.
HybridVector()
The default constructor for HybridVector.
Definition: HybridVector.h:440
Header file for the subtraction trait.
Header file for the SparseVector base class.
AlignedArray< Type, NN > v_
The statically allocated vector elements.
Definition: HybridVector.h:400
size_t capacity() const
Returns the maximum capacity of the vector.
Definition: HybridVector.h:1132
HybridVector< Type, N,!TF > TransposeType
Transpose type for expression template evaluations.
Definition: HybridVector.h:191
bool isDefault(const DynamicMatrix< Type, SO > &m)
Returns whether the given dense matrix is in default state.
Definition: DynamicMatrix.h:4622
IntrinsicType load(size_t index) const
Aligned load of an intrinsic element of the vector.
Definition: HybridVector.h:1398
EnableIf< IsIntegral< T >, Loadu< T, sizeof(T)> >::Type::Type loadu(const T *address)
Loads a vector of integral values.
Definition: Loadu.h:219
Header file for the IsSame and IsStrictlySame type traits.
void storeu(size_t index, const IntrinsicType &value)
Unaligned store of an intrinsic element of the vector.
Definition: HybridVector.h:1493
void storeu(float *address, const sse_float_t &value)
Unaligned store of a vector of 'float' values.
Definition: Storeu.h:234
bool isAligned() const
Returns whether the vector is properly aligned in memory.
Definition: HybridVector.h:1374
void UNUSED_PARAMETER(const T1 &)
Suppression of unused parameter warnings.
Definition: Unused.h:84
Header file for the DenseVector base class.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VOLATILE(T)
Constraint on the data type.In case the given data type is a volatile-qualified type, a compilation error is created.
Definition: Volatile.h:116
size_t nonZeros() const
Returns the number of non-zero elements in the vector.
Definition: HybridVector.h:1150
void clear(DynamicMatrix< Type, SO > &m)
Clearing the given dense matrix.
Definition: DynamicMatrix.h:4595
Constraint on the data type.
Iterator begin()
Returns an iterator to the first element of the hybrid vector.
Definition: HybridVector.h:737
IntrinsicType loadu(size_t index) const
Unaligned load of an intrinsic element of the vector.
Definition: HybridVector.h:1430
Efficient implementation of a dynamically sized vector with static memory.The HybridVector class temp...
Definition: Forward.h:49
void stream(float *address, const sse_float_t &value)
Aligned, non-temporal store of a vector of 'float' values.
Definition: Stream.h:233
const HybridVector & CompositeType
Data type for composite expression templates.
Definition: HybridVector.h:195
ConstIterator cbegin() const
Returns an iterator to the first element of the hybrid vector.
Definition: HybridVector.h:767
Header file for the DisableIf class template.
Header file for the multiplication trait.
ConstIterator cend() const
Returns an iterator just past the last element of the hybrid vector.
Definition: HybridVector.h:814
Header file for nested template disabiguation.
void swap(CompressedMatrix< Type, SO > &a, CompressedMatrix< Type, SO > &b)
Swapping the contents of two sparse matrices.
Definition: CompressedMatrix.h:4558
Header file for all forward declarations of the math module.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2388
#define BLAZE_CONSTRAINT_MUST_NOT_BE_POINTER_TYPE(T)
Constraint on the data type.In case the given data type T is not a pointer type, a compilation error ...
Definition: Pointer.h:116
size_t size() const
Returns the current size/dimension of the vector.
Definition: HybridVector.h:1117
Header file for the DenseIterator class template.
Header file for the subvector trait.
void assign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the assignment of a matrix to a matrix.
Definition: Matrix.h:179
DenseIterator< const Type > ConstIterator
Iterator over constant elements.
Definition: HybridVector.h:199
Constraint on the data type.
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:70
Compile time check for sparse vector types.This type trait tests whether or not the given template pa...
Definition: IsSparseVector.h:103
const Type & ConstReference
Reference to a constant vector value.
Definition: HybridVector.h:197
Type ElementType
Type of the vector elements.
Definition: HybridVector.h:192
#define BLAZE_CONSTRAINT_MUST_BE_VECTORIZABLE_TYPE(T)
Constraint on the data type.In case the given data type T is not a vectorizable data type...
Definition: Vectorizable.h:79
Type * data()
Low-level data access to the vector elements.
Definition: HybridVector.h:705
Reference operator[](size_t index)
Subscript operator for the direct access to the vector elements.
Definition: HybridVector.h:667
This ResultType
Result type for expression template evaluations.
Definition: HybridVector.h:190
void clear()
Clearing the vector.
Definition: HybridVector.h:1191
Header file for the EnableIf class template.
void stream(size_t index, const IntrinsicType &value)
Aligned, non-temporal store of an intrinsic element of the vector.
Definition: HybridVector.h:1524
Header file for the IsVectorizable type trait.
Header file for the IsNumeric type trait.
IT::Type IntrinsicType
Intrinsic type of the vector elements.
Definition: HybridVector.h:193
void resize(size_t n, bool preserve=true)
Changing the size of the vector.
Definition: HybridVector.h:1229
DenseIterator< Type > Iterator
Iterator over non-constant elements.
Definition: HybridVector.h:198
Header file for the IsSparseVector type trait.
Intrinsic characteristics of data types.The IntrinsicTrait class template provides the intrinsic char...
Definition: IntrinsicTrait.h:748
Header file for run time assertion macros.
IntrinsicTrait< Type > IT
Intrinsic trait for the vector element type.
Definition: HybridVector.h:179
Header file for the addition trait.
const Type & ReturnType
Return type for expression template evaluations.
Definition: HybridVector.h:194
Header file for the cross product trait.
Header file for the division trait.
void swap(DynamicMatrix< Type, SO > &a, DynamicMatrix< Type, SO > &b)
Swapping the contents of two matrices.
Definition: DynamicMatrix.h:4651
void addAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the addition assignment of a matrix to a matrix.
Definition: Matrix.h:209
Constraint on the data type.
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:184
#define BLAZE_CONSTRAINT_MUST_BE_NUMERIC_TYPE(T)
Constraint on the data type.In case the given data type T is not a numeric (integral or floating poin...
Definition: Numeric.h:79
Header file for the reset shim.
Header file for the AlignedArray implementation.
void subAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the subtraction assignment of a matrix to matrix.
Definition: Matrix.h:239
#define BLAZE_CONSTRAINT_MUST_NOT_BE_REFERENCE_TYPE(T)
Constraint on the data type.In case the given data type T is not a reference type, a compilation error is created.
Definition: Reference.h:116
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:2387
Header file for the isDefault shim.
Constraint on the data type.
void swap(HybridVector &v)
Swapping the contents of two hybrid vectors.
Definition: HybridVector.h:1300
Substitution Failure Is Not An Error (SFINAE) class.The DisableIf class template is an auxiliary tool...
Definition: DisableIf.h:184
bool isAliased(const Other *alias) const
Returns whether the vector is aliased with the given address alias.
Definition: HybridVector.h:1355
Type & Reference
Reference to a non-constant vector value.
Definition: HybridVector.h:196
Implementation of a generic iterator for dense vectors and matrices.The DenseIterator represents a ge...
Definition: DenseIterator.h:58
Header file for all intrinsic functionality.
Header file for the mathematical trait.
void reset()
Reset to the default initial values.
Definition: HybridVector.h:1172
size_t size_
The current size/dimension of the vector.
Definition: HybridVector.h:406
Iterator end()
Returns an iterator just past the last element of the hybrid vector.
Definition: HybridVector.h:782
bool canAlias(const Other *alias) const
Returns whether the vector can alias with the given address alias.
Definition: HybridVector.h:1334
Header file for the default transpose flag for all vectors of the Blaze library.
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:105
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2379
Header file for basic type definitions.
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.In case of an invalid compile time expression, a compilation error is cr...
Definition: StaticAssert.h:143
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101
void store(size_t index, const IntrinsicType &value)
Aligned store of an intrinsic element of the vector.
Definition: HybridVector.h:1461
HybridVector< Type, N, TF > This
Type of this HybridVector instance.
Definition: HybridVector.h:189
void store(float *address, const sse_float_t &value)
Aligned store of a vector of 'float' values.
Definition: Store.h:242