35 #ifndef _BLAZE_MATH_DENSE_STATICVECTOR_H_
36 #define _BLAZE_MATH_DENSE_STATICVECTOR_H_
167 template<
typename Type
170 class StaticVector :
public DenseVector< StaticVector<Type,N,TF>, TF >
204 template<
typename ET >
222 enum { smpAssignable = 0 };
230 template<
typename Other >
explicit inline StaticVector(
size_t n,
const Other* array );
232 template<
typename Other >
233 explicit inline StaticVector(
const Other (&array)[N] );
236 template<
typename Other >
inline StaticVector(
const StaticVector<Other,N,TF>& v );
237 template<
typename VT >
inline StaticVector(
const Vector<VT,TF>& v );
240 inline StaticVector(
const Type& v1,
const Type& v2,
const Type& v3 );
241 inline StaticVector(
const Type& v1,
const Type& v2,
const Type& v3,
const Type& v4 );
242 inline StaticVector(
const Type& v1,
const Type& v2,
const Type& v3,
243 const Type& v4,
const Type& v5 );
244 inline StaticVector(
const Type& v1,
const Type& v2,
const Type& v3,
245 const Type& v4,
const Type& v5,
const Type& v6 );
257 inline ConstReference
operator[](
size_t index )
const;
258 inline Reference
at(
size_t index );
259 inline ConstReference
at(
size_t index )
const;
260 inline Pointer
data ();
261 inline ConstPointer
data ()
const;
262 inline Iterator
begin ();
263 inline ConstIterator
begin ()
const;
264 inline ConstIterator
cbegin()
const;
265 inline Iterator
end ();
266 inline ConstIterator
end ()
const;
267 inline ConstIterator
cend ()
const;
274 template<
typename Other >
275 inline StaticVector& operator=(
const Other (&array)[N] );
279 template<
typename Other >
inline StaticVector& operator= (
const StaticVector<Other,N,TF>& rhs );
280 template<
typename VT >
inline StaticVector& operator= (
const Vector<VT,TF>& rhs );
281 template<
typename VT >
inline StaticVector& operator+=(
const Vector<VT,TF>& rhs );
282 template<
typename VT >
inline StaticVector& operator-=(
const Vector<VT,TF>& rhs );
283 template<
typename VT >
inline StaticVector& operator*=(
const Vector<VT,TF>& rhs );
285 template<
typename Other >
286 inline typename EnableIf< IsNumeric<Other>,
StaticVector >::Type&
287 operator*=( Other rhs );
289 template<
typename Other >
290 inline typename EnableIf< IsNumeric<Other>,
StaticVector >::Type&
291 operator/=( Other rhs );
298 inline size_t size()
const;
302 template<
typename Other >
inline StaticVector& scale(
const Other& scalar );
310 static inline void*
operator new ( std::size_t
size );
311 static inline void*
operator new[]( std::size_t
size );
312 static inline void*
operator new ( std::size_t
size,
const std::nothrow_t& );
313 static inline void*
operator new[]( std::size_t
size,
const std::nothrow_t& );
315 static inline void operator delete (
void* ptr );
316 static inline void operator delete[](
void* ptr );
317 static inline void operator delete (
void* ptr,
const std::nothrow_t& );
318 static inline void operator delete[](
void* ptr,
const std::nothrow_t& );
325 template<
typename VT >
327 struct VectorizedAssign {
329 vectorizable && VT::vectorizable &&
330 IsSame<Type,typename VT::ElementType>::value };
337 template<
typename VT >
339 struct VectorizedAddAssign {
341 vectorizable && VT::vectorizable &&
342 IsSame<Type,typename VT::ElementType>::value &&
343 IntrinsicTrait<Type>::addition };
350 template<
typename VT >
352 struct VectorizedSubAssign {
354 vectorizable && VT::vectorizable &&
355 IsSame<Type,typename VT::ElementType>::value &&
356 IntrinsicTrait<Type>::subtraction };
363 template<
typename VT >
365 struct VectorizedMultAssign {
367 vectorizable && VT::vectorizable &&
368 IsSame<Type,typename VT::ElementType>::value &&
369 IntrinsicTrait<Type>::multiplication };
378 template<
typename Other >
inline bool canAlias (
const Other* alias )
const;
379 template<
typename Other >
inline bool isAliased(
const Other* alias )
const;
392 template<
typename VT >
393 inline typename DisableIf< VectorizedAssign<VT> >::Type
394 assign(
const DenseVector<VT,TF>& rhs );
396 template<
typename VT >
397 inline typename EnableIf< VectorizedAssign<VT> >::Type
398 assign(
const DenseVector<VT,TF>& rhs );
400 template<
typename VT >
inline void assign(
const SparseVector<VT,TF>& rhs );
402 template<
typename VT >
403 inline typename DisableIf< VectorizedAddAssign<VT> >::Type
404 addAssign(
const DenseVector<VT,TF>& rhs );
406 template<
typename VT >
407 inline typename EnableIf< VectorizedAddAssign<VT> >::Type
408 addAssign(
const DenseVector<VT,TF>& rhs );
410 template<
typename VT >
inline void addAssign(
const SparseVector<VT,TF>& rhs );
412 template<
typename VT >
413 inline typename DisableIf< VectorizedSubAssign<VT> >::Type
414 subAssign(
const DenseVector<VT,TF>& rhs );
416 template<
typename VT >
417 inline typename EnableIf< VectorizedSubAssign<VT> >::Type
418 subAssign(
const DenseVector<VT,TF>& rhs );
420 template<
typename VT >
inline void subAssign(
const SparseVector<VT,TF>& rhs );
422 template<
typename VT >
423 inline typename DisableIf< VectorizedMultAssign<VT> >::Type
424 multAssign(
const DenseVector<VT,TF>& rhs );
426 template<
typename VT >
427 inline typename EnableIf< VectorizedMultAssign<VT> >::Type
428 multAssign(
const DenseVector<VT,TF>& rhs );
430 template<
typename VT >
inline void multAssign(
const SparseVector<VT,TF>& rhs );
474 template<
typename Type
483 for(
size_t i=0UL; i<
NN; ++i )
495 template<
typename Type
503 for(
size_t i=0UL; i<N; ++i )
506 for(
size_t i=N; i<
NN; ++i )
534 template<
typename Type
537 template<
typename Other >
547 for(
size_t i=0UL; i<n; ++i )
551 for(
size_t i=n; i<
NN; ++i )
574 template<
typename Type
577 template<
typename Other >
583 for(
size_t i=0UL; i<N; ++i )
586 for(
size_t i=N; i<
NN; ++i )
599 template<
typename Type
607 for(
size_t i=0UL; i<
NN; ++i )
618 template<
typename Type
621 template<
typename Other >
627 for(
size_t i=0UL; i<N; ++i )
630 for(
size_t i=N; i<
NN; ++i )
646 template<
typename Type
649 template<
typename VT >
657 if( (~v).
size() != N ) {
682 template<
typename Type
694 for(
size_t i=N; i<
NN; ++i )
713 template<
typename Type
726 for(
size_t i=N; i<
NN; ++i )
746 template<
typename Type
750 const Type& v3,
const Type& v4 )
761 for(
size_t i=N; i<
NN; ++i )
782 template<
typename Type
786 const Type& v4,
const Type& v5 )
798 for(
size_t i=N; i<
NN; ++i )
820 template<
typename Type
824 const Type& v4,
const Type& v5,
const Type& v6 )
837 for(
size_t i=N; i<
NN; ++i )
860 template<
typename Type
881 template<
typename Type
903 template<
typename Type
912 return (*
this)[index];
927 template<
typename Type
936 return (*
this)[index];
948 template<
typename Type
965 template<
typename Type
980 template<
typename Type
995 template<
typename Type
1010 template<
typename Type
1025 template<
typename Type
1040 template<
typename Type
1055 template<
typename Type
1090 template<
typename Type
1093 template<
typename Other >
1096 for(
size_t i=0UL; i<N; ++i )
1109 template<
typename Type
1114 for(
size_t i=0UL; i<N; ++i )
1129 template<
typename Type
1134 using blaze::assign;
1136 assign( *
this, ~rhs );
1148 template<
typename Type
1151 template<
typename Other >
1154 using blaze::assign;
1156 assign( *
this, ~rhs );
1172 template<
typename Type
1175 template<
typename VT >
1178 using blaze::assign;
1180 if( (~rhs).
size() != N ) {
1184 if( (~rhs).canAlias(
this ) ) {
1191 assign( *
this, ~rhs );
1209 template<
typename Type
1212 template<
typename VT >
1215 using blaze::addAssign;
1217 if( (~rhs).
size() != N ) {
1221 if( (~rhs).canAlias(
this ) ) {
1223 addAssign( *
this, tmp );
1226 addAssign( *
this, ~rhs );
1244 template<
typename Type
1247 template<
typename VT >
1250 using blaze::subAssign;
1252 if( (~rhs).
size() != N ) {
1256 if( (~rhs).canAlias(
this ) ) {
1258 subAssign( *
this, tmp );
1261 subAssign( *
this, ~rhs );
1280 template<
typename Type
1283 template<
typename VT >
1286 using blaze::multAssign;
1288 if( (~rhs).
size() != N ) {
1294 this->operator=( tmp );
1297 multAssign( *
this, ~rhs );
1312 template<
typename Type
1315 template<
typename Other >
1319 using blaze::assign;
1321 assign( *
this, (*
this) * rhs );
1336 template<
typename Type
1339 template<
typename Other >
1343 using blaze::assign;
1347 assign( *
this, (*
this) / rhs );
1366 template<
typename Type
1381 template<
typename Type
1399 template<
typename Type
1404 size_t nonzeros( 0 );
1406 for(
size_t i=0UL; i<N; ++i ) {
1421 template<
typename Type
1427 for(
size_t i=0UL; i<N; ++i )
1439 template<
typename Type
1442 template<
typename Other >
1445 for(
size_t i=0; i<N; ++i )
1459 template<
typename Type
1466 for(
size_t i=0UL; i<N; ++i )
1467 swap( v_[i], v.v_[i] );
1490 template<
typename Type
1499 return allocate<StaticVector>( 1UL );
1514 template<
typename Type
1522 return allocate<StaticVector>( size/
sizeof(
StaticVector) );
1537 template<
typename Type
1546 return allocate<StaticVector>( 1UL );
1561 template<
typename Type
1569 return allocate<StaticVector>( size/
sizeof(
StaticVector) );
1580 template<
typename Type
1585 deallocate( static_cast<StaticVector*>( ptr ) );
1596 template<
typename Type
1601 deallocate( static_cast<StaticVector*>( ptr ) );
1612 template<
typename Type
1617 deallocate( static_cast<StaticVector*>( ptr ) );
1628 template<
typename Type
1633 deallocate( static_cast<StaticVector*>( ptr ) );
1656 template<
typename Type
1659 template<
typename Other >
1662 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
1677 template<
typename Type
1680 template<
typename Other >
1683 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
1697 template<
typename Type
1720 template<
typename Type
1726 return loada( index );
1744 template<
typename Type
1759 return loada( &v_[index] );
1777 template<
typename Type
1790 return loadu( &v_[index] );
1809 template<
typename Type
1834 template<
typename Type
1849 storea( &v_[index], value );
1868 template<
typename Type
1881 storeu( &v_[index], value );
1900 template<
typename Type
1915 stream( &v_[index], value );
1931 template<
typename Type
1934 template<
typename VT >
1940 for(
size_t i=0UL; i<N; ++i )
1957 template<
typename Type
1960 template<
typename VT >
1970 const size_t ipos( ( remainder )?( N &
size_t(-
IT::size) ):( N ) );
1976 store( i, (~rhs).load(i) );
1978 for( ; remainder && i<N; ++i ) {
1996 template<
typename Type
1999 template<
typename VT >
2005 v_[element->index()] = element->value();
2021 template<
typename Type
2024 template<
typename VT >
2030 for(
size_t i=0UL; i<N; ++i )
2047 template<
typename Type
2050 template<
typename VT >
2060 const size_t ipos( ( remainder )?( N &
size_t(-
IT::size) ):( N ) );
2066 store( i, load(i) + (~rhs).load(i) );
2068 for( ; remainder && i<N; ++i ) {
2086 template<
typename Type
2089 template<
typename VT >
2095 v_[element->index()] += element->value();
2111 template<
typename Type
2114 template<
typename VT >
2120 for(
size_t i=0UL; i<N; ++i )
2137 template<
typename Type
2140 template<
typename VT >
2150 const size_t ipos( ( remainder )?( N &
size_t(-
IT::size) ):( N ) );
2156 store( i, load(i) - (~rhs).load(i) );
2158 for( ; remainder && i<N; ++i ) {
2176 template<
typename Type
2179 template<
typename VT >
2185 v_[element->index()] -= element->value();
2201 template<
typename Type
2204 template<
typename VT >
2210 for(
size_t i=0UL; i<N; ++i )
2227 template<
typename Type
2230 template<
typename VT >
2240 const size_t ipos( ( remainder )?( N &
size_t(-
IT::size) ):( N ) );
2246 store( i, load(i) * (~rhs).load(i) );
2248 for( ; remainder && i<N; ++i ) {
2266 template<
typename Type
2269 template<
typename VT >
2279 v_[element->index()] = tmp[element->index()] * element->value();
2304 template<
typename Type
2326 template<
typename Type,
size_t N,
bool TF >
2329 template<
typename Type,
size_t N,
bool TF >
2332 template<
typename Type,
size_t N,
bool TF >
2335 template<
typename Type,
size_t N,
bool TF >
2338 template<
typename Type,
bool TF >
2341 template<
typename Type,
bool TF >
2344 template<
typename Type,
size_t N,
bool TF >
2347 template<
typename Type,
size_t N,
bool TF >
2360 template<
typename Type
2379 template<
typename Type
2407 template<
typename Type
2412 for(
size_t i=0UL; i<N; ++i )
2437 template<
typename Type
2460 template<
typename Type
2477 template<
typename Type
2481 if( v[0] != Type() || v[1] != Type() )
2498 template<
typename Type
2517 template<
typename Type
2537 template<
typename T,
size_t N,
bool TF >
2538 struct Size< StaticVector<T,N,TF> >
2540 static const size_t value = N;
2556 template<
typename T,
size_t N,
bool TF >
2557 struct HasConstDataAccess< StaticVector<T,N,TF> > :
public IsTrue<true>
2573 template<
typename T,
size_t N,
bool TF >
2574 struct HasMutableDataAccess< StaticVector<T,N,TF> > :
public IsTrue<true>
2590 template<
typename T,
size_t N,
bool TF >
2591 struct IsAligned< StaticVector<T,N,TF> > :
public IsTrue<true>
2607 template<
typename T,
size_t N,
bool TF >
2608 struct IsPadded< StaticVector<T,N,TF> > :
public IsTrue<usePadding>
2624 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2625 struct AddTrait< StaticVector<T1,N,TF>, StaticVector<T2,N,TF> >
2627 typedef StaticVector< typename AddTrait<T1,T2>::Type, N, TF > Type;
2643 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2644 struct SubTrait< StaticVector<T1,N,TF>, StaticVector<T2,N,TF> >
2646 typedef StaticVector< typename SubTrait<T1,T2>::Type, N, TF > Type;
2662 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2663 struct MultTrait< StaticVector<T1,N,TF>, T2, typename EnableIf< IsNumeric<T2> >::Type >
2665 typedef StaticVector< typename MultTrait<T1,T2>::Type, N, TF > Type;
2668 template<
typename T1,
typename T2,
size_t N,
bool TF >
2669 struct MultTrait< T1, StaticVector<T2,N,TF>, typename EnableIf< IsNumeric<T1> >::Type >
2671 typedef StaticVector< typename MultTrait<T1,T2>::Type, N, TF > Type;
2674 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2675 struct MultTrait< StaticVector<T1,N,TF>, StaticVector<T2,N,TF> >
2677 typedef StaticVector< typename MultTrait<T1,T2>::Type, N, TF > Type;
2680 template<
typename T1,
size_t M,
typename T2,
size_t N >
2681 struct MultTrait< StaticVector<T1,M,false>, StaticVector<T2,N,true> >
2683 typedef StaticMatrix< typename MultTrait<T1,T2>::Type, M, N,
false > Type;
2686 template<
typename T1,
size_t N,
typename T2 >
2687 struct MultTrait< StaticVector<T1,N,true>, StaticVector<T2,N,false> >
2689 typedef typename MultTrait<T1,T2>::Type Type;
2705 template<
typename T1,
typename T2 >
2706 struct CrossTrait< StaticVector<T1,3UL,false>, StaticVector<T2,3UL,false> >
2709 typedef typename MultTrait<T1,T2>::Type T;
2712 typedef StaticVector< typename SubTrait<T,T>::Type, 3UL,
false > Type;
2728 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2729 struct DivTrait< StaticVector<T1,N,TF>, T2, typename EnableIf< IsNumeric<T2> >::Type >
2731 typedef StaticVector< typename DivTrait<T1,T2>::Type, N, TF > Type;
2747 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2748 struct MathTrait< StaticVector<T1,N,TF>, StaticVector<T2,N,TF> >
2750 typedef StaticVector< typename MathTrait<T1,T2>::HighType, N, TF > HighType;
2751 typedef StaticVector< typename MathTrait<T1,T2>::LowType , N, TF > LowType;
2767 template<
typename T1,
size_t N,
bool TF >
2768 struct SubvectorTrait< StaticVector<T1,N,TF> >
2770 typedef HybridVector<T1,N,TF> Type;
Compile time check for vectorizable types.Depending on the available instruction set (SSE...
Definition: IsVectorizable.h:118
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
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exceptionThis macro encapsulates the default way of...
Definition: Exception.h:187
BLAZE_ALWAYS_INLINE void storea(size_t index, const IntrinsicType &value)
Aligned store of an intrinsic element of the vector.
Definition: StaticVector.h:1838
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
Header file for the NextMultiple class template.
#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 alignment flag values.
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:194
Iterator end()
Returns an iterator just past the last element of the static vector.
Definition: StaticVector.h:1028
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector)
Returns the current size/dimension of the vector.
Definition: Vector.h:252
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:250
BLAZE_ALWAYS_INLINE void store(size_t index, const IntrinsicType &value)
Store of an intrinsic element of the vector.
Definition: StaticVector.h:1813
Header file for the IsSame and IsStrictlySame type traits.
IT::Type IntrinsicType
Intrinsic type of the vector elements.
Definition: StaticVector.h:188
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:507
void UNUSED_PARAMETER(const T1 &)
Suppression of unused parameter warnings.
Definition: Unused.h:81
BLAZE_ALWAYS_INLINE IntrinsicType loada(size_t index) const
Aligned load of an intrinsic element of the vector.
Definition: StaticVector.h:1748
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:721
Header file for the SizeT class template.
size_t nonZeros() const
Returns the number of non-zero elements in the vector.
Definition: StaticVector.h:1402
Header file for memory allocation and deallocation functionality.
void move(CustomMatrix< Type, AF, PF, SO > &dst, CustomMatrix< Type, AF, PF, SO > &src)
Moving the contents of one custom matrix to another.
Definition: CustomMatrix.h:6085
System settings for performance optimizations.
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:547
Constraint on the data type.
Efficient implementation of a fixed-sized vector.The StaticVector class template is the representatio...
Definition: Forward.h:61
bool isAligned() const
Returns whether the vector is properly aligned in memory.
Definition: StaticVector.h:1700
Header file for the DisableIf class template.
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > >, simd_int16_t >::Type loadu(const T *address)
Loads a vector of 2-byte integral values.
Definition: Loadu.h:74
size_t capacity() const
Returns the maximum capacity of the vector.
Definition: StaticVector.h:1384
bool canAlias(const Other *alias) const
Returns whether the vector can alias with the given address alias.
Definition: StaticVector.h:1660
void swap(StaticVector &v)
Swapping the contents of two static vectors.
Definition: StaticVector.h:1462
Header file for the multiplication trait.
const StaticVector & CompositeType
Data type for composite expression templates.
Definition: StaticVector.h:190
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
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:4998
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > > >::Type storeu(T *address, const simd_int16_t &value)
Unaligned store of a vector of 2-byte integral values.
Definition: Storeu.h:75
Header file for all forward declarations of the math module.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2592
#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
Compile time check for data types with padding.This type trait tests whether the given data type empl...
Definition: IsPadded.h:75
Reference at(size_t index)
Checked access to the vector elements.
Definition: StaticVector.h:907
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exceptionThis macro encapsulates the default way of Bla...
Definition: Exception.h:331
EnableIf< IsBuiltin< T > >::Type deallocate(T *address)
Deallocation of memory for built-in data types.
Definition: Memory.h:227
Header file for the DenseIterator class template.
const Type * ConstPointer
Pointer to a constant vector value.
Definition: StaticVector.h:195
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:189
Header file for the IsAligned type trait.
void reset()
Reset to the default initial values.
Definition: StaticVector.h:1424
#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
static const size_t NN
Alignment adjustment.
Definition: StaticVector.h:179
ConstIterator cbegin() const
Returns an iterator to the first element of the static vector.
Definition: StaticVector.h:1013
Reference operator[](size_t index)
Subscript operator for the direct access to the vector elements.
Definition: StaticVector.h:864
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:187
This ResultType
Result type for expression template evaluations.
Definition: StaticVector.h:185
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:2462
DenseIterator< const Type, aligned > ConstIterator
Iterator over constant elements.
Definition: StaticVector.h:198
BLAZE_ALWAYS_INLINE IntrinsicType load(size_t index) const
Load of an intrinsic element of the vector.
Definition: StaticVector.h:1724
Header file for the EnableIf class template.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:527
Header file for the IsPadded type trait.
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:1904
Header file for the IsVectorizable type trait.
Header file for the IsNumeric type trait.
AlignedArray< Type, NN > v_
The statically allocated vector elements.
Definition: StaticVector.h:438
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:1872
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > >, simd_int16_t >::Type loada(const T *address)
Loads a vector of 2-byte integral values.
Definition: Loada.h:77
Header file for the IsSparseVector type trait.
Compile time integral constant wrapper for size_t.The SizeT class template represents an integral wra...
Definition: SizeT.h:72
Type ElementType
Type of the vector elements.
Definition: StaticVector.h:187
Intrinsic characteristics of data types.The IntrinsicTrait class template provides the intrinsic char...
Definition: IntrinsicTrait.h:1232
StaticVector()
The default constructor for StaticVector.
Definition: StaticVector.h:477
Header file for run time assertion macros.
Header file for the addition trait.
DenseIterator< Type, aligned > Iterator
Iterator over non-constant elements.
Definition: StaticVector.h:197
Header file for the cross product trait.
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
Iterator begin()
Returns an iterator to the first element of the static vector.
Definition: StaticVector.h:983
const bool useOptimizedKernels
Configuration switch for optimized kernels.This configuration switch enables/disables all optimized c...
Definition: Optimizations.h:84
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:1781
const bool usePadding
Configuration of the padding of dense vectors and matrices.This configuration switch enables/disables...
Definition: Optimizations.h:52
#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:2591
Header file for the isDefault shim.
StaticVector< Type, N, TF > This
Type of this StaticVector instance.
Definition: StaticVector.h:184
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:1681
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:256
IntrinsicTrait< Type > IT
Intrinsic trait for the vector element type.
Definition: StaticVector.h:174
Implementation of a generic iterator for dense vectors and matrices.The DenseIterator represents a ge...
Definition: DenseIterator.h:59
Header file for all intrinsic functionality.
Header file for the mathematical trait.
BLAZE_ALWAYS_INLINE bool checkAlignment(const T *address)
Checks the alignment of the given address.
Definition: AlignmentCheck.h:68
StaticVector< ET, N, TF > Other
The type of the other StaticVector.
Definition: StaticVector.h:206
Base class for N-dimensional vectors.The Vector class is a base class for all arbitrarily sized (N-di...
Definition: Forward.h:164
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:186
Header file for the alignment check function.
size_t size() const
Returns the current size/dimension of the vector.
Definition: StaticVector.h:1369
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:118
Header file for the IsTrue value trait.
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > > >::Type stream(T *address, const simd_int16_t &value)
Aligned, non-temporal store of a vector of 2-byte integral values.
Definition: Stream.h:74
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:237
ConstIterator cend() const
Returns an iterator just past the last element of the static vector.
Definition: StaticVector.h:1058
Header file for exception macros.
#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:951
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:205
const Type & ConstReference
Reference to a constant vector value.
Definition: StaticVector.h:193
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > > >::Type storea(T *address, const simd_int16_t &value)
Aligned store of a vector of 2-byte integral values.
Definition: Storea.h:78
Type & Reference
Reference to a non-constant vector value.
Definition: StaticVector.h:192
Compile time integral round up operation.The NextMultiple class template rounds up the given template...
Definition: NextMultiple.h:81