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
320 template<
typename Other >
323 template<
typename Other,
size_t Rows,
size_t Cols >
326 template<
typename Other,
size_t Rows,
size_t Cols >
331 template<
typename Other,
bool SO2, AlignmentFlag AF2, PaddingFlag PF2 >
334 template<
typename MT,
bool SO2 >
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;
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> &&
496 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
497 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
510 template< typename MT,
bool SO2 >
513 template< typename MT,
bool SO2 >
514 inline auto
assign( const DenseMatrix<MT,SO2>& rhs ) ->
EnableIf_t< VectorizedAssign_v<MT> >;
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
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];
799 for(
size_t j=n; j<
NN; ++j )
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 ) {
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;
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;
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 ) {
1721template<
typename Type
1728template<
typename MT
1733 using blaze::addAssign;
1737 if( (*rhs).rows() != M || (*rhs).columns() != N ) {
1741 if( (*rhs).canAlias(
this ) ) {
1766template<
typename Type
1773template<
typename MT
1778 using blaze::subAssign;
1782 if( (*rhs).rows() != M || (*rhs).columns() != N ) {
1786 if( (*rhs).canAlias(
this ) ) {
1811template<
typename Type
1818template<
typename MT
1823 using blaze::schurAssign;
1827 if( (*rhs).rows() != M || (*rhs).columns() != N ) {
1831 if( (*rhs).canAlias(
this ) ) {
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 )
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 )
2032template<
typename Type
2043 for(
size_t i=0UL; i<M; ++i )
2044 for(
size_t j=0UL; j<N; ++j )
2061template<
typename Type
2073 for(
size_t j=0UL; j<N; ++j )
2085template<
typename Type
2096 for(
size_t i=0UL; i<M; ++i ) {
2097 for(
size_t j=0UL; j<N; ++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 )
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 ) {
2244template<
typename Type
2273template<
typename Type
2303template<
typename Type
2310template<
typename Other >
2312 StaticMatrix<Type,M,N,SO,AF,PF,Tag>::scale(
const Other& scalar )
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
2369template<
typename Type
2396template<
typename Type
2424template<
typename Type
2447template<
typename Type
2467template<
typename Type
2487template<
typename Type
2507template<
typename Type
2538template<
typename Type
2548 for(
size_t i=0UL; i<M; ++i ) {
2549 for(
size_t j=N; j<
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
2730template<
typename Type
2769template<
typename Type
2803template<
typename Type
2844template<
typename Type
2884template<
typename Type
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
2975 for(
size_t i=0UL; i<M; ++i )
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 )
3081 v_[i*
NN+i] += (*rhs)(i,i);
3093 for(
size_t j=jbegin; j<jend; ++j ) {
3094 v_[i*
NN+j] += (*rhs)(i,j);
3113template<
typename Type
3120template<
typename MT
3132 for(
size_t i=0UL; i<M; ++i )
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 )
3249 v_[i*
NN+i] -= (*rhs)(i,i);
3261 for(
size_t j=jbegin; j<jend; ++j ) {
3262 v_[i*
NN+j] -= (*rhs)(i,j);
3281template<
typename Type
3288template<
typename MT
3300 for(
size_t i=0UL; i<M; ++i )
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
3454 for(
size_t i=0UL; i<M; ++i )
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
3636 constexpr StaticMatrix( initializer_list< initializer_list<Type> > list );
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 >
3652 template<
typename MT,
bool SO >
3688 constexpr
StaticMatrix& operator=( initializer_list< initializer_list<Type> > list ) &;
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
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];
4079 for(
size_t i=m; i<MM; ++i )
4080 clear( v_[i+j*MM] );
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 ) {
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
4699 for(
size_t j=0UL; j<N; ++j )
4700 for(
size_t i=0UL; i<M; ++i )
4735template<
typename Type
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
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
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
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 ) {
4969 assign( *
this, tmp );
4974 assign( *
this, *rhs );
4996template<
typename Type
5002template<
typename MT
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 ) ) {
5017 addAssign( *
this, tmp );
5020 addAssign( *
this, *rhs );
5042template<
typename Type
5048template<
typename MT
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 ) ) {
5063 subAssign( *
this, tmp );
5066 subAssign( *
this, *rhs );
5088template<
typename Type
5094template<
typename MT
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 ) ) {
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 )
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 )
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
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
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 >
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
5649template<
typename Type
5677template<
typename Type
5706template<
typename Type
5730template<
typename Type
5751template<
typename Type
5772template<
typename Type
5793template<
typename Type
5825template<
typename Type
5834 for(
size_t j=0UL; j<N; ++j ) {
5835 for(
size_t i=M; i<MM; ++i ) {
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
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
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
6371 for(
size_t j=0UL; j<N; ++j )
6375 v_[j+j*MM] += (*rhs)(j,j);
6387 for(
size_t i=ibegin; i<iend; ++i ) {
6388 v_[i+j*MM] += (*rhs)(i,j);
6409template<
typename Type
6415template<
typename MT
6427 for(
size_t j=0UL; j<N; ++j )
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
6543 for(
size_t j=0UL; j<N; ++j )
6547 v_[j+j*MM] -= (*rhs)(j,j);
6559 for(
size_t i=ibegin; i<iend; ++i ) {
6560 v_[i+j*MM] -= (*rhs)(i,j);
6581template<
typename Type
6587template<
typename MT
6599 for(
size_t j=0UL; j<N; ++j )
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
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
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 >
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 >
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 >
6863template<
typename Type,
size_t M,
size_t N,
bool SO, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
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 )
6912 for(
size_t j=0UL; j<N; ++j )
6913 for(
size_t i=0UL; i<M; ++i )
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 >
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 >
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 >
7016 :
public Ptrdiff_t< static_cast<ptrdiff_t>(N) >
7032template<
typename T,
size_t N,
bool SO, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
7050template<
typename T,
size_t M,
size_t N,
bool SO, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
7068template<
typename T,
size_t M,
size_t N,
bool SO, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
7086template<
typename T,
size_t M,
size_t N,
bool SO, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
7104template<
typename T,
size_t M,
size_t N,
bool SO, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
7122template<
typename T,
size_t M,
size_t N,
bool SO, AlignmentFlag AF, PaddingFlag PF,
typename Tag >
7140template<
typename T1,
typename T2 >
7141struct AddTraitEval2< T1, T2
7184template<
typename T1,
typename T2 >
7185struct SubTraitEval2< T1, T2
7228template<
typename T1,
typename T2 >
7229struct SchurTraitEval2< T1, T2
7268template<
typename T1,
typename T2 >
7269struct MultTraitEval2< T1, T2
7284template<
typename T1,
typename T2 >
7285struct MultTraitEval2< T1, T2
7300template<
typename T1,
typename T2 >
7301struct MultTraitEval2< T1, T2
7316template<
typename T1,
typename T2 >
7317struct MultTraitEval2< T1, T2
7350template<
typename T1,
typename T2 >
7351struct KronTraitEval2< T1, T2
7381template<
typename T1,
typename T2 >
7382struct DivTraitEval2< T1, T2
7410template<
typename T,
typename OP >
7411struct UnaryMapTraitEval2< T, OP
7416 using ElementType =
decltype( std::declval<OP>()( std::declval< ElementType_t<T> >() ) );
7432template<
typename T1,
typename T2,
typename OP >
7433struct BinaryMapTraitEval2< T1, T2, OP
7439 using ElementType =
decltype( std::declval<OP>()( std::declval< ElementType_t<T1> >()
7440 , std::declval< ElementType_t<T2> >() ) );
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> >() ) );
7498template<
typename T,
size_t E >
7499struct ExpandTraitEval2< T, E
7526template<
typename T,
size_t R0,
size_t R1 >
7527struct RepeatTraitEval2< T, R0, R1,
inf
7556template<
typename T1,
typename T2 >
7557struct SolveTraitEval2< T1, 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
7652template<
typename MT,
size_t M >
7653struct RowsTraitEval2< MT, M
7680template<
typename MT,
size_t N >
7681struct ColumnsTraitEval2< MT, N
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 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 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 dense matrices.
Definition DenseMatrix.h:82
Base class for matrices.
Definition Matrix.h:85
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
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
Definition StaticMatrix.h:275
StaticMatrix & transpose()
BLAZE_ALWAYS_INLINE void storeu(size_t i, size_t j, const SIMDType &value) noexcept
static constexpr size_t SIMDSIZE
Definition StaticMatrix.h:434
StaticMatrix(const Other(&array)[Rows][Cols])
Array initialization of all matrix elements.
Definition StaticMatrix.h:846
const Type & ReturnType
Definition StaticMatrix.h:267
const This & CompositeType
Definition StaticMatrix.h:268
static constexpr bool isAligned() noexcept
constexpr Iterator begin(size_t i) noexcept
static constexpr size_t Alignment
Definition StaticMatrix.h:560
Tag TagType
Definition StaticMatrix.h:266
static constexpr size_t NN
Definition StaticMatrix.h:437
auto addAssign(const DenseMatrix< MT, SO2 > &rhs) -> DisableIf_t< VectorizedAddAssign_v< MT > >
const Type * ConstPointer
Definition StaticMatrix.h:273
Type ElementType
Definition StaticMatrix.h:264
DenseIterator< const Type, AF > ConstIterator
Definition StaticMatrix.h:276
BLAZE_ALWAYS_INLINE SIMDType load(size_t i, size_t j) const noexcept
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
StaticMatrix(const StaticMatrix< Other, M, N, SO2, AF2, PF2, Tag > &m)
Conversion constructor from different StaticMatrix instances.
Definition StaticMatrix.h:955
bool isAliased(const Other *alias) const noexcept
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
auto subAssign(const DenseMatrix< MT, SO2 > &rhs) -> DisableIf_t< VectorizedSubAssign_v< MT > >
void swap(StaticMatrix &m) noexcept
StaticMatrix & ctranspose()
BLAZE_ALWAYS_INLINE void store(size_t i, size_t j, const SIMDType &value) noexcept
BLAZE_ALWAYS_INLINE SIMDType loadu(size_t i, size_t j) const noexcept
StaticMatrix(size_t m, size_t n, const Other *array)
Array initialization of all matrix elements.
Definition StaticMatrix.h:785
constexpr Iterator end(size_t i) noexcept
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
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
constexpr bool isIntact() const noexcept
bool canAlias(const Other *alias) const noexcept
Reference at(size_t i, size_t j)
Checked access to the matrix elements.
Definition StaticMatrix.h:1096
Type * Pointer
Definition StaticMatrix.h:272
static constexpr size_t rows() noexcept
AlignedStorage v_
Definition StaticMatrix.h:570
BLAZE_ALWAYS_INLINE void storea(size_t i, size_t j, const SIMDType &value) noexcept
BLAZE_ALWAYS_INLINE SIMDType loada(size_t i, size_t j) const noexcept
constexpr StaticMatrix(const StaticMatrix &m)
The copy constructor for StaticMatrix.
Definition StaticMatrix.h:930
auto assign(const DenseMatrix< MT, SO2 > &rhs) -> DisableIf_t< VectorizedAssign_v< MT > >
ConstReference at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition StaticMatrix.h:1128
static constexpr size_t spacing() noexcept
constexpr ConstReference operator()(size_t i, size_t j) const noexcept
2D-access to the matrix elements.
Definition StaticMatrix.h:1068
auto schurAssign(const DenseMatrix< MT, SO2 > &rhs) -> DisableIf_t< VectorizedSchurAssign_v< MT > >
Type & Reference
Definition StaticMatrix.h:270
static constexpr size_t capacity() noexcept
constexpr StaticMatrix(initializer_list< initializer_list< Type > > list)
List initialization of all matrix elements.
Definition StaticMatrix.h:728
static constexpr bool smpAssignable
Definition StaticMatrix.h:310
StaticMatrix(const Matrix< MT, SO2 > &m)
Conversion constructor from different matrices.
Definition StaticMatrix.h:990
BLAZE_ALWAYS_INLINE void stream(size_t i, size_t j, const SIMDType &value) noexcept
static constexpr bool simdEnabled
Definition StaticMatrix.h:304
This ResultType
Result type for expression template evaluations.
Definition StaticMatrix.h:256
const Type & ConstReference
Definition StaticMatrix.h:271
StaticMatrix(const std::array< std::array< Other, Cols >, Rows > &array)
Initialization of all matrix elements from the given std::array.
Definition StaticMatrix.h:896
SIMDTrait_t< ElementType > SIMDType
Definition StaticMatrix.h:265
constexpr ConstIterator cend(size_t i) const noexcept
StaticMatrix(const Type &init)
Constructor for a homogenous initialization of all elements.
Definition StaticMatrix.h:680
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 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_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
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 IsStrictlyUpper_v
Auxiliary variable template for the IsStrictlyUpper type trait.
Definition IsStrictlyUpper.h:173
constexpr bool IsSymmetric_v
Auxiliary variable template for the IsSymmetric type trait.
Definition IsSymmetric.h:172
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 IsStrictlyLower_v
Auxiliary variable template for the IsStrictlyLower type trait.
Definition IsStrictlyLower.h:173
constexpr bool IsRowMajorMatrix_v
Auxiliary variable template for the IsRowMajorMatrix type trait.
Definition IsRowMajorMatrix.h:129
constexpr bool IsUpper_v
Auxiliary variable template for the IsUpper type trait.
Definition IsUpper.h:175
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 IsDiagonal_v
Auxiliary variable template for the IsDiagonal type trait.
Definition IsDiagonal.h:148
constexpr bool StorageOrder_v
Auxiliary variable template for the StorageOrder type trait.
Definition StorageOrder.h:93
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 IsSparseMatrix_v
Auxiliary variable template for the IsSparseMatrix type trait.
Definition IsSparseMatrix.h:124
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 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
constexpr bool IsLower_v
Auxiliary variable template for the IsLower type trait.
Definition IsLower.h:175
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 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 IsSame_v
Auxiliary variable template for the IsSame type trait.
Definition IsSame.h:159
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
BoolConstant< false > FalseType
Type/value traits base class.
Definition IntegralConstant.h:121
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.
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.
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
Compile time check for square matrices.
Definition IsSquare.h:89
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
Compile time evaluation of the size of vectors and matrices.
Definition Size.h:119
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.