35#ifndef _BLAZE_MATH_DENSE_STATICMATRIX_H_
36#define _BLAZE_MATH_DENSE_STATICMATRIX_H_
240template<
typename Type
248 :
public DenseMatrix< StaticMatrix<Type,M,N,SO,AF,PF,Tag>, SO >
282 template<
typename NewType >
291 template<
size_t NewM
318 constexpr StaticMatrix( initializer_list< initializer_list<Type> > list );
320 template<
typename Other >
321 inline StaticMatrix(
size_t m,
size_t n,
const Other* array );
323 template<
typename Other,
size_t Rows,
size_t Cols >
324 inline StaticMatrix(
const Other (&array)[Rows][Cols] );
326 template<
typename Other,
size_t Rows,
size_t Cols >
327 StaticMatrix(
const std::array<std::array<Other,Cols>,Rows>& array );
331 template<
typename Other,
bool SO2, AlignmentFlag AF2, PaddingFlag PF2 >
334 template<
typename MT,
bool SO2 >
370 constexpr
StaticMatrix& operator=( initializer_list< initializer_list<Type> > list ) &;
372 template< typename Other,
size_t Rows,
size_t Cols >
373 inline
StaticMatrix& operator=( const Other (&array)[Rows][Cols] ) &;
375 template< typename Other,
size_t Rows,
size_t Cols >
376 inline
StaticMatrix& operator=( const std::array<std::array<Other,Cols>,Rows>& array ) &;
383 template< typename MT,
bool SO2 > inline
StaticMatrix& operator= ( const
Matrix<MT,SO2>& rhs ) &;
384 template< typename MT,
bool SO2 > inline
StaticMatrix& operator+=( const
Matrix<MT,SO2>& rhs ) &;
385 template< typename MT,
bool SO2 > inline
StaticMatrix& operator-=( const
Matrix<MT,SO2>& rhs ) &;
386 template< typename MT,
bool SO2 > inline
StaticMatrix& operator%=( const
Matrix<MT,SO2>& rhs ) &;
393 static constexpr
size_t rows() noexcept;
394 static constexpr
size_t columns() noexcept;
395 static constexpr
size_t spacing() noexcept;
396 static constexpr
size_t capacity() noexcept;
397 inline
size_t capacity(
size_t i ) const noexcept;
399 inline
size_t nonZeros(
size_t i ) const;
400 constexpr
void reset();
401 inline
void reset(
size_t i );
412 template< typename Other > inline
StaticMatrix& scale( const Other& scalar );
419 static inline
void* operator new ( std::
size_t size );
420 static inline
void* operator new[]( std::
size_t size );
421 static inline
void* operator new ( std::
size_t size, const std::nothrow_t& );
422 static inline
void* operator new[]( std::
size_t size, const std::nothrow_t& );
424 static inline
void operator delete (
void* ptr );
425 static inline
void operator delete[](
void* ptr );
426 static inline
void operator delete (
void* ptr, const std::nothrow_t& );
427 static inline
void operator delete[](
void* ptr, const std::nothrow_t& );
443 template< typename MT >
444 static constexpr
bool VectorizedAssign_v =
445 ( useOptimizedKernels &&
456 template< typename MT >
457 static constexpr
bool VectorizedAddAssign_v =
458 ( VectorizedAssign_v<MT> &&
467 template< typename MT >
468 static constexpr
bool VectorizedSubAssign_v =
469 ( VectorizedAssign_v<MT> &&
478 template< typename MT >
479 static constexpr
bool VectorizedSchurAssign_v =
480 ( VectorizedAssign_v<MT> &&
489 constexpr
bool isIntact() const noexcept;
496 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
497 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
499 static constexpr
bool isAligned() noexcept;
510 template< typename MT,
bool SO2 >
513 template< typename MT,
bool SO2 >
519 template< typename MT,
bool SO2 >
522 template< typename MT,
bool SO2 >
528 template< typename MT,
bool SO2 >
531 template< typename MT,
bool SO2 >
537 template< typename MT,
bool SO2 >
540 template< typename MT,
bool SO2 >
610template<
typename Type,
size_t M,
size_t N >
613template<
typename Type,
size_t M,
size_t N >
641template<
typename Type
649#if BLAZE_USE_DEFAULT_INITIALIZATION
653#if !BLAZE_USE_DEFAULT_INITIALIZATION
656 if( IsNumeric_v<Type> && PF ==
padded ) {
657 for(
size_t i=0UL; i<M; ++i )
658 for(
size_t j=N; j<
NN; ++j )
673template<
typename Type
685 for(
size_t i=0UL; i<M; ++i ) {
686 for(
size_t j=0UL; j<N; ++j )
689 for(
size_t j=N; j<
NN; ++j )
721template<
typename Type
737 for(
const auto& rowList : list ) {
739 for(
const auto& element : rowList ) {
740 v_[i*
NN+j] = element;
777template<
typename Type
784template<
typename Other >
790 if( m > M || n > N ) {
794 for(
size_t i=0UL; i<m; ++i ) {
795 for(
size_t j=0UL; j<n; ++j )
796 v_[i*NN+j] = array[i*n+j];
798 if( IsNumeric_v<Type> ) {
799 for(
size_t j=n; j<NN; ++j )
804 if( IsNumeric_v<Type> ) {
805 for(
size_t i=m; i<M; ++i ) {
806 for(
size_t j=0UL; j<NN; ++j )
836template<
typename Type
843template<
typename Other
853 for(
size_t i=0UL; i<M; ++i ) {
854 for(
size_t j=0UL; j<N; ++j )
855 v_[i*NN+j] = array[i][j];
857 for(
size_t j=N; j<NN; ++j )
886template<
typename Type
893template<
typename Other
903 for(
size_t i=0UL; i<M; ++i ) {
904 for(
size_t j=0UL; j<N; ++j )
905 v_[i*NN+j] = array[i][j];
907 for(
size_t j=N; j<NN; ++j )
923template<
typename Type
944template<
typename Type
951template<
typename Other
955inline StaticMatrix<Type,M,N,SO,AF,PF,Tag>::StaticMatrix(
const StaticMatrix<Other,M,N,SO2,AF2,PF2,Tag>& m )
958 for(
size_t i=0UL; i<M; ++i ) {
959 for(
size_t j=0UL; j<N; ++j )
962 for(
size_t j=N; j<NN; ++j )
981template<
typename Type
998 if( (*m).rows() != M || (*m).columns() != N ) {
1002 for(
size_t i=0UL; i<M; ++i ) {
1003 for(
size_t j=( IsSparseMatrix_v<MT> ? 0UL : N ); j<NN; ++j ) {
1004 clear( v_[i*NN+j] );
1008 assign( *
this, *m );
1033template<
typename Type
1060template<
typename Type
1088template<
typename Type
1104 return (*
this)(i,j);
1120template<
typename Type
1136 return (*
this)(i,j);
1153template<
typename Type
1180template<
typename Type
1203template<
typename Type
1227template<
typename Type
1254template<
typename Type
1281template<
typename Type
1308template<
typename Type
1335template<
typename Type
1362template<
typename Type
1389template<
typename Type
1419template<
typename Type
1429 for(
size_t i=0UL; i<M; ++i )
1430 for(
size_t j=0UL; j<N; ++j )
1464template<
typename Type
1482 for(
const auto& rowList : list ) {
1484 for(
const auto& element : rowList ) {
1485 v_[i*NN+j] = element;
1489 clear( v_[i*NN+j] );
1522template<
typename Type
1529template<
typename Other
1537 for(
size_t i=0UL; i<M; ++i )
1538 for(
size_t j=0UL; j<N; ++j )
1539 v_[i*NN+j] = array[i][j];
1569template<
typename Type
1576template<
typename Other
1584 for(
size_t i=0UL; i<M; ++i )
1585 for(
size_t j=0UL; j<N; ++j )
1586 v_[i*NN+j] = array[i][j];
1603template<
typename Type
1628template<
typename Type
1635template<
typename Other
1640 StaticMatrix<Type,M,N,SO,AF,PF,Tag>::operator=(
const StaticMatrix<Other,M,N,SO2,AF2,PF2,Tag>& rhs ) &
1642 using blaze::assign;
1644 assign( *
this, *rhs );
1664template<
typename Type
1671template<
typename MT
1676 using blaze::assign;
1678 using TT =
decltype(
trans( *
this ) );
1679 using CT =
decltype(
ctrans( *
this ) );
1680 using IT =
decltype(
inv( *
this ) );
1684 if( (*rhs).rows() != M || (*rhs).columns() != N ) {
1688 if( IsSame_v<MT,TT> && (*rhs).isAliased(
this ) ) {
1691 else if( IsSame_v<MT,CT> && (*rhs).isAliased(
this ) ) {
1694 else if( !IsSame_v<MT,IT> && (*rhs).canAlias(
this ) ) {
1696 assign( *
this, tmp );
1699 if( IsSparseMatrix_v<MT> )
1701 assign( *
this, *rhs );
1721template<
typename Type
1728template<
typename MT
1733 using blaze::addAssign;
1737 if( (*rhs).rows() != M || (*rhs).columns() != N ) {
1741 if( (*rhs).canAlias(
this ) ) {
1743 addAssign( *
this, tmp );
1746 addAssign( *
this, *rhs );
1766template<
typename Type
1773template<
typename MT
1778 using blaze::subAssign;
1782 if( (*rhs).rows() != M || (*rhs).columns() != N ) {
1786 if( (*rhs).canAlias(
this ) ) {
1788 subAssign( *
this, tmp );
1791 subAssign( *
this, *rhs );
1811template<
typename Type
1818template<
typename MT
1823 using blaze::schurAssign;
1827 if( (*rhs).rows() != M || (*rhs).columns() != N ) {
1831 if( (*rhs).canAlias(
this ) ) {
1833 schurAssign( *
this, tmp );
1836 schurAssign( *
this, *rhs );
1859template<
typename Type
1878template<
typename Type
1900template<
typename Type
1919template<
typename Type
1944template<
typename Type
1971template<
typename Type
1980 size_t nonzeros( 0UL );
1982 for(
size_t i=0UL; i<M; ++i )
1983 for(
size_t j=0UL; j<N; ++j )
1984 if( !isDefault<strict>( v_[i*NN+j] ) )
2004template<
typename Type
2015 const size_t jend( i*NN + N );
2016 size_t nonzeros( 0UL );
2018 for(
size_t j=i*NN; j<jend; ++j )
2019 if( !isDefault<strict>( v_[j] ) )
2032template<
typename Type
2043 for(
size_t i=0UL; i<M; ++i )
2044 for(
size_t j=0UL; j<N; ++j )
2045 clear( v_[i*NN+j] );
2061template<
typename Type
2073 for(
size_t j=0UL; j<N; ++j )
2074 clear( v_[i*NN+j] );
2085template<
typename Type
2096 for(
size_t i=0UL; i<M; ++i ) {
2097 for(
size_t j=0UL; j<N; ++j ) {
2098 swap( v_[i*NN+j], m(i,j) );
2121template<
typename Type
2128inline StaticMatrix<Type,M,N,SO,AF,PF,Tag>&
StaticMatrix<Type,M,N,SO,AF,PF,Tag>::transpose()
2134 for(
size_t i=1UL; i<M; ++i )
2135 for(
size_t j=0UL; j<i; ++j )
2136 swap( v_[i*NN+j], v_[j*NN+i] );
2157template<
typename Type
2186template<
typename Type
2207template<
typename Type
2214inline StaticMatrix<Type,M,N,SO,AF,PF,Tag>&
StaticMatrix<Type,M,N,SO,AF,PF,Tag>::ctranspose()
2218 for(
size_t i=0UL; i<M; ++i ) {
2219 for(
size_t j=0UL; j<i; ++j ) {
2220 cswap( v_[i*NN+j], v_[j*NN+i] );
2244template<
typename Type
2273template<
typename Type
2303template<
typename Type
2310template<
typename Other >
2311inline StaticMatrix<Type,M,N,SO,AF,PF,Tag>&
2314 for(
size_t i=0UL; i<M; ++i )
2315 for(
size_t j=0UL; j<N; ++j )
2316 v_[i*NN+j] *= scalar;
2341template<
typename Type
2354 return allocate<StaticMatrix>( 1UL );
2369template<
typename Type
2396template<
typename Type
2409 return allocate<StaticMatrix>( 1UL );
2424template<
typename Type
2447template<
typename Type
2467template<
typename Type
2487template<
typename Type
2507template<
typename Type
2538template<
typename Type
2547 if( IsNumeric_v<Type> ) {
2548 for(
size_t i=0UL; i<M; ++i ) {
2549 for(
size_t j=N; j<NN; ++j ) {
2550 if( !isDefault<strict>( v_[i*NN+j] ) )
2579template<
typename Type
2586template<
typename Other >
2589 return static_cast<const void*
>( this ) ==
static_cast<const void*
>( alias );
2604template<
typename Type
2611template<
typename Other >
2614 return static_cast<const void*
>( this ) ==
static_cast<const void*
>( alias );
2628template<
typename Type
2657template<
typename Type
2668 return loada( i, j );
2670 return loadu( i, j );
2690template<
typename Type
2710 return loada( &v_[i*NN+j] );
2730template<
typename Type
2748 return loadu( &v_[i*NN+j] );
2769template<
typename Type
2803template<
typename Type
2823 storea( &v_[i*NN+j], value );
2844template<
typename Type
2862 storeu( &v_[i*NN+j], value );
2884template<
typename Type
2904 stream( &v_[i*NN+j], value );
2920template<
typename Type
2927template<
typename MT
2934 for(
size_t i=0UL; i<M; ++i ) {
2935 for(
size_t j=0UL; j<N; ++j ) {
2936 v_[i*NN+j] = (*rhs)(i,j);
2954template<
typename Type
2961template<
typename MT
2970 constexpr bool remainder( PF ==
unpadded || !IsPadded_v<MT> );
2972 constexpr size_t jpos( remainder ?
prevMultiple( N, SIMDSIZE ) : N );
2975 for(
size_t i=0UL; i<M; ++i )
2979 for( ; j<jpos; j+=SIMDSIZE ) {
2980 store( i, j, (*rhs).load(i,j) );
2982 for( ; remainder && j<N; ++j ) {
2983 v_[i*NN+j] = (*rhs)(i,j);
3001template<
typename Type
3008template<
typename MT >
3013 for(
size_t i=0UL; i<M; ++i )
3014 for(
auto element=(*rhs).begin(i); element!=(*rhs).end(i); ++element )
3015 v_[i*NN+element->index()] = element->value();
3031template<
typename Type
3038template<
typename MT >
3045 for(
size_t j=0UL; j<N; ++j )
3046 for(
auto element=(*rhs).begin(j); element!=(*rhs).end(j); ++element )
3047 v_[element->index()*NN+j] = element->value();
3063template<
typename Type
3070template<
typename MT
3077 for(
size_t i=0UL; i<M; ++i )
3079 if( IsDiagonal_v<MT> )
3081 v_[i*NN+i] += (*rhs)(i,i);
3085 const size_t jbegin( ( IsUpper_v<MT> )
3086 ?( IsStrictlyUpper_v<MT> ? i+1UL : i )
3088 const size_t jend ( ( IsLower_v<MT> )
3089 ?( IsStrictlyLower_v<MT> ? i : i+1UL )
3093 for(
size_t j=jbegin; j<jend; ++j ) {
3094 v_[i*NN+j] += (*rhs)(i,j);
3113template<
typename Type
3120template<
typename MT
3130 constexpr bool remainder( PF ==
unpadded || !IsPadded_v<MT> );
3132 for(
size_t i=0UL; i<M; ++i )
3134 const size_t jbegin( ( IsUpper_v<MT> )
3135 ?(
prevMultiple( ( IsStrictlyUpper_v<MT> ? i+1UL : i ), SIMDSIZE ) )
3137 const size_t jend ( ( IsLower_v<MT> )
3138 ?( IsStrictlyLower_v<MT> ? i : i+1UL )
3142 const size_t jpos( remainder ?
prevMultiple( jend, SIMDSIZE ) : jend );
3147 for( ; j<jpos; j+=SIMDSIZE ) {
3148 store( i, j, load(i,j) + (*rhs).load(i,j) );
3150 for( ; remainder && j<jend; ++j ) {
3151 v_[i*NN+j] += (*rhs)(i,j);
3169template<
typename Type
3176template<
typename MT >
3181 for(
size_t i=0UL; i<M; ++i )
3182 for(
auto element=(*rhs).begin(i); element!=(*rhs).end(i); ++element )
3183 v_[i*NN+element->index()] += element->value();
3199template<
typename Type
3206template<
typename MT >
3213 for(
size_t j=0UL; j<N; ++j )
3214 for(
auto element=(*rhs).begin(j); element!=(*rhs).end(j); ++element )
3215 v_[element->index()*NN+j] += element->value();
3231template<
typename Type
3238template<
typename MT
3245 for(
size_t i=0UL; i<M; ++i )
3247 if( IsDiagonal_v<MT> )
3249 v_[i*NN+i] -= (*rhs)(i,i);
3253 const size_t jbegin( ( IsUpper_v<MT> )
3254 ?( IsStrictlyUpper_v<MT> ? i+1UL : i )
3256 const size_t jend ( ( IsLower_v<MT> )
3257 ?( IsStrictlyLower_v<MT> ? i : i+1UL )
3261 for(
size_t j=jbegin; j<jend; ++j ) {
3262 v_[i*NN+j] -= (*rhs)(i,j);
3281template<
typename Type
3288template<
typename MT
3298 constexpr bool remainder( PF ==
unpadded || !IsPadded_v<MT> );
3300 for(
size_t i=0UL; i<M; ++i )
3302 const size_t jbegin( ( IsUpper_v<MT> )
3303 ?(
prevMultiple( ( IsStrictlyUpper_v<MT> ? i+1UL : i ), SIMDSIZE ) )
3305 const size_t jend ( ( IsLower_v<MT> )
3306 ?( IsStrictlyLower_v<MT> ? i : i+1UL )
3310 const size_t jpos( remainder ?
prevMultiple( jend, SIMDSIZE ) : jend );
3315 for( ; j<jpos; j+=SIMDSIZE ) {
3316 store( i, j, load(i,j) - (*rhs).load(i,j) );
3318 for( ; remainder && j<jend; ++j ) {
3319 v_[i*NN+j] -= (*rhs)(i,j);
3337template<
typename Type
3344template<
typename MT >
3349 for(
size_t i=0UL; i<M; ++i )
3350 for(
auto element=(*rhs).begin(i); element!=(*rhs).end(i); ++element )
3351 v_[i*NN+element->index()] -= element->value();
3367template<
typename Type
3374template<
typename MT >
3381 for(
size_t j=0UL; j<N; ++j )
3382 for(
auto element=(*rhs).begin(j); element!=(*rhs).end(j); ++element )
3383 v_[element->index()*NN+j] -= element->value();
3399template<
typename Type
3406template<
typename MT
3413 for(
size_t i=0UL; i<M; ++i ) {
3414 for(
size_t j=0UL; j<N; ++j ) {
3415 v_[i*NN+j] *= (*rhs)(i,j);
3433template<
typename Type
3440template<
typename MT
3449 constexpr bool remainder( PF ==
unpadded || !IsPadded_v<MT> );
3451 constexpr size_t jpos( remainder ?
prevMultiple( N, SIMDSIZE ) : N );
3454 for(
size_t i=0UL; i<M; ++i )
3458 for( ; j<jpos; j+=SIMDSIZE ) {
3459 store( i, j, load(i,j) * (*rhs).load(i,j) );
3461 for( ; remainder && j<N; ++j ) {
3462 v_[i*NN+j] *= (*rhs)(i,j);
3480template<
typename Type
3487template<
typename MT >
3496 for(
size_t i=0UL; i<M; ++i )
3497 for(
auto element=(*rhs).begin(i); element!=(*rhs).end(i); ++element )
3498 v_[i*NN+element->index()] = tmp.
v_[i*NN+element->index()] * element->value();
3514template<
typename Type
3521template<
typename MT >
3532 for(
size_t j=0UL; j<N; ++j )
3533 for(
auto element=(*rhs).begin(j); element!=(*rhs).end(j); ++element )
3534 v_[element->index()*NN+j] = tmp.
v_[element->index()*NN+j] * element->value();
3559template<
typename Type
3566 :
public DenseMatrix< StaticMatrix<Type,M,N,true,AF,PF,Tag>, true >
3600 template<
typename NewType >
3609 template<
size_t NewM
3612 using Other = StaticMatrix<Type,NewM,NewN,true,AF,PF,Tag>;
3622 static constexpr bool simdEnabled = IsVectorizable_v<Type>;
3638 template<
typename Other >
3639 inline StaticMatrix(
size_t m,
size_t n,
const Other* array );
3641 template<
typename Other,
size_t Rows,
size_t Cols >
3642 inline StaticMatrix(
const Other (&array)[Rows][Cols] );
3644 template<
typename Other,
size_t Rows,
size_t Cols >
3645 StaticMatrix(
const std::array<std::array<Other,Cols>,Rows>& array );
3649 template<
typename Other,
bool SO2, AlignmentFlag AF2, PaddingFlag PF2 >
3650 inline StaticMatrix(
const StaticMatrix<Other,M,N,SO2,AF2,PF2,Tag>& m );
3652 template<
typename MT,
bool SO >
3660 ~StaticMatrix() =
default;
3690 template< typename Other,
size_t Rows,
size_t Cols >
3691 inline
StaticMatrix& operator=( const Other (&array)[Rows][Cols] ) &;
3693 template< typename Other,
size_t Rows,
size_t Cols >
3694 inline
StaticMatrix& operator=( const std::array<std::array<Other,Cols>,Rows>& array ) &;
3701 template< typename MT,
bool SO > inline
StaticMatrix& operator= ( const Matrix<MT,SO>& rhs ) &;
3702 template< typename MT,
bool SO > inline
StaticMatrix& operator+=( const Matrix<MT,SO>& rhs ) &;
3703 template< typename MT,
bool SO > inline
StaticMatrix& operator-=( const Matrix<MT,SO>& rhs ) &;
3704 template< typename MT,
bool SO > inline
StaticMatrix& operator%=( const Matrix<MT,SO>& rhs ) &;
3711 static constexpr
size_t rows() noexcept;
3712 static constexpr
size_t columns() noexcept;
3713 static constexpr
size_t spacing() noexcept;
3714 static constexpr
size_t capacity() noexcept;
3715 inline
size_t capacity(
size_t j ) const noexcept;
3717 inline
size_t nonZeros(
size_t j ) const;
3718 constexpr
void reset();
3719 inline
void reset(
size_t i );
3730 template< typename Other > inline
StaticMatrix& scale( const Other& scalar );
3737 static inline
void* operator new ( std::
size_t size );
3738 static inline
void* operator new[]( std::
size_t size );
3739 static inline
void* operator new ( std::
size_t size, const std::nothrow_t& );
3740 static inline
void* operator new[]( std::
size_t size, const std::nothrow_t& );
3742 static inline
void operator delete (
void* ptr );
3743 static inline
void operator delete[](
void* ptr );
3744 static inline
void operator delete (
void* ptr, const std::nothrow_t& );
3745 static inline
void operator delete[](
void* ptr, const std::nothrow_t& );
3752 static constexpr
size_t SIMDSIZE = SIMDTrait<Type>::
size;
3760 template< typename MT >
3761 static constexpr
bool VectorizedAssign_v =
3762 ( useOptimizedKernels &&
3771 template< typename MT >
3772 static constexpr
bool VectorizedAddAssign_v =
3773 ( VectorizedAssign_v<MT> &&
3780 template< typename MT >
3781 static constexpr
bool VectorizedSubAssign_v =
3782 ( VectorizedAssign_v<MT> &&
3789 template< typename MT >
3790 static constexpr
bool VectorizedSchurAssign_v =
3791 ( VectorizedAssign_v<MT> &&
3799 constexpr
bool isIntact() const noexcept;
3806 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
3807 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
3809 static constexpr
bool isAligned() noexcept;
3820 template< typename MT,
bool SO >
3821 inline auto
assign( const DenseMatrix<MT,SO>& rhs ) ->
DisableIf_t< VectorizedAssign_v<MT> >;
3823 template< typename MT,
bool SO >
3824 inline auto
assign( const DenseMatrix<MT,SO>& rhs ) ->
EnableIf_t< VectorizedAssign_v<MT> >;
3826 template< typename MT > inline
void assign( const SparseMatrix<MT,true>& rhs );
3827 template< typename MT > inline
void assign( const SparseMatrix<MT,false>& rhs );
3829 template< typename MT,
bool SO >
3830 inline auto
addAssign( const DenseMatrix<MT,SO>& rhs ) ->
DisableIf_t< VectorizedAddAssign_v<MT> >;
3832 template< typename MT,
bool SO >
3833 inline auto
addAssign( const DenseMatrix<MT,SO>& rhs ) ->
EnableIf_t< VectorizedAddAssign_v<MT> >;
3835 template< typename MT > inline
void addAssign( const SparseMatrix<MT,true>& rhs );
3836 template< typename MT > inline
void addAssign( const SparseMatrix<MT,false>& rhs );
3838 template< typename MT,
bool SO >
3839 inline auto
subAssign( const DenseMatrix<MT,SO>& rhs ) ->
DisableIf_t< VectorizedSubAssign_v<MT> >;
3841 template< typename MT,
bool SO >
3842 inline auto
subAssign( const DenseMatrix<MT,SO>& rhs ) ->
EnableIf_t< VectorizedSubAssign_v<MT> >;
3844 template< typename MT > inline
void subAssign( const SparseMatrix<MT,true>& rhs );
3845 template< typename MT > inline
void subAssign( const SparseMatrix<MT,false>& rhs );
3847 template< typename MT,
bool SO >
3850 template< typename MT,
bool SO >
3851 inline auto
schurAssign( const DenseMatrix<MT,SO>& rhs ) ->
EnableIf_t< VectorizedSchurAssign_v<MT> >;
3853 template< typename MT > inline
void schurAssign( const SparseMatrix<MT,true>& rhs );
3854 template< typename MT > inline
void schurAssign( const SparseMatrix<MT,false>& rhs );
3920template< typename Type
3927#if BLAZE_USE_DEFAULT_INITIALIZATION
3931#if !BLAZE_USE_DEFAULT_INITIALIZATION
3934 if( IsNumeric_v<Type> && PF ==
padded ) {
3935 for(
size_t j=0UL; j<N; ++j )
3936 for(
size_t i=M; i<MM; ++i )
3953template<
typename Type
3964 for(
size_t j=0UL; j<N; ++j ) {
3965 for(
size_t i=0UL; i<M; ++i )
3968 for(
size_t i=M; i<MM; ++i )
4001template<
typename Type
4016 for(
const auto& rowList : list ) {
4018 for(
const auto& element : rowList ) {
4019 v_[i+j*MM] = element;
4058template<
typename Type
4064template<
typename Other >
4070 if( m > M || n > N ) {
4074 for(
size_t j=0UL; j<n; ++j ) {
4075 for(
size_t i=0UL; i<m; ++i )
4076 v_[i+j*MM] = array[i+j*m];
4078 if( IsNumeric_v<Type> ) {
4079 for(
size_t i=m; i<MM; ++i )
4080 clear( v_[i+j*MM] );
4084 if( IsNumeric_v<Type> ) {
4085 for(
size_t j=n; j<N; ++j ) {
4086 for(
size_t i=0UL; i<MM; ++i )
4087 clear( v_[i+j*MM] );
4118template<
typename Type
4124template<
typename Other
4134 for(
size_t j=0UL; j<N; ++j ) {
4135 for(
size_t i=0UL; i<M; ++i )
4136 v_[i+j*MM] = array[i][j];
4138 for(
size_t i=M; i<MM; ++i )
4139 clear( v_[i+j*MM] );
4169template<
typename Type
4175template<
typename Other
4185 for(
size_t j=0UL; j<N; ++j ) {
4186 for(
size_t i=0UL; i<M; ++i )
4187 v_[i+j*MM] = array[i][j];
4189 for(
size_t i=M; i<MM; ++i )
4190 clear( v_[i+j*MM] );
4207template<
typename Type
4229template<
typename Type
4235template<
typename Other
4239inline StaticMatrix<Type,M,N,true,AF,PF,Tag>::StaticMatrix(
const StaticMatrix<Other,M,N,SO2,AF2,PF2,Tag>& m )
4244 for(
size_t j=0UL; j<N; ++j ) {
4245 for(
size_t i=0UL; i<M; ++i )
4246 v_[i+j*MM] = m(i,j);
4248 for(
size_t i=M; i<MM; ++i )
4249 clear( v_[i+j*MM] );
4269template<
typename Type
4275template<
typename MT
4280 using blaze::assign;
4285 if( (*m).rows() != M || (*m).columns() != N ) {
4289 for(
size_t j=0UL; j<N; ++j ) {
4290 for(
size_t i=( IsSparseMatrix_v<MT> ? 0UL : M ); i<MM; ++i ) {
4291 clear( v_[i+j*MM] );
4295 assign( *
this, *m );
4322template<
typename Type
4350template<
typename Type
4379template<
typename Type
4394 return (*
this)(i,j);
4412template<
typename Type
4427 return (*
this)(i,j);
4445template<
typename Type
4472template<
typename Type
4496template<
typename Type
4521template<
typename Type
4544template<
typename Type
4554 return Iterator( v_ + j*MM );
4567template<
typename Type
4577 return ConstIterator( v_ + j*MM );
4590template<
typename Type
4600 return ConstIterator( v_ + j*MM );
4613template<
typename Type
4623 return Iterator( v_ + j*MM + M );
4636template<
typename Type
4646 return ConstIterator( v_ + j*MM + M );
4659template<
typename Type
4669 return ConstIterator( v_ + j*MM + M );
4690template<
typename Type
4696constexpr StaticMatrix<Type,M,N,true,AF,PF,Tag>&
4699 for(
size_t j=0UL; j<N; ++j )
4700 for(
size_t i=0UL; i<M; ++i )
4735template<
typename Type
4741constexpr StaticMatrix<Type,M,N,true,AF,PF,Tag>&
4752 for(
const auto& rowList : list ) {
4754 for(
const auto& element : rowList ) {
4755 v_[i+j*MM] = element;
4759 clear( v_[i+j*MM] );
4794template<
typename Type
4800template<
typename Other
4803inline StaticMatrix<Type,M,N,true,AF,PF,Tag>&
4808 for(
size_t j=0UL; j<N; ++j )
4809 for(
size_t i=0UL; i<M; ++i )
4810 v_[i+j*MM] = array[i][j];
4841template<
typename Type
4847template<
typename Other
4850inline StaticMatrix<Type,M,N,true,AF,PF,Tag>&
4855 for(
size_t j=0UL; j<N; ++j )
4856 for(
size_t i=0UL; i<M; ++i )
4857 v_[i+j*MM] = array[i][j];
4875template<
typename Type
4901template<
typename Type
4907template<
typename Other
4911inline StaticMatrix<Type,M,N,true,AF,PF,Tag>&
4912 StaticMatrix<Type,M,N,true,AF,PF,Tag>::operator=(
const StaticMatrix<Other,M,N,SO2,AF2,PF2,Tag>& rhs ) &
4914 using blaze::assign;
4916 assign( *
this, *rhs );
4938template<
typename Type
4944template<
typename MT
4946inline StaticMatrix<Type,M,N,true,AF,PF,Tag>&
4949 using blaze::assign;
4951 using TT =
decltype(
trans( *
this ) );
4952 using CT =
decltype(
ctrans( *
this ) );
4953 using IT =
decltype(
inv( *
this ) );
4957 if( (*rhs).rows() != M || (*rhs).columns() != N ) {
4961 if( IsSame_v<MT,TT> && (*rhs).isAliased(
this ) ) {
4962 transpose(
typename IsSquare<This>::Type() );
4964 else if( IsSame_v<MT,CT> && (*rhs).isAliased(
this ) ) {
4965 ctranspose(
typename IsSquare<This>::Type() );
4967 else if( !IsSame_v<MT,IT> && (*rhs).canAlias(
this ) ) {
4968 StaticMatrix tmp( *rhs );
4969 assign( *
this, tmp );
4972 if( IsSparseMatrix_v<MT> )
4974 assign( *
this, *rhs );
4996template<
typename Type
5002template<
typename MT
5004inline StaticMatrix<Type,M,N,true,AF,PF,Tag>&
5005 StaticMatrix<Type,M,N,true,AF,PF,Tag>::operator+=(
const Matrix<MT,SO>& rhs ) &
5007 using blaze::addAssign;
5011 if( (*rhs).rows() != M || (*rhs).columns() != N ) {
5015 if( (*rhs).canAlias(
this ) ) {
5016 const ResultType_t<MT> tmp( *rhs );
5017 addAssign( *
this, tmp );
5020 addAssign( *
this, *rhs );
5042template<
typename Type
5048template<
typename MT
5050inline StaticMatrix<Type,M,N,true,AF,PF,Tag>&
5051 StaticMatrix<Type,M,N,true,AF,PF,Tag>::operator-=(
const Matrix<MT,SO>& rhs ) &
5053 using blaze::subAssign;
5057 if( (*rhs).rows() != M || (*rhs).columns() != N ) {
5061 if( (*rhs).canAlias(
this ) ) {
5062 const ResultType_t<MT> tmp( *rhs );
5063 subAssign( *
this, tmp );
5066 subAssign( *
this, *rhs );
5088template<
typename Type
5094template<
typename MT
5096inline StaticMatrix<Type,M,N,true,AF,PF,Tag>&
5097 StaticMatrix<Type,M,N,true,AF,PF,Tag>::operator%=(
const Matrix<MT,SO>& rhs ) &
5099 using blaze::schurAssign;
5103 if( (*rhs).rows() != M || (*rhs).columns() != N ) {
5107 if( (*rhs).canAlias(
this ) ) {
5108 const ResultType_t<MT> tmp( *rhs );
5109 schurAssign( *
this, tmp );
5112 schurAssign( *
this, *rhs );
5137template<
typename Type
5157template<
typename Type
5180template<
typename Type
5200template<
typename Type
5221template<
typename Type
5249template<
typename Type
5257 size_t nonzeros( 0UL );
5259 for(
size_t j=0UL; j<N; ++j )
5260 for(
size_t i=0UL; i<M; ++i )
5261 if( !isDefault<strict>( v_[i+j*MM] ) )
5280template<
typename Type
5290 const size_t iend( j*MM + M );
5291 size_t nonzeros( 0UL );
5293 for(
size_t i=j*MM; i<iend; ++i )
5294 if( !isDefault<strict>( v_[i] ) )
5309template<
typename Type
5319 for(
size_t j=0UL; j<N; ++j )
5320 for(
size_t i=0UL; i<M; ++i )
5321 clear( v_[i+j*MM] );
5337template<
typename Type
5348 for(
size_t i=0UL; i<M; ++i )
5349 clear( v_[i+j*MM] );
5362template<
typename Type
5372 for(
size_t j=0UL; j<N; ++j ) {
5373 for(
size_t i=0UL; i<M; ++i ) {
5374 swap( v_[i+j*MM], m(i,j) );
5399template<
typename Type
5405inline StaticMatrix<Type,M,N,true,AF,PF,Tag>&
5412 for(
size_t j=1UL; j<N; ++j )
5413 for(
size_t i=0UL; i<j; ++i )
5414 swap( v_[i+j*MM], v_[j+i*MM] );
5436template<
typename Type
5464template<
typename Type
5485template<
typename Type
5491inline StaticMatrix<Type,M,N,true,AF,PF,Tag>&
5496 for(
size_t j=0UL; j<N; ++j ) {
5497 for(
size_t i=0UL; i<j; ++i ) {
5498 cswap( v_[i+j*MM], v_[j+i*MM] );
5523template<
typename Type
5551template<
typename Type
5581template<
typename Type
5587template<
typename Other >
5588inline StaticMatrix<Type,M,N,true,AF,PF,Tag>&
5589 StaticMatrix<Type,M,N,true,AF,PF,Tag>::scale(
const Other& scalar )
5591 for(
size_t j=0UL; j<N; ++j )
5592 for(
size_t i=0UL; i<M; ++i )
5593 v_[i+j*MM] *= scalar;
5620template<
typename Type
5626inline void* StaticMatrix<Type,M,N,true,AF,PF,Tag>::operator
new( std::size_t
size )
5632 return allocate<StaticMatrix>( 1UL );
5649template<
typename Type
5655inline void* StaticMatrix<Type,M,N,true,AF,PF,Tag>::operator
new[]( std::size_t
size )
5660 return allocate<StaticMatrix>(
size/
sizeof(StaticMatrix) );
5677template<
typename Type
5683inline void* StaticMatrix<Type,M,N,true,AF,PF,Tag>::operator
new( std::size_t
size,
const std::nothrow_t& )
5689 return allocate<StaticMatrix>( 1UL );
5706template<
typename Type
5712inline void* StaticMatrix<Type,M,N,true,AF,PF,Tag>::operator
new[]( std::size_t
size,
const std::nothrow_t& )
5717 return allocate<StaticMatrix>(
size/
sizeof(StaticMatrix) );
5730template<
typename Type
5736inline void StaticMatrix<Type,M,N,true,AF,PF,Tag>::operator
delete(
void* ptr )
5738 deallocate(
static_cast<StaticMatrix*
>( ptr ) );
5751template<
typename Type
5757inline void StaticMatrix<Type,M,N,true,AF,PF,Tag>::operator
delete[](
void* ptr )
5759 deallocate(
static_cast<StaticMatrix*
>( ptr ) );
5772template<
typename Type
5778inline void StaticMatrix<Type,M,N,true,AF,PF,Tag>::operator
delete(
void* ptr,
const std::nothrow_t& )
5780 deallocate(
static_cast<StaticMatrix*
>( ptr ) );
5793template<
typename Type
5799inline void StaticMatrix<Type,M,N,true,AF,PF,Tag>::operator
delete[](
void* ptr,
const std::nothrow_t& )
5801 deallocate(
static_cast<StaticMatrix*
>( ptr ) );
5825template<
typename Type
5833 if( IsNumeric_v<Type> ) {
5834 for(
size_t j=0UL; j<N; ++j ) {
5835 for(
size_t i=M; i<MM; ++i ) {
5836 if( !isDefault<strict>( v_[i+j*MM] ) )
5867template<
typename Type
5873template<
typename Other >
5876 return static_cast<const void*
>( this ) ==
static_cast<const void*
>( alias );
5893template<
typename Type
5899template<
typename Other >
5902 return static_cast<const void*
>( this ) ==
static_cast<const void*
>( alias );
5918template<
typename Type
5947template<
typename Type
5957 return loada( i, j );
5959 return loadu( i, j );
5980template<
typename Type
5999 return loada( &v_[i+j*MM] );
6020template<
typename Type
6037 return loadu( &v_[i+j*MM] );
6059template<
typename Type
6093template<
typename Type
6112 storea( &v_[i+j*MM], value );
6134template<
typename Type
6151 storeu( &v_[i+j*MM], value );
6174template<
typename Type
6193 stream( &v_[i+j*MM], value );
6211template<
typename Type
6217template<
typename MT
6220 -> DisableIf_t< VectorizedAssign_v<MT> >
6224 for(
size_t j=0UL; j<N; ++j ) {
6225 for(
size_t i=0UL; i<M; ++i ) {
6226 v_[i+j*MM] = (*rhs)(i,j);
6246template<
typename Type
6252template<
typename MT
6255 -> EnableIf_t< VectorizedAssign_v<MT> >
6261 constexpr bool remainder( PF ==
unpadded || !IsPadded_v<MT> );
6263 constexpr size_t ipos( remainder ?
prevMultiple( M, SIMDSIZE ) : M );
6266 for(
size_t j=0UL; j<N; ++j )
6270 for( ; i<ipos; i+=SIMDSIZE ) {
6271 store( i, j, (*rhs).load(i,j) );
6273 for( ; remainder && i<M; ++i ) {
6274 v_[i+j*MM] = (*rhs)(i,j);
6294template<
typename Type
6300template<
typename MT >
6305 for(
size_t j=0UL; j<N; ++j )
6306 for(
auto element=(*rhs).begin(j); element!=(*rhs).end(j); ++element )
6307 v_[element->index()+j*MM] = element->value();
6325template<
typename Type
6331template<
typename MT >
6338 for(
size_t i=0UL; i<M; ++i )
6339 for(
auto element=(*rhs).begin(i); element!=(*rhs).end(i); ++element )
6340 v_[i+element->index()*MM] = element->value();
6358template<
typename Type
6364template<
typename MT
6367 -> DisableIf_t< VectorizedAddAssign_v<MT> >
6371 for(
size_t j=0UL; j<N; ++j )
6373 if( IsDiagonal_v<MT> )
6375 v_[j+j*MM] += (*rhs)(j,j);
6379 const size_t ibegin( ( IsLower_v<MT> )
6380 ?( IsStrictlyLower_v<MT> ? j+1UL : j )
6382 const size_t iend ( ( IsUpper_v<MT> )
6383 ?( IsStrictlyUpper_v<MT> ? j : j+1UL )
6387 for(
size_t i=ibegin; i<iend; ++i ) {
6388 v_[i+j*MM] += (*rhs)(i,j);
6409template<
typename Type
6415template<
typename MT
6418 -> EnableIf_t< VectorizedAddAssign_v<MT> >
6425 constexpr bool remainder( PF ==
unpadded || !IsPadded_v<MT> );
6427 for(
size_t j=0UL; j<N; ++j )
6429 const size_t ibegin( ( IsLower_v<MT> )
6430 ?(
prevMultiple( ( IsStrictlyLower_v<MT> ? j+1UL : j ), SIMDSIZE ) )
6432 const size_t iend ( ( IsUpper_v<MT> )
6433 ?( IsStrictlyUpper_v<MT> ? j : j+1UL )
6437 const size_t ipos( remainder ?
prevMultiple( iend, SIMDSIZE ) : iend );
6442 for( ; i<ipos; i+=SIMDSIZE ) {
6443 store( i, j, load(i,j) + (*rhs).load(i,j) );
6445 for( ; remainder && i<iend; ++i ) {
6446 v_[i+j*MM] += (*rhs)(i,j);
6466template<
typename Type
6472template<
typename MT >
6477 for(
size_t j=0UL; j<N; ++j )
6478 for(
auto element=(*rhs).begin(j); element!=(*rhs).end(j); ++element )
6479 v_[element->index()+j*MM] += element->value();
6497template<
typename Type
6503template<
typename MT >
6510 for(
size_t i=0UL; i<M; ++i )
6511 for(
auto element=(*rhs).begin(i); element!=(*rhs).end(i); ++element )
6512 v_[i+element->index()*MM] += element->value();
6530template<
typename Type
6536template<
typename MT
6539 -> DisableIf_t< VectorizedSubAssign_v<MT> >
6543 for(
size_t j=0UL; j<N; ++j )
6545 if( IsDiagonal_v<MT> )
6547 v_[j+j*MM] -= (*rhs)(j,j);
6551 const size_t ibegin( ( IsLower_v<MT> )
6552 ?( IsStrictlyLower_v<MT> ? j+1UL : j )
6554 const size_t iend ( ( IsUpper_v<MT> )
6555 ?( IsStrictlyUpper_v<MT> ? j : j+1UL )
6559 for(
size_t i=ibegin; i<iend; ++i ) {
6560 v_[i+j*MM] -= (*rhs)(i,j);
6581template<
typename Type
6587template<
typename MT
6590 -> EnableIf_t< VectorizedSubAssign_v<MT> >
6597 constexpr bool remainder( PF ==
unpadded || !IsPadded_v<MT> );
6599 for(
size_t j=0UL; j<N; ++j )
6601 const size_t ibegin( ( IsLower_v<MT> )
6602 ?(
prevMultiple( ( IsStrictlyLower_v<MT> ? j+1UL : j ), SIMDSIZE ) )
6604 const size_t iend ( ( IsUpper_v<MT> )
6605 ?( IsStrictlyUpper_v<MT> ? j : j+1UL )
6609 const size_t ipos( remainder ?
prevMultiple( iend, SIMDSIZE ) : iend );
6614 for( ; i<ipos; i+=SIMDSIZE ) {
6615 store( i, j, load(i,j) - (*rhs).load(i,j) );
6617 for( ; remainder && i<iend; ++i ) {
6618 v_[i+j*MM] -= (*rhs)(i,j);
6638template<
typename Type
6644template<
typename MT >
6649 for(
size_t j=0UL; j<N; ++j )
6650 for(
auto element=(*rhs).begin(j); element!=(*rhs).end(j); ++element )
6651 v_[element->index()+j*MM] -= element->value();
6669template<
typename Type
6675template<
typename MT >
6682 for(
size_t i=0UL; i<M; ++i )
6683 for(
auto element=(*rhs).begin(i); element!=(*rhs).end(i); ++element )
6684 v_[i+element->index()*MM] -= element->value();
6702template<
typename Type
6708template<
typename MT
6711 -> DisableIf_t< VectorizedSchurAssign_v<MT> >
6715 for(
size_t j=0UL; j<N; ++j ) {
6716 for(
size_t i=0UL; i<M; ++i ) {
6717 v_[i+j*MM] *= (*rhs)(i,j);
6737template<
typename Type
6743template<
typename MT
6746 -> EnableIf_t< VectorizedSchurAssign_v<MT> >
6752 constexpr bool remainder( PF ==
unpadded || !IsPadded_v<MT> );
6754 constexpr size_t ipos( remainder ?
prevMultiple( M, SIMDSIZE ) : M );
6757 for(
size_t j=0UL; j<N; ++j )
6761 for( ; i<ipos; i+=SIMDSIZE ) {
6762 store( i, j, load(i,j) * (*rhs).load(i,j) );
6764 for( ; remainder && i<M; ++i ) {
6765 v_[i+j*MM] *= (*rhs)(i,j);
6785template<
typename Type
6791template<
typename MT >
6796 const StaticMatrix tmp(
serial( *
this ) );
6800 for(
size_t j=0UL; j<N; ++j )
6801 for(
auto element=(*rhs).begin(j); element!=(*rhs).end(j); ++element )
6802 v_[element->index()+j*MM] = tmp.v_[element->index()+j*MM] * element->value();
6820template<
typename Type
6826template<
typename MT >
6833 const StaticMatrix tmp(
serial( *
this ) );
6837 for(
size_t i=0UL; i<M; ++i )
6838 for(
auto element=(*rhs).begin(i); element!=(*rhs).end(i); ++element )
6839 v_[i+element->index()*MM] = tmp.v_[i+element->index()*MM] * element->value();
6860template< RelaxationFlag RF,
typename Type,
size_t M,
size_t N,
bool SO, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
6861bool isDefault(
const StaticMatrix<Type,M,N,SO,AF,PF,Tag>& m );
6863template<
typename Type,
size_t M,
size_t N,
bool SO, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
6864bool isIntact(
const StaticMatrix<Type,M,N,SO,AF,PF,Tag>& m )
noexcept;
6866template<
typename Type,
size_t M,
size_t N,
bool SO, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
6867void swap( StaticMatrix<Type,M,N,SO,AF,PF,Tag>& a, StaticMatrix<Type,M,N,SO,AF,PF,Tag>& b )
noexcept;
6907 for(
size_t i=0UL; i<M; ++i )
6908 for(
size_t j=0UL; j<N; ++j )
6909 if( !isDefault<RF>( m(i,j) ) )
return false;
6912 for(
size_t j=0UL; j<N; ++j )
6913 for(
size_t i=0UL; i<M; ++i )
6914 if( !isDefault<RF>( m(i,j) ) )
return false;
6940template<
typename Type
6949 return m.isIntact();
6962template<
typename Type
6969inline void swap(
StaticMatrix<Type,M,N,SO,AF,PF,Tag>& a,
StaticMatrix<Type,M,N,SO,AF,PF,Tag>& b )
noexcept
6986template<
typename T,
size_t M,
size_t N,
bool SO, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
6987struct Size< StaticMatrix<T,M,N,SO,AF,PF,Tag>, 0UL >
6988 :
public Ptrdiff_t< static_cast<ptrdiff_t>(M) >
6991template<
typename T,
size_t M,
size_t N,
bool SO, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
6992struct Size< StaticMatrix<T,M,N,SO,AF,PF,Tag>, 1UL >
6993 :
public Ptrdiff_t< static_cast<ptrdiff_t>(N) >
7009template<
typename T,
size_t M,
size_t N,
bool SO, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
7010struct MaxSize< StaticMatrix<T,M,N,SO,AF,PF,Tag>, 0UL >
7011 :
public Ptrdiff_t< static_cast<ptrdiff_t>(M) >
7014template<
typename T,
size_t M,
size_t N,
bool SO, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
7015struct MaxSize< StaticMatrix<T,M,N,SO,AF,PF,Tag>, 1UL >
7016 :
public Ptrdiff_t< static_cast<ptrdiff_t>(N) >
7032template<
typename T,
size_t N,
bool SO, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
7033struct IsSquare< StaticMatrix<T,N,N,SO,AF,PF,Tag> >
7050template<
typename T,
size_t M,
size_t N,
bool SO, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
7051struct HasConstDataAccess< StaticMatrix<T,M,N,SO,AF,PF,Tag> >
7068template<
typename T,
size_t M,
size_t N,
bool SO, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
7069struct HasMutableDataAccess< StaticMatrix<T,M,N,SO,AF,PF,Tag> >
7086template<
typename T,
size_t M,
size_t N,
bool SO, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
7087struct IsAligned< StaticMatrix<T,M,N,SO,AF,PF,Tag> >
7104template<
typename T,
size_t M,
size_t N,
bool SO, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
7105struct IsContiguous< StaticMatrix<T,M,N,SO,AF,PF,Tag> >
7122template<
typename T,
size_t M,
size_t N,
bool SO, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
7123struct IsPadded< StaticMatrix<T,M,N,SO,AF,PF,Tag> >
7140template<
typename T1,
typename T2 >
7141struct AddTraitEval2< T1, T2
7149 static constexpr bool SO1 = StorageOrder_v<T1>;
7150 static constexpr bool SO2 = StorageOrder_v<T2>;
7152 static constexpr bool SO = ( IsDenseMatrix_v<T1> && IsDenseMatrix_v<T2>
7153 ? ( IsSymmetric_v<T1> ^ IsSymmetric_v<T2>
7154 ? ( IsSymmetric_v<T1>
7162 using Type = StaticMatrix< AddTrait_t< ElementType_t<T1>, ElementType_t<T2> >
7163 ,
max( Size_v<T1,0UL>, Size_v<T2,0UL> )
7164 ,
max( Size_v<T1,1UL>, Size_v<T2,1UL> )
7168 , AddTrait_t< TagType_t<T1>, TagType_t<T2> > >;
7184template<
typename T1,
typename T2 >
7185struct SubTraitEval2< T1, T2
7193 static constexpr bool SO1 = StorageOrder_v<T1>;
7194 static constexpr bool SO2 = StorageOrder_v<T2>;
7196 static constexpr bool SO = ( IsDenseMatrix_v<T1> && IsDenseMatrix_v<T2>
7197 ? ( IsSymmetric_v<T1> ^ IsSymmetric_v<T2>
7198 ? ( IsSymmetric_v<T1>
7206 using Type = StaticMatrix< SubTrait_t< ElementType_t<T1>, ElementType_t<T2> >
7207 ,
max( Size_v<T1,0UL>, Size_v<T2,0UL> )
7208 ,
max( Size_v<T1,1UL>, Size_v<T2,1UL> )
7212 , SubTrait_t< TagType_t<T1>, TagType_t<T2> > >;
7228template<
typename T1,
typename T2 >
7229struct SchurTraitEval2< T1, T2
7231 IsDenseMatrix_v<T2> &&
7237 static constexpr bool SO1 = StorageOrder_v<T1>;
7238 static constexpr bool SO2 = StorageOrder_v<T2>;
7240 static constexpr bool SO = ( IsSymmetric_v<T1> ^ IsSymmetric_v<T2>
7241 ? ( IsSymmetric_v<T1>
7246 using Type = StaticMatrix< MultTrait_t< ElementType_t<T1>, ElementType_t<T2> >
7247 ,
max( Size_v<T1,0UL>, Size_v<T2,0UL> )
7248 ,
max( Size_v<T1,1UL>, Size_v<T2,1UL> )
7252 , MultTrait_t< TagType_t<T1>, TagType_t<T2> > >;
7268template<
typename T1,
typename T2 >
7269struct MultTraitEval2< T1, T2
7275 using Type = StaticMatrix< MultTrait_t< ElementType_t<T1>, T2 >
7278 , StorageOrder_v<T1>
7281 , MultTrait_t< TagType_t<T1>, T2 > >;
7284template<
typename T1,
typename T2 >
7285struct MultTraitEval2< T1, T2
7291 using Type = StaticMatrix< MultTrait_t< T1, ElementType_t<T2> >
7294 , StorageOrder_v<T2>
7297 , MultTrait_t< T1, TagType_t<T2> > >;
7300template<
typename T1,
typename T2 >
7301struct MultTraitEval2< T1, T2
7303 IsRowVector_v<T2> &&
7307 using Type = StaticMatrix< MultTrait_t< ElementType_t<T1>, ElementType_t<T2> >
7313 , MultTrait_t< TagType_t<T1>, TagType_t<T2> > >;
7316template<
typename T1,
typename T2 >
7317struct MultTraitEval2< T1, T2
7325 using MultType = MultTrait_t< ElementType_t<T1>, ElementType_t<T2> >;
7326 using MultTag = MultTrait_t< TagType_t<T1>, TagType_t<T2> >;
7328 using Type = StaticMatrix< AddTrait_t<MultType,MultType>
7329 , ( Size_v<T1,0UL> !=
DefaultSize_v ? Size_v<T1,0UL> : Size_v<T2,0UL> )
7330 , ( Size_v<T2,1UL> !=
DefaultSize_v ? Size_v<T2,1UL> : Size_v<T1,1UL> )
7331 , ( IsSparseMatrix_v<T1> ? StorageOrder_v<T2> : StorageOrder_v<T1> )
7334 , AddTrait_t<MultTag,MultTag> >;
7350template<
typename T1,
typename T2 >
7351struct KronTraitEval2< T1, T2
7353 IsDenseMatrix_v<T2> &&
7359 using Type = StaticMatrix< MultTrait_t< ElementType_t<T1>, ElementType_t<T2> >
7360 , Size_v<T1,0UL> * Size_v<T2,0UL>
7361 , Size_v<T1,1UL> * Size_v<T2,1UL>
7362 , StorageOrder_v<T2>
7365 , MultTrait_t< TagType_t<T1>, TagType_t<T2> > >;
7381template<
typename T1,
typename T2 >
7382struct DivTraitEval2< T1, T2
7388 using Type = StaticMatrix< DivTrait_t< ElementType_t<T1>, T2 >
7391 , StorageOrder_v<T1>
7394 , DivTrait_t< TagType_t<T1>, T2 > >;
7410template<
typename T,
typename OP >
7411struct UnaryMapTraitEval2< T, OP
7416 using ElementType =
decltype( std::declval<OP>()( std::declval< ElementType_t<T> >() ) );
7418 using Type = StaticMatrix< EvaluateTrait_t<ElementType>
7424 , MapTrait_t< TagType_t<T>, OP > >;
7432template<
typename T1,
typename T2,
typename OP >
7433struct BinaryMapTraitEval2< T1, T2, OP
7435 IsRowVector_v<T2> &&
7439 using ElementType =
decltype( std::declval<OP>()( std::declval< ElementType_t<T1> >()
7440 , std::declval< ElementType_t<T2> >() ) );
7442 using Type = StaticMatrix< EvaluateTrait_t<ElementType>
7448 , MapTrait_t< TagType_t<T1>, TagType_t<T2>, OP > >;
7451template<
typename T1,
typename T2,
typename OP >
7452struct BinaryMapTraitEval2< T1, T2, OP
7460 using ElementType =
decltype( std::declval<OP>()( std::declval< ElementType_t<T1> >()
7461 , std::declval< ElementType_t<T2> >() ) );
7463 static constexpr bool SO1 = StorageOrder_v<T1>;
7464 static constexpr bool SO2 = StorageOrder_v<T2>;
7466 static constexpr bool SO = ( IsDenseMatrix_v<T1> && IsDenseMatrix_v<T2>
7467 ? ( IsSymmetric_v<T1> ^ IsSymmetric_v<T2>
7468 ? ( IsSymmetric_v<T1>
7476 using Type = StaticMatrix< EvaluateTrait_t<ElementType>
7477 ,
max( Size_v<T1,0UL>, Size_v<T2,0UL> )
7478 ,
max( Size_v<T1,1UL>, Size_v<T2,1UL> )
7482 , MapTrait_t< TagType_t<T1>, TagType_t<T2>, OP > >;
7498template<
typename T,
size_t E >
7499struct ExpandTraitEval2< T, E
7504 using Type = StaticMatrix< ElementType_t<T>
7505 , ( IsColumnVector_v<T> ? Size_v<T,0UL> : E )
7506 , ( IsColumnVector_v<T> ? E : Size_v<T,0UL> )
7526template<
typename T,
size_t R0,
size_t R1 >
7527struct RepeatTraitEval2< T, R0, R1,
inf
7534 using Type = StaticMatrix< ElementType_t<T>
7556template<
typename T1,
typename T2 >
7557struct SolveTraitEval2< T1, T2
7559 IsDenseMatrix_v<T2> &&
7565 using Type = StaticMatrix< ElementType_t<T2>
7566 ,
max( Size_v<T1,0UL>, Size_v<T1,1UL>, Size_v<T2,0UL> )
7568 , StorageOrder_v<T2>
7587template<
typename T1,
size_t M,
size_t N,
bool SO, AlignmentFlag AF, PaddingFlag PF,
typename Tag,
typename T2 >
7588struct HighType< StaticMatrix<T1,M,N,SO,AF,PF,Tag>, StaticMatrix<T2,M,N,SO,AF,PF,Tag> >
7590 using Type = StaticMatrix< typename HighType<T1,T2>::Type, M, N, SO, AF, PF, Tag >;
7606template<
typename T1,
size_t M,
size_t N,
bool SO, AlignmentFlag AF, PaddingFlag PF,
typename Tag,
typename T2 >
7607struct LowType< StaticMatrix<T1,M,N,SO,AF,PF,Tag>, StaticMatrix<T2,M,N,SO,AF,PF,Tag> >
7609 using Type = StaticMatrix< typename LowType<T1,T2>::Type, M, N, SO, AF, PF, Tag >;
7625template<
typename MT,
size_t I,
size_t J,
size_t M,
size_t N >
7626struct SubmatrixTraitEval2< MT, I, J, M, N
7628 IsDenseMatrix_v<MT> > >
7630 using Type = StaticMatrix< RemoveConst_t< ElementType_t<MT> >
7633 , StorageOrder_v<MT>
7652template<
typename MT,
size_t M >
7653struct RowsTraitEval2< MT, M
7655 IsDenseMatrix_v<MT> &&
7658 using Type = StaticMatrix< RemoveConst_t< ElementType_t<MT> >
7680template<
typename MT,
size_t N >
7681struct ColumnsTraitEval2< MT, N
7683 IsDenseMatrix_v<MT> &&
7686 using Type = StaticMatrix< RemoveConst_t< ElementType_t<MT> >
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::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.
Definition: Aliases.h:450
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.
Definition: Aliases.h:190
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 columns trait.
Header file for the conjugate shim.
Constraint on the data type.
Header file for the DenseIterator class template.
Constraint on the data type.
Header file for the division trait.
Header file for the EnableIf class template.
Header file for the EvaluateTrait class template.
Header file for the expand trait.
Constraint on the data type.
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 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 IsColumnMajorMatrix 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 IsDiagonal type trait.
Header file for the IsLower 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 IsRowMajorMatrix type trait.
Header file for the IsRowVector type trait.
Header file for the IsSIMDCombinable type trait.
Header file for the IsSame and IsStrictlySame type traits.
Header file for the IsScalar type trait.
Header file for the IsSparseMatrix type trait.
Header file for the IsSquare type trait.
Header file for the IsStrictlyLower type trait.
Header file for the IsStrictlyUpper type trait.
Header file for the IsSymmetric type trait.
Header file for the IsUpper 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.
Constraint on the data type.
Header file for the prevMultiple shim.
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 rows trait.
Header file for all SIMD functionality.
Header file for the Schur product trait.
Header file for the Solver trait.
Header file for the subtraction trait.
Header file for the submatrix trait.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Implementation of a generic iterator for dense vectors and matrices.
Definition: DenseIterator.h:60
Base class for dense matrices.
Definition: DenseMatrix.h:82
Base class for matrices.
Definition: Matrix.h:85
SIMD characteristics of data types.
Definition: SIMDTrait.h:297
Base class for sparse matrices.
Definition: SparseMatrix.h:77
Efficient implementation of a fixed-sized matrix.
Definition: StaticMatrix.h:249
AlignedArray< Type, M *NN, Alignment > AlignedStorage
Type of the aligned storage.
Definition: StaticMatrix.h:564
DenseMatrix< This, SO > BaseType
Base type of this StaticMatrix instance.
Definition: StaticMatrix.h:255
StaticMatrix< Type, M, N,!SO, AF, PF, Tag > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: StaticMatrix.h:259
DenseIterator< Type, AF > Iterator
Iterator over non-constant elements.
Definition: StaticMatrix.h:275
StaticMatrix & transpose()
In-place transpose of the matrix.
Definition: StaticMatrix.h:2128
BLAZE_ALWAYS_INLINE void storeu(size_t i, size_t j, const SIMDType &value) noexcept
Unaligned store of a SIMD element of the matrix.
Definition: StaticMatrix.h:2852
static constexpr size_t SIMDSIZE
The number of elements packed within a single SIMD vector.
Definition: StaticMatrix.h:434
const Type & ReturnType
Return type for expression template evaluations.
Definition: StaticMatrix.h:267
const This & CompositeType
Data type for composite expression templates.
Definition: StaticMatrix.h:268
static constexpr bool isAligned() noexcept
Returns whether the matrix is properly aligned in memory.
Definition: StaticMatrix.h:2635
constexpr Iterator begin(size_t i) noexcept
Returns an iterator to the first element of row/column i.
Definition: StaticMatrix.h:1262
static constexpr size_t Alignment
Alignment of the data elements.
Definition: StaticMatrix.h:560
Tag TagType
Tag type of this StaticMatrix instance.
Definition: StaticMatrix.h:266
static constexpr size_t NN
Alignment adjustment.
Definition: StaticMatrix.h:437
auto addAssign(const DenseMatrix< MT, SO2 > &rhs) -> DisableIf_t< VectorizedAddAssign_v< MT > >
Default implementation of the addition assignment of a row-major dense matrix.
Definition: StaticMatrix.h:3072
const Type * ConstPointer
Pointer to a constant matrix value.
Definition: StaticMatrix.h:273
Type ElementType
Type of the matrix elements.
Definition: StaticMatrix.h:264
DenseIterator< const Type, AF > ConstIterator
Iterator over constant elements.
Definition: StaticMatrix.h:276
BLAZE_ALWAYS_INLINE SIMDType load(size_t i, size_t j) const noexcept
Load of a SIMD element of the matrix.
Definition: StaticMatrix.h:2665
constexpr StaticMatrix & operator=(const Type &set) &
Homogenous assignment to all matrix elements.
Definition: StaticMatrix.h:1427
StaticMatrix()
The default constructor for StaticMatrix.
Definition: StaticMatrix.h:648
bool isAliased(const Other *alias) const noexcept
Returns whether the matrix is aliased with the given address alias.
Definition: StaticMatrix.h:2612
constexpr Reference operator()(size_t i, size_t j) noexcept
2D-access to the matrix elements.
Definition: StaticMatrix.h:1041
constexpr ConstIterator cbegin(size_t i) const noexcept
Returns an iterator to the first element of row/column i.
Definition: StaticMatrix.h:1316
auto subAssign(const DenseMatrix< MT, SO2 > &rhs) -> DisableIf_t< VectorizedSubAssign_v< MT > >
Default implementation of the subtraction assignment of a dense matrix.
Definition: StaticMatrix.h:3240
void swap(StaticMatrix &m) noexcept
Swapping the contents of two static matrices.
Definition: StaticMatrix.h:2092
StaticMatrix & ctranspose()
In-place conjugate transpose of the matrix.
Definition: StaticMatrix.h:2214
BLAZE_ALWAYS_INLINE void store(size_t i, size_t j, const SIMDType &value) noexcept
Store of a SIMD element of the matrix.
Definition: StaticMatrix.h:2777
BLAZE_ALWAYS_INLINE SIMDType loadu(size_t i, size_t j) const noexcept
Unaligned load of a SIMD element of the matrix.
Definition: StaticMatrix.h:2738
constexpr Iterator end(size_t i) noexcept
Returns an iterator just past the last element of row/column i.
Definition: StaticMatrix.h:1343
StaticMatrix< Type, M, N, SO, AF, PF, Tag > This
Type of this StaticMatrix instance.
Definition: StaticMatrix.h:253
StaticMatrix< Type, N, M,!SO, AF, PF, Tag > TransposeType
Transpose type for expression template evaluations.
Definition: StaticMatrix.h:262
constexpr Pointer data() noexcept
Low-level data access to the matrix elements.
Definition: StaticMatrix.h:1161
static constexpr size_t columns() noexcept
Returns the current number of columns of the matrix.
Definition: StaticMatrix.h:1885
constexpr bool isIntact() const noexcept
Returns whether the invariants of the static matrix are intact.
Definition: StaticMatrix.h:2545
bool canAlias(const Other *alias) const noexcept
Returns whether the matrix can alias with the given address alias.
Definition: StaticMatrix.h:2587
Reference at(size_t i, size_t j)
Checked access to the matrix elements.
Definition: StaticMatrix.h:1096
Type * Pointer
Pointer to a non-constant matrix value.
Definition: StaticMatrix.h:272
static constexpr size_t rows() noexcept
Returns the current number of rows of the matrix.
Definition: StaticMatrix.h:1866
AlignedStorage v_
The statically allocated matrix elements.
Definition: StaticMatrix.h:570
BLAZE_ALWAYS_INLINE void storea(size_t i, size_t j, const SIMDType &value) noexcept
Aligned store of a SIMD element of the matrix.
Definition: StaticMatrix.h:2811
BLAZE_ALWAYS_INLINE SIMDType loada(size_t i, size_t j) const noexcept
Aligned load of a SIMD element of the matrix.
Definition: StaticMatrix.h:2698
auto assign(const DenseMatrix< MT, SO2 > &rhs) -> DisableIf_t< VectorizedAssign_v< MT > >
Default implementation of the assignment of a dense matrix.
Definition: StaticMatrix.h:2929
static constexpr size_t spacing() noexcept
Returns the spacing between the beginning of two rows.
Definition: StaticMatrix.h:1907
constexpr void reset()
Reset to the default initial values.
Definition: StaticMatrix.h:2039
auto schurAssign(const DenseMatrix< MT, SO2 > &rhs) -> DisableIf_t< VectorizedSchurAssign_v< MT > >
Default implementation of the Schur product assignment of a dense matrix.
Definition: StaticMatrix.h:3408
Type & Reference
Reference to a non-constant matrix value.
Definition: StaticMatrix.h:270
static constexpr size_t capacity() noexcept
Returns the maximum capacity of the matrix.
Definition: StaticMatrix.h:1926
static constexpr bool smpAssignable
Compilation flag for SMP assignments.
Definition: StaticMatrix.h:310
BLAZE_ALWAYS_INLINE void stream(size_t i, size_t j, const SIMDType &value) noexcept
Aligned, non-temporal store of a SIMD element of the matrix.
Definition: StaticMatrix.h:2892
size_t nonZeros() const
Returns the total number of non-zero elements in the matrix.
Definition: StaticMatrix.h:1978
static constexpr bool simdEnabled
Compilation flag for SIMD optimization.
Definition: StaticMatrix.h:304
This ResultType
Result type for expression template evaluations.
Definition: StaticMatrix.h:256
const Type & ConstReference
Reference to a constant matrix value.
Definition: StaticMatrix.h:271
SIMDTrait_t< ElementType > SIMDType
SIMD type of the matrix elements.
Definition: StaticMatrix.h:265
constexpr ConstIterator cend(size_t i) const noexcept
Returns an iterator just past the last element of row/column i.
Definition: StaticMatrix.h:1397
Initializer list type of the Blaze library.
Header file for the DenseMatrix base class.
Header file for the SparseMatrix 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) 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) ctrans(const DenseMatrix< MT, SO > &dm)
Returns the conjugate transpose matrix of dm.
Definition: DMatMapExpr.h:1501
decltype(auto) trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:766
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:812
decltype(auto) inv(const DenseMatrix< MT, SO > &dm)
Calculation of the inverse of the given dense matrix.
Definition: DMatInvExpr.h:405
bool isIntact(const StaticMatrix< Type, M, N, SO, AF, PF, Tag > &m) noexcept
Returns whether the invariants of the given static matrix are intact.
Definition: StaticMatrix.h:6947
void swap(StaticMatrix< Type, M, N, SO, AF, PF, Tag > &a, StaticMatrix< Type, M, N, SO, AF, PF, Tag > &b) noexcept
Swapping the contents of two static matrices.
Definition: StaticMatrix.h:6969
bool isDefault(const StaticMatrix< Type, M, N, SO, AF, PF, Tag > &m)
Returns whether the given dynamic matrix is in default state.
Definition: StaticMatrix.h:6904
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SYMMETRIC_MATRIX_TYPE(T)
Constraint on the data type.
Definition: Symmetric.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_DIAGONAL_MATRIX_TYPE(T)
Constraint on the data type.
Definition: Diagonal.h:79
BLAZE_ALWAYS_INLINE void cswap(T &a, T &b) noexcept(IsNumeric_v< T >)
Swapping two conjugated values/objects.
Definition: Conjugate.h:193
BLAZE_ALWAYS_INLINE void conjugate(T &a) noexcept(IsNumeric_v< T >)
In-place conjugation of the given value/object.
Definition: Conjugate.h:118
constexpr bool HasSIMDSub_v
Auxiliary variable template for the HasSIMDSub type trait.
Definition: HasSIMDSub.h:187
constexpr bool IsScalar_v
Auxiliary variable template for the IsScalar type trait.
Definition: IsScalar.h:104
constexpr bool IsRowMajorMatrix_v
Auxiliary variable template for the IsRowMajorMatrix type trait.
Definition: IsRowMajorMatrix.h:129
constexpr bool IsSIMDCombinable_v
Auxiliary variable template for the IsSIMDCombinable type trait.
Definition: IsSIMDCombinable.h:137
constexpr ptrdiff_t DefaultSize_v
Default size of the Size type trait.
Definition: Size.h:72
constexpr bool IsDiagonal_v
Auxiliary variable template for the IsDiagonal type trait.
Definition: IsDiagonal.h:148
constexpr bool IsColumnMajorMatrix_v
Auxiliary variable template for the IsColumnMajorMatrix type trait.
Definition: IsColumnMajorMatrix.h:129
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 HasSIMDMult_v
Auxiliary variable template for the HasSIMDMult type trait.
Definition: HasSIMDMult.h:188
constexpr bool IsDenseMatrix_v
Auxiliary variable template for the IsDenseMatrix type trait.
Definition: IsDenseMatrix.h:124
constexpr bool IsDenseVector_v
Auxiliary variable template for the IsDenseVector type trait.
Definition: IsDenseVector.h:124
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
constexpr size_t determineColumns(initializer_list< initializer_list< Type > > list) noexcept
Determines the maximum number of columns specified by the given initializer list.
Definition: InitializerList.h:107
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
@ unaligned
Flag for unaligned vectors and matrices.
Definition: AlignmentFlag.h:64
@ 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
constexpr size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:644
constexpr void reset(Matrix< MT, SO > &matrix)
Resetting the given matrix.
Definition: Matrix.h:806
constexpr size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:660
void ctranspose(Matrix< MT, SO > &matrix)
In-place conjugate transpose of the given matrix.
Definition: Matrix.h:1221
constexpr size_t size(const Matrix< MT, SO > &matrix) noexcept
Returns the total number of elements of the matrix.
Definition: Matrix.h:676
void transpose(Matrix< MT, SO > &matrix)
In-place transpose of the given matrix.
Definition: Matrix.h:1195
#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
BLAZE_ALWAYS_INLINE const EnableIf_t< IsIntegral_v< T > &&HasSize_v< T, 1UL >, If_t< IsSigned_v< T >, SIMDint8, SIMDuint8 > > set(T value) noexcept
Sets all values in the vector to the given 1-byte integral value.
Definition: Set.h:75
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(expr)
Compile time assertion macro.
Definition: StaticAssert.h:112
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 IsVectorizable_v
Auxiliary variable template for the IsVectorizable type trait.
Definition: IsVectorizable.h:157
constexpr size_t AlignmentOf_v
Auxiliary variable template for the AlignmentOf type trait.
Definition: AlignmentOf.h:239
BoolConstant< true > TrueType
Type traits base class.
Definition: IntegralConstant.h:132
void deallocate(T *address) noexcept
Deallocation of memory for built-in data types.
Definition: Memory.h:230
BoolConstant< false > FalseType
Type/value traits base class.
Definition: IntegralConstant.h:121
IntegralConstant< ptrdiff_t, N > Ptrdiff_t
Compile time integral constant wrapper for ptrdiff_t.
Definition: IntegralConstant.h:237
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition: EnableIf.h:138
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition: MaybeUnused.h:81
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.
Definition: IntegralConstant.h:110
#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
typename EnableIf<!Condition, T >::Type DisableIf_t
Auxiliary type for the EnableIf class template.
Definition: EnableIf.h:175
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.
constexpr bool rowMajor
Storage order flag for row-major matrices.
Definition: StorageOrder.h:71
constexpr bool columnMajor
Storage order flag for column-major matrices.
Definition: StorageOrder.h:99
Header file for all forward declarations for dense vectors and matrices.
Header file for the Size type trait.
Header file for the StorageOrder type trait.
Header file for the clear shim.
Header file for the serial shim.
Generic wrapper for a compile time constant integral value.
Definition: IntegralConstant.h:74
Compile time check for square matrices.
Definition: IsSquare.h:89
Rebind mechanism to obtain a StaticMatrix with different data/element type.
Definition: StaticMatrix.h:283
StaticMatrix< NewType, M, N, SO, AF, PF, Tag > Other
The type of the other StaticMatrix.
Definition: StaticMatrix.h:284
Resize mechanism to obtain a StaticMatrix with different fixed dimensions.
Definition: StaticMatrix.h:293
StaticMatrix< Type, NewM, NewN, SO, AF, PF, Tag > Other
The type of the other StaticMatrix.
Definition: StaticMatrix.h:294
System settings for the inline keywords.
System settings for performance optimizations.
Header file for basic type definitions.
Header file for the generic max algorithm.
Header file for the generic min algorithm.