26 #ifndef _BLAZE_MATH_DENSE_HYBRIDVECTOR_H_
27 #define _BLAZE_MATH_DENSE_HYBRIDVECTOR_H_
152 template<
typename Type
155 class HybridVector :
public DenseVector< HybridVector<Type,N,TF>, TF >
164 enum { NN = N + ( IT::size - ( N % IT::size ) ) % IT::size };
196 enum { smpAssignable = 0 };
204 explicit inline HybridVector(
size_t n,
const Type& init );
205 template<
typename Other >
explicit inline HybridVector(
size_t n,
const Other* array );
207 template<
typename Other,
size_t M >
208 explicit inline HybridVector(
const Other (&array)[M] );
211 template<
typename VT >
inline HybridVector(
const Vector<VT,TF>& v );
238 template<
typename Other,
size_t M >
239 inline HybridVector& operator=(
const Other (&array)[M] );
243 template<
typename VT >
inline HybridVector& operator= (
const Vector<VT,TF>& rhs );
244 template<
typename VT >
inline HybridVector& operator+=(
const Vector<VT,TF>& rhs );
245 template<
typename VT >
inline HybridVector& operator-=(
const Vector<VT,TF>& rhs );
246 template<
typename VT >
inline HybridVector& operator*=(
const Vector<VT,TF>& rhs );
248 template<
typename Other >
249 inline typename EnableIf< IsNumeric<Other>,
HybridVector >::Type&
250 operator*=( Other rhs );
252 template<
typename Other >
253 inline typename EnableIf< IsNumeric<Other>,
HybridVector >::Type&
254 operator/=( Other rhs );
261 inline size_t size()
const;
266 inline void resize(
size_t n,
bool preserve=
true );
267 inline void extend(
size_t n,
bool preserve=
true );
268 template<
typename Other >
inline HybridVector& scale( Other scalar );
276 static inline void*
operator new ( std::size_t
size );
277 static inline void*
operator new[]( std::size_t
size );
278 static inline void*
operator new ( std::size_t
size,
const std::nothrow_t& );
279 static inline void*
operator new[]( std::size_t
size,
const std::nothrow_t& );
281 static inline void operator delete (
void* ptr );
282 static inline void operator delete[](
void* ptr );
283 static inline void operator delete (
void* ptr,
const std::nothrow_t& );
284 static inline void operator delete[](
void* ptr,
const std::nothrow_t& );
291 template<
typename VT >
293 struct VectorizedAssign {
294 enum { value = vectorizable && VT::vectorizable &&
295 IsSame<Type,typename VT::ElementType>::value };
302 template<
typename VT >
304 struct VectorizedAddAssign {
305 enum { value = vectorizable && VT::vectorizable &&
306 IsSame<Type,typename VT::ElementType>::value &&
307 IntrinsicTrait<Type>::addition };
314 template<
typename VT >
316 struct VectorizedSubAssign {
317 enum { value = vectorizable && VT::vectorizable &&
318 IsSame<Type,typename VT::ElementType>::value &&
319 IntrinsicTrait<Type>::subtraction };
326 template<
typename VT >
328 struct VectorizedMultAssign {
329 enum { value = vectorizable && VT::vectorizable &&
330 IsSame<Type,typename VT::ElementType>::value &&
331 IntrinsicTrait<Type>::multiplication };
340 template<
typename Other >
inline bool canAlias (
const Other* alias )
const;
341 template<
typename Other >
inline bool isAliased(
const Other* alias )
const;
351 template<
typename VT >
352 inline typename DisableIf< VectorizedAssign<VT> >::Type
353 assign(
const DenseVector<VT,TF>& rhs );
355 template<
typename VT >
356 inline typename EnableIf< VectorizedAssign<VT> >::Type
357 assign(
const DenseVector<VT,TF>& rhs );
359 template<
typename VT >
inline void assign(
const SparseVector<VT,TF>& rhs );
361 template<
typename VT >
362 inline typename DisableIf< VectorizedAddAssign<VT> >::Type
363 addAssign(
const DenseVector<VT,TF>& rhs );
365 template<
typename VT >
366 inline typename EnableIf< VectorizedAddAssign<VT> >::Type
367 addAssign(
const DenseVector<VT,TF>& rhs );
369 template<
typename VT >
inline void addAssign(
const SparseVector<VT,TF>& rhs );
371 template<
typename VT >
372 inline typename DisableIf< VectorizedSubAssign<VT> >::Type
373 subAssign(
const DenseVector<VT,TF>& rhs );
375 template<
typename VT >
376 inline typename EnableIf< VectorizedSubAssign<VT> >::Type
377 subAssign(
const DenseVector<VT,TF>& rhs );
379 template<
typename VT >
inline void subAssign(
const SparseVector<VT,TF>& rhs );
381 template<
typename VT >
382 inline typename DisableIf< VectorizedMultAssign<VT> >::Type
383 multAssign(
const DenseVector<VT,TF>& rhs );
385 template<
typename VT >
386 inline typename EnableIf< VectorizedMultAssign<VT> >::Type
387 multAssign(
const DenseVector<VT,TF>& rhs );
389 template<
typename VT >
inline void multAssign(
const SparseVector<VT,TF>& rhs );
434 template<
typename Type
442 for(
size_t i=0UL; i<NN; ++i )
459 template<
typename Type
467 throw std::invalid_argument(
"Invalid size for hybrid vector" );
470 for(
size_t i=0UL; i<NN; ++i )
488 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 )
532 template<
typename Type
535 template<
typename Other >
541 throw std::invalid_argument(
"Invalid setup of hybrid vector" );
543 for(
size_t i=0UL; i<n; ++i )
547 for(
size_t i=n; i<NN; ++i )
572 template<
typename Type
575 template<
typename Other
583 for(
size_t i=0UL; i<M; ++i )
587 for(
size_t i=M; i<NN; ++i )
601 template<
typename Type
608 for(
size_t i=0UL; i<
size_; ++i )
612 for(
size_t i=size_; i<NN; ++i )
629 template<
typename Type
632 template<
typename VT >
635 , size_( (~v).size() )
639 if( (~v).
size() > N )
640 throw std::invalid_argument(
"Invalid setup of hybrid vector" );
643 i<( IsVectorizable<Type>::value ? NN :
size_ ); ++i ) {
668 template<
typename Type
688 template<
typename Type
707 template<
typename Type
724 template<
typename Type
739 template<
typename Type
754 template<
typename Type
769 template<
typename Type
784 template<
typename Type
800 template<
typename Type
816 template<
typename Type
854 template<
typename Type
857 template<
typename Other
865 for(
size_t i=0UL; i<M; ++i )
879 template<
typename Type
886 for(
size_t i=0UL; i<size_; ++i )
901 template<
typename Type
910 resize( rhs.size() );
928 template<
typename Type
931 template<
typename VT >
936 if( (~rhs).size() > N )
937 throw std::invalid_argument(
"Invalid assignment to hybrid vector" );
939 if( (~rhs).canAlias(
this ) ) {
944 resize( (~rhs).size() );
965 template<
typename Type
968 template<
typename VT >
973 if( (~rhs).size() != size_ )
974 throw std::invalid_argument(
"Vector sizes do not match" );
976 if( (~rhs).canAlias(
this ) ) {
999 template<
typename Type
1002 template<
typename VT >
1007 if( (~rhs).size() != size_ )
1008 throw std::invalid_argument(
"Vector sizes do not match" );
1010 if( (~rhs).canAlias(
this ) ) {
1034 template<
typename Type
1037 template<
typename VT >
1042 if( (~rhs).size() != size_ )
1043 throw std::invalid_argument(
"Vector sizes do not match" );
1047 this->operator=( tmp );
1065 template<
typename Type
1068 template<
typename Other >
1074 assign( *
this, (*
this) * rhs );
1089 template<
typename Type
1092 template<
typename Other >
1100 assign( *
this, (*
this) / rhs );
1119 template<
typename Type
1134 template<
typename Type
1152 template<
typename Type
1157 size_t nonzeros( 0 );
1159 for(
size_t i=0UL; i<size_; ++i ) {
1174 template<
typename Type
1180 for(
size_t i=0UL; i<size_; ++i )
1193 template<
typename Type
1234 template<
typename Type
1242 throw std::invalid_argument(
"Invalid size for hybrid vector" );
1245 for(
size_t i=n; i<size_; ++i )
1268 template<
typename Type
1285 template<
typename Type
1288 template<
typename Other >
1291 for(
size_t i=0; i<size_; ++i )
1305 template<
typename Type
1312 const size_t maxsize( max( size_, v.size_ ) );
1313 for(
size_t i=0UL; i<maxsize; ++i )
1314 swap( v_[i], v.v_[i] );
1315 swap( size_, v.size_ );
1338 template<
typename Type
1347 return allocate<HybridVector>( 1UL );
1362 template<
typename Type
1370 return allocate<HybridVector>( size/
sizeof(
HybridVector) );
1385 template<
typename Type
1394 return allocate<HybridVector>( 1UL );
1409 template<
typename Type
1417 return allocate<HybridVector>( size/
sizeof(
HybridVector) );
1428 template<
typename Type
1433 deallocate( static_cast<HybridVector*>( ptr ) );
1444 template<
typename Type
1449 deallocate( static_cast<HybridVector*>( ptr ) );
1460 template<
typename Type
1465 deallocate( static_cast<HybridVector*>( ptr ) );
1476 template<
typename Type
1481 deallocate( static_cast<HybridVector*>( ptr ) );
1504 template<
typename Type
1507 template<
typename Other >
1510 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
1525 template<
typename Type
1528 template<
typename Other >
1531 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
1545 template<
typename Type
1568 template<
typename Type
1582 return load( &v_[index] );
1600 template<
typename Type
1613 return loadu( &v_[index] );
1632 template<
typename Type
1645 store( &v_[index], value );
1664 template<
typename Type
1676 storeu( &v_[index], value );
1695 template<
typename Type
1708 stream( &v_[index], value );
1724 template<
typename Type
1727 template<
typename VT >
1733 for(
size_t i=0UL; i<size_; ++i )
1750 template<
typename Type
1753 template<
typename VT >
1763 for(
size_t i=0UL; i<size_; i+=IT::size ) {
1781 template<
typename Type
1784 template<
typename VT >
1789 for(
typename VT::ConstIterator element=(~rhs).begin(); element!=(~rhs).end(); ++element )
1790 v_[element->index()] = element->value();
1806 template<
typename Type
1809 template<
typename VT >
1815 for(
size_t i=0UL; i<size_; ++i )
1832 template<
typename Type
1835 template<
typename VT >
1846 for(
size_t i=0UL; i<size_; i+=IT::size ) {
1864 template<
typename Type
1867 template<
typename VT >
1872 for(
typename VT::ConstIterator element=(~rhs).begin(); element!=(~rhs).end(); ++element )
1873 v_[element->index()] += element->value();
1889 template<
typename Type
1892 template<
typename VT >
1898 for(
size_t i=0UL; i<size_; ++i )
1915 template<
typename Type
1918 template<
typename VT >
1929 for(
size_t i=0UL; i<size_; i+=IT::size ) {
1947 template<
typename Type
1950 template<
typename VT >
1955 for(
typename VT::ConstIterator element=(~rhs).begin(); element!=(~rhs).end(); ++element )
1956 v_[element->index()] -= element->value();
1972 template<
typename Type
1975 template<
typename VT >
1981 for(
size_t i=0UL; i<size_; ++i )
1998 template<
typename Type
2001 template<
typename VT >
2012 for(
size_t i=0UL; i<size_; i+=IT::size ) {
2030 template<
typename Type
2033 template<
typename VT >
2042 for(
typename VT::ConstIterator element=(~rhs).begin(); element!=(~rhs).end(); ++element )
2043 v_[element->index()] = tmp[element->index()] * element->value();
2068 template<
typename Type
2090 template<
typename Type,
size_t N,
bool TF >
2093 template<
typename Type,
size_t N,
bool TF >
2096 template<
typename Type,
size_t N,
bool TF >
2099 template<
typename Type,
size_t N,
bool TF >
2112 template<
typename Type
2131 template<
typename Type
2159 template<
typename Type
2164 for(
size_t i=0UL; i<v.size(); ++i )
2180 template<
typename Type
2200 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2201 struct AddTrait< HybridVector<T1,M,TF>, StaticVector<T2,N,TF> >
2203 typedef StaticVector< typename AddTrait<T1,T2>::Type, N, TF > Type;
2206 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2207 struct AddTrait< StaticVector<T1,M,TF>, HybridVector<T2,N,TF> >
2209 typedef StaticVector< typename AddTrait<T1,T2>::Type, M, TF > Type;
2212 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2213 struct AddTrait< HybridVector<T1,M,TF>, HybridVector<T2,N,TF> >
2215 typedef HybridVector< typename AddTrait<T1,T2>::Type, ( M < N )?( M ):( N ), TF > Type;
2231 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2232 struct SubTrait< HybridVector<T1,M,TF>, StaticVector<T2,N,TF> >
2234 typedef StaticVector< typename SubTrait<T1,T2>::Type, N, TF > Type;
2237 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2238 struct SubTrait< StaticVector<T1,M,TF>, HybridVector<T2,N,TF> >
2240 typedef StaticVector< typename SubTrait<T1,T2>::Type, M, TF > Type;
2243 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2244 struct SubTrait< HybridVector<T1,M,TF>, HybridVector<T2,N,TF> >
2246 typedef HybridVector< typename SubTrait<T1,T2>::Type, ( M < N )?( M ):( N ), TF > Type;
2262 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2263 struct MultTrait< HybridVector<T1,N,TF>, T2 >
2265 typedef HybridVector< typename MultTrait<T1,T2>::Type, N, TF > Type;
2269 template<
typename T1,
typename T2,
size_t N,
bool TF >
2270 struct MultTrait< T1, HybridVector<T2,N,TF> >
2272 typedef HybridVector< typename MultTrait<T1,T2>::Type, N, TF > Type;
2276 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2277 struct MultTrait< HybridVector<T1,M,TF>, StaticVector<T2,N,TF> >
2279 typedef StaticVector< typename MultTrait<T1,T2>::Type, N, TF > Type;
2282 template<
typename T1,
size_t M,
typename T2,
size_t N >
2283 struct MultTrait< HybridVector<T1,M,false>, StaticVector<T2,N,true> >
2285 typedef DynamicMatrix< typename MultTrait<T1,T2>::Type,
false > Type;
2288 template<
typename T1,
size_t M,
typename T2,
size_t N >
2289 struct MultTrait< HybridVector<T1,M,true>, StaticVector<T2,N,false> >
2291 typedef typename MultTrait<T1,T2>::Type Type;
2294 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2295 struct MultTrait< StaticVector<T1,M,TF>, HybridVector<T2,N,TF> >
2297 typedef StaticVector< typename MultTrait<T1,T2>::Type, M, TF > Type;
2300 template<
typename T1,
size_t M,
typename T2,
size_t N >
2301 struct MultTrait< StaticVector<T1,M,false>, HybridVector<T2,N,true> >
2303 typedef DynamicMatrix< typename MultTrait<T1,T2>::Type,
false > Type;
2306 template<
typename T1,
size_t M,
typename T2,
size_t N >
2307 struct MultTrait< StaticVector<T1,M,true>, HybridVector<T2,N,false> >
2309 typedef typename MultTrait<T1,T2>::Type Type;
2312 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2313 struct MultTrait< HybridVector<T1,M,TF>, HybridVector<T2,N,TF> >
2315 typedef HybridVector< typename MultTrait<T1,T2>::Type, ( M < N )?( M ):( N ), TF > Type;
2318 template<
typename T1,
size_t M,
typename T2,
size_t N >
2319 struct MultTrait< HybridVector<T1,M,false>, HybridVector<T2,N,true> >
2321 typedef DynamicMatrix< typename MultTrait<T1,T2>::Type,
false > Type;
2324 template<
typename T1,
size_t M,
typename T2,
size_t N >
2325 struct MultTrait< HybridVector<T1,M,true>, HybridVector<T2,N,false> >
2327 typedef typename MultTrait<T1,T2>::Type Type;
2343 template<
typename T1,
size_t N,
typename T2 >
2344 struct CrossTrait< HybridVector<T1,N,false>, StaticVector<T2,3UL,false> >
2347 typedef typename MultTrait<T1,T2>::Type T;
2350 typedef StaticVector< typename SubTrait<T,T>::Type, 3UL,
false > Type;
2353 template<
typename T1,
typename T2,
size_t N >
2354 struct CrossTrait< StaticVector<T1,3UL,false>, HybridVector<T2,N,false> >
2357 typedef typename MultTrait<T1,T2>::Type T;
2360 typedef StaticVector< typename SubTrait<T,T>::Type, 3UL,
false > Type;
2363 template<
typename T1,
size_t M,
typename T2,
size_t N >
2364 struct CrossTrait< HybridVector<T1,M,false>, HybridVector<T2,N,false> >
2367 typedef typename MultTrait<T1,T2>::Type T;
2370 typedef StaticVector< typename SubTrait<T,T>::Type, 3UL,
false > Type;
2386 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2387 struct DivTrait< HybridVector<T1,N,TF>, T2 >
2389 typedef HybridVector< typename DivTrait<T1,T2>::Type, N, TF > Type;
2406 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2407 struct MathTrait< HybridVector<T1,N,TF>, HybridVector<T2,N,TF> >
2409 typedef StaticVector< typename MathTrait<T1,T2>::HighType, N, TF > HighType;
2410 typedef StaticVector< typename MathTrait<T1,T2>::LowType , N, TF > LowType;
2426 template<
typename T1,
size_t N,
bool TF >
2427 struct SubvectorTrait< HybridVector<T1,N,TF> >
2429 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
Constraint on the data type.
Header file for mathematical functions.
void reset(DynamicMatrix< Type, SO > &m)
Resetting the given dense matrix.
Definition: DynamicMatrix.h:4599
#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 > >::Type store(T *address, const typename Store< T, sizeof(T)>::Type &value)
Aligned store of a vector of integral values.
Definition: Store.h:223
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:1271
Header file for the UNUSED_PARAMETER function template.
HybridVector()
The default constructor for HybridVector.
Definition: HybridVector.h:437
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:397
size_t capacity() const
Returns the maximum capacity of the vector.
Definition: HybridVector.h:1137
HybridVector< Type, N,!TF > TransposeType
Transpose type for expression template evaluations.
Definition: HybridVector.h:171
bool isDefault(const DynamicMatrix< Type, SO > &m)
Returns whether the given dense matrix is in default state.
Definition: DynamicMatrix.h:4642
IntrinsicType load(size_t index) const
Aligned load of an intrinsic element of the vector.
Definition: HybridVector.h:1572
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:1667
bool isAligned() const
Returns whether the vector is properly aligned in memory.
Definition: HybridVector.h:1548
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
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:690
size_t nonZeros() const
Returns the number of non-zero elements in the vector.
Definition: HybridVector.h:1155
Type * Pointer
Pointer to a non-constant vector value.
Definition: HybridVector.h:178
Header file for memory allocation and deallocation functionality.
void clear(DynamicMatrix< Type, SO > &m)
Clearing the given dense matrix.
Definition: DynamicMatrix.h:4615
Constraint on the data type.
Iterator begin()
Returns an iterator to the first element of the hybrid vector.
Definition: HybridVector.h:742
IntrinsicType loadu(size_t index) const
Unaligned load of an intrinsic element of the vector.
Definition: HybridVector.h:1604
Efficient implementation of a dynamically sized vector with static memory.The HybridVector class temp...
Definition: Forward.h:50
void deallocate(T *address)
Deallocation of memory.
Definition: Memory.h:115
const HybridVector & CompositeType
Data type for composite expression templates.
Definition: HybridVector.h:175
ConstIterator cbegin() const
Returns an iterator to the first element of the hybrid vector.
Definition: HybridVector.h:772
Header file for the DisableIf class template.
const Type * ConstPointer
Pointer to a constant vector value.
Definition: HybridVector.h:179
Header file for the multiplication trait.
ConstIterator cend() const
Returns an iterator just past the last element of the hybrid vector.
Definition: HybridVector.h:819
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:4605
Header file for all forward declarations of the math module.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2412
#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:1122
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:271
DenseIterator< const Type > ConstIterator
Iterator over constant elements.
Definition: HybridVector.h:181
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:177
Type ElementType
Type of the vector elements.
Definition: HybridVector.h:172
#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
Reference operator[](size_t index)
Subscript operator for the direct access to the vector elements.
Definition: HybridVector.h:672
void multAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the multiplication assignment of a matrix to a matrix.
Definition: Matrix.h:361
This ResultType
Result type for expression template evaluations.
Definition: HybridVector.h:170
void clear()
Clearing the vector.
Definition: HybridVector.h:1196
Header file for the EnableIf class template.
EnableIf< IsIntegral< T > >::Type storeu(T *address, const typename Storeu< T, sizeof(T)>::Type &value)
Unaligned store of a vector of integral values.
Definition: Storeu.h:216
void stream(size_t index, const IntrinsicType &value)
Aligned, non-temporal store of an intrinsic element of the vector.
Definition: HybridVector.h:1698
Header file for the serial shim.
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:173
void resize(size_t n, bool preserve=true)
Changing the size of the vector.
Definition: HybridVector.h:1237
DenseIterator< Type > Iterator
Iterator over non-constant elements.
Definition: HybridVector.h:180
Header file for the IsSparseVector type trait.
EnableIf< IsIntegral< T > >::Type stream(T *address, const typename Stream< T, sizeof(T)>::Type &value)
Aligned, non-temporal store of a vector of integral values.
Definition: Stream.h:218
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:159
Header file for the addition trait.
const Type & ReturnType
Return type for expression template evaluations.
Definition: HybridVector.h:174
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:4671
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:301
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:331
#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:2411
Header file for the isDefault shim.
Constraint on the data type.
Pointer data()
Low-level data access to the vector elements.
Definition: HybridVector.h:710
void swap(HybridVector &v)
Swapping the contents of two hybrid vectors.
Definition: HybridVector.h:1308
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:1529
Type & Reference
Reference to a non-constant vector value.
Definition: HybridVector.h:176
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:1177
size_t size_
The current size/dimension of the vector.
Definition: HybridVector.h:403
Iterator end()
Returns an iterator just past the last element of the hybrid vector.
Definition: HybridVector.h:787
bool canAlias(const Other *alias) const
Returns whether the vector can alias with the given address alias.
Definition: HybridVector.h:1508
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:108
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2403
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:1635
HybridVector< Type, N, TF > This
Type of this HybridVector instance.
Definition: HybridVector.h:169