35#ifndef _BLAZE_MATH_DENSE_STATICVECTOR_H_
36#define _BLAZE_MATH_DENSE_STATICVECTOR_H_
222template<
typename Type
229 :
public DenseVector< StaticVector<Type,N,TF,AF,PF,Tag>, TF >
258 template<
typename NewType >
267 template<
size_t NewN >
295 template<
typename Other >
298 template<
typename Other,
size_t Dim >
301 template<
typename Other,
size_t Dim >
306 template<
typename Other, AlignmentFlag AF2, PaddingFlag PF2 >
309 template<
typename VT >
345 template< typename Other,
size_t Dim >
346 constexpr
StaticVector& operator=( const Other (&array)[Dim] ) &;
348 template< typename Other,
size_t Dim >
349 constexpr
StaticVector& operator=( const std::array<Other,Dim>& array ) &;
356 template< typename VT > inline
StaticVector& operator= ( const
Vector<VT,TF>& rhs ) &;
357 template< typename VT > inline
StaticVector& operator+=( const
Vector<VT,TF>& rhs ) &;
358 template< typename VT > inline
StaticVector& operator-=( const
Vector<VT,TF>& rhs ) &;
359 template< typename VT > inline
StaticVector& operator*=( const
Vector<VT,TF>& rhs ) &;
360 template< typename VT > inline
StaticVector& operator/=( const DenseVector<VT,TF>& rhs ) &;
361 template< typename VT > inline
StaticVector& operator%=( const
Vector<VT,TF>& rhs ) &;
368 static constexpr
size_t size() noexcept;
380 template< typename Other > inline
StaticVector& scale( const Other& scalar );
387 static inline
void* operator new ( std::
size_t size );
388 static inline
void* operator new[]( std::
size_t size );
389 static inline
void* operator new ( std::
size_t size, const std::nothrow_t& );
390 static inline
void* operator new[]( std::
size_t size, const std::nothrow_t& );
392 static inline
void operator delete (
void* ptr );
393 static inline
void operator delete[](
void* ptr );
394 static inline
void operator delete (
void* ptr, const std::nothrow_t& );
395 static inline
void operator delete[](
void* ptr, const std::nothrow_t& );
411 template< typename VT >
412 static constexpr
bool VectorizedAssign_v =
413 ( useOptimizedKernels &&
423 template< typename VT >
424 static constexpr
bool VectorizedAddAssign_v =
425 ( VectorizedAssign_v<VT> &&
433 template< typename VT >
434 static constexpr
bool VectorizedSubAssign_v =
435 ( VectorizedAssign_v<VT> &&
443 template< typename VT >
444 static constexpr
bool VectorizedMultAssign_v =
445 ( VectorizedAssign_v<VT> &&
453 template< typename VT >
454 static constexpr
bool VectorizedDivAssign_v =
455 ( VectorizedAssign_v<VT> &&
471 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
472 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
485 template< typename VT >
488 template< typename VT >
489 inline auto
assign( const DenseVector<VT,TF>& rhs ) ->
EnableIf_t< VectorizedAssign_v<VT> >;
493 template< typename VT >
496 template< typename VT >
501 template< typename VT >
504 template< typename VT >
509 template< typename VT >
512 template< typename VT >
517 template< typename VT >
520 template< typename VT >
573template<
typename Type,
typename... Ts >
576template<
typename Type,
size_t N >
579template<
typename Type,
size_t N >
607template<
typename Type
614#if BLAZE_USE_DEFAULT_INITIALIZATION
618#if !BLAZE_USE_DEFAULT_INITIALIZATION
622 for(
size_t i=N; i<
NN; ++i )
637template<
typename Type
648 for(
size_t i=0UL; i<N; ++i )
651 for(
size_t i=N; i<
NN; ++i )
676template<
typename Type
685 if( list.size() > N ) {
686 BLAZE_THROW_INVALID_ARGUMENT(
"Invalid setup of static vector" );
691 for(
const auto& element : list ) {
723template<
typename Type
729template<
typename Other >
739 for(
size_t i=0UL; i<n; ++i )
743 for(
size_t i=n; i<
NN; ++i )
770template<
typename Type
776template<
typename Other
806template<
typename Type
812template<
typename Other
831template<
typename Type
851template<
typename Type
857template<
typename Other
860inline StaticVector<Type,N,TF,AF,PF,Tag>::StaticVector(
const StaticVector<Other,N,TF,AF2,PF2,Tag>& v )
865 for(
size_t i=0UL; i<N; ++i )
868 for(
size_t i=N; i<
NN; ++i )
886template<
typename Type
892template<
typename VT >
901 if( (*v).size() != N ) {
933template<
typename Type
957template<
typename Type
982template<
typename Type
994 return (*
this)[index];
1009template<
typename Type
1021 return (*
this)[index];
1033template<
typename Type
1054template<
typename Type
1073template<
typename Type
1092template<
typename Type
1111template<
typename Type
1130template<
typename Type
1149template<
typename Type
1168template<
typename Type
1196template<
typename Type
1205 for(
size_t i=0UL; i<N; ++i )
1230template<
typename Type
1241 if( list.size() > N ) {
1247 for(
const auto& element : list ) {
1280template<
typename Type
1286template<
typename Other
1293 for(
size_t i=0UL; i<N; ++i )
1320template<
typename Type
1326template<
typename Other
1333 for(
size_t i=0UL; i<N; ++i )
1349template<
typename Type
1373template<
typename Type
1379template<
typename Other
1383 StaticVector<Type,N,TF,AF,PF,Tag>::operator=(
const StaticVector<Other,N,TF,AF2,PF2,Tag>& rhs ) &
1385 using blaze::assign;
1406template<
typename Type
1412template<
typename VT >
1416 using blaze::assign;
1420 if( (*rhs).size() != N ) {
1424 if( (*rhs).canAlias(
this ) ) {
1451template<
typename Type
1457template<
typename VT >
1461 using blaze::addAssign;
1465 if( (*rhs).size() != N ) {
1469 if( (*rhs).canAlias(
this ) ) {
1494template<
typename Type
1500template<
typename VT >
1504 using blaze::subAssign;
1508 if( (*rhs).size() != N ) {
1512 if( (*rhs).canAlias(
this ) ) {
1538template<
typename Type
1544template<
typename VT >
1548 using blaze::assign;
1549 using blaze::multAssign;
1553 if( (*rhs).size() != N ) {
1582template<
typename Type
1588template<
typename VT >
1590 StaticVector<Type,N,TF,AF,PF,Tag>::operator/=(
const DenseVector<VT,TF>& rhs ) &
1592 using blaze::assign;
1593 using blaze::divAssign;
1597 if( (*rhs).size() != N ) {
1601 if( (*rhs).canAlias(
this ) ) {
1627template<
typename Type
1633template<
typename VT >
1637 using blaze::assign;
1650 if( N != 3UL || (*rhs).size() != 3UL ) {
1654 const CrossType tmp( *
this % (*rhs) );
1677template<
typename Type
1698template<
typename Type
1716template<
typename Type
1738template<
typename Type
1746 size_t nonzeros( 0 );
1748 for(
size_t i=0UL; i<N; ++i ) {
1763template<
typename Type
1772 for(
size_t i=0UL; i<N; ++i )
1784template<
typename Type
1794 for(
size_t i=0UL; i<N; ++i )
1825template<
typename Type
1831template<
typename Other >
1833 StaticVector<Type,N,TF,AF,PF,Tag>::scale(
const Other& scalar )
1835 for(
size_t i=0; i<N; ++i )
1860template<
typename Type
1887template<
typename Type
1913template<
typename Type
1940template<
typename Type
1962template<
typename Type
1981template<
typename Type
2000template<
typename Type
2019template<
typename Type
2049template<
typename Type
2058 for(
size_t i=N; i<
NN; ++i ) {
2087template<
typename Type
2093template<
typename Other >
2096 return static_cast<const void*
>( this ) ==
static_cast<const void*
>( alias );
2111template<
typename Type
2117template<
typename Other >
2120 return static_cast<const void*
>( this ) ==
static_cast<const void*
>( alias );
2134template<
typename Type
2159template<
typename Type
2169 return loada( index );
2171 return loadu( index );
2189template<
typename Type
2225template<
typename Type
2259template<
typename Type
2289template<
typename Type
2325template<
typename Type
2360template<
typename Type
2394template<
typename Type
2400template<
typename VT >
2406 for(
size_t i=0UL; i<N; ++i )
2423template<
typename Type
2429template<
typename VT >
2445 store( i, (*rhs).load(i) );
2447 for( ; remainder && i<N; ++i ) {
2465template<
typename Type
2471template<
typename VT >
2476 for(
auto element=(*rhs).begin(); element!=(*rhs).end(); ++element )
2477 v_[element->index()] = element->value();
2493template<
typename Type
2499template<
typename VT >
2505 for(
size_t i=0UL; i<N; ++i )
2522template<
typename Type
2528template<
typename VT >
2546 for( ; remainder && i<N; ++i ) {
2564template<
typename Type
2570template<
typename VT >
2575 for(
auto element=(*rhs).begin(); element!=(*rhs).end(); ++element )
2576 v_[element->index()] += element->value();
2592template<
typename Type
2598template<
typename VT >
2604 for(
size_t i=0UL; i<N; ++i )
2621template<
typename Type
2627template<
typename VT >
2645 for( ; remainder && i<N; ++i ) {
2663template<
typename Type
2669template<
typename VT >
2674 for(
auto element=(*rhs).begin(); element!=(*rhs).end(); ++element )
2675 v_[element->index()] -= element->value();
2691template<
typename Type
2697template<
typename VT >
2703 for(
size_t i=0UL; i<N; ++i )
2720template<
typename Type
2726template<
typename VT >
2744 for( ; remainder && i<N; ++i ) {
2762template<
typename Type
2768template<
typename VT >
2777 for(
auto element=(*rhs).begin(); element!=(*rhs).end(); ++element )
2778 v_[element->index()] = tmp[element->index()] * element->value();
2794template<
typename Type
2800template<
typename VT >
2806 for(
size_t i=0UL; i<N; ++i )
2823template<
typename Type
2829template<
typename VT >
2867template< RelaxationFlag RF,
typename Type,
size_t N,
bool TF, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
2870template<
typename Type,
size_t N,
bool TF, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
2873template<
typename Type,
bool TF, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
2874const StaticVector<Type,2UL,TF,AF,PF,Tag> perp(
const StaticVector<Type,2UL,TF,AF,PF,Tag>& v );
2876template<
typename Type,
bool TF, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
2877const StaticVector<Type,3UL,TF,AF,PF,Tag> perp(
const StaticVector<Type,3UL,TF,AF,PF,Tag>& v );
2879template<
typename Type,
size_t N,
bool TF, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
2880void swap(
StaticVector<Type,N,TF,AF,PF,Tag>& a,
StaticVector<Type,N,TF,AF,PF,Tag>& b )
noexcept;
2882template<
size_t I,
typename Type,
size_t N,
bool TF, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
2885template<
size_t I,
typename Type,
size_t N,
bool TF, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
2888template<
size_t I,
typename Type,
size_t N,
bool TF, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
2891template<
size_t I,
typename Type,
size_t N,
bool TF, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
2931 for(
size_t i=0UL; i<N; ++i )
2956template<
typename Type
2964 return v.isIntact();
2980template<
typename Type
2985inline const StaticVector<Type,2UL,TF,AF,PF,Tag>
3001template<
typename Type
3006inline const StaticVector<Type,3UL,TF,AF,PF,Tag>
3009 if( v[0] !=
Type() || v[1] !=
Type() )
3025template<
typename Type
3031inline void swap(
StaticVector<Type,N,TF,AF,PF,Tag>& a,
StaticVector<Type,N,TF,AF,PF,Tag>& b )
noexcept
3077 return std::move( v[I] );
3121 return std::move( v[I] );
3136template<
typename T,
size_t N,
bool TF, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
3137struct Size< StaticVector<T,N,TF,AF,PF,Tag>, 0UL >
3138 :
public Ptrdiff_t< static_cast<ptrdiff_t>(N) >
3154template<
typename T,
size_t N,
bool TF, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
3156 :
public Ptrdiff_t< static_cast<ptrdiff_t>(N) >
3172template<
typename T,
size_t N,
bool TF, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
3190template<
typename T,
size_t N,
bool TF, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
3208template<
typename T,
size_t N,
bool TF, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
3226template<
typename T,
size_t N,
bool TF, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
3244template<
typename T,
size_t N,
bool TF, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
3262template<
typename T1,
typename T2 >
3263struct AddTraitEval2< T1, T2
3290template<
typename T1,
typename T2 >
3291struct SubTraitEval2< T1, T2
3318template<
typename T1,
typename T2 >
3319struct MultTraitEval2< T1, T2
3332template<
typename T1,
typename T2 >
3333struct MultTraitEval2< T1, T2
3346template<
typename T1,
typename T2 >
3347struct MultTraitEval2< T1, T2
3362template<
typename T1,
typename T2 >
3363struct MultTraitEval2< T1, T2
3380template<
typename T1,
typename T2 >
3381struct MultTraitEval2< T1, T2
3411template<
typename T1,
typename T2 >
3412struct KronTraitEval2< T1, T2
3439template<
typename T1,
typename T2 >
3440struct DivTraitEval2< T1, T2
3453template<
typename T1,
typename T2 >
3454struct DivTraitEval2< T1, T2
3481template<
typename T1,
typename T2 >
3482struct CrossTraitEval2< T1, T2
3509template<
typename T,
typename OP >
3510struct UnaryMapTraitEval2< T, OP
3514 using ElementType =
decltype( std::declval<OP>()( std::declval< ElementType_t<T> >() ) );
3529template<
typename T1,
typename T2,
typename OP >
3530struct BinaryMapTraitEval2< T1, T2, OP
3536 using ElementType =
decltype( std::declval<OP>()( std::declval< ElementType_t<T1> >()
3537 , std::declval< ElementType_t<T2> >() ) );
3560template<
typename T,
typename OP, ReductionFlag RF >
3561struct PartialReduceTraitEval2< T, OP, RF
3568 static constexpr bool TF = ( RF ==
columnwise );
3591template<
typename T,
size_t R0 >
3592struct RepeatTraitEval2< T, R0,
inf,
inf
3618template<
typename T1,
typename T2 >
3619struct SolveTraitEval2< T1, T2
3647template<
typename T1,
size_t N,
bool TF, AlignmentFlag AF, PaddingFlag PF,
typename Tag,
typename T2 >
3648struct HighType<
StaticVector<T1,N,TF,AF,PF,Tag>,
StaticVector<T2,N,TF,AF,PF,Tag> >
3650 using Type = StaticVector< typename HighType<T1,T2>::Type, N, TF, AF, PF, Tag >;
3666template<
typename T1,
size_t N,
bool TF, AlignmentFlag AF, PaddingFlag PF,
typename Tag,
typename T2 >
3667struct LowType<
StaticVector<T1,N,TF,AF,PF,Tag>,
StaticVector<T2,N,TF,AF,PF,Tag> >
3669 using Type = StaticVector< typename LowType<T1,T2>::Type, N, TF, AF, PF, Tag >;
3685template<
typename VT,
size_t I,
size_t N >
3686struct SubvectorTraitEval2< VT, I, N
3711template<
typename VT,
size_t N >
3712struct ElementsTraitEval2< VT, N
3737template<
typename MT,
size_t I >
3738struct RowTraitEval2< MT, I
3763template<
typename MT,
size_t I >
3764struct ColumnTraitEval2< MT, I
3789template<
typename MT, ptrdiff_t I >
3790struct BandTraitEval2< MT, I
3797 static constexpr size_t Min =
min( M - ( I >= 0L ? 0UL : -I ), N - ( I >= 0L ? I : 0UL ) );
3825template<
typename Type
3831class tuple_size< blaze::StaticVector<Type,N,TF,AF,PF,Tag> >
3832 :
public integral_constant< size_t, N >
3842class tuple_element< I, blaze::StaticVector<Type,N,TF,AF,PF,Tag> >
Header file for the addition trait.
Header file for auxiliary alias declarations.
typename ResultType_t< T >::TagType TagType_t
Alias declaration for nested TagType type definitions.
Definition Aliases.h:530
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.
Definition Aliases.h:190
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.
Definition Aliases.h:450
Header file for the AlignedArray implementation.
Header file for the alignment check function.
Header file for the alignment flag enumeration.
Header file for the AlignmentOf type trait.
Header file for run time assertion macros.
Header file for the band trait.
Header file for the column trait.
Constraint on the data type.
Header file for the cross product trait.
Header file for the DenseIterator class template.
Header file for the division trait.
Header file for the elements trait.
Header file for the EnableIf class template.
Header file for the EvaluateTrait class template.
Header file for the HasConstDataAccess type trait.
Header file for the HasMutableDataAccess type trait.
Header file for the HasSIMDAdd type trait.
Header file for the HasSIMDDiv type trait.
Header file for the HasSIMDMult type trait.
Header file for the HasSIMDSub type trait.
Header file for the HighType type trait.
Header file for the IntegralConstant class template.
Header file for the IsAligned type trait.
Header file for the IsColumnVector type trait.
Header file for the IsContiguous type trait.
Header file for the isDefault shim.
Header file for the IsDenseMatrix type trait.
Header file for the IsDenseVector type trait.
Header file for the IsMatrix type trait.
Header file for the IsNumeric type trait.
Header file for the IsPadded type trait.
Header file for the IsRowVector type trait.
Header file for the IsSIMDCombinable type trait.
Header file for the IsScalar type trait.
Header file for the IsSparseVector type trait.
Header file for the IsSquare type trait.
Header file for the IsVector type trait.
Header file for the IsVectorizable type trait.
Header file for the Kron product trait.
Header file for the LowType type trait.
Header file for the map trait.
Header file for the MaxSize type trait.
Header file for the MAYBE_UNUSED function template.
Header file for memory allocation and deallocation functionality.
Header file for the multiplication trait.
Header file for the nextMultiple shim.
Header file for the padding flag enumeration.
Constraint on the data type.
Header file for the prevMultiple shim.
Header file for the reduce trait.
Header file for the reduction flags.
constexpr ReductionFlag columnwise
Reduction flag for column-wise reduction operations.
Definition ReductionFlag.h:97
Constraint on the data type.
Header file for the relaxation flag enumeration.
Header file for the RemoveCV type trait.
Header file for the RemoveConst type trait.
Header file for the repeat trait.
Header file for the row trait.
Header file for all SIMD functionality.
Header file for the Solver trait.
C++-standard-specific system settings.
Header file for the subtraction trait.
Header file for the subvector trait.
Constraint on the data type.
Constraint on the data type.
Implementation of a static array with a fixed alignment.
Definition AlignedArray.h:101
Implementation of a generic iterator for dense vectors and matrices.
Definition DenseIterator.h:60
Base class for sparse vectors.
Definition SparseVector.h:72
Efficient implementation of a fixed-sized vector.
Definition StaticVector.h:230
static constexpr bool isAligned() noexcept
const Type & ReturnType
Definition StaticVector.h:243
BLAZE_ALWAYS_INLINE void storeu(size_t index, const SIMDType &value) noexcept
constexpr StaticVector(const StaticVector &v)
The copy constructor for StaticVector.
Definition StaticVector.h:837
Reference at(size_t index)
Checked access to the vector elements.
Definition StaticVector.h:989
constexpr StaticVector(const Other(&array)[Dim])
Array initialization of all vector elements.
Definition StaticVector.h:778
void swap(StaticVector &v) noexcept
auto multAssign(const DenseVector< VT, TF > &rhs) -> DisableIf_t< VectorizedMultAssign_v< VT > >
AlignedArray< Type, NN, Alignment > AlignedStorage
Definition StaticVector.h:532
static constexpr size_t capacity() noexcept
constexpr Iterator begin() noexcept
static constexpr size_t SIMDSIZE
Definition StaticVector.h:402
BLAZE_ALWAYS_INLINE SIMDType loada(size_t index) const noexcept
constexpr Reference operator[](size_t index) noexcept
Subscript operator for the direct access to the vector elements.
Definition StaticVector.h:940
StaticVector(const Vector< VT, TF > &v)
Conversion constructor from different vectors.
Definition StaticVector.h:893
Type * Pointer
Definition StaticVector.h:248
constexpr StaticVector(const std::array< Other, Dim > &array)
Initialization of all vector elements from the given std::array.
Definition StaticVector.h:814
StaticVector(const Type &init)
Constructor for a homogenous initialization of all elements.
Definition StaticVector.h:643
auto addAssign(const DenseVector< VT, TF > &rhs) -> DisableIf_t< VectorizedAddAssign_v< VT > >
StaticVector()
The default constructor for StaticVector.
Definition StaticVector.h:613
DenseVector< This, TF > BaseType
Base type of this StaticVector instance.
Definition StaticVector.h:234
BLAZE_ALWAYS_INLINE void storea(size_t index, const SIMDType &value) noexcept
StaticVector(const StaticVector< Other, N, TF, AF2, PF2, Tag > &v)
Conversion constructor from different StaticVector instances.
Definition StaticVector.h:860
BLAZE_ALWAYS_INLINE void store(size_t index, const SIMDType &value) noexcept
SIMDTrait_t< ElementType > SIMDType
Definition StaticVector.h:241
bool canAlias(const Other *alias) const noexcept
auto divAssign(const DenseVector< VT, TF > &rhs) -> DisableIf_t< VectorizedDivAssign_v< VT > >
const Type * ConstPointer
Definition StaticVector.h:249
Type & Reference
Definition StaticVector.h:246
StaticVector< Type, N, TF, AF, PF, Tag > This
Type of this StaticVector instance.
Definition StaticVector.h:233
bool isAliased(const Other *alias) const noexcept
AlignedStorage v_
Definition StaticVector.h:538
BLAZE_ALWAYS_INLINE SIMDType load(size_t index) const noexcept
auto assign(const DenseVector< VT, TF > &rhs) -> DisableIf_t< VectorizedAssign_v< VT > >
constexpr Iterator end() noexcept
static constexpr bool simdEnabled
Definition StaticVector.h:279
DenseIterator< const Type, AF > ConstIterator
Definition StaticVector.h:252
constexpr ConstIterator cend() const noexcept
const StaticVector & CompositeType
Definition StaticVector.h:244
constexpr StaticVector(initializer_list< Type > list)
List initialization of all vector elements.
Definition StaticVector.h:682
constexpr ConstReference operator[](size_t index) const noexcept
Subscript operator for the direct access to the vector elements.
Definition StaticVector.h:964
const Type & ConstReference
Definition StaticVector.h:247
Type ElementType
Definition StaticVector.h:240
BLAZE_ALWAYS_INLINE SIMDType loadu(size_t index) const noexcept
auto subAssign(const DenseVector< VT, TF > &rhs) -> DisableIf_t< VectorizedSubAssign_v< VT > >
DenseIterator< Type, AF > Iterator
Definition StaticVector.h:251
static constexpr bool smpAssignable
Definition StaticVector.h:285
Tag TagType
Definition StaticVector.h:242
constexpr ConstIterator cbegin() const noexcept
constexpr bool isIntact() const noexcept
StaticVector< Type, N,!TF, AF, PF, Tag > TransposeType
Transpose type for expression template evaluations.
Definition StaticVector.h:238
BLAZE_ALWAYS_INLINE void stream(size_t index, const SIMDType &value) noexcept
constexpr StaticVector & operator=(const Type &rhs) &
Homogenous assignment to all vector elements.
Definition StaticVector.h:1203
static constexpr size_t Alignment
Definition StaticVector.h:528
ConstReference at(size_t index) const
Checked access to the vector elements.
Definition StaticVector.h:1016
This ResultType
Result type for expression template evaluations.
Definition StaticVector.h:235
static constexpr size_t spacing() noexcept
static constexpr size_t NN
Definition StaticVector.h:405
constexpr Pointer data() noexcept
Low-level data access to the vector elements.
Definition StaticVector.h:1040
StaticVector(size_t n, const Other *array)
Array initialization of all vector elements.
Definition StaticVector.h:730
static constexpr size_t size() noexcept
Base class for N-dimensional vectors.
Definition Vector.h:82
Initializer list type of the Blaze library.
Constraint on the data type.
Constraint on the data type.
Header file for the DenseVector base class.
Header file for the SparseVector base class.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VOLATILE(T)
Constraint on the data type.
Definition Volatile.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_POINTER_TYPE(T)
Constraint on the data type.
Definition Pointer.h:79
#define BLAZE_CONSTRAINT_MUST_BE_VECTORIZABLE_TYPE(T)
Constraint on the data type.
Definition Vectorizable.h:61
#define BLAZE_CONSTRAINT_MUST_NOT_BE_CONST(T)
Constraint on the data type.
Definition Const.h:79
#define BLAZE_CONSTRAINT_MUST_BE_SAME_TAG(A, B)
Data type constraint.
Definition SameTag.h:68
#define BLAZE_CONSTRAINT_MUST_NOT_BE_REFERENCE_TYPE(T)
Constraint on the data type.
Definition Reference.h:79
decltype(auto) min(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise minimum of the dense matrices lhs and rhs.
Definition DMatDMatMapExpr.h:1339
decltype(auto) max(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise maximum of the dense matrices lhs and rhs.
Definition DMatDMatMapExpr.h:1375
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition DMatSerialExpr.h:812
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition DiagonalMatrix.h:207
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b) noexcept
Swapping the contents of two matrices.
Definition DiagonalMatrix.h:225
bool isDefault(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the given diagonal matrix is in default state.
Definition DiagonalMatrix.h:169
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.
Definition RequiresEvaluation.h:81
#define BLAZE_CONSTRAINT_MUST_BE_VECTOR_WITH_TRANSPOSE_FLAG(T, TF)
Constraint on the data type.
Definition TransposeFlag.h:63
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_VECTOR_TYPE(T)
Constraint on the data type.
Definition DenseVector.h:61
typename CrossTrait< T1, T2 >::Type CrossTrait_t
Auxiliary alias declaration for the CrossTrait class template.
Definition CrossTrait.h:138
typename SubTrait< T1, T2 >::Type SubTrait_t
Auxiliary alias declaration for the SubTrait class template.
Definition SubTrait.h:163
typename AddTrait< T1, T2 >::Type AddTrait_t
Auxiliary alias declaration for the AddTrait class template.
Definition AddTrait.h:163
typename MapTrait< Args... >::Type MapTrait_t
Auxiliary alias declaration for the MapTrait class template.
Definition MapTrait.h:131
typename DivTrait< T1, T2 >::Type DivTrait_t
Auxiliary alias declaration for the DivTrait class template.
Definition DivTrait.h:164
typename MultTrait< T1, T2 >::Type MultTrait_t
Auxiliary alias declaration for the MultTrait class template.
Definition MultTrait.h:165
constexpr bool HasSIMDSub_v
Auxiliary variable template for the HasSIMDSub type trait.
Definition HasSIMDSub.h:187
constexpr bool IsSquare_v
Auxiliary variable template for the IsSquare type trait.
Definition IsSquare.h:146
constexpr bool IsScalar_v
Auxiliary variable template for the IsScalar type trait.
Definition IsScalar.h:104
constexpr bool IsSIMDCombinable_v
Auxiliary variable template for the IsSIMDCombinable type trait.
Definition IsSIMDCombinable.h:137
constexpr ptrdiff_t Size_v
Auxiliary variable template for the Size type trait.
Definition Size.h:176
constexpr ptrdiff_t DefaultSize_v
Default size of the Size type trait.
Definition Size.h:72
constexpr bool IsVector_v
Auxiliary variable template for the IsVector type trait.
Definition IsVector.h:125
constexpr bool IsMatrix_v
Auxiliary variable template for the IsMatrix type trait.
Definition IsMatrix.h:124
constexpr bool IsColumnVector_v
Auxiliary variable template for the IsColumnVector type trait.
Definition IsColumnVector.h:126
constexpr bool HasSIMDAdd_v
Auxiliary variable template for the HasSIMDAdd type trait.
Definition HasSIMDAdd.h:187
constexpr bool HasSIMDDiv_v
Auxiliary variable template for the HasSIMDDiv type trait.
Definition HasSIMDDiv.h:173
constexpr bool HasSIMDMult_v
Auxiliary variable template for the HasSIMDMult type trait.
Definition HasSIMDMult.h:188
constexpr bool IsRowVector_v
Auxiliary variable template for the IsRowVector type trait.
Definition IsRowVector.h:126
constexpr bool IsDenseMatrix_v
Auxiliary variable template for the IsDenseMatrix type trait.
Definition IsDenseMatrix.h:124
constexpr bool IsSparseVector_v
Auxiliary variable template for the IsSparseVector type trait.
Definition IsSparseVector.h:124
constexpr bool TransposeFlag_v
Auxiliary variable template for the TransposeFlag type trait.
Definition TransposeFlag.h:93
constexpr bool IsDenseVector_v
Auxiliary variable template for the IsDenseVector type trait.
Definition IsDenseVector.h:124
constexpr bool IsPadded_v
Auxiliary variable template for the IsPadded type trait.
Definition IsPadded.h:134
RelaxationFlag
Relaxation flag for strict or relaxed semantics.
Definition RelaxationFlag.h:66
BLAZE_ALWAYS_INLINE constexpr auto prevMultiple(T1 value, T2 factor) noexcept
Rounds down an integral value to the previous multiple of a given factor.
Definition PrevMultiple.h:68
constexpr Infinity inf
Global Infinity instance.
Definition Infinity.h:1080
BLAZE_ALWAYS_INLINE constexpr auto nextMultiple(T1 value, T2 factor) noexcept
Rounds up an integral value to the next multiple of a given factor.
Definition NextMultiple.h:68
PaddingFlag
Padding flag for (un-)padded vectors and matrices.
Definition PaddingFlag.h:77
AlignmentFlag
Alignment flag for (un-)aligned vectors and matrices.
Definition AlignmentFlag.h:63
@ padded
Flag for padded vectors and matrices.
Definition PaddingFlag.h:79
@ unpadded
Flag for unpadded vectors and matrices.
Definition PaddingFlag.h:78
@ aligned
Flag for aligned vectors and matrices.
Definition AlignmentFlag.h:65
constexpr void clear(Matrix< MT, SO > &matrix)
Clearing the given matrix.
Definition Matrix.h:960
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.
Definition Assert.h:101
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.
Definition Assert.h:117
typename SIMDTrait< T >::Type SIMDTrait_t
Auxiliary alias declaration for the SIMDTrait class template.
Definition SIMDTrait.h:315
BLAZE_ALWAYS_INLINE EnableIf_t< IsIntegral_v< T1 > &&HasSize_v< T1, 1UL > > storea(T1 *address, const SIMDi8< T2 > &value) noexcept
Aligned store of a vector of 1-byte integral values.
Definition Storea.h:78
BLAZE_ALWAYS_INLINE EnableIf_t< IsIntegral_v< T1 > &&HasSize_v< T1, 1UL > > storeu(T1 *address, const SIMDi8< T2 > &value) noexcept
Unaligned store of a vector of 1-byte integral values.
Definition Storeu.h:75
BLAZE_ALWAYS_INLINE EnableIf_t< IsIntegral_v< T1 > &&HasSize_v< T1, 1UL > > stream(T1 *address, const SIMDi8< T2 > &value) noexcept
Aligned, non-temporal store of a vector of 1-byte integral values.
Definition Stream.h:74
BLAZE_ALWAYS_INLINE const EnableIf_t< IsIntegral_v< T > &&HasSize_v< T, 1UL >, If_t< IsSigned_v< T >, SIMDint8, SIMDuint8 > > loadu(const T *address) noexcept
Loads a vector of 1-byte integral values.
Definition Loadu.h:76
BLAZE_ALWAYS_INLINE const EnableIf_t< IsIntegral_v< T > &&HasSize_v< T, 1UL >, If_t< IsSigned_v< T >, SIMDint8, SIMDuint8 > > loada(const T *address) noexcept
Loads a vector of 1-byte integral values.
Definition Loada.h:79
#define BLAZE_STATIC_ASSERT_MSG(expr, msg)
Compile time assertion macro.
Definition StaticAssert.h:123
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.
Definition StaticAssert.h:112
constexpr Type & get(StaticVector< Type, N, TF, AF, PF, Tag > &v) noexcept
Tuple-like index-based access the contents of a static vector.
Definition StaticVector.h:3052
const StaticVector< Type, 2UL, TF, AF, PF, Tag > perp(const StaticVector< Type, 2UL, TF, AF, PF, Tag > &v)
Unary perp dot product operator for the calculation of a perpendicular vector ( ).
Definition StaticVector.h:2986
constexpr PaddingFlag defaultPaddingFlag
The default padding flag for all vectors and matrices of the Blaze library.
Definition Padding.h:74
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition Inline.h:85
constexpr AlignmentFlag defaultAlignmentFlag
The default alignment for all vectors and matrices of the Blaze library.
Definition Alignment.h:75
constexpr bool defaultTransposeFlag
The default transpose flag for all vectors of the Blaze library.
Definition TransposeFlag.h:75
constexpr bool IsVectorizable_v
Auxiliary variable template for the IsVectorizable type trait.
Definition IsVectorizable.h:157
constexpr bool IsNumeric_v
Auxiliary variable template for the IsNumeric type trait.
Definition IsNumeric.h:132
constexpr size_t AlignmentOf_v
Auxiliary variable template for the AlignmentOf type trait.
Definition AlignmentOf.h:239
void deallocate(T *address) noexcept
Deallocation of memory for built-in data types.
Definition Memory.h:230
IntegralConstant< ptrdiff_t, N > Ptrdiff_t
Compile time integral constant wrapper for ptrdiff_t.
Definition IntegralConstant.h:237
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition MaybeUnused.h:81
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition EnableIf.h:138
BoolConstant< true > TrueType
Type traits base class.
Definition IntegralConstant.h:132
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.
Definition Exception.h:331
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.
Definition Exception.h:235
BLAZE_ALWAYS_INLINE bool checkAlignment(const T *address)
Checks the alignment of the given address.
Definition AlignmentCheck.h:68
T * allocate(size_t size)
Aligned array allocation for built-in data types.
Definition Memory.h:158
typename EnableIf<!Condition, T >::Type DisableIf_t
Auxiliary type for the EnableIf class template.
Definition EnableIf.h:175
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.
Definition IntegralConstant.h:110
Header file for the exception macros of the math module.
Header file for all forward declarations of the math module.
Header file for the extended initializer_list functionality.
Constraint on the data type.
Header file for all forward declarations for dense vectors and matrices.
Header file for the Size type trait.
Header file for the TransposeFlag type trait.
Header file for the clear shim.
Header file for the serial shim.
Compile time check for low-level access to constant data.
Definition HasConstDataAccess.h:76
Compile time check for low-level access to mutable data.
Definition HasMutableDataAccess.h:76
Base template for the HighType type trait.
Definition HighType.h:322
Compile time check for the alignment of data types.
Definition IsAligned.h:88
Compile time check for the memory layout of data types.
Definition IsContiguous.h:87
Compile time check for data types with padding.
Definition IsPadded.h:77
Base template for the LowType type trait.
Definition LowType.h:322
Compile time evaluation of the maximum size of vectors and matrices.
Definition MaxSize.h:118
Generic wrapper for the min() function.
Definition Min.h:82
Rebind mechanism to obtain a StaticVector with different data/element type.
Definition StaticVector.h:259
StaticVector< NewType, N, TF, AF, PF, Tag > Other
The type of the other StaticVector.
Definition StaticVector.h:260
Resize mechanism to obtain a StaticVector with a different fixed number of elements.
Definition StaticVector.h:268
StaticVector< Type, NewN, TF, AF, PF, Tag > Other
The type of the other StaticVector.
Definition StaticVector.h:269
System settings for the inline keywords.
System settings for performance optimizations.
Header file for the default transpose flag for all vectors of the Blaze library.
Header file for basic type definitions.
Header file for the generic max algorithm.
Header file for the generic min algorithm.