35 #ifndef _BLAZE_MATH_DENSE_STATICVECTOR_H_
36 #define _BLAZE_MATH_DENSE_STATICVECTOR_H_
160 template<
typename Type
163 class StaticVector :
public DenseVector< StaticVector<Type,N,TF>, TF >
195 template<
typename ET >
213 enum { smpAssignable = 0 };
221 template<
typename Other >
explicit inline StaticVector(
size_t n,
const Other* array );
223 template<
typename Other >
224 explicit inline StaticVector(
const Other (&array)[N] );
227 template<
typename Other >
inline StaticVector(
const StaticVector<Other,N,TF>& v );
228 template<
typename VT >
inline StaticVector(
const Vector<VT,TF>& v );
231 inline StaticVector(
const Type& v1,
const Type& v2,
const Type& v3 );
232 inline StaticVector(
const Type& v1,
const Type& v2,
const Type& v3,
const Type& v4 );
233 inline StaticVector(
const Type& v1,
const Type& v2,
const Type& v3,
234 const Type& v4,
const Type& v5 );
235 inline StaticVector(
const Type& v1,
const Type& v2,
const Type& v3,
236 const Type& v4,
const Type& v5,
const Type& v6 );
248 inline ConstReference
operator[](
size_t index )
const;
249 inline Pointer
data ();
250 inline ConstPointer
data ()
const;
251 inline Iterator
begin ();
252 inline ConstIterator
begin ()
const;
253 inline ConstIterator
cbegin()
const;
254 inline Iterator
end ();
255 inline ConstIterator
end ()
const;
256 inline ConstIterator
cend ()
const;
263 template<
typename Other >
264 inline StaticVector& operator=(
const Other (&array)[N] );
268 template<
typename Other >
inline StaticVector& operator= (
const StaticVector<Other,N,TF>& rhs );
269 template<
typename VT >
inline StaticVector& operator= (
const Vector<VT,TF>& rhs );
270 template<
typename VT >
inline StaticVector& operator+=(
const Vector<VT,TF>& rhs );
271 template<
typename VT >
inline StaticVector& operator-=(
const Vector<VT,TF>& rhs );
272 template<
typename VT >
inline StaticVector& operator*=(
const Vector<VT,TF>& rhs );
274 template<
typename Other >
275 inline typename EnableIf< IsNumeric<Other>,
StaticVector >::Type&
276 operator*=( Other rhs );
278 template<
typename Other >
279 inline typename EnableIf< IsNumeric<Other>,
StaticVector >::Type&
280 operator/=( Other rhs );
287 inline size_t size()
const;
291 template<
typename Other >
inline StaticVector& scale(
const Other& scalar );
299 static inline void*
operator new ( std::size_t
size );
300 static inline void*
operator new[]( std::size_t
size );
301 static inline void*
operator new ( std::size_t
size,
const std::nothrow_t& );
302 static inline void*
operator new[]( std::size_t
size,
const std::nothrow_t& );
304 static inline void operator delete (
void* ptr );
305 static inline void operator delete[](
void* ptr );
306 static inline void operator delete (
void* ptr,
const std::nothrow_t& );
307 static inline void operator delete[](
void* ptr,
const std::nothrow_t& );
314 template<
typename VT >
316 struct VectorizedAssign {
317 enum { value = vectorizable && VT::vectorizable &&
318 IsSame<Type,typename VT::ElementType>::value };
325 template<
typename VT >
327 struct VectorizedAddAssign {
328 enum { value = vectorizable && VT::vectorizable &&
329 IsSame<Type,typename VT::ElementType>::value &&
330 IntrinsicTrait<Type>::addition };
337 template<
typename VT >
339 struct VectorizedSubAssign {
340 enum { value = vectorizable && VT::vectorizable &&
341 IsSame<Type,typename VT::ElementType>::value &&
342 IntrinsicTrait<Type>::subtraction };
349 template<
typename VT >
351 struct VectorizedMultAssign {
352 enum { value = vectorizable && VT::vectorizable &&
353 IsSame<Type,typename VT::ElementType>::value &&
354 IntrinsicTrait<Type>::multiplication };
363 template<
typename Other >
inline bool canAlias (
const Other* alias )
const;
364 template<
typename Other >
inline bool isAliased(
const Other* alias )
const;
375 template<
typename VT >
376 inline typename DisableIf< VectorizedAssign<VT> >::Type
377 assign(
const DenseVector<VT,TF>& rhs );
379 template<
typename VT >
380 inline typename EnableIf< VectorizedAssign<VT> >::Type
381 assign(
const DenseVector<VT,TF>& rhs );
383 template<
typename VT >
inline void assign(
const SparseVector<VT,TF>& rhs );
385 template<
typename VT >
386 inline typename DisableIf< VectorizedAddAssign<VT> >::Type
387 addAssign(
const DenseVector<VT,TF>& rhs );
389 template<
typename VT >
390 inline typename EnableIf< VectorizedAddAssign<VT> >::Type
391 addAssign(
const DenseVector<VT,TF>& rhs );
393 template<
typename VT >
inline void addAssign(
const SparseVector<VT,TF>& rhs );
395 template<
typename VT >
396 inline typename DisableIf< VectorizedSubAssign<VT> >::Type
397 subAssign(
const DenseVector<VT,TF>& rhs );
399 template<
typename VT >
400 inline typename EnableIf< VectorizedSubAssign<VT> >::Type
401 subAssign(
const DenseVector<VT,TF>& rhs );
403 template<
typename VT >
inline void subAssign(
const SparseVector<VT,TF>& rhs );
405 template<
typename VT >
406 inline typename DisableIf< VectorizedMultAssign<VT> >::Type
407 multAssign(
const DenseVector<VT,TF>& rhs );
409 template<
typename VT >
410 inline typename EnableIf< VectorizedMultAssign<VT> >::Type
411 multAssign(
const DenseVector<VT,TF>& rhs );
413 template<
typename VT >
inline void multAssign(
const SparseVector<VT,TF>& rhs );
457 template<
typename Type
466 for(
size_t i=0UL; i<NN; ++i )
478 template<
typename Type
486 for(
size_t i=0UL; i<N; ++i )
489 for(
size_t i=N; i<NN; ++i )
517 template<
typename Type
520 template<
typename Other >
527 throw std::invalid_argument(
"Invalid setup of static vector" );
529 for(
size_t i=0UL; i<n; ++i )
533 for(
size_t i=n; i<NN; ++i )
556 template<
typename Type
559 template<
typename Other >
565 for(
size_t i=0UL; i<N; ++i )
568 for(
size_t i=N; i<NN; ++i )
581 template<
typename Type
589 for(
size_t i=0UL; i<NN; ++i )
600 template<
typename Type
603 template<
typename Other >
609 for(
size_t i=0UL; i<N; ++i )
612 for(
size_t i=N; i<NN; ++i )
628 template<
typename Type
631 template<
typename VT >
639 if( (~v).
size() != N )
640 throw std::invalid_argument(
"Invalid setup of static vector" );
663 template<
typename Type
675 for(
size_t i=N; i<NN; ++i )
694 template<
typename Type
707 for(
size_t i=N; i<NN; ++i )
727 template<
typename Type
731 const Type& v3,
const Type& v4 )
742 for(
size_t i=N; i<NN; ++i )
763 template<
typename Type
767 const Type& v4,
const Type& v5 )
779 for(
size_t i=N; i<NN; ++i )
801 template<
typename Type
805 const Type& v4,
const Type& v5,
const Type& v6 )
818 for(
size_t i=N; i<NN; ++i )
840 template<
typename Type
860 template<
typename Type
879 template<
typename Type
896 template<
typename Type
911 template<
typename Type
926 template<
typename Type
941 template<
typename Type
956 template<
typename Type
971 template<
typename Type
986 template<
typename Type
1021 template<
typename Type
1024 template<
typename Other >
1027 for(
size_t i=0UL; i<N; ++i )
1040 template<
typename Type
1045 for(
size_t i=0UL; i<N; ++i )
1060 template<
typename Type
1079 template<
typename Type
1082 template<
typename Other >
1103 template<
typename Type
1106 template<
typename VT >
1111 if( (~rhs).
size() != N )
1112 throw std::invalid_argument(
"Invalid assignment to static vector" );
1114 if( (~rhs).canAlias(
this ) ) {
1139 template<
typename Type
1142 template<
typename VT >
1147 if( (~rhs).
size() != N )
1148 throw std::invalid_argument(
"Vector sizes do not match" );
1150 if( (~rhs).canAlias(
this ) ) {
1173 template<
typename Type
1176 template<
typename VT >
1181 if( (~rhs).
size() != N )
1182 throw std::invalid_argument(
"Vector sizes do not match" );
1184 if( (~rhs).canAlias(
this ) ) {
1208 template<
typename Type
1211 template<
typename VT >
1216 if( (~rhs).
size() != N )
1217 throw std::invalid_argument(
"Vector sizes do not match" );
1221 this->operator=( tmp );
1239 template<
typename Type
1242 template<
typename Other >
1248 assign( *
this, (*
this) * rhs );
1263 template<
typename Type
1266 template<
typename Other >
1274 assign( *
this, (*
this) / rhs );
1293 template<
typename Type
1308 template<
typename Type
1326 template<
typename Type
1331 size_t nonzeros( 0 );
1333 for(
size_t i=0UL; i<N; ++i ) {
1348 template<
typename Type
1354 for(
size_t i=0UL; i<N; ++i )
1366 template<
typename Type
1369 template<
typename Other >
1372 for(
size_t i=0; i<N; ++i )
1386 template<
typename Type
1393 for(
size_t i=0UL; i<N; ++i )
1394 swap( v_[i], v.v_[i] );
1417 template<
typename Type
1426 return allocate<StaticVector>( 1UL );
1441 template<
typename Type
1464 template<
typename Type
1473 return allocate<StaticVector>( 1UL );
1488 template<
typename Type
1496 return allocate<StaticVector>( size/
sizeof(
StaticVector) );
1507 template<
typename Type
1512 deallocate( static_cast<StaticVector*>( ptr ) );
1523 template<
typename Type
1528 deallocate( static_cast<StaticVector*>( ptr ) );
1539 template<
typename Type
1544 deallocate( static_cast<StaticVector*>( ptr ) );
1555 template<
typename Type
1560 deallocate( static_cast<StaticVector*>( ptr ) );
1583 template<
typename Type
1586 template<
typename Other >
1589 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
1604 template<
typename Type
1607 template<
typename Other >
1610 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
1624 template<
typename Type
1647 template<
typename Type
1661 return load( &v_[index] );
1679 template<
typename Type
1692 return loadu( &v_[index] );
1711 template<
typename Type
1725 store( &v_[index], value );
1744 template<
typename Type
1757 storeu( &v_[index], value );
1776 template<
typename Type
1790 stream( &v_[index], value );
1806 template<
typename Type
1809 template<
typename VT >
1815 for(
size_t i=0UL; i<N; ++i )
1832 template<
typename Type
1835 template<
typename VT >
1845 for(
size_t i=0UL; i<N; i+=
IT::size ) {
1863 template<
typename Type
1866 template<
typename VT >
1872 v_[element->index()] = element->value();
1888 template<
typename Type
1891 template<
typename VT >
1897 for(
size_t i=0UL; i<N; ++i )
1914 template<
typename Type
1917 template<
typename VT >
1928 for(
size_t i=0UL; i<N; i+=
IT::size ) {
1946 template<
typename Type
1949 template<
typename VT >
1955 v_[element->index()] += element->value();
1971 template<
typename Type
1974 template<
typename VT >
1980 for(
size_t i=0UL; i<N; ++i )
1997 template<
typename Type
2000 template<
typename VT >
2011 for(
size_t i=0UL; i<N; i+=
IT::size ) {
2029 template<
typename Type
2032 template<
typename VT >
2038 v_[element->index()] -= element->value();
2054 template<
typename Type
2057 template<
typename VT >
2063 for(
size_t i=0UL; i<N; ++i )
2080 template<
typename Type
2083 template<
typename VT >
2094 for(
size_t i=0UL; i<N; i+=
IT::size ) {
2112 template<
typename Type
2115 template<
typename VT >
2125 v_[element->index()] = tmp[element->index()] * element->value();
2150 template<
typename Type
2172 template<
typename Type,
size_t N,
bool TF >
2175 template<
typename Type,
size_t N,
bool TF >
2178 template<
typename Type,
size_t N,
bool TF >
2181 template<
typename Type,
bool TF >
2184 template<
typename Type,
bool TF >
2187 template<
typename Type,
size_t N,
bool TF >
2190 template<
typename Type,
size_t N,
bool TF >
2203 template<
typename Type
2222 template<
typename Type
2250 template<
typename Type
2255 for(
size_t i=0UL; i<N; ++i )
2273 template<
typename Type
2290 template<
typename Type
2294 if( v[0] != Type() || v[1] != Type() )
2311 template<
typename Type
2330 template<
typename Type
2350 template<
typename T,
size_t N,
bool TF >
2351 struct Size< StaticVector<T,N,TF> >
2353 static const size_t value = N;
2369 template<
typename T,
size_t N,
bool TF >
2370 struct HasConstDataAccess< StaticVector<T,N,TF> > :
public TrueType
2389 template<
typename T,
size_t N,
bool TF >
2390 struct HasMutableDataAccess< StaticVector<T,N,TF> > :
public TrueType
2409 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2410 struct AddTrait< StaticVector<T1,N,TF>, StaticVector<T2,N,TF> >
2412 typedef StaticVector< typename AddTrait<T1,T2>::Type, N, TF > Type;
2428 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2429 struct SubTrait< StaticVector<T1,N,TF>, StaticVector<T2,N,TF> >
2431 typedef StaticVector< typename SubTrait<T1,T2>::Type, N, TF > Type;
2447 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2448 struct MultTrait< StaticVector<T1,N,TF>, T2 >
2450 typedef StaticVector< typename MultTrait<T1,T2>::Type, N, TF > Type;
2454 template<
typename T1,
typename T2,
size_t N,
bool TF >
2455 struct MultTrait< T1, StaticVector<T2,N,TF> >
2457 typedef StaticVector< typename MultTrait<T1,T2>::Type, N, TF > Type;
2461 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2462 struct MultTrait< StaticVector<T1,N,TF>, StaticVector<T2,N,TF> >
2464 typedef StaticVector< typename MultTrait<T1,T2>::Type, N, TF > Type;
2467 template<
typename T1,
size_t M,
typename T2,
size_t N >
2468 struct MultTrait< StaticVector<T1,M,false>, StaticVector<T2,N,true> >
2470 typedef StaticMatrix< typename MultTrait<T1,T2>::Type, M, N,
false > Type;
2473 template<
typename T1,
size_t N,
typename T2 >
2474 struct MultTrait< StaticVector<T1,N,true>, StaticVector<T2,N,false> >
2476 typedef typename MultTrait<T1,T2>::Type Type;
2492 template<
typename T1,
typename T2 >
2493 struct CrossTrait< StaticVector<T1,3UL,false>, StaticVector<T2,3UL,false> >
2496 typedef typename MultTrait<T1,T2>::Type T;
2499 typedef StaticVector< typename SubTrait<T,T>::Type, 3UL,
false > Type;
2515 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2516 struct DivTrait< StaticVector<T1,N,TF>, T2 >
2518 typedef StaticVector< typename DivTrait<T1,T2>::Type, N, TF > Type;
2535 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2536 struct MathTrait< StaticVector<T1,N,TF>, StaticVector<T2,N,TF> >
2538 typedef StaticVector< typename MathTrait<T1,T2>::HighType, N, TF > HighType;
2539 typedef StaticVector< typename MathTrait<T1,T2>::LowType , N, TF > LowType;
2555 template<
typename T1,
size_t N,
bool TF >
2556 struct SubvectorTrait< StaticVector<T1,N,TF> >
2558 typedef HybridVector<T1,N,TF> Type;
Compile time check for vectorizable types.Depending on the available instruction set (SSE...
Definition: IsVectorizable.h:108
Constraint on the data type.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_CONST(T)
Constraint on the data type.In case the given data type is a const-qualified type, a compilation error is created.
Definition: Const.h:116
const bool defaultTransposeFlag
The default transpose flag for all vectors of the Blaze library.This value specifies the default tran...
Definition: TransposeFlag.h:56
Compile time check for numeric types.This type trait tests whether or not the given template paramete...
Definition: IsNumeric.h:98
Constraint on the data type.
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
Header file for the UNUSED_PARAMETER function template.
Header file for the subtraction trait.
Header file for basic type definitions.
Header file for the SparseVector base class.
Type * Pointer
Pointer to a non-constant vector value.
Definition: StaticVector.h:186
Iterator end()
Returns an iterator just past the last element of the static vector.
Definition: StaticVector.h:959
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
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 void store(size_t index, const IntrinsicType &value)
Aligned store of an intrinsic element of the vector.
Definition: StaticVector.h:1715
Header file for the IsSame and IsStrictlySame type traits.
IT::Type IntrinsicType
Intrinsic type of the vector elements.
Definition: StaticVector.h:181
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:821
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: StaticVector.h:1329
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.
Efficient implementation of a fixed-sized vector.The StaticVector class template is the representatio...
Definition: Forward.h:59
bool isAligned() const
Returns whether the vector is properly aligned in memory.
Definition: StaticVector.h:1627
Header file for the DisableIf class template.
size_t capacity() const
Returns the maximum capacity of the vector.
Definition: StaticVector.h:1311
bool canAlias(const Other *alias) const
Returns whether the vector can alias with the given address alias.
Definition: StaticVector.h:1587
void swap(StaticVector &v)
Swapping the contents of two static vectors.
Definition: StaticVector.h:1389
Header file for the multiplication trait.
const StaticVector & CompositeType
Data type for composite expression templates.
Definition: StaticVector.h:183
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
DenseIterator< const Type > ConstIterator
Iterator over constant elements.
Definition: StaticVector.h:189
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
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.
const Type * ConstPointer
Pointer to a constant vector value.
Definition: StaticVector.h:187
Header file for the subvector trait.
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 & ReturnType
Return type for expression template evaluations.
Definition: StaticVector.h:182
void reset()
Reset to the default initial values.
Definition: StaticVector.h:1351
#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
ConstIterator cbegin() const
Returns an iterator to the first element of the static vector.
Definition: StaticVector.h:944
Reference operator[](size_t index)
Subscript operator for the direct access to the vector elements.
Definition: StaticVector.h:844
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
This ResultType
Result type for expression template evaluations.
Definition: StaticVector.h:178
const StaticVector< Type, 2UL, TF > perp(const StaticVector< Type, 2UL, TF > &v)
Unary perp dot product operator for the calculation of a perpendicular vector ( ).
Definition: StaticVector.h:2275
BLAZE_ALWAYS_INLINE IntrinsicType load(size_t index) const
Aligned load of an intrinsic element of the vector.
Definition: StaticVector.h:1651
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.
BLAZE_ALWAYS_INLINE void stream(size_t index, const IntrinsicType &value)
Aligned, non-temporal store of an intrinsic element of the vector.
Definition: StaticVector.h:1780
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.
AlignedArray< Type, NN > v_
The statically allocated vector elements.
Definition: StaticVector.h:421
Header file for the HasConstDataAccess type trait.
BLAZE_ALWAYS_INLINE void storeu(size_t index, const IntrinsicType &value)
Unaligned store of an intrinsic element of the vector.
Definition: StaticVector.h:1748
Header file for the IsSparseVector type trait.
Type ElementType
Type of the vector elements.
Definition: StaticVector.h:180
Intrinsic characteristics of data types.The IntrinsicTrait class template provides the intrinsic char...
Definition: IntrinsicTrait.h:749
StaticVector()
The default constructor for StaticVector.
Definition: StaticVector.h:460
Header file for run time assertion macros.
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
Iterator begin()
Returns an iterator to the first element of the static vector.
Definition: StaticVector.h:914
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.
BLAZE_ALWAYS_INLINE IntrinsicType loadu(size_t index) const
Unaligned load of an intrinsic element of the vector.
Definition: StaticVector.h:1683
#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.
StaticVector< Type, N, TF > This
Type of this StaticVector instance.
Definition: StaticVector.h:177
Constraint on the data type.
Header file for the HasMutableDataAccess type trait.
bool isAliased(const Other *alias) const
Returns whether the vector is aliased with the given address alias.
Definition: StaticVector.h:1608
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
IntrinsicTrait< Type > IT
Intrinsic trait for the vector element type.
Definition: StaticVector.h:167
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.
StaticVector< ET, N, TF > Other
The type of the other StaticVector.
Definition: StaticVector.h:197
Base class for N-dimensional vectors.The Vector class is a base class for all arbitrarily sized (N-di...
Definition: Forward.h:151
Header file for the default transpose flag for all vectors of the Blaze library.
StaticVector< Type, N,!TF > TransposeType
Transpose type for expression template evaluations.
Definition: StaticVector.h:179
size_t size() const
Returns the current size/dimension of the vector.
Definition: StaticVector.h:1296
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:108
ConstIterator cend() const
Returns an iterator just past the last element of the static vector.
Definition: StaticVector.h:989
DenseIterator< Type > Iterator
Iterator over non-constant elements.
Definition: StaticVector.h:188
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
Pointer data()
Low-level data access to the vector elements.
Definition: StaticVector.h:882
System settings for the inline keywords.
Header file for the Size 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
Rebind mechanism to obtain a StaticVector with different data/element type.
Definition: StaticVector.h:196
const Type & ConstReference
Reference to a constant vector value.
Definition: StaticVector.h:185
Type & Reference
Reference to a non-constant vector value.
Definition: StaticVector.h:184
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