26 #ifndef _BLAZE_MATH_DENSE_HYBRIDVECTOR_H_
27 #define _BLAZE_MATH_DENSE_HYBRIDVECTOR_H_
156 template<
typename Type
159 class HybridVector :
public DenseVector< HybridVector<Type,N,TF>, TF >
191 template<
typename ET >
209 enum { smpAssignable = 0 };
217 explicit inline HybridVector(
size_t n,
const Type& init );
218 template<
typename Other >
explicit inline HybridVector(
size_t n,
const Other* array );
220 template<
typename Other,
size_t M >
221 explicit inline HybridVector(
const Other (&array)[M] );
224 template<
typename VT >
inline HybridVector(
const Vector<VT,TF>& v );
236 inline ConstReference
operator[](
size_t index )
const;
237 inline Pointer
data ();
238 inline ConstPointer
data ()
const;
239 inline Iterator
begin ();
240 inline ConstIterator
begin ()
const;
241 inline ConstIterator
cbegin()
const;
242 inline Iterator
end ();
243 inline ConstIterator
end ()
const;
244 inline ConstIterator
cend ()
const;
251 template<
typename Other,
size_t M >
252 inline HybridVector& operator=(
const Other (&array)[M] );
256 template<
typename VT >
inline HybridVector& operator= (
const Vector<VT,TF>& rhs );
257 template<
typename VT >
inline HybridVector& operator+=(
const Vector<VT,TF>& rhs );
258 template<
typename VT >
inline HybridVector& operator-=(
const Vector<VT,TF>& rhs );
259 template<
typename VT >
inline HybridVector& operator*=(
const Vector<VT,TF>& rhs );
261 template<
typename Other >
262 inline typename EnableIf< IsNumeric<Other>,
HybridVector >::Type&
263 operator*=( Other rhs );
265 template<
typename Other >
266 inline typename EnableIf< IsNumeric<Other>,
HybridVector >::Type&
267 operator/=( Other rhs );
274 inline size_t size()
const;
279 inline void resize(
size_t n,
bool preserve=
true );
280 inline void extend(
size_t n,
bool preserve=
true );
281 template<
typename Other >
inline HybridVector& scale(
const Other& scalar );
289 static inline void*
operator new ( std::size_t
size );
290 static inline void*
operator new[]( std::size_t
size );
291 static inline void*
operator new ( std::size_t
size,
const std::nothrow_t& );
292 static inline void*
operator new[]( std::size_t
size,
const std::nothrow_t& );
294 static inline void operator delete (
void* ptr );
295 static inline void operator delete[](
void* ptr );
296 static inline void operator delete (
void* ptr,
const std::nothrow_t& );
297 static inline void operator delete[](
void* ptr,
const std::nothrow_t& );
304 template<
typename VT >
306 struct VectorizedAssign {
307 enum { value = vectorizable && VT::vectorizable &&
308 IsSame<Type,typename VT::ElementType>::value };
315 template<
typename VT >
317 struct VectorizedAddAssign {
318 enum { value = vectorizable && VT::vectorizable &&
319 IsSame<Type,typename VT::ElementType>::value &&
320 IntrinsicTrait<Type>::addition };
327 template<
typename VT >
329 struct VectorizedSubAssign {
330 enum { value = vectorizable && VT::vectorizable &&
331 IsSame<Type,typename VT::ElementType>::value &&
332 IntrinsicTrait<Type>::subtraction };
339 template<
typename VT >
341 struct VectorizedMultAssign {
342 enum { value = vectorizable && VT::vectorizable &&
343 IsSame<Type,typename VT::ElementType>::value &&
344 IntrinsicTrait<Type>::multiplication };
353 template<
typename Other >
inline bool canAlias (
const Other* alias )
const;
354 template<
typename Other >
inline bool isAliased(
const Other* alias )
const;
365 template<
typename VT >
366 inline typename DisableIf< VectorizedAssign<VT> >::Type
367 assign(
const DenseVector<VT,TF>& rhs );
369 template<
typename VT >
370 inline typename EnableIf< VectorizedAssign<VT> >::Type
371 assign(
const DenseVector<VT,TF>& rhs );
373 template<
typename VT >
inline void assign(
const SparseVector<VT,TF>& rhs );
375 template<
typename VT >
376 inline typename DisableIf< VectorizedAddAssign<VT> >::Type
377 addAssign(
const DenseVector<VT,TF>& rhs );
379 template<
typename VT >
380 inline typename EnableIf< VectorizedAddAssign<VT> >::Type
381 addAssign(
const DenseVector<VT,TF>& rhs );
383 template<
typename VT >
inline void addAssign(
const SparseVector<VT,TF>& rhs );
385 template<
typename VT >
386 inline typename DisableIf< VectorizedSubAssign<VT> >::Type
387 subAssign(
const DenseVector<VT,TF>& rhs );
389 template<
typename VT >
390 inline typename EnableIf< VectorizedSubAssign<VT> >::Type
391 subAssign(
const DenseVector<VT,TF>& rhs );
393 template<
typename VT >
inline void subAssign(
const SparseVector<VT,TF>& rhs );
395 template<
typename VT >
396 inline typename DisableIf< VectorizedMultAssign<VT> >::Type
397 multAssign(
const DenseVector<VT,TF>& rhs );
399 template<
typename VT >
400 inline typename EnableIf< VectorizedMultAssign<VT> >::Type
401 multAssign(
const DenseVector<VT,TF>& rhs );
403 template<
typename VT >
inline void multAssign(
const SparseVector<VT,TF>& rhs );
448 template<
typename Type
458 for(
size_t i=0UL; i<NN; ++i )
475 template<
typename Type
485 throw std::invalid_argument(
"Invalid size for hybrid vector" );
488 for(
size_t i=0UL; i<NN; ++i )
506 template<
typename Type
516 throw std::invalid_argument(
"Invalid size for hybrid vector" );
518 for(
size_t i=0UL; i<n; ++i )
522 for(
size_t i=n; i<NN; ++i )
552 template<
typename Type
555 template<
typename Other >
563 throw std::invalid_argument(
"Invalid setup of hybrid vector" );
565 for(
size_t i=0UL; i<n; ++i )
569 for(
size_t i=n; i<NN; ++i )
594 template<
typename Type
597 template<
typename Other
606 for(
size_t i=0UL; i<M; ++i )
610 for(
size_t i=M; i<NN; ++i )
624 template<
typename Type
633 for(
size_t i=0UL; i<
size_; ++i )
637 for(
size_t i=size_; i<NN; ++i )
654 template<
typename Type
657 template<
typename VT >
660 , size_( (~v).
size() )
666 if( (~v).
size() > N )
667 throw std::invalid_argument(
"Invalid setup of hybrid vector" );
670 i<( IsNumeric<Type>::value ? NN :
size_ ); ++i ) {
695 template<
typename Type
715 template<
typename Type
734 template<
typename Type
751 template<
typename Type
766 template<
typename Type
781 template<
typename Type
796 template<
typename Type
811 template<
typename Type
827 template<
typename Type
843 template<
typename Type
881 template<
typename Type
884 template<
typename Other
892 for(
size_t i=0UL; i<M; ++i )
906 template<
typename Type
913 for(
size_t i=0UL; i<size_; ++i )
928 template<
typename Type
955 template<
typename Type
958 template<
typename VT >
963 if( (~rhs).
size() > N )
964 throw std::invalid_argument(
"Invalid assignment to hybrid vector" );
966 if( (~rhs).canAlias(
this ) ) {
992 template<
typename Type
995 template<
typename VT >
1000 if( (~rhs).
size() != size_ )
1001 throw std::invalid_argument(
"Vector sizes do not match" );
1003 if( (~rhs).canAlias(
this ) ) {
1026 template<
typename Type
1029 template<
typename VT >
1034 if( (~rhs).
size() != size_ )
1035 throw std::invalid_argument(
"Vector sizes do not match" );
1037 if( (~rhs).canAlias(
this ) ) {
1061 template<
typename Type
1064 template<
typename VT >
1069 if( (~rhs).
size() != size_ )
1070 throw std::invalid_argument(
"Vector sizes do not match" );
1074 this->operator=( tmp );
1092 template<
typename Type
1095 template<
typename Other >
1101 assign( *
this, (*
this) * rhs );
1116 template<
typename Type
1119 template<
typename Other >
1127 assign( *
this, (*
this) / rhs );
1146 template<
typename Type
1161 template<
typename Type
1179 template<
typename Type
1184 size_t nonzeros( 0 );
1186 for(
size_t i=0UL; i<size_; ++i ) {
1201 template<
typename Type
1207 for(
size_t i=0UL; i<size_; ++i )
1220 template<
typename Type
1261 template<
typename Type
1269 throw std::invalid_argument(
"Invalid size for hybrid vector" );
1272 for(
size_t i=n; i<size_; ++i )
1295 template<
typename Type
1312 template<
typename Type
1315 template<
typename Other >
1318 for(
size_t i=0; i<size_; ++i )
1332 template<
typename Type
1339 const size_t maxsize(
max( size_, v.size_ ) );
1340 for(
size_t i=0UL; i<maxsize; ++i )
1341 swap( v_[i], v.v_[i] );
1342 swap( size_, v.size_ );
1365 template<
typename Type
1374 return allocate<HybridVector>( 1UL );
1389 template<
typename Type
1412 template<
typename Type
1421 return allocate<HybridVector>( 1UL );
1436 template<
typename Type
1444 return allocate<HybridVector>( size/
sizeof(
HybridVector) );
1455 template<
typename Type
1460 deallocate( static_cast<HybridVector*>( ptr ) );
1471 template<
typename Type
1476 deallocate( static_cast<HybridVector*>( ptr ) );
1487 template<
typename Type
1492 deallocate( static_cast<HybridVector*>( ptr ) );
1503 template<
typename Type
1508 deallocate( static_cast<HybridVector*>( ptr ) );
1531 template<
typename Type
1534 template<
typename Other >
1537 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
1552 template<
typename Type
1555 template<
typename Other >
1558 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
1572 template<
typename Type
1595 template<
typename Type
1609 return load( &v_[index] );
1627 template<
typename Type
1640 return loadu( &v_[index] );
1659 template<
typename Type
1672 store( &v_[index], value );
1691 template<
typename Type
1703 storeu( &v_[index], value );
1722 template<
typename Type
1735 stream( &v_[index], value );
1751 template<
typename Type
1754 template<
typename VT >
1760 for(
size_t i=0UL; i<size_; ++i )
1777 template<
typename Type
1780 template<
typename VT >
1790 for(
size_t i=0UL; i<size_; i+=
IT::size ) {
1808 template<
typename Type
1811 template<
typename VT >
1817 v_[element->index()] = element->value();
1833 template<
typename Type
1836 template<
typename VT >
1842 for(
size_t i=0UL; i<size_; ++i )
1859 template<
typename Type
1862 template<
typename VT >
1873 for(
size_t i=0UL; i<size_; i+=
IT::size ) {
1891 template<
typename Type
1894 template<
typename VT >
1900 v_[element->index()] += element->value();
1916 template<
typename Type
1919 template<
typename VT >
1925 for(
size_t i=0UL; i<size_; ++i )
1942 template<
typename Type
1945 template<
typename VT >
1956 for(
size_t i=0UL; i<size_; i+=
IT::size ) {
1974 template<
typename Type
1977 template<
typename VT >
1983 v_[element->index()] -= element->value();
1999 template<
typename Type
2002 template<
typename VT >
2008 for(
size_t i=0UL; i<size_; ++i )
2025 template<
typename Type
2028 template<
typename VT >
2039 for(
size_t i=0UL; i<size_; i+=
IT::size ) {
2057 template<
typename Type
2060 template<
typename VT >
2070 v_[element->index()] = tmp[element->index()] * element->value();
2095 template<
typename Type
2117 template<
typename Type,
size_t N,
bool TF >
2120 template<
typename Type,
size_t N,
bool TF >
2123 template<
typename Type,
size_t N,
bool TF >
2126 template<
typename Type,
size_t N,
bool TF >
2129 template<
typename Type,
size_t N,
bool TF >
2142 template<
typename Type
2159 template<
typename Type
2186 template<
typename Type
2191 return ( v.size() == 0UL );
2205 template<
typename Type
2224 template<
typename Type
2244 template<
typename T,
size_t N,
bool TF >
2245 struct HasConstDataAccess< HybridVector<T,N,TF> > :
public TrueType
2264 template<
typename T,
size_t N,
bool TF >
2265 struct HasMutableDataAccess< HybridVector<T,N,TF> > :
public TrueType
2284 template<
typename T,
size_t N,
bool TF >
2285 struct IsResizable< HybridVector<T,N,TF> > :
public TrueType
2304 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2305 struct AddTrait< HybridVector<T1,M,TF>, StaticVector<T2,N,TF> >
2307 typedef StaticVector< typename AddTrait<T1,T2>::Type, N, TF > Type;
2310 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2311 struct AddTrait< StaticVector<T1,M,TF>, HybridVector<T2,N,TF> >
2313 typedef StaticVector< typename AddTrait<T1,T2>::Type, M, TF > Type;
2316 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2317 struct AddTrait< HybridVector<T1,M,TF>, HybridVector<T2,N,TF> >
2319 typedef HybridVector< typename AddTrait<T1,T2>::Type, ( M < N )?( M ):( N ), TF > Type;
2335 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2336 struct SubTrait< HybridVector<T1,M,TF>, StaticVector<T2,N,TF> >
2338 typedef StaticVector< typename SubTrait<T1,T2>::Type, N, TF > Type;
2341 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2342 struct SubTrait< StaticVector<T1,M,TF>, HybridVector<T2,N,TF> >
2344 typedef StaticVector< typename SubTrait<T1,T2>::Type, M, TF > Type;
2347 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2348 struct SubTrait< HybridVector<T1,M,TF>, HybridVector<T2,N,TF> >
2350 typedef HybridVector< typename SubTrait<T1,T2>::Type, ( M < N )?( M ):( N ), TF > Type;
2366 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2367 struct MultTrait< HybridVector<T1,N,TF>, T2 >
2369 typedef HybridVector< typename MultTrait<T1,T2>::Type, N, TF > Type;
2373 template<
typename T1,
typename T2,
size_t N,
bool TF >
2374 struct MultTrait< T1, HybridVector<T2,N,TF> >
2376 typedef HybridVector< typename MultTrait<T1,T2>::Type, N, TF > Type;
2380 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2381 struct MultTrait< HybridVector<T1,M,TF>, StaticVector<T2,N,TF> >
2383 typedef StaticVector< typename MultTrait<T1,T2>::Type, N, TF > Type;
2386 template<
typename T1,
size_t M,
typename T2,
size_t N >
2387 struct MultTrait< HybridVector<T1,M,false>, StaticVector<T2,N,true> >
2389 typedef DynamicMatrix< typename MultTrait<T1,T2>::Type,
false > Type;
2392 template<
typename T1,
size_t M,
typename T2,
size_t N >
2393 struct MultTrait< HybridVector<T1,M,true>, StaticVector<T2,N,false> >
2395 typedef typename MultTrait<T1,T2>::Type Type;
2398 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2399 struct MultTrait< StaticVector<T1,M,TF>, HybridVector<T2,N,TF> >
2401 typedef StaticVector< typename MultTrait<T1,T2>::Type, M, TF > Type;
2404 template<
typename T1,
size_t M,
typename T2,
size_t N >
2405 struct MultTrait< StaticVector<T1,M,false>, HybridVector<T2,N,true> >
2407 typedef DynamicMatrix< typename MultTrait<T1,T2>::Type,
false > Type;
2410 template<
typename T1,
size_t M,
typename T2,
size_t N >
2411 struct MultTrait< StaticVector<T1,M,true>, HybridVector<T2,N,false> >
2413 typedef typename MultTrait<T1,T2>::Type Type;
2416 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2417 struct MultTrait< HybridVector<T1,M,TF>, HybridVector<T2,N,TF> >
2419 typedef HybridVector< typename MultTrait<T1,T2>::Type, ( M < N )?( M ):( N ), TF > Type;
2422 template<
typename T1,
size_t M,
typename T2,
size_t N >
2423 struct MultTrait< HybridVector<T1,M,false>, HybridVector<T2,N,true> >
2425 typedef DynamicMatrix< typename MultTrait<T1,T2>::Type,
false > Type;
2428 template<
typename T1,
size_t M,
typename T2,
size_t N >
2429 struct MultTrait< HybridVector<T1,M,true>, HybridVector<T2,N,false> >
2431 typedef typename MultTrait<T1,T2>::Type Type;
2447 template<
typename T1,
size_t N,
typename T2 >
2448 struct CrossTrait< HybridVector<T1,N,false>, StaticVector<T2,3UL,false> >
2451 typedef typename MultTrait<T1,T2>::Type T;
2454 typedef StaticVector< typename SubTrait<T,T>::Type, 3UL,
false > Type;
2457 template<
typename T1,
typename T2,
size_t N >
2458 struct CrossTrait< StaticVector<T1,3UL,false>, HybridVector<T2,N,false> >
2461 typedef typename MultTrait<T1,T2>::Type T;
2464 typedef StaticVector< typename SubTrait<T,T>::Type, 3UL,
false > Type;
2467 template<
typename T1,
size_t M,
typename T2,
size_t N >
2468 struct CrossTrait< HybridVector<T1,M,false>, HybridVector<T2,N,false> >
2471 typedef typename MultTrait<T1,T2>::Type T;
2474 typedef StaticVector< typename SubTrait<T,T>::Type, 3UL,
false > Type;
2490 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2491 struct DivTrait< HybridVector<T1,N,TF>, T2 >
2493 typedef HybridVector< typename DivTrait<T1,T2>::Type, N, TF > Type;
2510 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2511 struct MathTrait< HybridVector<T1,N,TF>, HybridVector<T2,N,TF> >
2513 typedef StaticVector< typename MathTrait<T1,T2>::HighType, N, TF > HighType;
2514 typedef StaticVector< typename MathTrait<T1,T2>::LowType , N, TF > LowType;
2530 template<
typename T1,
size_t N,
bool TF >
2531 struct SubvectorTrait< HybridVector<T1,N,TF> >
2533 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
IntrinsicTrait< Type > IT
Intrinsic trait for the vector element type.
Definition: HybridVector.h:163
const MT::ElementType max(const DenseMatrix< MT, SO > &dm)
Returns the largest element of the dense matrix.
Definition: DenseMatrix.h:1649
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.
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
#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:1298
Header file for the UNUSED_PARAMETER function template.
HybridVector()
The default constructor for HybridVector.
Definition: HybridVector.h:451
Header file for the subtraction trait.
Header file for basic type definitions.
Header file for the SparseVector base class.
BLAZE_ALWAYS_INLINE void stream(size_t index, const IntrinsicType &value)
Aligned, non-temporal store of an intrinsic element of the vector.
Definition: HybridVector.h:1725
AlignedArray< Type, NN > v_
The statically allocated vector elements.
Definition: HybridVector.h:411
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector)
Returns the current size/dimension of the vector.
Definition: Vector.h:264
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > > >::Type stream(T *address, const sse_int16_t &value)
Aligned, non-temporal store of a vector of 2-byte integral values.
Definition: Stream.h:76
size_t capacity() const
Returns the maximum capacity of the vector.
Definition: HybridVector.h:1164
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
BLAZE_ALWAYS_INLINE IntrinsicType loadu(size_t index) const
Unaligned load of an intrinsic element of the vector.
Definition: HybridVector.h:1631
Header file for the IsSame and IsStrictlySame type traits.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:821
bool isAligned() const
Returns whether the vector is properly aligned in memory.
Definition: HybridVector.h:1575
Type ElementType
Type of the vector elements.
Definition: HybridVector.h:176
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:699
size_t nonZeros() const
Returns the number of non-zero elements in the vector.
Definition: HybridVector.h:1182
Header file for memory allocation and deallocation functionality.
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:861
Constraint on the data type.
Iterator begin()
Returns an iterator to the first element of the hybrid vector.
Definition: HybridVector.h:769
Efficient implementation of a dynamically sized vector with static memory.The HybridVector class temp...
Definition: Forward.h:57
HybridVector< Type, N,!TF > TransposeType
Transpose type for expression template evaluations.
Definition: HybridVector.h:175
Rebind mechanism to obtain a HybridVector with different data/element type.
Definition: HybridVector.h:192
ConstIterator cbegin() const
Returns an iterator to the first element of the hybrid vector.
Definition: HybridVector.h:799
Header file for the DisableIf class template.
HybridVector< ET, N, TF > Other
The type of the other HybridVector.
Definition: HybridVector.h:193
Header file for the multiplication trait.
ConstIterator cend() const
Returns an iterator just past the last element of the hybrid vector.
Definition: HybridVector.h:846
Header file for the clear shim.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > >, sse_int16_t >::Type loadu(const T *address)
Loads a vector of 2-byte integral values.
Definition: Loadu.h:76
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:4807
Header file for all forward declarations of the math module.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2511
#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
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > > >::Type store(T *address, const sse_int16_t &value)
Aligned store of a vector of 2-byte integral values.
Definition: Store.h:80
DenseIterator< const Type > ConstIterator
Iterator over constant elements.
Definition: HybridVector.h:185
size_t size() const
Returns the current size/dimension of the vector.
Definition: HybridVector.h:1149
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 store(size_t index, const IntrinsicType &value)
Aligned store of an intrinsic element of the vector.
Definition: HybridVector.h:1662
Header file for the subvector trait.
Constraint on the data type.
DenseIterator< Type > Iterator
Iterator over non-constant elements.
Definition: HybridVector.h:184
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
#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:699
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
const Type * ConstPointer
Pointer to a constant vector value.
Definition: HybridVector.h:183
void clear()
Clearing the vector.
Definition: HybridVector.h:1223
const Type & ReturnType
Return type for expression template evaluations.
Definition: HybridVector.h:178
Header file for the EnableIf class template.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:841
Header file for the serial shim.
Header file for the IsVectorizable type trait.
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > >, sse_int16_t >::Type load(const T *address)
Loads a vector of 2-byte integral values.
Definition: Load.h:79
Header file for the IsNumeric type trait.
Header file for the HasConstDataAccess type trait.
void resize(size_t n, bool preserve=true)
Changing the size of the vector.
Definition: HybridVector.h:1264
size_t size_
The current size/dimension of the vector.
Definition: HybridVector.h:417
BLAZE_ALWAYS_INLINE void storeu(size_t index, const IntrinsicType &value)
Unaligned store of an intrinsic element of the vector.
Definition: HybridVector.h:1694
Header file for the IsSparseVector type trait.
Intrinsic characteristics of data types.The IntrinsicTrait class template provides the intrinsic char...
Definition: IntrinsicTrait.h:749
const HybridVector & CompositeType
Data type for composite expression templates.
Definition: HybridVector.h:179
Header file for run time assertion macros.
Type * Pointer
Pointer to a non-constant vector value.
Definition: HybridVector.h:182
Header file for the addition trait.
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
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > > >::Type storeu(T *address, const sse_int16_t &value)
Unaligned store of a vector of 2-byte integral values.
Definition: Storeu.h:77
void move(DynamicMatrix< Type, SO > &dst, DynamicMatrix< Type, SO > &src)
Moving the contents of one dynamic matrix to another.
Definition: DynamicMatrix.h:4934
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:2510
Header file for the isDefault shim.
Constraint on the data type.
Header file for the HasMutableDataAccess type trait.
Pointer data()
Low-level data access to the vector elements.
Definition: HybridVector.h:737
void swap(HybridVector &v)
Swapping the contents of two hybrid vectors.
Definition: HybridVector.h:1335
Substitution Failure Is Not An Error (SFINAE) class.The DisableIf class template is an auxiliary tool...
Definition: DisableIf.h:184
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b)
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:200
bool isAliased(const Other *alias) const
Returns whether the vector is aliased with the given address alias.
Definition: HybridVector.h:1556
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.
Type & Reference
Reference to a non-constant vector value.
Definition: HybridVector.h:180
void reset()
Reset to the default initial values.
Definition: HybridVector.h:1204
HybridVector< Type, N, TF > This
Type of this HybridVector instance.
Definition: HybridVector.h:173
Iterator end()
Returns an iterator just past the last element of the hybrid vector.
Definition: HybridVector.h:814
Base class for N-dimensional vectors.The Vector class is a base class for all arbitrarily sized (N-di...
Definition: Forward.h:151
const Type & ConstReference
Reference to a constant vector value.
Definition: HybridVector.h:181
bool canAlias(const Other *alias) const
Returns whether the vector can alias with the given address alias.
Definition: HybridVector.h:1535
Header file for the default transpose flag for all vectors of the Blaze library.
IT::Type IntrinsicType
Intrinsic type of the vector elements.
Definition: HybridVector.h:177
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:2502
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
BLAZE_ALWAYS_INLINE IntrinsicType load(size_t index) const
Aligned load of an intrinsic element of the vector.
Definition: HybridVector.h:1599
#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
Header file for the IsResizable type trait.
System settings for the inline keywords.
#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
This ResultType
Result type for expression template evaluations.
Definition: HybridVector.h:174
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