26 #ifndef _BLAZE_MATH_DENSE_HYBRIDVECTOR_H_
27 #define _BLAZE_MATH_DENSE_HYBRIDVECTOR_H_
150 template<
typename Type
153 class HybridVector :
public DenseVector< HybridVector<Type,N,TF>, TF >
162 enum { NN = N + ( IT::size - ( N % IT::size ) ) % IT::size };
192 enum { smpAssignable = 0 };
200 explicit inline HybridVector(
size_t n,
const Type& init );
201 template<
typename Other >
explicit inline HybridVector(
size_t n,
const Other* array );
203 template<
typename Other,
size_t M >
204 explicit inline HybridVector(
const Other (&array)[M] );
207 template<
typename VT >
inline HybridVector(
const Vector<VT,TF>& v );
220 inline Type*
data ();
221 inline const Type*
data ()
const;
234 template<
typename Other,
size_t M >
235 inline HybridVector& operator=(
const Other (&array)[M] );
239 template<
typename VT >
inline HybridVector& operator= (
const Vector<VT,TF>& rhs );
240 template<
typename VT >
inline HybridVector& operator+=(
const Vector<VT,TF>& rhs );
241 template<
typename VT >
inline HybridVector& operator-=(
const Vector<VT,TF>& rhs );
242 template<
typename VT >
inline HybridVector& operator*=(
const Vector<VT,TF>& rhs );
244 template<
typename Other >
245 inline typename EnableIf< IsNumeric<Other>,
HybridVector >::Type&
246 operator*=( Other rhs );
248 template<
typename Other >
249 inline typename EnableIf< IsNumeric<Other>,
HybridVector >::Type&
250 operator/=( Other rhs );
257 inline size_t size()
const;
262 inline void resize(
size_t n,
bool preserve=
true );
263 inline void extend(
size_t n,
bool preserve=
true );
264 template<
typename Other >
inline HybridVector& scale( Other scalar );
272 template<
typename VT >
274 struct VectorizedAssign {
275 enum { value = vectorizable && VT::vectorizable &&
276 IsSame<Type,typename VT::ElementType>::value };
283 template<
typename VT >
285 struct VectorizedAddAssign {
286 enum { value = vectorizable && VT::vectorizable &&
287 IsSame<Type,typename VT::ElementType>::value &&
288 IntrinsicTrait<Type>::addition };
295 template<
typename VT >
297 struct VectorizedSubAssign {
298 enum { value = vectorizable && VT::vectorizable &&
299 IsSame<Type,typename VT::ElementType>::value &&
300 IntrinsicTrait<Type>::subtraction };
307 template<
typename VT >
309 struct VectorizedMultAssign {
310 enum { value = vectorizable && VT::vectorizable &&
311 IsSame<Type,typename VT::ElementType>::value &&
312 IntrinsicTrait<Type>::multiplication };
321 template<
typename Other >
inline bool canAlias (
const Other* alias )
const;
322 template<
typename Other >
inline bool isAliased(
const Other* alias )
const;
330 template<
typename VT >
331 inline typename DisableIf< VectorizedAssign<VT> >::Type
332 assign(
const DenseVector<VT,TF>& rhs );
334 template<
typename VT >
335 inline typename EnableIf< VectorizedAssign<VT> >::Type
336 assign(
const DenseVector<VT,TF>& rhs );
338 template<
typename VT >
inline void assign(
const SparseVector<VT,TF>& rhs );
340 template<
typename VT >
341 inline typename DisableIf< VectorizedAddAssign<VT> >::Type
342 addAssign(
const DenseVector<VT,TF>& rhs );
344 template<
typename VT >
345 inline typename EnableIf< VectorizedAddAssign<VT> >::Type
346 addAssign(
const DenseVector<VT,TF>& rhs );
348 template<
typename VT >
inline void addAssign(
const SparseVector<VT,TF>& rhs );
350 template<
typename VT >
351 inline typename DisableIf< VectorizedSubAssign<VT> >::Type
352 subAssign(
const DenseVector<VT,TF>& rhs );
354 template<
typename VT >
355 inline typename EnableIf< VectorizedSubAssign<VT> >::Type
356 subAssign(
const DenseVector<VT,TF>& rhs );
358 template<
typename VT >
inline void subAssign(
const SparseVector<VT,TF>& rhs );
360 template<
typename VT >
361 inline typename DisableIf< VectorizedMultAssign<VT> >::Type
362 multAssign(
const DenseVector<VT,TF>& rhs );
364 template<
typename VT >
365 inline typename EnableIf< VectorizedMultAssign<VT> >::Type
366 multAssign(
const DenseVector<VT,TF>& rhs );
368 template<
typename VT >
inline void multAssign(
const SparseVector<VT,TF>& rhs );
413 template<
typename Type
420 for(
size_t i=0UL; i<NN; ++i )
437 template<
typename Type
444 throw std::invalid_argument(
"Invalid size for hybrid vector" );
447 for(
size_t i=0UL; i<NN; ++i )
465 template<
typename Type
472 throw std::invalid_argument(
"Invalid size for hybrid vector" );
474 for(
size_t i=0UL; i<n; ++i )
478 for(
size_t i=n; i<NN; ++i )
507 template<
typename Type
510 template<
typename Other >
515 throw std::invalid_argument(
"Invalid setup of hybrid vector" );
517 for(
size_t i=0UL; i<n; ++i )
521 for(
size_t i=n; i<NN; ++i )
546 template<
typename Type
549 template<
typename Other
556 for(
size_t i=0UL; i<M; ++i )
560 for(
size_t i=M; i<NN; ++i )
574 template<
typename Type
580 for(
size_t i=0UL; i<
size_; ++i )
584 for(
size_t i=size_; i<NN; ++i )
601 template<
typename Type
604 template<
typename VT >
606 : size_( (~v).size() )
610 if( (~v).
size() > N )
611 throw std::invalid_argument(
"Invalid setup of hybrid vector" );
639 template<
typename Type
659 template<
typename Type
678 template<
typename Type
695 template<
typename Type
710 template<
typename Type
725 template<
typename Type
740 template<
typename Type
755 template<
typename Type
771 template<
typename Type
787 template<
typename Type
825 template<
typename Type
828 template<
typename Other
836 for(
size_t i=0UL; i<M; ++i )
850 template<
typename Type
857 for(
size_t i=0UL; i<size_; ++i )
872 template<
typename Type
879 resize( rhs.size() );
881 for(
size_t i=0UL; i<size_; ++i )
899 template<
typename Type
902 template<
typename VT >
907 if( (~rhs).size() > N )
908 throw std::invalid_argument(
"Invalid assignment to hybrid vector" );
910 if( (~rhs).canAlias(
this ) ) {
915 resize( (~rhs).size() );
936 template<
typename Type
939 template<
typename VT >
944 if( (~rhs).size() != size_ )
945 throw std::invalid_argument(
"Vector sizes do not match" );
947 if( (~rhs).canAlias(
this ) ) {
970 template<
typename Type
973 template<
typename VT >
978 if( (~rhs).size() != size_ )
979 throw std::invalid_argument(
"Vector sizes do not match" );
981 if( (~rhs).canAlias(
this ) ) {
1005 template<
typename Type
1008 template<
typename VT >
1013 if( (~rhs).size() != size_ )
1014 throw std::invalid_argument(
"Vector sizes do not match" );
1018 this->operator=( tmp );
1021 assign( *
this, *
this * (~rhs) );
1036 template<
typename Type
1039 template<
typename Other >
1045 assign( *
this, (*
this) * rhs );
1060 template<
typename Type
1063 template<
typename Other >
1071 assign( *
this, (*
this) / rhs );
1090 template<
typename Type
1105 template<
typename Type
1123 template<
typename Type
1128 size_t nonzeros( 0 );
1130 for(
size_t i=0UL; i<size_; ++i ) {
1145 template<
typename Type
1151 for(
size_t i=0UL; i<size_; ++i )
1164 template<
typename Type
1202 template<
typename Type
1210 throw std::invalid_argument(
"Invalid size for hybrid vector" );
1213 for(
size_t i=n; i<size_; ++i )
1236 template<
typename Type
1253 template<
typename Type
1256 template<
typename Other >
1259 for(
size_t i=0; i<size_; ++i )
1273 template<
typename Type
1280 const size_t maxsize( max( size_, v.size_ ) );
1281 for(
size_t i=0UL; i<maxsize; ++i )
1282 swap( v_[i], v.v_[i] );
1283 swap( size_, v.size_ );
1306 template<
typename Type
1309 template<
typename Other >
1312 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
1327 template<
typename Type
1330 template<
typename Other >
1333 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
1351 template<
typename Type
1365 return load( &v_[index] );
1383 template<
typename Type
1396 return loadu( &v_[index] );
1415 template<
typename Type
1428 store( &v_[index], value );
1447 template<
typename Type
1459 storeu( &v_[index], value );
1478 template<
typename Type
1491 stream( &v_[index], value );
1507 template<
typename Type
1510 template<
typename VT >
1516 for(
size_t i=0UL; i<size_; ++i )
1533 template<
typename Type
1536 template<
typename VT >
1546 for(
size_t i=0UL; i<size_; i+=IT::size ) {
1564 template<
typename Type
1567 template<
typename VT >
1572 for(
typename VT::ConstIterator element=(~rhs).begin(); element!=(~rhs).end(); ++element )
1573 v_[element->index()] = element->value();
1589 template<
typename Type
1592 template<
typename VT >
1598 for(
size_t i=0UL; i<size_; ++i )
1615 template<
typename Type
1618 template<
typename VT >
1629 for(
size_t i=0UL; i<size_; i+=IT::size ) {
1647 template<
typename Type
1650 template<
typename VT >
1655 for(
typename VT::ConstIterator element=(~rhs).begin(); element!=(~rhs).end(); ++element )
1656 v_[element->index()] += element->value();
1672 template<
typename Type
1675 template<
typename VT >
1681 for(
size_t i=0UL; i<size_; ++i )
1698 template<
typename Type
1701 template<
typename VT >
1712 for(
size_t i=0UL; i<size_; i+=IT::size ) {
1730 template<
typename Type
1733 template<
typename VT >
1738 for(
typename VT::ConstIterator element=(~rhs).begin(); element!=(~rhs).end(); ++element )
1739 v_[element->index()] -= element->value();
1755 template<
typename Type
1758 template<
typename VT >
1764 for(
size_t i=0UL; i<size_; ++i )
1781 template<
typename Type
1784 template<
typename VT >
1795 for(
size_t i=0UL; i<size_; i+=IT::size ) {
1813 template<
typename Type
1816 template<
typename VT >
1825 for(
typename VT::ConstIterator element=(~rhs).begin(); element!=(~rhs).end(); ++element )
1826 v_[element->index()] = tmp[element->index()] * element->value();
1851 template<
typename Type
1873 template<
typename Type,
size_t N,
bool TF >
1876 template<
typename Type,
size_t N,
bool TF >
1879 template<
typename Type,
size_t N,
bool TF >
1882 template<
typename Type,
size_t N,
bool TF >
1895 template<
typename Type
1914 template<
typename Type
1942 template<
typename Type
1947 for(
size_t i=0UL; i<v.size(); ++i )
1963 template<
typename Type
1983 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
1984 struct AddTrait< HybridVector<T1,M,TF>, StaticVector<T2,N,TF> >
1986 typedef StaticVector< typename AddTrait<T1,T2>::Type, N, TF > Type;
1989 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
1990 struct AddTrait< StaticVector<T1,M,TF>, HybridVector<T2,N,TF> >
1992 typedef StaticVector< typename AddTrait<T1,T2>::Type, M, TF > Type;
1995 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
1996 struct AddTrait< HybridVector<T1,M,TF>, HybridVector<T2,N,TF> >
1998 typedef HybridVector< typename AddTrait<T1,T2>::Type, ( M < N )?( M ):( N ), TF > Type;
2014 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2015 struct SubTrait< HybridVector<T1,M,TF>, StaticVector<T2,N,TF> >
2017 typedef StaticVector< typename SubTrait<T1,T2>::Type, N, TF > Type;
2020 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2021 struct SubTrait< StaticVector<T1,M,TF>, HybridVector<T2,N,TF> >
2023 typedef StaticVector< typename SubTrait<T1,T2>::Type, M, TF > Type;
2026 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2027 struct SubTrait< HybridVector<T1,M,TF>, HybridVector<T2,N,TF> >
2029 typedef HybridVector< typename SubTrait<T1,T2>::Type, ( M < N )?( M ):( N ), TF > Type;
2045 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2046 struct MultTrait< HybridVector<T1,N,TF>, T2 >
2048 typedef HybridVector< typename MultTrait<T1,T2>::Type, N, TF > Type;
2052 template<
typename T1,
typename T2,
size_t N,
bool TF >
2053 struct MultTrait< T1, HybridVector<T2,N,TF> >
2055 typedef HybridVector< typename MultTrait<T1,T2>::Type, N, TF > Type;
2059 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2060 struct MultTrait< HybridVector<T1,M,TF>, StaticVector<T2,N,TF> >
2062 typedef StaticVector< typename MultTrait<T1,T2>::Type, N, TF > Type;
2065 template<
typename T1,
size_t M,
typename T2,
size_t N >
2066 struct MultTrait< HybridVector<T1,M,false>, StaticVector<T2,N,true> >
2068 typedef DynamicMatrix< typename MultTrait<T1,T2>::Type,
false > Type;
2071 template<
typename T1,
size_t M,
typename T2,
size_t N >
2072 struct MultTrait< HybridVector<T1,M,true>, StaticVector<T2,N,false> >
2074 typedef typename MultTrait<T1,T2>::Type Type;
2077 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2078 struct MultTrait< StaticVector<T1,M,TF>, HybridVector<T2,N,TF> >
2080 typedef StaticVector< typename MultTrait<T1,T2>::Type, M, TF > Type;
2083 template<
typename T1,
size_t M,
typename T2,
size_t N >
2084 struct MultTrait< StaticVector<T1,M,false>, HybridVector<T2,N,true> >
2086 typedef DynamicMatrix< typename MultTrait<T1,T2>::Type,
false > Type;
2089 template<
typename T1,
size_t M,
typename T2,
size_t N >
2090 struct MultTrait< StaticVector<T1,M,true>, HybridVector<T2,N,false> >
2092 typedef typename MultTrait<T1,T2>::Type Type;
2095 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2096 struct MultTrait< HybridVector<T1,M,TF>, HybridVector<T2,N,TF> >
2098 typedef HybridVector< typename MultTrait<T1,T2>::Type, ( M < N )?( M ):( N ), TF > Type;
2101 template<
typename T1,
size_t M,
typename T2,
size_t N >
2102 struct MultTrait< HybridVector<T1,M,false>, HybridVector<T2,N,true> >
2104 typedef DynamicMatrix< typename MultTrait<T1,T2>::Type,
false > Type;
2107 template<
typename T1,
size_t M,
typename T2,
size_t N >
2108 struct MultTrait< HybridVector<T1,M,true>, HybridVector<T2,N,false> >
2110 typedef typename MultTrait<T1,T2>::Type Type;
2126 template<
typename T1,
size_t N,
typename T2 >
2127 struct CrossTrait< HybridVector<T1,N,false>, StaticVector<T2,3UL,false> >
2130 typedef typename MultTrait<T1,T2>::Type T;
2133 typedef StaticVector< typename SubTrait<T,T>::Type, 3UL,
false > Type;
2136 template<
typename T1,
typename T2,
size_t N >
2137 struct CrossTrait< StaticVector<T1,3UL,false>, HybridVector<T2,N,false> >
2140 typedef typename MultTrait<T1,T2>::Type T;
2143 typedef StaticVector< typename SubTrait<T,T>::Type, 3UL,
false > Type;
2146 template<
typename T1,
size_t M,
typename T2,
size_t N >
2147 struct CrossTrait< HybridVector<T1,M,false>, HybridVector<T2,N,false> >
2150 typedef typename MultTrait<T1,T2>::Type T;
2153 typedef StaticVector< typename SubTrait<T,T>::Type, 3UL,
false > Type;
2169 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2170 struct DivTrait< HybridVector<T1,N,TF>, T2 >
2172 typedef HybridVector< typename DivTrait<T1,T2>::Type, N, TF > Type;
2189 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2190 struct MathTrait< HybridVector<T1,N,TF>, HybridVector<T2,N,TF> >
2192 typedef StaticVector< typename MathTrait<T1,T2>::HighType, N, TF > HighType;
2193 typedef StaticVector< typename MathTrait<T1,T2>::LowType , N, TF > LowType;
2209 template<
typename T1,
size_t N,
bool TF >
2210 struct SubvectorTrait< HybridVector<T1,N,TF> >
2212 typedef HybridVector<T1,N,TF> Type;
Compile time check for vectorizable types.Depending on the available instruction set (SSE...
Definition: IsVectorizable.h:107
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:4512
#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:1239
Header file for the UNUSED_PARAMETER function template.
HybridVector()
The default constructor for HybridVector.
Definition: HybridVector.h:416
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:376
size_t capacity() const
Returns the maximum capacity of the vector.
Definition: HybridVector.h:1108
HybridVector< Type, N,!TF > TransposeType
Transpose type for expression template evaluations.
Definition: HybridVector.h:169
bool isDefault(const DynamicMatrix< Type, SO > &m)
Returns whether the given dense matrix is in default state.
Definition: DynamicMatrix.h:4555
IntrinsicType load(size_t index) const
Aligned load of an intrinsic element of the vector.
Definition: HybridVector.h:1355
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:1450
void storeu(float *address, const sse_float_t &value)
Unaligned store of a vector of 'float' values.
Definition: Storeu.h:234
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:1126
void clear(DynamicMatrix< Type, SO > &m)
Clearing the given dense matrix.
Definition: DynamicMatrix.h:4528
Constraint on the data type.
Iterator begin()
Returns an iterator to the first element of the hybrid vector.
Definition: HybridVector.h:713
IntrinsicType loadu(size_t index) const
Unaligned load of an intrinsic element of the vector.
Definition: HybridVector.h:1387
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:173
ConstIterator cbegin() const
Returns an iterator to the first element of the hybrid vector.
Definition: HybridVector.h:743
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:790
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:4541
Header file for all forward declarations of the math module.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2379
#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:1093
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:177
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:175
Type ElementType
Type of the vector elements.
Definition: HybridVector.h:170
#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:681
Reference operator[](size_t index)
Subscript operator for the direct access to the vector elements.
Definition: HybridVector.h:643
This ResultType
Result type for expression template evaluations.
Definition: HybridVector.h:168
void clear()
Clearing the vector.
Definition: HybridVector.h:1167
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:1481
Header file for the IsVectorizable type trait.
ColumnIterator< const MT > ConstIterator
Iterator over constant elements.
Definition: DenseColumn.h:1972
Header file for the IsNumeric type trait.
IT::Type IntrinsicType
Intrinsic type of the vector elements.
Definition: HybridVector.h:171
void resize(size_t n, bool preserve=true)
Changing the size of the vector.
Definition: HybridVector.h:1205
DenseIterator< Type > Iterator
Iterator over non-constant elements.
Definition: HybridVector.h:176
Header file for the IsSparseVector type trait.
Intrinsic characteristics of data types.The IntrinsicTrait class template provides the intrinsic char...
Definition: IntrinsicTrait.h:648
Header file for run time assertion macros.
IntrinsicTrait< Type > IT
Intrinsic trait for the vector element type.
Definition: HybridVector.h:157
Header file for the addition trait.
const Type & ReturnType
Return type for expression template evaluations.
Definition: HybridVector.h:172
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:4584
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:2378
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:1276
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:1331
Type & Reference
Reference to a non-constant vector value.
Definition: HybridVector.h:174
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:1148
size_t size_
The current size/dimension of the vector.
Definition: HybridVector.h:382
Iterator end()
Returns an iterator just past the last element of the hybrid vector.
Definition: HybridVector.h:758
bool canAlias(const Other *alias) const
Returns whether the vector can alias with the given address alias.
Definition: HybridVector.h:1310
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:2370
Header file for basic type definitions.
SelectType< useConst, ConstIterator, ColumnIterator< MT > >::Type Iterator
Iterator over non-constant elements.
Definition: DenseColumn.h:1980
#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:1418
HybridVector< Type, N, TF > This
Type of this HybridVector instance.
Definition: HybridVector.h:167
void store(float *address, const sse_float_t &value)
Aligned store of a vector of 'float' values.
Definition: Store.h:242