26 #ifndef _BLAZE_MATH_DENSE_HYBRIDVECTOR_H_
27 #define _BLAZE_MATH_DENSE_HYBRIDVECTOR_H_
153 template<
typename Type
156 class HybridVector :
public DenseVector< HybridVector<Type,N,TF>, TF >
188 template<
typename ET >
206 enum { smpAssignable = 0 };
214 explicit inline HybridVector(
size_t n,
const Type& init );
215 template<
typename Other >
explicit inline HybridVector(
size_t n,
const Other* array );
217 template<
typename Other,
size_t M >
218 explicit inline HybridVector(
const Other (&array)[M] );
221 template<
typename VT >
inline HybridVector(
const Vector<VT,TF>& v );
248 template<
typename Other,
size_t M >
249 inline HybridVector& operator=(
const Other (&array)[M] );
253 template<
typename VT >
inline HybridVector& operator= (
const Vector<VT,TF>& rhs );
254 template<
typename VT >
inline HybridVector& operator+=(
const Vector<VT,TF>& rhs );
255 template<
typename VT >
inline HybridVector& operator-=(
const Vector<VT,TF>& rhs );
256 template<
typename VT >
inline HybridVector& operator*=(
const Vector<VT,TF>& rhs );
258 template<
typename Other >
259 inline typename EnableIf< IsNumeric<Other>,
HybridVector >::Type&
260 operator*=( Other rhs );
262 template<
typename Other >
263 inline typename EnableIf< IsNumeric<Other>,
HybridVector >::Type&
264 operator/=( Other rhs );
271 inline size_t size()
const;
276 inline void resize(
size_t n,
bool preserve=
true );
277 inline void extend(
size_t n,
bool preserve=
true );
278 template<
typename Other >
inline HybridVector& scale(
const Other& scalar );
286 static inline void*
operator new ( std::size_t
size );
287 static inline void*
operator new[]( std::size_t
size );
288 static inline void*
operator new ( std::size_t
size,
const std::nothrow_t& );
289 static inline void*
operator new[]( std::size_t
size,
const std::nothrow_t& );
291 static inline void operator delete (
void* ptr );
292 static inline void operator delete[](
void* ptr );
293 static inline void operator delete (
void* ptr,
const std::nothrow_t& );
294 static inline void operator delete[](
void* ptr,
const std::nothrow_t& );
301 template<
typename VT >
303 struct VectorizedAssign {
304 enum { value = vectorizable && VT::vectorizable &&
305 IsSame<Type,typename VT::ElementType>::value };
312 template<
typename VT >
314 struct VectorizedAddAssign {
315 enum { value = vectorizable && VT::vectorizable &&
316 IsSame<Type,typename VT::ElementType>::value &&
317 IntrinsicTrait<Type>::addition };
324 template<
typename VT >
326 struct VectorizedSubAssign {
327 enum { value = vectorizable && VT::vectorizable &&
328 IsSame<Type,typename VT::ElementType>::value &&
329 IntrinsicTrait<Type>::subtraction };
336 template<
typename VT >
338 struct VectorizedMultAssign {
339 enum { value = vectorizable && VT::vectorizable &&
340 IsSame<Type,typename VT::ElementType>::value &&
341 IntrinsicTrait<Type>::multiplication };
350 template<
typename Other >
inline bool canAlias (
const Other* alias )
const;
351 template<
typename Other >
inline bool isAliased(
const Other* alias )
const;
361 template<
typename VT >
362 inline typename DisableIf< VectorizedAssign<VT> >::Type
363 assign(
const DenseVector<VT,TF>& rhs );
365 template<
typename VT >
366 inline typename EnableIf< VectorizedAssign<VT> >::Type
367 assign(
const DenseVector<VT,TF>& rhs );
369 template<
typename VT >
inline void assign(
const SparseVector<VT,TF>& rhs );
371 template<
typename VT >
372 inline typename DisableIf< VectorizedAddAssign<VT> >::Type
373 addAssign(
const DenseVector<VT,TF>& rhs );
375 template<
typename VT >
376 inline typename EnableIf< VectorizedAddAssign<VT> >::Type
377 addAssign(
const DenseVector<VT,TF>& rhs );
379 template<
typename VT >
inline void addAssign(
const SparseVector<VT,TF>& rhs );
381 template<
typename VT >
382 inline typename DisableIf< VectorizedSubAssign<VT> >::Type
383 subAssign(
const DenseVector<VT,TF>& rhs );
385 template<
typename VT >
386 inline typename EnableIf< VectorizedSubAssign<VT> >::Type
387 subAssign(
const DenseVector<VT,TF>& rhs );
389 template<
typename VT >
inline void subAssign(
const SparseVector<VT,TF>& rhs );
391 template<
typename VT >
392 inline typename DisableIf< VectorizedMultAssign<VT> >::Type
393 multAssign(
const DenseVector<VT,TF>& rhs );
395 template<
typename VT >
396 inline typename EnableIf< VectorizedMultAssign<VT> >::Type
397 multAssign(
const DenseVector<VT,TF>& rhs );
399 template<
typename VT >
inline void multAssign(
const SparseVector<VT,TF>& rhs );
444 template<
typename Type
454 for(
size_t i=0UL; i<NN; ++i )
471 template<
typename Type
481 throw std::invalid_argument(
"Invalid size for hybrid vector" );
484 for(
size_t i=0UL; i<NN; ++i )
502 template<
typename Type
512 throw std::invalid_argument(
"Invalid size for hybrid vector" );
514 for(
size_t i=0UL; i<n; ++i )
518 for(
size_t i=n; i<NN; ++i )
548 template<
typename Type
551 template<
typename Other >
559 throw std::invalid_argument(
"Invalid setup of hybrid vector" );
561 for(
size_t i=0UL; i<n; ++i )
565 for(
size_t i=n; i<NN; ++i )
590 template<
typename Type
593 template<
typename Other
602 for(
size_t i=0UL; i<M; ++i )
606 for(
size_t i=M; i<NN; ++i )
620 template<
typename Type
629 for(
size_t i=0UL; i<
size_; ++i )
633 for(
size_t i=size_; i<NN; ++i )
650 template<
typename Type
653 template<
typename VT >
656 , size_( (~v).
size() )
662 if( (~v).
size() > N )
663 throw std::invalid_argument(
"Invalid setup of hybrid vector" );
666 i<( IsNumeric<Type>::value ? NN :
size_ ); ++i ) {
691 template<
typename Type
711 template<
typename Type
730 template<
typename Type
747 template<
typename Type
762 template<
typename Type
777 template<
typename Type
792 template<
typename Type
807 template<
typename Type
823 template<
typename Type
839 template<
typename Type
877 template<
typename Type
880 template<
typename Other
888 for(
size_t i=0UL; i<M; ++i )
902 template<
typename Type
909 for(
size_t i=0UL; i<size_; ++i )
924 template<
typename Type
951 template<
typename Type
954 template<
typename VT >
959 if( (~rhs).
size() > N )
960 throw std::invalid_argument(
"Invalid assignment to hybrid vector" );
962 if( (~rhs).canAlias(
this ) ) {
988 template<
typename Type
991 template<
typename VT >
996 if( (~rhs).
size() != size_ )
997 throw std::invalid_argument(
"Vector sizes do not match" );
999 if( (~rhs).canAlias(
this ) ) {
1022 template<
typename Type
1025 template<
typename VT >
1030 if( (~rhs).
size() != size_ )
1031 throw std::invalid_argument(
"Vector sizes do not match" );
1033 if( (~rhs).canAlias(
this ) ) {
1057 template<
typename Type
1060 template<
typename VT >
1065 if( (~rhs).
size() != size_ )
1066 throw std::invalid_argument(
"Vector sizes do not match" );
1070 this->operator=( tmp );
1088 template<
typename Type
1091 template<
typename Other >
1097 assign( *
this, (*
this) * rhs );
1112 template<
typename Type
1115 template<
typename Other >
1123 assign( *
this, (*
this) / rhs );
1142 template<
typename Type
1157 template<
typename Type
1175 template<
typename Type
1180 size_t nonzeros( 0 );
1182 for(
size_t i=0UL; i<size_; ++i ) {
1197 template<
typename Type
1203 for(
size_t i=0UL; i<size_; ++i )
1216 template<
typename Type
1257 template<
typename Type
1265 throw std::invalid_argument(
"Invalid size for hybrid vector" );
1268 for(
size_t i=n; i<size_; ++i )
1291 template<
typename Type
1308 template<
typename Type
1311 template<
typename Other >
1314 for(
size_t i=0; i<size_; ++i )
1328 template<
typename Type
1335 const size_t maxsize(
max( size_, v.size_ ) );
1336 for(
size_t i=0UL; i<maxsize; ++i )
1337 swap( v_[i], v.v_[i] );
1338 swap( size_, v.size_ );
1361 template<
typename Type
1370 return allocate<HybridVector>( 1UL );
1385 template<
typename Type
1408 template<
typename Type
1417 return allocate<HybridVector>( 1UL );
1432 template<
typename Type
1451 template<
typename Type
1456 deallocate( static_cast<HybridVector*>( ptr ) );
1467 template<
typename Type
1472 deallocate( static_cast<HybridVector*>( ptr ) );
1483 template<
typename Type
1488 deallocate( static_cast<HybridVector*>( ptr ) );
1499 template<
typename Type
1504 deallocate( static_cast<HybridVector*>( ptr ) );
1527 template<
typename Type
1530 template<
typename Other >
1533 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
1548 template<
typename Type
1551 template<
typename Other >
1554 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
1568 template<
typename Type
1591 template<
typename Type
1605 return load( &v_[index] );
1623 template<
typename Type
1636 return loadu( &v_[index] );
1655 template<
typename Type
1668 store( &v_[index], value );
1687 template<
typename Type
1699 storeu( &v_[index], value );
1718 template<
typename Type
1731 stream( &v_[index], value );
1747 template<
typename Type
1750 template<
typename VT >
1756 for(
size_t i=0UL; i<size_; ++i )
1773 template<
typename Type
1776 template<
typename VT >
1786 for(
size_t i=0UL; i<size_; i+=
IT::size ) {
1804 template<
typename Type
1807 template<
typename VT >
1813 v_[element->index()] = element->value();
1829 template<
typename Type
1832 template<
typename VT >
1838 for(
size_t i=0UL; i<size_; ++i )
1855 template<
typename Type
1858 template<
typename VT >
1869 for(
size_t i=0UL; i<size_; i+=
IT::size ) {
1887 template<
typename Type
1890 template<
typename VT >
1896 v_[element->index()] += element->value();
1912 template<
typename Type
1915 template<
typename VT >
1921 for(
size_t i=0UL; i<size_; ++i )
1938 template<
typename Type
1941 template<
typename VT >
1952 for(
size_t i=0UL; i<size_; i+=
IT::size ) {
1970 template<
typename Type
1973 template<
typename VT >
1979 v_[element->index()] -= element->value();
1995 template<
typename Type
1998 template<
typename VT >
2004 for(
size_t i=0UL; i<size_; ++i )
2021 template<
typename Type
2024 template<
typename VT >
2035 for(
size_t i=0UL; i<size_; i+=
IT::size ) {
2053 template<
typename Type
2056 template<
typename VT >
2066 v_[element->index()] = tmp[element->index()] * element->value();
2091 template<
typename Type
2113 template<
typename Type,
size_t N,
bool TF >
2116 template<
typename Type,
size_t N,
bool TF >
2119 template<
typename Type,
size_t N,
bool TF >
2122 template<
typename Type,
size_t N,
bool TF >
2125 template<
typename Type,
size_t N,
bool TF >
2138 template<
typename Type
2155 template<
typename Type
2182 template<
typename Type
2187 return ( v.size() == 0UL );
2201 template<
typename Type
2220 template<
typename Type
2240 template<
typename T,
size_t N,
bool TF >
2241 struct IsResizable< HybridVector<T,N,TF> > :
public TrueType
2260 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2261 struct AddTrait< HybridVector<T1,M,TF>, StaticVector<T2,N,TF> >
2263 typedef StaticVector< typename AddTrait<T1,T2>::Type, N, TF > Type;
2266 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2267 struct AddTrait< StaticVector<T1,M,TF>, HybridVector<T2,N,TF> >
2269 typedef StaticVector< typename AddTrait<T1,T2>::Type, M, TF > Type;
2272 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2273 struct AddTrait< HybridVector<T1,M,TF>, HybridVector<T2,N,TF> >
2275 typedef HybridVector< typename AddTrait<T1,T2>::Type, ( M < N )?( M ):( N ), TF > Type;
2291 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2292 struct SubTrait< HybridVector<T1,M,TF>, StaticVector<T2,N,TF> >
2294 typedef StaticVector< typename SubTrait<T1,T2>::Type, N, TF > Type;
2297 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2298 struct SubTrait< StaticVector<T1,M,TF>, HybridVector<T2,N,TF> >
2300 typedef StaticVector< typename SubTrait<T1,T2>::Type, M, TF > Type;
2303 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2304 struct SubTrait< HybridVector<T1,M,TF>, HybridVector<T2,N,TF> >
2306 typedef HybridVector< typename SubTrait<T1,T2>::Type, ( M < N )?( M ):( N ), TF > Type;
2322 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2323 struct MultTrait< HybridVector<T1,N,TF>, T2 >
2325 typedef HybridVector< typename MultTrait<T1,T2>::Type, N, TF > Type;
2329 template<
typename T1,
typename T2,
size_t N,
bool TF >
2330 struct MultTrait< T1, HybridVector<T2,N,TF> >
2332 typedef HybridVector< typename MultTrait<T1,T2>::Type, N, TF > Type;
2336 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2337 struct MultTrait< HybridVector<T1,M,TF>, StaticVector<T2,N,TF> >
2339 typedef StaticVector< typename MultTrait<T1,T2>::Type, N, TF > Type;
2342 template<
typename T1,
size_t M,
typename T2,
size_t N >
2343 struct MultTrait< HybridVector<T1,M,false>, StaticVector<T2,N,true> >
2345 typedef DynamicMatrix< typename MultTrait<T1,T2>::Type,
false > Type;
2348 template<
typename T1,
size_t M,
typename T2,
size_t N >
2349 struct MultTrait< HybridVector<T1,M,true>, StaticVector<T2,N,false> >
2351 typedef typename MultTrait<T1,T2>::Type Type;
2354 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2355 struct MultTrait< StaticVector<T1,M,TF>, HybridVector<T2,N,TF> >
2357 typedef StaticVector< typename MultTrait<T1,T2>::Type, M, TF > Type;
2360 template<
typename T1,
size_t M,
typename T2,
size_t N >
2361 struct MultTrait< StaticVector<T1,M,false>, HybridVector<T2,N,true> >
2363 typedef DynamicMatrix< typename MultTrait<T1,T2>::Type,
false > Type;
2366 template<
typename T1,
size_t M,
typename T2,
size_t N >
2367 struct MultTrait< StaticVector<T1,M,true>, HybridVector<T2,N,false> >
2369 typedef typename MultTrait<T1,T2>::Type Type;
2372 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2373 struct MultTrait< HybridVector<T1,M,TF>, HybridVector<T2,N,TF> >
2375 typedef HybridVector< typename MultTrait<T1,T2>::Type, ( M < N )?( M ):( N ), TF > Type;
2378 template<
typename T1,
size_t M,
typename T2,
size_t N >
2379 struct MultTrait< HybridVector<T1,M,false>, HybridVector<T2,N,true> >
2381 typedef DynamicMatrix< typename MultTrait<T1,T2>::Type,
false > Type;
2384 template<
typename T1,
size_t M,
typename T2,
size_t N >
2385 struct MultTrait< HybridVector<T1,M,true>, HybridVector<T2,N,false> >
2387 typedef typename MultTrait<T1,T2>::Type Type;
2403 template<
typename T1,
size_t N,
typename T2 >
2404 struct CrossTrait< HybridVector<T1,N,false>, StaticVector<T2,3UL,false> >
2407 typedef typename MultTrait<T1,T2>::Type T;
2410 typedef StaticVector< typename SubTrait<T,T>::Type, 3UL,
false > Type;
2413 template<
typename T1,
typename T2,
size_t N >
2414 struct CrossTrait< StaticVector<T1,3UL,false>, HybridVector<T2,N,false> >
2417 typedef typename MultTrait<T1,T2>::Type T;
2420 typedef StaticVector< typename SubTrait<T,T>::Type, 3UL,
false > Type;
2423 template<
typename T1,
size_t M,
typename T2,
size_t N >
2424 struct CrossTrait< HybridVector<T1,M,false>, HybridVector<T2,N,false> >
2427 typedef typename MultTrait<T1,T2>::Type T;
2430 typedef StaticVector< typename SubTrait<T,T>::Type, 3UL,
false > Type;
2446 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2447 struct DivTrait< HybridVector<T1,N,TF>, T2 >
2449 typedef HybridVector< typename DivTrait<T1,T2>::Type, N, TF > Type;
2466 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2467 struct MathTrait< HybridVector<T1,N,TF>, HybridVector<T2,N,TF> >
2469 typedef StaticVector< typename MathTrait<T1,T2>::HighType, N, TF > HighType;
2470 typedef StaticVector< typename MathTrait<T1,T2>::LowType , N, TF > LowType;
2486 template<
typename T1,
size_t N,
bool TF >
2487 struct SubvectorTrait< HybridVector<T1,N,TF> >
2489 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 MT::ElementType max(const DenseMatrix< MT, SO > &dm)
Returns the largest element of the dense matrix.
Definition: DenseMatrix.h:994
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 swap(SymmetricMatrix< MT, SO, DF, NF > &a, SymmetricMatrix< MT, SO, DF, NF > &b)
Swapping the contents of two matrices.
Definition: SymmetricMatrix.h:195
BLAZE_ALWAYS_INLINE 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:879
HybridVector< ET, N, TF > Other
The type of the other HybridVector.
Definition: HybridVector.h:190
#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
void extend(size_t n, bool preserve=true)
Extending the size of the vector.
Definition: HybridVector.h:1294
Header file for the UNUSED_PARAMETER function template.
HybridVector()
The default constructor for HybridVector.
Definition: HybridVector.h:447
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:407
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector)
Returns the current size/dimension of the vector.
Definition: Vector.h:258
size_t capacity() const
Returns the maximum capacity of the vector.
Definition: HybridVector.h:1160
HybridVector< Type, N,!TF > TransposeType
Transpose type for expression template evaluations.
Definition: HybridVector.h:172
BLAZE_ALWAYS_INLINE MT::Iterator end(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:258
IntrinsicType load(size_t index) const
Aligned load of an intrinsic element of the vector.
Definition: HybridVector.h:1595
BLAZE_ALWAYS_INLINE 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:220
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:1690
bool isAligned() const
Returns whether the vector is properly aligned in memory.
Definition: HybridVector.h:1571
BLAZE_ALWAYS_INLINE EnableIf< IsIntegral< T >, Load< T, sizeof(T)> >::Type::Type load(const T *address)
Loads a vector of integral values.
Definition: Load.h:224
void UNUSED_PARAMETER(const T1 &)
Suppression of unused parameter warnings.
Definition: Unused.h:81
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:695
size_t nonZeros() const
Returns the number of non-zero elements in the vector.
Definition: HybridVector.h:1178
Type * Pointer
Pointer to a non-constant vector value.
Definition: HybridVector.h:179
Header file for memory allocation and deallocation functionality.
Constraint on the data type.
Iterator begin()
Returns an iterator to the first element of the hybrid vector.
Definition: HybridVector.h:765
IntrinsicType loadu(size_t index) const
Unaligned load of an intrinsic element of the vector.
Definition: HybridVector.h:1627
Efficient implementation of a dynamically sized vector with static memory.The HybridVector class temp...
Definition: Forward.h:57
const HybridVector & CompositeType
Data type for composite expression templates.
Definition: HybridVector.h:176
Rebind mechanism to obtain a HybridVector with different data/element type.
Definition: HybridVector.h:189
ConstIterator cbegin() const
Returns an iterator to the first element of the hybrid vector.
Definition: HybridVector.h:795
Header file for the DisableIf class template.
const Type * ConstPointer
Pointer to a constant vector value.
Definition: HybridVector.h:180
Header file for the multiplication trait.
ConstIterator cend() const
Returns an iterator just past the last element of the hybrid vector.
Definition: HybridVector.h:842
Header file for the clear shim.
Header file for nested template disabiguation.
void swap(CompressedMatrix< Type, SO > &a, CompressedMatrix< Type, SO > &b)
Swapping the contents of two compressed matrices.
Definition: CompressedMatrix.h:4754
Header file for all forward declarations of the math module.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2482
#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:1145
BLAZE_ALWAYS_INLINE 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:635
EnableIf< IsBuiltin< T > >::Type deallocate(T *address)
Deallocation of memory for built-in data types.
Definition: Memory.h:226
Header file for the DenseIterator class template.
BLAZE_ALWAYS_INLINE void clear(const NonNumericProxy< MT > &proxy)
Clearing the represented element.
Definition: NonNumericProxy.h:854
Header file for the subvector trait.
DenseIterator< const Type > ConstIterator
Iterator over constant elements.
Definition: HybridVector.h:182
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
BLAZE_ALWAYS_INLINE EnableIf< IsIntegral< T >, Loadu< T, sizeof(T)> >::Type::Type loadu(const T *address)
Loads a vector of integral values.
Definition: Loadu.h:221
const Type & ConstReference
Reference to a constant vector value.
Definition: HybridVector.h:178
Type ElementType
Type of the vector elements.
Definition: HybridVector.h:173
#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:695
BLAZE_ALWAYS_INLINE MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:195
BLAZE_ALWAYS_INLINE void resize(Matrix< MT, SO > &matrix, size_t rows, size_t columns, bool preserve=true)
Changing the size of the matrix.
Definition: Matrix.h:535
This ResultType
Result type for expression template evaluations.
Definition: HybridVector.h:171
void clear()
Clearing the vector.
Definition: HybridVector.h:1219
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:1721
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:174
void resize(size_t n, bool preserve=true)
Changing the size of the vector.
Definition: HybridVector.h:1260
DenseIterator< Type > Iterator
Iterator over non-constant elements.
Definition: HybridVector.h:181
Header file for the IsSparseVector type trait.
Intrinsic characteristics of data types.The IntrinsicTrait class template provides the intrinsic char...
Definition: IntrinsicTrait.h:749
Header file for run time assertion macros.
IntrinsicTrait< Type > IT
Intrinsic trait for the vector element type.
Definition: HybridVector.h:160
Header file for the addition trait.
const Type & ReturnType
Return type for expression template evaluations.
Definition: HybridVector.h:175
Header file for the cross product trait.
BLAZE_ALWAYS_INLINE 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:742
Header file for the division trait.
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
void move(DynamicMatrix< Type, SO > &dst, DynamicMatrix< Type, SO > &src)
Moving the contents of one dynamic matrix to another.
Definition: DynamicMatrix.h:4769
Header file for the AlignedArray implementation.
#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:2481
Header file for the isDefault shim.
BLAZE_ALWAYS_INLINE bool isDefault(const NonNumericProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: NonNumericProxy.h:874
Constraint on the data type.
BLAZE_ALWAYS_INLINE void reset(const NonNumericProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: NonNumericProxy.h:833
Pointer data()
Low-level data access to the vector elements.
Definition: HybridVector.h:733
void swap(HybridVector &v)
Swapping the contents of two hybrid vectors.
Definition: HybridVector.h:1331
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:1552
Type & Reference
Reference to a non-constant vector value.
Definition: HybridVector.h:177
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:1200
size_t size_
The current size/dimension of the vector.
Definition: HybridVector.h:413
Iterator end()
Returns an iterator just past the last element of the hybrid vector.
Definition: HybridVector.h:810
bool canAlias(const Other *alias) const
Returns whether the vector can alias with the given address alias.
Definition: HybridVector.h:1531
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:2473
Header file for basic type definitions.
BLAZE_ALWAYS_INLINE 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:218
boost::true_type TrueType
Type traits base class.The TrueType class is used as base class for type traits and value traits that...
Definition: TrueType.h:61
#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
BLAZE_ALWAYS_INLINE 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:225
Header file for the IsResizable type trait.
#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:1658
HybridVector< Type, N, TF > This
Type of this HybridVector instance.
Definition: HybridVector.h:170
BLAZE_ALWAYS_INLINE 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:849