35#ifndef _BLAZE_MATH_DENSE_CUSTOMMATRIX_H_
36#define _BLAZE_MATH_DENSE_CUSTOMMATRIX_H_
415template<
typename Type
422 :
public DenseMatrix< CustomMatrix<Type,AF,PF,SO,Tag,RT>, SO >
456 template<
typename NewType >
466 template<
size_t NewM
494 inline CustomMatrix( Type* ptr,
size_t m,
size_t n,
size_t nn );
531 inline
CustomMatrix& operator=( initializer_list< initializer_list<Type> > list );
533 template< typename Other,
size_t Rows,
size_t Cols >
534 inline
CustomMatrix& operator=( const Other (&array)[Rows][Cols] );
536 template< typename Other,
size_t Rows,
size_t Cols >
537 inline
CustomMatrix& operator=( const std::array<std::array<Other,Cols>,Rows>& array );
542 template< typename MT,
bool SO2 > inline
CustomMatrix& operator= ( const
Matrix<MT,SO2>& rhs );
543 template< typename MT,
bool SO2 > inline
CustomMatrix& operator+=( const
Matrix<MT,SO2>& rhs );
544 template< typename MT,
bool SO2 > inline
CustomMatrix& operator-=( const
Matrix<MT,SO2>& rhs );
545 template< typename MT,
bool SO2 > inline
CustomMatrix& operator%=( const
Matrix<MT,SO2>& rhs );
552 inline
size_t rows() const noexcept;
553 inline
size_t columns() const noexcept;
554 inline
size_t spacing() const noexcept;
555 inline
size_t capacity() const noexcept;
556 inline
size_t capacity(
size_t i ) const noexcept;
558 inline
size_t nonZeros(
size_t i ) const;
560 inline
void reset(
size_t i );
572 template< typename Other > inline
CustomMatrix& scale( const Other& scalar );
579 inline
void reset( Type* ptr,
size_t m,
size_t n );
580 inline
void reset( Type* ptr,
size_t m,
size_t n,
size_t nn );
588 template< typename MT >
589 static constexpr
bool VectorizedAssign_v =
590 ( useOptimizedKernels &&
599 template< typename MT >
600 static constexpr
bool VectorizedAddAssign_v =
601 ( VectorizedAssign_v<MT> &&
610 template< typename MT >
611 static constexpr
bool VectorizedSubAssign_v =
612 ( VectorizedAssign_v<MT> &&
621 template< typename MT >
622 static constexpr
bool VectorizedSchurAssign_v =
623 ( VectorizedAssign_v<MT> &&
637 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
638 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
652 template< typename MT >
655 template< typename MT >
662 template< typename MT >
665 template< typename MT >
672 template< typename MT >
675 template< typename MT >
682 template< typename MT >
685 template< typename MT >
736template< typename Type
771template<
typename Type
785 if( ptr ==
nullptr ) {
818template<
typename Type
834 if( ptr ==
nullptr ) {
842 if( PF && IsVectorizable_v<Type> && (
nn_ < nextMultiple<size_t>(
n_,
SIMDSIZE ) ) ) {
846 if( PF && IsVectorizable_v<Type> ) {
848 for(
size_t i=0UL; i<
m_; ++i ) {
849 for(
size_t j=
n_; j<
nn_; ++j )
864template<
typename Type
884template<
typename Type
917template<
typename Type
951template<
typename Type
977template<
typename Type
1004template<
typename Type
1019 return (*
this)(i,j);
1035template<
typename Type
1050 return (*
this)(i,j);
1067template<
typename Type
1093template<
typename Type
1115template<
typename Type
1138template<
typename Type
1164template<
typename Type
1190template<
typename Type
1216template<
typename Type
1242template<
typename Type
1268template<
typename Type
1294template<
typename Type
1323template<
typename Type
1332 for(
size_t i=0UL; i<m_; ++i )
1333 for(
size_t j=0UL; j<n_; ++j )
1369template<
typename Type
1384 for(
const auto& rowList : list ) {
1385 std::fill( std::copy( rowList.begin(), rowList.end(), v_+i*nn_ ),
1386 v_+i*nn_+( PF ? nn_ : n_ ), Type() );
1424template<
typename Type
1430template<
typename Other
1436 if( m_ != Rows || n_ != Cols ) {
1440 for(
size_t i=0UL; i<Rows; ++i )
1441 for(
size_t j=0UL; j<Cols; ++j )
1442 v_[i*nn_+j] = array[i][j];
1478template<
typename Type
1484template<
typename Other
1490 if( m_ != Rows || n_ != Cols ) {
1494 for(
size_t i=0UL; i<Rows; ++i )
1495 for(
size_t j=0UL; j<Cols; ++j )
1496 v_[i*nn_+j] = array[i][j];
1513template<
typename Type
1539template<
typename Type
1575template<
typename Type
1581template<
typename MT
1586 using TT =
decltype(
trans( *
this ) );
1587 using CT =
decltype(
ctrans( *
this ) );
1588 using IT =
decltype(
inv( *
this ) );
1592 if( (*rhs).rows() != m_ || (*rhs).columns() != n_ ) {
1596 if( IsSame_v<MT,TT> && (*rhs).isAliased(
this ) ) {
1599 else if( IsSame_v<MT,CT> && (*rhs).isAliased(
this ) ) {
1602 else if( !IsSame_v<MT,IT> && (*rhs).canAlias(
this ) ) {
1607 if( IsSparseMatrix_v<MT> )
1627template<
typename Type
1633template<
typename MT
1640 if( (*rhs).rows() != m_ || (*rhs).columns() != n_ ) {
1644 if( (*rhs).canAlias(
this ) ) {
1667template<
typename Type
1673template<
typename MT
1680 if( (*rhs).rows() != m_ || (*rhs).columns() != n_ ) {
1684 if( (*rhs).canAlias(
this ) ) {
1707template<
typename Type
1713template<
typename MT
1720 if( (*rhs).rows() != m_ || (*rhs).columns() != n_ ) {
1724 if( (*rhs).canAlias(
this ) ) {
1750template<
typename Type
1768template<
typename Type
1791template<
typename Type
1809template<
typename Type
1833template<
typename Type
1857template<
typename Type
1865 size_t nonzeros( 0UL );
1867 for(
size_t i=0UL; i<m_; ++i )
1868 for(
size_t j=0UL; j<n_; ++j )
1869 if( !isDefault<strict>( v_[i*nn_+j] ) )
1889template<
typename Type
1899 const size_t jend( i*nn_ + n_ );
1900 size_t nonzeros( 0UL );
1902 for(
size_t j=i*nn_; j<jend; ++j )
1903 if( !isDefault<strict>( v_[j] ) )
1916template<
typename Type
1926 for(
size_t i=0UL; i<m_; ++i )
1927 for(
size_t j=0UL; j<n_; ++j )
1928 clear( v_[i*nn_+j] );
1944template<
typename Type
1955 for(
size_t j=0UL; j<n_; ++j )
1956 clear( v_[i*nn_+j] );
1968template<
typename Type
1990template<
typename Type
2024template<
typename Type
2030inline CustomMatrix<Type,AF,PF,SO,Tag,RT>&
CustomMatrix<Type,AF,PF,SO,Tag,RT>::transpose()
2038 for(
size_t i=1UL; i<m_; ++i )
2039 for(
size_t j=0UL; j<i; ++j )
2040 swap( v_[i*nn_+j], v_[j*nn_+i] );
2055template<
typename Type
2061inline CustomMatrix<Type,AF,PF,SO,Tag,RT>&
CustomMatrix<Type,AF,PF,SO,Tag,RT>::ctranspose()
2067 for(
size_t i=0UL; i<m_; ++i ) {
2068 for(
size_t j=0UL; j<i; ++j ) {
2069 cswap( v_[i*nn_+j], v_[j*nn_+i] );
2100template<
typename Type
2106template<
typename Other >
2110 for(
size_t i=0UL; i<m_; ++i )
2111 for(
size_t j=0UL; j<n_; ++j )
2112 v_[i*nn_+j] *= scalar;
2150template<
typename Type
2189template<
typename Type
2221template<
typename Type
2227template<
typename Other >
2230 return static_cast<const void*
>( this ) ==
static_cast<const void*
>( alias );
2245template<
typename Type
2251template<
typename Other >
2254 return static_cast<const void*
>( this ) ==
static_cast<const void*
>( alias );
2268template<
typename Type
2291template<
typename Type
2299 return (
rows() *
columns() >= SMP_DMATASSIGN_THRESHOLD );
2319template<
typename Type
2329 return loada( i, j );
2331 return loadu( i, j );
2351template<
typename Type
2370 return loada( v_+i*nn_+j );
2390template<
typename Type
2407 return loadu( v_+i*nn_+j );
2428template<
typename Type
2461template<
typename Type
2480 storea( v_+i*nn_+j, value );
2501template<
typename Type
2518 storeu( v_+i*nn_+j, value );
2540template<
typename Type
2559 stream( v_+i*nn_+j, value );
2575template<
typename Type
2581template<
typename MT >
2591 for(
size_t i=0UL; i<m_; ++i ) {
2592 for(
size_t j=0UL; j<jpos; j+=2UL ) {
2593 v_[i*nn_+j ] = (*rhs)(i,j );
2594 v_[i*nn_+j+1UL] = (*rhs)(i,j+1UL);
2597 v_[i*nn_+jpos] = (*rhs)(i,jpos);
2615template<
typename Type
2621template<
typename MT >
2630 constexpr bool remainder( !PF || !IsPadded_v<MT> );
2632 const size_t jpos( remainder ?
prevMultiple( n_, SIMDSIZE ): n_ );
2635 if( AF && PF && useStreaming &&
2636 ( m_*n_ > ( cacheSize / (
sizeof(Type) * 3UL ) ) ) && !(*rhs).isAliased(
this ) )
2638 for(
size_t i=0UL; i<m_; ++i )
2641 Iterator left(
begin(i) );
2644 for( ; j<jpos; j+=SIMDSIZE ) {
2645 left.stream( right.load() ); left += SIMDSIZE, right += SIMDSIZE;
2647 for( ; remainder && j<n_; ++j ) {
2648 *left = *right; ++left; ++right;
2654 for(
size_t i=0UL; i<m_; ++i )
2657 Iterator left(
begin(i) );
2658 ConstIterator_t<MT> right( (*rhs).begin(i) );
2660 for( ; (j+SIMDSIZE*3UL) < jpos; j+=SIMDSIZE*4UL ) {
2661 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2662 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2663 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2664 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2666 for( ; j<jpos; j+=SIMDSIZE ) {
2667 left.store( right.load() ); left+=SIMDSIZE, right+=SIMDSIZE;
2669 for( ; remainder && j<n_; ++j ) {
2670 *left = *right; ++left; ++right;
2689template<
typename Type
2695template<
typename MT >
2703 constexpr size_t block( BLOCK_SIZE );
2705 for(
size_t ii=0UL; ii<m_; ii+=block ) {
2706 const size_t iend(
min( m_, ii+block ) );
2707 for(
size_t jj=0UL; jj<n_; jj+=block ) {
2708 const size_t jend(
min( n_, jj+block ) );
2709 for(
size_t i=ii; i<iend; ++i ) {
2710 for(
size_t j=jj; j<jend; ++j ) {
2711 v_[i*nn_+j] = (*rhs)(i,j);
2731template<
typename Type
2737template<
typename MT >
2743 for(
size_t i=0UL; i<m_; ++i )
2744 for(
auto element=(*rhs).begin(i); element!=(*rhs).end(i); ++element )
2745 v_[i*nn_+element->index()] = element->value();
2761template<
typename Type
2767template<
typename MT >
2775 for(
size_t j=0UL; j<n_; ++j )
2776 for(
auto element=(*rhs).begin(j); element!=(*rhs).end(j); ++element )
2777 v_[element->index()*nn_+j] = element->value();
2793template<
typename Type
2799template<
typename MT >
2806 for(
size_t i=0UL; i<m_; ++i )
2808 if( IsDiagonal_v<MT> )
2810 v_[i*nn_+i] += (*rhs)(i,i);
2814 const size_t jbegin( ( IsUpper_v<MT> )
2815 ?( IsStrictlyUpper_v<MT> ? i+1UL : i )
2817 const size_t jend ( ( IsLower_v<MT> )
2818 ?( IsStrictlyLower_v<MT> ? i : i+1UL )
2824 for( ; (j+2UL) <= jend; j+=2UL ) {
2825 v_[i*nn_+j ] += (*rhs)(i,j );
2826 v_[i*nn_+j+1UL] += (*rhs)(i,j+1UL);
2829 v_[i*nn_+j] += (*rhs)(i,j);
2848template<
typename Type
2854template<
typename MT >
2864 constexpr bool remainder( !PF || !IsPadded_v<MT> );
2866 for(
size_t i=0UL; i<m_; ++i )
2868 const size_t jbegin( ( IsUpper_v<MT> )
2869 ?(
prevMultiple( ( IsStrictlyUpper_v<MT> ? i+1UL : i ), SIMDSIZE ) )
2871 const size_t jend ( ( IsLower_v<MT> )
2872 ?( IsStrictlyLower_v<MT> ? i : i+1UL )
2876 const size_t jpos( remainder ?
prevMultiple( jend, SIMDSIZE ) : jend );
2880 Iterator left(
begin(i) + jbegin );
2883 for( ; (j+SIMDSIZE*3UL) < jpos; j+=SIMDSIZE*4UL ) {
2884 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2885 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2886 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2887 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2889 for( ; j<jpos; j+=SIMDSIZE ) {
2890 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2892 for( ; remainder && j<jend; ++j ) {
2893 *left += *right; ++left; ++right;
2911template<
typename Type
2917template<
typename MT >
2925 constexpr size_t block( BLOCK_SIZE );
2927 for(
size_t ii=0UL; ii<m_; ii+=block ) {
2928 const size_t iend(
min( m_, ii+block ) );
2929 for(
size_t jj=0UL; jj<n_; jj+=block )
2931 if( IsLower_v<MT> && ii < jj )
break;
2932 if( IsUpper_v<MT> && ii > jj )
continue;
2934 for(
size_t i=ii; i<iend; ++i )
2936 const size_t jbegin( ( IsUpper_v<MT> )
2937 ?(
max( ( IsStrictlyUpper_v<MT> ? i+1UL : i ), jj ) )
2939 const size_t jend ( ( IsLower_v<MT> )
2940 ?(
min( ( IsStrictlyLower_v<MT> ? i : i+1UL ), n_, jj+block ) )
2941 :(
min( n_, jj+block ) ) );
2944 for(
size_t j=jbegin; j<jend; ++j ) {
2945 v_[i*nn_+j] += (*rhs)(i,j);
2965template<
typename Type
2971template<
typename MT >
2977 for(
size_t i=0UL; i<m_; ++i )
2978 for(
auto element=(*rhs).begin(i); element!=(*rhs).end(i); ++element )
2979 v_[i*nn_+element->index()] += element->value();
2995template<
typename Type
3001template<
typename MT >
3009 for(
size_t j=0UL; j<n_; ++j )
3010 for(
auto element=(*rhs).begin(j); element!=(*rhs).end(j); ++element )
3011 v_[element->index()*nn_+j] += element->value();
3027template<
typename Type
3033template<
typename MT >
3040 for(
size_t i=0UL; i<m_; ++i )
3042 if( IsDiagonal_v<MT> )
3044 v_[i*nn_+i] -= (*rhs)(i,i);
3048 const size_t jbegin( ( IsUpper_v<MT> )
3049 ?( IsStrictlyUpper_v<MT> ? i+1UL : i )
3051 const size_t jend ( ( IsLower_v<MT> )
3052 ?( IsStrictlyLower_v<MT> ? i : i+1UL )
3058 for( ; (j+2UL) <= jend; j+=2UL ) {
3059 v_[i*nn_+j ] -= (*rhs)(i,j );
3060 v_[i*nn_+j+1UL] -= (*rhs)(i,j+1UL);
3063 v_[i*nn_+j] -= (*rhs)(i,j);
3082template<
typename Type
3088template<
typename MT >
3098 constexpr bool remainder( !PF || !IsPadded_v<MT> );
3100 for(
size_t i=0UL; i<m_; ++i )
3102 const size_t jbegin( ( IsUpper_v<MT> )
3103 ?(
prevMultiple( ( IsStrictlyUpper_v<MT> ? i+1UL : i ), SIMDSIZE ) )
3105 const size_t jend ( ( IsLower_v<MT> )
3106 ?( IsStrictlyLower_v<MT> ? i : i+1UL )
3110 const size_t jpos( remainder ?
prevMultiple( jend, SIMDSIZE ) : jend );
3114 Iterator left(
begin(i) + jbegin );
3117 for( ; (j+SIMDSIZE*3UL) < jpos; j+=SIMDSIZE*4UL ) {
3118 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
3119 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
3120 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
3121 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
3123 for( ; j<jpos; j+=SIMDSIZE ) {
3124 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
3126 for( ; remainder && j<jend; ++j ) {
3127 *left -= *right; ++left; ++right;
3145template<
typename Type
3151template<
typename MT >
3159 constexpr size_t block( BLOCK_SIZE );
3161 for(
size_t ii=0UL; ii<m_; ii+=block ) {
3162 const size_t iend(
min( m_, ii+block ) );
3163 for(
size_t jj=0UL; jj<n_; jj+=block )
3165 if( IsLower_v<MT> && ii < jj )
break;
3166 if( IsUpper_v<MT> && ii > jj )
continue;
3168 for(
size_t i=ii; i<iend; ++i )
3170 const size_t jbegin( ( IsUpper_v<MT> )
3171 ?(
max( ( IsStrictlyUpper_v<MT> ? i+1UL : i ), jj ) )
3173 const size_t jend ( ( IsLower_v<MT> )
3174 ?(
min( ( IsStrictlyLower_v<MT> ? i : i+1UL ), n_, jj+block ) )
3175 :(
min( n_, jj+block ) ) );
3178 for(
size_t j=jbegin; j<jend; ++j ) {
3179 v_[i*nn_+j] -= (*rhs)(i,j);
3199template<
typename Type
3205template<
typename MT >
3211 for(
size_t i=0UL; i<m_; ++i )
3212 for(
auto element=(*rhs).begin(i); element!=(*rhs).end(i); ++element )
3213 v_[i*nn_+element->index()] -= element->value();
3229template<
typename Type
3235template<
typename MT >
3243 for(
size_t j=0UL; j<n_; ++j )
3244 for(
auto element=(*rhs).begin(j); element!=(*rhs).end(j); ++element )
3245 v_[element->index()*nn_+j] -= element->value();
3261template<
typename Type
3267template<
typename MT >
3277 for(
size_t i=0UL; i<m_; ++i ) {
3278 for(
size_t j=0UL; j<jpos; j+=2UL ) {
3279 v_[i*nn_+j ] *= (*rhs)(i,j );
3280 v_[i*nn_+j+1UL] *= (*rhs)(i,j+1UL);
3283 v_[i*nn_+jpos] *= (*rhs)(i,jpos);
3301template<
typename Type
3307template<
typename MT >
3316 constexpr bool remainder( !PF || !IsPadded_v<MT> );
3318 for(
size_t i=0UL; i<m_; ++i )
3320 const size_t jpos( remainder ?
prevMultiple( n_, SIMDSIZE ): n_ );
3324 Iterator left(
begin(i) );
3327 for( ; (j+SIMDSIZE*3UL) < jpos; j+=SIMDSIZE*4UL ) {
3328 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
3329 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
3330 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
3331 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
3333 for( ; j<jpos; j+=SIMDSIZE ) {
3334 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
3336 for( ; remainder && j<n_; ++j ) {
3337 *left *= *right; ++left; ++right;
3355template<
typename Type
3361template<
typename MT >
3369 constexpr size_t block( BLOCK_SIZE );
3371 for(
size_t ii=0UL; ii<m_; ii+=block ) {
3372 const size_t iend(
min( m_, ii+block ) );
3373 for(
size_t jj=0UL; jj<n_; jj+=block ) {
3374 const size_t jend(
min( n_, jj+block ) );
3375 for(
size_t i=ii; i<iend; ++i ) {
3376 for(
size_t j=jj; j<jend; ++j ) {
3377 v_[i*nn_+j] *= (*rhs)(i,j);
3397template<
typename Type
3403template<
typename MT >
3413 for(
size_t i=0UL; i<m_; ++i )
3414 for(
auto element=(*rhs).begin(i); element!=(*rhs).end(i); ++element )
3415 v_[i*nn_+element->index()] = tmp(i,element->index()) * element->value();
3431template<
typename Type
3437template<
typename MT >
3449 for(
size_t j=0UL; j<n_; ++j )
3450 for(
auto element=(*rhs).begin(j); element!=(*rhs).end(j); ++element )
3451 v_[element->index()*nn_+j] = tmp(element->index(),j) * element->value();
3476template<
typename Type
3482 :
public DenseMatrix< CustomMatrix<Type,AF,PF,true,Tag,RT>, true >
3516 template<
typename NewType >
3526 template<
size_t NewM
3529 using RRT = Resize_t<RT,NewM,NewN>;
3530 using Other = CustomMatrix<Type,AF,PF,true,Tag,RRT>;
3540 static constexpr bool simdEnabled = IsVectorizable_v<Type>;
3546 static constexpr bool smpAssignable = !IsSMPAssignable_v<Type>;
3554 inline CustomMatrix( Type* ptr,
size_t m,
size_t n,
size_t mm );
3593 template< typename Other,
size_t Rows,
size_t Cols >
3594 inline
CustomMatrix& operator=( const Other (&array)[Rows][Cols] );
3596 template< typename Other,
size_t Rows,
size_t Cols >
3597 inline
CustomMatrix& operator=( const std::array<std::array<Other,Cols>,Rows>& array );
3602 template< typename MT,
bool SO > inline
CustomMatrix& operator= ( const Matrix<MT,SO>& rhs );
3603 template< typename MT,
bool SO > inline
CustomMatrix& operator+=( const Matrix<MT,SO>& rhs );
3604 template< typename MT,
bool SO > inline
CustomMatrix& operator-=( const Matrix<MT,SO>& rhs );
3605 template< typename MT,
bool SO > inline
CustomMatrix& operator%=( const Matrix<MT,SO>& rhs );
3612 inline
size_t rows() const noexcept;
3613 inline
size_t columns() const noexcept;
3614 inline
size_t spacing() const noexcept;
3615 inline
size_t capacity() const noexcept;
3616 inline
size_t capacity(
size_t j ) const noexcept;
3618 inline
size_t nonZeros(
size_t j ) const;
3619 inline
void reset();
3620 inline
void reset(
size_t j );
3621 inline
void clear();
3632 template< typename Other > inline
CustomMatrix& scale( const Other& scalar );
3639 inline
void reset( Type* ptr,
size_t m,
size_t n );
3640 inline
void reset( Type* ptr,
size_t m,
size_t n,
size_t mm );
3647 template< typename MT >
3648 static constexpr
bool VectorizedAssign_v =
3649 ( useOptimizedKernels &&
3656 template< typename MT >
3657 static constexpr
bool VectorizedAddAssign_v =
3658 ( VectorizedAssign_v<MT> &&
3665 template< typename MT >
3666 static constexpr
bool VectorizedSubAssign_v =
3667 ( VectorizedAssign_v<MT> &&
3674 template< typename MT >
3675 static constexpr
bool VectorizedSchurAssign_v =
3676 ( VectorizedAssign_v<MT> &&
3689 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
3690 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
3692 inline
bool isAligned () const noexcept;
3704 template< typename MT >
3705 inline auto
assign( const DenseMatrix<MT,true>& rhs ) ->
DisableIf_t< VectorizedAssign_v<MT> >;
3707 template< typename MT >
3708 inline auto
assign( const DenseMatrix<MT,true>& rhs ) ->
EnableIf_t< VectorizedAssign_v<MT> >;
3710 template< typename MT > inline
void assign( const DenseMatrix<MT,false>& rhs );
3711 template< typename MT > inline
void assign( const SparseMatrix<MT,true>& rhs );
3712 template< typename MT > inline
void assign( const SparseMatrix<MT,false>& rhs );
3714 template< typename MT >
3715 inline auto
addAssign( const DenseMatrix<MT,true>& rhs ) ->
DisableIf_t< VectorizedAddAssign_v<MT> >;
3717 template< typename MT >
3718 inline auto
addAssign( const DenseMatrix<MT,true>& rhs ) ->
EnableIf_t< VectorizedAddAssign_v<MT> >;
3720 template< typename MT > inline
void addAssign( const DenseMatrix<MT,false>& rhs );
3721 template< typename MT > inline
void addAssign( const SparseMatrix<MT,true>& rhs );
3722 template< typename MT > inline
void addAssign( const SparseMatrix<MT,false>& rhs );
3724 template< typename MT >
3725 inline auto
subAssign ( const DenseMatrix<MT,true>& rhs ) ->
DisableIf_t< VectorizedSubAssign_v<MT> >;
3727 template< typename MT >
3728 inline auto
subAssign ( const DenseMatrix<MT,true>& rhs ) ->
EnableIf_t< VectorizedSubAssign_v<MT> >;
3730 template< typename MT > inline
void subAssign( const DenseMatrix<MT,false>& rhs );
3731 template< typename MT > inline
void subAssign( const SparseMatrix<MT,true>& rhs );
3732 template< typename MT > inline
void subAssign( const SparseMatrix<MT,false>& rhs );
3734 template< typename MT >
3735 inline auto
schurAssign ( const DenseMatrix<MT,true>& rhs ) ->
DisableIf_t< VectorizedSchurAssign_v<MT> >;
3737 template< typename MT >
3738 inline auto
schurAssign ( const DenseMatrix<MT,true>& rhs ) ->
EnableIf_t< VectorizedSchurAssign_v<MT> >;
3740 template< typename MT > inline
void schurAssign( const DenseMatrix<MT,false>& rhs );
3741 template< typename MT > inline
void schurAssign( const SparseMatrix<MT,true>& rhs );
3742 template< typename MT > inline
void schurAssign( const SparseMatrix<MT,false>& rhs );
3781template< typename Type
3817template<
typename Type
3830 if( ptr ==
nullptr ) {
3865template<
typename Type
3878 using ClearFunctor = If_t< PF || !IsConst_v<Type>, Clear, Noop >;
3880 if( ptr ==
nullptr ) {
3888 if( PF && IsVectorizable_v<Type> && ( mm_ < nextMultiple<size_t>(
m_,
SIMDSIZE ) ) ) {
3892 if( PF && IsVectorizable_v<Type> ) {
3894 for(
size_t j=0UL; j<
n_; ++j )
3895 for(
size_t i=
m_; i<mm_; ++i ) {
3913template<
typename Type
3934template<
typename Type
3968template<
typename Type
4003template<
typename Type
4030template<
typename Type
4058template<
typename Type
4072 return (*
this)(i,j);
4090template<
typename Type
4104 return (*
this)(i,j);
4122template<
typename Type
4148template<
typename Type
4171template<
typename Type
4195template<
typename Type
4217template<
typename Type
4226 return Iterator( v_+j*mm_ );
4239template<
typename Type
4248 return ConstIterator( v_+j*mm_ );
4261template<
typename Type
4270 return ConstIterator( v_+j*mm_ );
4283template<
typename Type
4292 return Iterator( v_+j*mm_+m_ );
4305template<
typename Type
4314 return ConstIterator( v_+j*mm_+m_ );
4327template<
typename Type
4336 return ConstIterator( v_+j*mm_+m_ );
4357template<
typename Type
4362inline CustomMatrix<Type,AF,PF,true,Tag,RT>&
4365 for(
size_t j=0UL; j<n_; ++j )
4366 for(
size_t i=0UL; i<m_; ++i )
4404template<
typename Type
4409inline CustomMatrix<Type,AF,PF,true,Tag,RT>&
4420 for(
const auto& rowList : list ) {
4422 for(
const auto& element : rowList ) {
4423 v_[i+j*mm_] = element;
4426 for( ; j<n_; ++j ) {
4427 clear( v_[i+j*mm_] );
4468template<
typename Type
4473template<
typename Other
4476inline CustomMatrix<Type,AF,PF,true,Tag,RT>&
4479 if( m_ != Rows || n_ != Cols ) {
4483 for(
size_t j=0UL; j<Cols; ++j )
4484 for(
size_t i=0UL; i<Rows; ++i )
4485 v_[i+j*mm_] = array[i][j];
4523template<
typename Type
4528template<
typename Other
4531inline CustomMatrix<Type,AF,PF,true,Tag,RT>&
4534 if( m_ != Rows || n_ != Cols ) {
4538 for(
size_t j=0UL; j<Cols; ++j )
4539 for(
size_t i=0UL; i<Rows; ++i )
4540 v_[i+j*mm_] = array[i][j];
4559template<
typename Type
4564inline CustomMatrix<Type,AF,PF,true,Tag,RT>&
4567 if( rhs.rows() != m_ || rhs.columns() != n_ ) {
4586template<
typename Type
4591inline CustomMatrix<Type,AF,PF,true,Tag,RT>&
4623template<
typename Type
4628template<
typename MT
4630inline CustomMatrix<Type,AF,PF,true,Tag,RT>&
4633 using TT =
decltype(
trans( *
this ) );
4634 using CT =
decltype(
ctrans( *
this ) );
4635 using IT =
decltype(
inv( *
this ) );
4639 if( (*rhs).rows() != m_ || (*rhs).columns() != n_ ) {
4643 if( IsSame_v<MT,TT> && (*rhs).isAliased(
this ) ) {
4646 else if( IsSame_v<MT,CT> && (*rhs).isAliased(
this ) ) {
4649 else if( !IsSame_v<MT,IT> && (*rhs).canAlias(
this ) ) {
4650 const ResultType_t<MT> tmp( *rhs );
4654 if( IsSparseMatrix_v<MT> )
4676template<
typename Type
4681template<
typename MT
4683inline CustomMatrix<Type,AF,PF,true,Tag,RT>&
4684 CustomMatrix<Type,AF,PF,true,Tag,RT>::operator+=(
const Matrix<MT,SO>& rhs )
4688 if( (*rhs).rows() != m_ || (*rhs).columns() != n_ ) {
4692 if( (*rhs).canAlias(
this ) ) {
4693 const ResultType_t<MT> tmp( *rhs );
4717template<
typename Type
4722template<
typename MT
4724inline CustomMatrix<Type,AF,PF,true,Tag,RT>&
4725 CustomMatrix<Type,AF,PF,true,Tag,RT>::operator-=(
const Matrix<MT,SO>& rhs )
4729 if( (*rhs).rows() != m_ || (*rhs).columns() != n_ ) {
4733 if( (*rhs).canAlias(
this ) ) {
4734 const ResultType_t<MT> tmp( *rhs );
4758template<
typename Type
4763template<
typename MT
4765inline CustomMatrix<Type,AF,PF,true,Tag,RT>&
4766 CustomMatrix<Type,AF,PF,true,Tag,RT>::operator%=(
const Matrix<MT,SO>& rhs )
4770 if( (*rhs).rows() != m_ || (*rhs).columns() != n_ ) {
4774 if( (*rhs).canAlias(
this ) ) {
4775 const ResultType_t<MT> tmp( *rhs );
4802template<
typename Type
4821template<
typename Type
4843template<
typename Type
4862template<
typename Type
4882template<
typename Type
4907template<
typename Type
4914 size_t nonzeros( 0UL );
4916 for(
size_t j=0UL; j<n_; ++j )
4917 for(
size_t i=0UL; i<m_; ++i )
4918 if( !isDefault<strict>( v_[i+j*mm_] ) )
4937template<
typename Type
4946 const size_t iend( j*mm_ + m_ );
4947 size_t nonzeros( 0UL );
4949 for(
size_t i=j*mm_; i<iend; ++i )
4950 if( !isDefault<strict>( v_[i] ) )
4965template<
typename Type
4974 for(
size_t j=0UL; j<n_; ++j )
4975 for(
size_t i=0UL; i<m_; ++i )
4976 clear( v_[i+j*mm_] );
4992template<
typename Type
5002 for(
size_t i=0UL; i<m_; ++i )
5003 clear( v_[i+j*mm_] );
5017template<
typename Type
5040template<
typename Type
5075template<
typename Type
5080inline CustomMatrix<Type,AF,PF,true,Tag,RT>&
CustomMatrix<Type,AF,PF,true,Tag,RT>::transpose()
5088 for(
size_t j=1UL; j<n_; ++j )
5089 for(
size_t i=0UL; i<j; ++i )
5090 swap( v_[i+j*mm_], v_[j+i*mm_] );
5107template<
typename Type
5112inline CustomMatrix<Type,AF,PF,true,Tag,RT>&
CustomMatrix<Type,AF,PF,true,Tag,RT>::ctranspose()
5118 for(
size_t j=0UL; j<n_; ++j ) {
5119 for(
size_t i=0UL; i<j; ++i ) {
5120 cswap( v_[i+j*mm_], v_[j+i*mm_] );
5153template<
typename Type
5158template<
typename Other >
5159inline CustomMatrix<Type,AF,PF,true,Tag,RT>&
5160 CustomMatrix<Type,AF,PF,true,Tag,RT>::scale(
const Other& scalar )
5162 for(
size_t j=0UL; j<n_; ++j )
5163 for(
size_t i=0UL; i<m_; ++i )
5164 v_[i+j*mm_] *= scalar;
5204template<
typename Type
5213 CustomMatrix tmp( ptr, m, n );
5244template<
typename Type
5251 CustomMatrix tmp( ptr, m, n, mm );
5277template<
typename Type
5282template<
typename Other >
5285 return static_cast<const void*
>( this ) ==
static_cast<const void*
>( alias );
5302template<
typename Type
5307template<
typename Other >
5310 return static_cast<const void*
>( this ) ==
static_cast<const void*
>( alias );
5326template<
typename Type
5350template<
typename Type
5357 return (
rows() *
columns() >= SMP_DMATASSIGN_THRESHOLD );
5378template<
typename Type
5387 return loada( i, j );
5389 return loadu( i, j );
5410template<
typename Type
5428 return loada( v_+i+j*mm_ );
5449template<
typename Type
5465 return loadu( v_+i+j*mm_ );
5487template<
typename Type
5520template<
typename Type
5538 storea( v_+i+j*mm_, value );
5560template<
typename Type
5576 storeu( v_+i+j*mm_, value );
5599template<
typename Type
5617 stream( v_+i+j*mm_, value );
5635template<
typename Type
5640template<
typename MT >
5642 -> DisableIf_t< VectorizedAssign_v<MT> >
5650 for(
size_t j=0UL; j<n_; ++j ) {
5651 for(
size_t i=0UL; i<ipos; i+=2UL ) {
5652 v_[i +j*mm_] = (*rhs)(i ,j);
5653 v_[i+1UL+j*mm_] = (*rhs)(i+1UL,j);
5656 v_[ipos+j*mm_] = (*rhs)(ipos,j);
5676template<
typename Type
5681template<
typename MT >
5683 -> EnableIf_t< VectorizedAssign_v<MT> >
5690 constexpr bool remainder( !PF || !IsPadded_v<MT> );
5692 const size_t ipos( remainder ?
prevMultiple( m_, SIMDSIZE ) : m_ );
5695 if( AF && PF && useStreaming &&
5696 ( m_*n_ > ( cacheSize / (
sizeof(Type) * 3UL ) ) ) && !(*rhs).isAliased(
this ) )
5698 for(
size_t j=0UL; j<n_; ++j )
5701 Iterator left(
begin(j) );
5702 ConstIterator_t<MT> right( (*rhs).begin(j) );
5704 for( ; i<ipos; i+=SIMDSIZE ) {
5705 left.stream( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5707 for( ; remainder && i<m_; ++i ) {
5708 *left = *right; ++left; ++right;
5714 for(
size_t j=0UL; j<n_; ++j )
5717 Iterator left(
begin(j) );
5718 ConstIterator_t<MT> right( (*rhs).begin(j) );
5720 for( ; (i+SIMDSIZE*3UL) < ipos; i+=SIMDSIZE*4UL ) {
5721 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5722 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5723 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5724 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5726 for( ; i<ipos; i+=SIMDSIZE ) {
5727 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5729 for( ; remainder && i<m_; ++i ) {
5730 *left = *right; ++left; ++right;
5751template<
typename Type
5756template<
typename MT >
5764 constexpr size_t block( BLOCK_SIZE );
5766 for(
size_t jj=0UL; jj<n_; jj+=block ) {
5767 const size_t jend(
min( n_, jj+block ) );
5768 for(
size_t ii=0UL; ii<m_; ii+=block ) {
5769 const size_t iend(
min( m_, ii+block ) );
5770 for(
size_t j=jj; j<jend; ++j ) {
5771 for(
size_t i=ii; i<iend; ++i ) {
5772 v_[i+j*mm_] = (*rhs)(i,j);
5794template<
typename Type
5799template<
typename MT >
5805 for(
size_t j=0UL; j<(*rhs).columns(); ++j )
5806 for(
auto element=(*rhs).begin(j); element!=(*rhs).end(j); ++element )
5807 v_[element->index()+j*mm_] = element->value();
5825template<
typename Type
5830template<
typename MT >
5838 for(
size_t i=0UL; i<(*rhs).rows(); ++i )
5839 for(
auto element=(*rhs).begin(i); element!=(*rhs).end(i); ++element )
5840 v_[i+element->index()*mm_] = element->value();
5858template<
typename Type
5863template<
typename MT >
5865 -> DisableIf_t< VectorizedAddAssign_v<MT> >
5870 for(
size_t j=0UL; j<n_; ++j )
5872 if( IsDiagonal_v<MT> )
5874 v_[j+j*mm_] += (*rhs)(j,j);
5878 const size_t ibegin( ( IsLower_v<MT> )
5879 ?( IsStrictlyLower_v<MT> ? j+1UL : j )
5881 const size_t iend ( ( IsUpper_v<MT> )
5882 ?( IsStrictlyUpper_v<MT> ? j : j+1UL )
5888 for( ; (i+2UL) <= iend; i+=2UL ) {
5889 v_[i +j*mm_] += (*rhs)(i ,j);
5890 v_[i+1UL+j*mm_] += (*rhs)(i+1UL,j);
5893 v_[i+j*mm_] += (*rhs)(i,j);
5914template<
typename Type
5919template<
typename MT >
5921 -> EnableIf_t< VectorizedAddAssign_v<MT> >
5929 constexpr bool remainder( !PF || !IsPadded_v<MT> );
5931 for(
size_t j=0UL; j<n_; ++j )
5933 const size_t ibegin( ( IsLower_v<MT> )
5934 ?(
prevMultiple( ( IsStrictlyLower_v<MT> ? j+1UL : j ), SIMDSIZE ) )
5936 const size_t iend ( ( IsUpper_v<MT> )
5937 ?( IsStrictlyUpper_v<MT> ? j : j+1UL )
5941 const size_t ipos( remainder ?
prevMultiple( iend, SIMDSIZE ) : iend );
5945 Iterator left(
begin(j) + ibegin );
5946 ConstIterator_t<MT> right( (*rhs).begin(j) + ibegin );
5948 for( ; (i+SIMDSIZE*3UL) < ipos; i+=SIMDSIZE*4UL ) {
5949 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5950 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5951 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5952 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5954 for( ; i<ipos; i+=SIMDSIZE ) {
5955 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5957 for( ; remainder && i<iend; ++i ) {
5958 *left += *right; ++left; ++right;
5978template<
typename Type
5983template<
typename MT >
5991 constexpr size_t block( BLOCK_SIZE );
5993 for(
size_t jj=0UL; jj<n_; jj+=block ) {
5994 const size_t jend(
min( n_, jj+block ) );
5995 for(
size_t ii=0UL; ii<m_; ii+=block )
5997 if( IsLower_v<MT> && ii < jj )
continue;
5998 if( IsUpper_v<MT> && ii > jj )
break;
6000 for(
size_t j=jj; j<jend; ++j )
6002 const size_t ibegin( ( IsLower_v<MT> )
6003 ?(
max( ( IsStrictlyLower_v<MT> ? j+1UL : j ), ii ) )
6005 const size_t iend ( ( IsUpper_v<MT> )
6006 ?(
min( ( IsStrictlyUpper_v<MT> ? j : j+1UL ), m_, ii+block ) )
6007 :(
min( m_, ii+block ) ) );
6010 for(
size_t i=ibegin; i<iend; ++i ) {
6011 v_[i+j*mm_] += (*rhs)(i,j);
6033template<
typename Type
6038template<
typename MT >
6044 for(
size_t j=0UL; j<(*rhs).columns(); ++j )
6045 for(
auto element=(*rhs).begin(j); element!=(*rhs).end(j); ++element )
6046 v_[element->index()+j*mm_] += element->value();
6064template<
typename Type
6069template<
typename MT >
6077 for(
size_t i=0UL; i<(*rhs).rows(); ++i )
6078 for(
auto element=(*rhs).begin(i); element!=(*rhs).end(i); ++element )
6079 v_[i+element->index()*mm_] += element->value();
6097template<
typename Type
6102template<
typename MT >
6104 -> DisableIf_t< VectorizedSubAssign_v<MT> >
6109 for(
size_t j=0UL; j<n_; ++j )
6111 if( IsDiagonal_v<MT> )
6113 v_[j+j*mm_] -= (*rhs)(j,j);
6117 const size_t ibegin( ( IsLower_v<MT> )
6118 ?( IsStrictlyLower_v<MT> ? j+1UL : j )
6120 const size_t iend ( ( IsUpper_v<MT> )
6121 ?( IsStrictlyUpper_v<MT> ? j : j+1UL )
6127 for( ; (i+2UL) <= iend; i+=2UL ) {
6128 v_[i +j*mm_] -= (*rhs)(i ,j);
6129 v_[i+1+j*mm_] -= (*rhs)(i+1,j);
6132 v_[i+j*mm_] -= (*rhs)(i,j);
6154template<
typename Type
6159template<
typename MT >
6161 -> EnableIf_t< VectorizedSubAssign_v<MT> >
6169 constexpr bool remainder( !PF || !IsPadded_v<MT> );
6171 for(
size_t j=0UL; j<n_; ++j )
6173 const size_t ibegin( ( IsLower_v<MT> )
6174 ?(
prevMultiple( ( IsStrictlyLower_v<MT> ? j+1UL : j ), SIMDSIZE ) )
6176 const size_t iend ( ( IsUpper_v<MT> )
6177 ?( IsStrictlyUpper_v<MT> ? j : j+1UL )
6181 const size_t ipos( remainder ?
prevMultiple( iend, SIMDSIZE ) : iend );
6185 Iterator left(
begin(j) + ibegin );
6186 ConstIterator_t<MT> right( (*rhs).begin(j) + ibegin );
6188 for( ; (i+SIMDSIZE*3UL) < ipos; i+=SIMDSIZE*4UL ) {
6189 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6190 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6191 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6192 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6194 for( ; i<ipos; i+=SIMDSIZE ) {
6195 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6197 for( ; remainder && i<iend; ++i ) {
6198 *left -= *right; ++left; ++right;
6218template<
typename Type
6223template<
typename MT >
6231 constexpr size_t block( BLOCK_SIZE );
6233 for(
size_t jj=0UL; jj<n_; jj+=block ) {
6234 const size_t jend(
min( n_, jj+block ) );
6235 for(
size_t ii=0UL; ii<m_; ii+=block )
6237 if( IsLower_v<MT> && ii < jj )
continue;
6238 if( IsUpper_v<MT> && ii > jj )
break;
6240 for(
size_t j=jj; j<jend; ++j )
6242 const size_t ibegin( ( IsLower_v<MT> )
6243 ?(
max( ( IsStrictlyLower_v<MT> ? j+1UL : j ), ii ) )
6245 const size_t iend ( ( IsUpper_v<MT> )
6246 ?(
min( ( IsStrictlyUpper_v<MT> ? j : j+1UL ), m_, ii+block ) )
6247 :(
min( m_, ii+block ) ) );
6250 for(
size_t i=ibegin; i<iend; ++i ) {
6251 v_[i+j*mm_] -= (*rhs)(i,j);
6273template<
typename Type
6278template<
typename MT >
6284 for(
size_t j=0UL; j<(*rhs).columns(); ++j )
6285 for(
auto element=(*rhs).begin(j); element!=(*rhs).end(j); ++element )
6286 v_[element->index()+j*mm_] -= element->value();
6304template<
typename Type
6309template<
typename MT >
6317 for(
size_t i=0UL; i<(*rhs).rows(); ++i )
6318 for(
auto element=(*rhs).begin(i); element!=(*rhs).end(i); ++element )
6319 v_[i+element->index()*mm_] -= element->value();
6337template<
typename Type
6342template<
typename MT >
6344 -> DisableIf_t< VectorizedSchurAssign_v<MT> >
6352 for(
size_t j=0UL; j<n_; ++j ) {
6353 for(
size_t i=0UL; i<ipos; i+=2UL ) {
6354 v_[i +j*mm_] *= (*rhs)(i ,j);
6355 v_[i+1UL+j*mm_] *= (*rhs)(i+1UL,j);
6358 v_[ipos+j*mm_] *= (*rhs)(ipos,j);
6379template<
typename Type
6384template<
typename MT >
6386 -> EnableIf_t< VectorizedSchurAssign_v<MT> >
6393 constexpr bool remainder( !PF || !IsPadded_v<MT> );
6395 for(
size_t j=0UL; j<n_; ++j )
6397 const size_t ipos( remainder ?
prevMultiple( m_, SIMDSIZE ) : m_ );
6401 Iterator left(
begin(j) );
6402 ConstIterator_t<MT> right( (*rhs).begin(j) );
6404 for( ; (i+SIMDSIZE*3UL) < ipos; i+=SIMDSIZE*4UL ) {
6405 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6406 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6407 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6408 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6410 for( ; i<ipos; i+=SIMDSIZE ) {
6411 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6413 for( ; remainder && i<m_; ++i ) {
6414 *left *= *right; ++left; ++right;
6434template<
typename Type
6439template<
typename MT >
6447 constexpr size_t block( BLOCK_SIZE );
6449 for(
size_t jj=0UL; jj<n_; jj+=block ) {
6450 const size_t jend(
min( n_, jj+block ) );
6451 for(
size_t ii=0UL; ii<m_; ii+=block ) {
6452 const size_t iend(
min( m_, ii+block ) );
6453 for(
size_t j=jj; j<jend; ++j ) {
6454 for(
size_t i=ii; i<iend; ++i ) {
6455 v_[i+j*mm_] *= (*rhs)(i,j);
6477template<
typename Type
6482template<
typename MT >
6488 const ResultType tmp(
serial( *
this ) );
6492 for(
size_t j=0UL; j<(*rhs).columns(); ++j )
6493 for(
auto element=(*rhs).begin(j); element!=(*rhs).end(j); ++element )
6494 v_[element->index()+j*mm_] = tmp(element->index(),j) * element->value();
6512template<
typename Type
6517template<
typename MT >
6525 const ResultType tmp(
serial( *
this ) );
6529 for(
size_t i=0UL; i<(*rhs).rows(); ++i )
6530 for(
auto element=(*rhs).begin(i); element!=(*rhs).end(i); ++element )
6531 v_[i+element->index()*mm_] = tmp(i,element->index()) * element->value();
6552template< RelaxationFlag RF,
typename Type, AlignmentFlag AF, PaddingFlag PF,
bool SO,
typename Tag,
typename RT >
6553bool isDefault(
const CustomMatrix<Type,AF,PF,SO,Tag,RT>& m );
6555template<
typename Type, AlignmentFlag AF, PaddingFlag PF,
bool SO,
typename Tag,
typename RT >
6556bool isIntact(
const CustomMatrix<Type,AF,PF,SO,Tag,RT>& m );
6558template<
typename Type, AlignmentFlag AF, PaddingFlag PF,
bool SO,
typename Tag,
typename RT >
6559void swap( CustomMatrix<Type,AF,PF,SO,Tag,RT>& a, CustomMatrix<Type,AF,PF,SO,Tag,RT>& b )
noexcept;
6627template<
typename Type
6648template<
typename Type
6654inline void swap(
CustomMatrix<Type,AF,PF,SO,Tag,RT>& a,
CustomMatrix<Type,AF,PF,SO,Tag,RT>& b )
noexcept
6671template<
typename T, AlignmentFlag AF, PaddingFlag PF,
bool SO,
typename Tag,
typename RT >
6672struct HasConstDataAccess< CustomMatrix<T,AF,PF,SO,Tag,RT> >
6689template<
typename T, AlignmentFlag AF, PaddingFlag PF,
bool SO,
typename Tag,
typename RT >
6690struct HasMutableDataAccess< CustomMatrix<T,AF,PF,SO,Tag,RT> >
6707template<
typename T, AlignmentFlag AF, PaddingFlag PF,
bool SO,
typename Tag,
typename RT >
6708struct IsCustom< CustomMatrix<T,AF,PF,SO,Tag,RT> >
6725template<
typename T, PaddingFlag PF,
bool SO,
typename Tag,
typename RT >
6726struct IsAligned< CustomMatrix<T,
aligned,PF,SO,Tag,RT> >
6743template<
typename T, AlignmentFlag AF, PaddingFlag PF,
bool SO,
typename Tag,
typename RT >
6744struct IsContiguous< CustomMatrix<T,AF,PF,SO,Tag,RT> >
6762template<
typename T, AlignmentFlag AF,
bool SO,
typename Tag,
typename RT >
6763struct IsPadded< CustomMatrix<T,AF,
padded,SO,Tag,RT> >
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 T1::template Rebind< T2 >::Other Rebind_t
Alias declaration for nested Rebind class templates.
Definition: Aliases.h:350
typename T::template Resize< Ns... >::Other Resize_t
Alias declaration for nested Resize class templates.
Definition: Aliases.h:430
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
typename T::ConstIterator ConstIterator_t
Alias declaration for nested ConstIterator type definitions.
Definition: Aliases.h:130
Header file for the alignment check function.
Header file for the alignment flag enumeration.
Header file for run time assertion macros.
Header file for kernel specific block sizes.
Constraints on the storage order of matrix types.
Header file for the conjugate shim.
Constraint on the data type.
Header file for the CustomOppositeType type trait.
Header file for the CustomTransposeType type trait.
Header file for the DenseIterator class template.
Constraint on the data type.
Header file for the EnableIf class template.
Header file for the HasConstDataAccess type trait.
Header file for the HasMutableDataAccess type trait.
Header file for the HasSIMDAdd type trait.
Header file for the HasSIMDMult type trait.
Header file for the HasSIMDSub type trait.
Header file for the If class template.
Header file for the IntegralConstant class template.
Header file for the IsAligned type trait.
Header file for the IsConst type trait.
Header file for the IsContiguous type trait.
Header file for the IsCustom type trait.
Header file for the isDefault shim.
Header file for the IsDiagonal type trait.
Header file for the IsLower type trait.
Header file for the IsPadded type trait.
Header file for the IsSIMDCombinable type trait.
Header file for the IsSMPAssignable type trait.
Header file for the IsSame and IsStrictlySame type traits.
Header file for the IsSparseMatrix type trait.
Header file for the IsStrictlyLower type trait.
Header file for the IsStrictlyUpper type trait.
Header file for the IsUpper type trait.
Header file for the IsVectorizable type trait.
Header file for the MAYBE_UNUSED function template.
Header file for the misalignment function.
Header file for the nextMultiple shim.
Header file for the Noop functor.
Header file for the padding flag enumeration.
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 RemoveConst type trait.
Constraints on the storage order of matrix types.
Header file for all SIMD functionality.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Efficient implementation of a customizable matrix.
Definition: CustomMatrix.h:423
size_t n_
The current number of columns of the matrix.
Definition: CustomMatrix.h:699
bool canSMPAssign() const noexcept
Returns whether the matrix can be used in SMP assignments.
Definition: CustomMatrix.h:2297
Reference at(size_t i, size_t j)
Checked access to the matrix elements.
Definition: CustomMatrix.h:1011
CustomMatrix()
The default constructor for CustomMatrix.
Definition: CustomMatrix.h:742
Iterator begin(size_t i) noexcept
Returns an iterator to the first element of row/column i.
Definition: CustomMatrix.h:1171
void reset()
Reset to the default initial values.
Definition: CustomMatrix.h:1922
auto addAssign(const DenseMatrix< MT, SO > &rhs) -> DisableIf_t< VectorizedAddAssign_v< MT > >
Default implementation of the addition assignment of a row-major dense matrix.
Definition: CustomMatrix.h:2800
void clear()
Clearing the matrix.
Definition: CustomMatrix.h:1974
static constexpr bool smpAssignable
Compilation flag for SMP assignments.
Definition: CustomMatrix.h:486
size_t capacity() const noexcept
Returns the maximum capacity of the matrix.
Definition: CustomMatrix.h:1815
CustomTransposeType_t< RT > TransposeType
Transpose type for expression template evaluations.
Definition: CustomMatrix.h:436
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: CustomMatrix.h:1756
bool isAligned() const noexcept
Returns whether the matrix is properly aligned in memory.
Definition: CustomMatrix.h:2274
static constexpr size_t SIMDSIZE
The number of elements packed within a single SIMD element.
Definition: CustomMatrix.h:630
CustomMatrix & operator=(const Type &set)
Homogenous assignment to all matrix elements.
Definition: CustomMatrix.h:1330
DenseIterator< Type, AF > Iterator
Iterator over non-constant elements.
Definition: CustomMatrix.h:449
bool canAlias(const Other *alias) const noexcept
Returns whether the matrix can alias with the given address alias.
Definition: CustomMatrix.h:2228
Tag TagType
Tag type of this CustomMatrix instance.
Definition: CustomMatrix.h:440
BLAZE_ALWAYS_INLINE SIMDType loada(size_t i, size_t j) const noexcept
Aligned load of a SIMD element of the matrix.
Definition: CustomMatrix.h:2358
size_t spacing() const noexcept
Returns the spacing between the beginning of two rows/columns.
Definition: CustomMatrix.h:1797
Type * Pointer
Pointer to a non-constant matrix value.
Definition: CustomMatrix.h:446
size_t nonZeros() const
Returns the total number of non-zero elements in the matrix.
Definition: CustomMatrix.h:1863
ConstIterator cend(size_t i) const noexcept
Returns an iterator just past the last element of row/column i.
Definition: CustomMatrix.h:1301
const Type & ConstReference
Reference to a constant matrix value.
Definition: CustomMatrix.h:445
SIMDTrait_t< ElementType > SIMDType
SIMD type of the matrix elements.
Definition: CustomMatrix.h:439
BLAZE_ALWAYS_INLINE SIMDType loadu(size_t i, size_t j) const noexcept
Unaligned load of a SIMD element of the matrix.
Definition: CustomMatrix.h:2397
Iterator end(size_t i) noexcept
Returns an iterator just past the last element of row/column i.
Definition: CustomMatrix.h:1249
const This & CompositeType
Data type for composite expression templates.
Definition: CustomMatrix.h:442
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: CustomMatrix.h:2508
static constexpr bool simdEnabled
Compilation flag for SIMD optimization.
Definition: CustomMatrix.h:480
auto assign(const DenseMatrix< MT, SO > &rhs) -> DisableIf_t< VectorizedAssign_v< MT > >
Default implementation of the assignment of a row-major dense matrix.
Definition: CustomMatrix.h:2582
ConstIterator cbegin(size_t i) const noexcept
Returns an iterator to the first element of row/column i.
Definition: CustomMatrix.h:1223
auto schurAssign(const DenseMatrix< MT, SO > &rhs) -> DisableIf_t< VectorizedSchurAssign_v< MT > >
Default implementation of the Schur product assignment of a row-major dense matrix.
Definition: CustomMatrix.h:3268
CustomMatrix< Type, AF, PF, SO, Tag, RT > This
Type of this CustomMatrix instance.
Definition: CustomMatrix.h:426
CustomMatrix & transpose()
In-place transpose of the matrix.
Definition: CustomMatrix.h:2030
const Type & ReturnType
Return type for expression template evaluations.
Definition: CustomMatrix.h:441
BLAZE_ALWAYS_INLINE void store(size_t i, size_t j, const SIMDType &value) noexcept
Store of a SIMD element of the matrix.
Definition: CustomMatrix.h:2435
size_t nn_
The number of elements between two rows.
Definition: CustomMatrix.h:700
DenseIterator< const Type, AF > ConstIterator
Iterator over constant elements.
Definition: CustomMatrix.h:450
Pointer data() noexcept
Low-level data access to the matrix elements.
Definition: CustomMatrix.h:1074
Type ElementType
Type of the matrix elements.
Definition: CustomMatrix.h:438
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: CustomMatrix.h:1774
Reference operator()(size_t i, size_t j) noexcept
2D-access to the matrix elements.
Definition: CustomMatrix.h:958
void swap(CustomMatrix &m) noexcept
Swapping the contents of two matrices.
Definition: CustomMatrix.h:1996
Type & Reference
Reference to a non-constant matrix value.
Definition: CustomMatrix.h:444
bool isAliased(const Other *alias) const noexcept
Returns whether the matrix is aliased with the given address alias.
Definition: CustomMatrix.h:2252
auto subAssign(const DenseMatrix< MT, SO > &rhs) -> DisableIf_t< VectorizedSubAssign_v< MT > >
Default implementation of the subtraction assignment of a row-major dense matrix.
Definition: CustomMatrix.h:3034
const Type * ConstPointer
Pointer to a constant matrix value.
Definition: CustomMatrix.h:447
size_t m_
The current number of rows of the matrix.
Definition: CustomMatrix.h:698
DenseMatrix< This, SO > BaseType
Base type of this CustomMatrix instance.
Definition: CustomMatrix.h:427
~CustomMatrix()
The destructor for CustomMatrix.
Definition: CustomMatrix.h:923
Type * v_
The custom array of elements.
Definition: CustomMatrix.h:701
BLAZE_ALWAYS_INLINE SIMDType load(size_t i, size_t j) const noexcept
Load of a SIMD element of the matrix.
Definition: CustomMatrix.h:2326
RT ResultType
Result type for expression template evaluations.
Definition: CustomMatrix.h:430
CustomMatrix & ctranspose()
In-place conjugate transpose of the matrix.
Definition: CustomMatrix.h:2061
CustomOppositeType_t< RT > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: CustomMatrix.h:433
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: CustomMatrix.h:2468
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: CustomMatrix.h:2547
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
Initializer list type of the Blaze library.
Constraint on the data type.
Header file for the DenseMatrix base class.
Header file for the SparseMatrix base class.
Header file for the Clear functor.
#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
void swap(CustomMatrix< Type, AF, PF, SO, Tag, RT > &a, CustomMatrix< Type, AF, PF, SO, Tag, RT > &b) noexcept
Swapping the contents of two custom matrices.
Definition: CustomMatrix.h:6654
bool isIntact(const CustomMatrix< Type, AF, PF, SO, Tag, RT > &m)
Returns whether the invariants of the given custom matrix are intact.
Definition: CustomMatrix.h:6633
bool isDefault(const CustomMatrix< Type, AF, PF, SO, Tag, RT > &m)
Returns whether the given custom matrix is in default state.
Definition: CustomMatrix.h:6599
decltype(auto) min(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise minimum of the dense matrices lhs and rhs.
Definition: DMatDMatMapExpr.h:1339
decltype(auto) max(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise maximum of the dense matrices lhs and rhs.
Definition: DMatDMatMapExpr.h:1375
decltype(auto) 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
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SYMMETRIC_MATRIX_TYPE(T)
Constraint on the data type.
Definition: Symmetric.h:79
#define BLAZE_CONSTRAINT_MUST_BE_ROW_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.
Definition: RowMajorMatrix.h:61
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_MATRIX_TYPE(T)
Constraint on the data type.
Definition: DenseMatrix.h:61
#define BLAZE_CONSTRAINT_MUST_NOT_BE_DIAGONAL_MATRIX_TYPE(T)
Constraint on the data type.
Definition: Diagonal.h:79
#define BLAZE_CONSTRAINT_MUST_BE_COLUMN_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.
Definition: ColumnMajorMatrix.h:61
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 IsSIMDCombinable_v
Auxiliary variable template for the IsSIMDCombinable type trait.
Definition: IsSIMDCombinable.h:137
constexpr bool IsDiagonal_v
Auxiliary variable template for the IsDiagonal type trait.
Definition: IsDiagonal.h:148
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
typename CustomOppositeType< T >::Type CustomOppositeType_t
Auxiliary alias declaration for the CustomOppositeType type trait.
Definition: CustomOppositeType.h:83
typename CustomTransposeType< T >::Type CustomTransposeType_t
Auxiliary alias declaration for the CustomTransposeType type trait.
Definition: CustomTransposeType.h:83
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 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
PaddingFlag
Padding flag for (un-)padded vectors and matrices.
Definition: PaddingFlag.h:77
AlignmentFlag
Alignment flag for (un-)aligned vectors and matrices.
Definition: AlignmentFlag.h:63
@ padded
Flag for padded vectors and matrices.
Definition: PaddingFlag.h:79
@ unpadded
Flag for unpadded vectors and matrices.
Definition: PaddingFlag.h:78
@ aligned
Flag for aligned vectors and matrices.
Definition: AlignmentFlag.h:65
constexpr void clear(Matrix< MT, SO > &matrix)
Clearing the given matrix.
Definition: Matrix.h:960
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
MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:518
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
auto smpSubAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:162
auto smpAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:100
auto smpSchurAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP Schur product assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:194
auto smpAddAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP addition assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:131
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.
Definition: StaticAssert.h:112
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
BoolConstant< true > TrueType
Type traits base class.
Definition: IntegralConstant.h:132
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
typename If< Condition >::template Type< T1, T2 > If_t
Auxiliary alias template for the If class template.
Definition: If.h:108
#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
#define BLAZE_THROW_LOGIC_ERROR(MESSAGE)
Macro for the emission of a std::logic_error exception.
Definition: Exception.h:187
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.
Header file for all forward declarations for dense vectors and matrices.
Header file for the clear shim.
Header file for the serial shim.
Generic wrapper for the clear() function.
Definition: Clear.h:61
Rebind mechanism to obtain a CustomMatrix with different data/element type.
Definition: CustomMatrix.h:457
Rebind_t< RT, RemoveConst_t< NewType > > RRT
The rebound result type.
Definition: CustomMatrix.h:458
CustomMatrix< NewType, AF, PF, SO, Tag, RRT > Other
The type of the other CustomMatrix.
Definition: CustomMatrix.h:459
Resize mechanism to obtain a CustomMatrix with different fixed dimensions.
Definition: CustomMatrix.h:468
CustomMatrix< Type, AF, PF, SO, Tag, RRT > Other
The type of the other CustomMatrix.
Definition: CustomMatrix.h:470
Resize_t< RT, NewM, NewN > RRT
The resized result type.
Definition: CustomMatrix.h:469
Generic wrapper for the null function.
Definition: Noop.h:62
Header file for the cache size of the target architecture.
System settings for the inline keywords.
System settings for performance optimizations.
Header file for the thresholds for matrix/vector and matrix/matrix multiplications.
Header file for basic type definitions.
Header file for the generic max algorithm.
Header file for the generic min algorithm.