35 #ifndef _BLAZE_MATH_DENSE_CUSTOMMATRIX_H_ 36 #define _BLAZE_MATH_DENSE_CUSTOMMATRIX_H_ 401 template<
typename Type
404 ,
bool SO = defaultStorageOrder
405 ,
typename RT = DynamicMatrix<RemoveConst_t<Type>,SO> >
407 :
public DenseMatrix< CustomMatrix<Type,AF,PF,SO,RT>, SO >
440 template<
typename NewType >
450 template<
size_t NewM
477 explicit inline CustomMatrix( Type* ptr,
size_t m,
size_t n );
478 explicit inline CustomMatrix( Type* ptr,
size_t m,
size_t n,
size_t nn );
518 template< typename Other,
size_t M,
size_t N >
519 inline
CustomMatrix& operator=( const Other (&array)[M][N] );
524 template< typename MT,
bool SO2 > inline
CustomMatrix& operator= ( const
Matrix<MT,SO2>& rhs );
525 template< typename MT,
bool SO2 > inline
CustomMatrix& operator+=( const
Matrix<MT,SO2>& rhs );
526 template< typename MT,
bool SO2 > inline
CustomMatrix& operator-=( const
Matrix<MT,SO2>& rhs );
527 template< typename MT,
bool SO2 > inline
CustomMatrix& operator%=( const
Matrix<MT,SO2>& rhs );
534 inline
size_t rows() const noexcept;
535 inline
size_t columns() const noexcept;
536 inline
size_t spacing() const noexcept;
537 inline
size_t capacity() const noexcept;
538 inline
size_t capacity(
size_t i ) const noexcept;
540 inline
size_t nonZeros(
size_t i ) const;
542 inline
void reset(
size_t i );
554 template< typename Other > inline
CustomMatrix& scale( const Other& scalar );
561 inline
void reset( Type* ptr,
size_t m,
size_t n );
562 inline
void reset( Type* ptr,
size_t m,
size_t n,
size_t nn );
569 template< typename MT >
571 static constexpr
bool VectorizedAssign_v =
572 ( useOptimizedKernels &&
580 template< typename MT >
582 static constexpr
bool VectorizedAddAssign_v =
583 ( useOptimizedKernels &&
593 template< typename MT >
595 static constexpr
bool VectorizedSubAssign_v =
596 ( useOptimizedKernels &&
606 template< typename MT >
608 static constexpr
bool VectorizedSchurAssign_v =
609 ( useOptimizedKernels &&
625 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
626 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
640 template< typename MT >
643 template< typename MT >
650 template< typename MT >
653 template< typename MT >
660 template< typename MT >
663 template< typename MT >
670 template< typename MT >
673 template< typename MT >
724 template< typename Type
758 template<
typename Type
771 if( ptr ==
nullptr ) {
804 template<
typename Type
819 if( ptr ==
nullptr ) {
827 if( PF && IsVectorizable_v<Type> && (
nn_ < nextMultiple<size_t>(
n_,
SIMDSIZE ) ) ) {
831 if( PF && IsVectorizable_v<Type> ) {
833 for(
size_t i=0UL; i<
m_; ++i ) {
834 for(
size_t j=
n_; j<
nn_; ++j )
849 template<
typename Type
868 template<
typename Type
907 template<
typename Type
932 template<
typename Type
958 template<
typename Type
988 template<
typename Type
1002 return (*
this)(i,j);
1019 template<
typename Type
1044 template<
typename Type
1065 template<
typename Type
1087 template<
typename Type
1112 template<
typename Type
1137 template<
typename Type
1162 template<
typename Type
1187 template<
typename Type
1212 template<
typename Type
1237 template<
typename Type
1265 template<
typename Type
1273 for(
size_t i=0UL; i<
m_; ++i )
1274 for(
size_t j=0UL; j<
n_; ++j )
1310 template<
typename Type
1324 for(
const auto& rowList : list ) {
1325 std::fill( std::copy( rowList.begin(), rowList.end(), v_+i*nn_ ),
1326 v_+i*nn_+( PF ? nn_ :
n_ ), Type() );
1364 template<
typename Type
1369 template<
typename Other
1375 if(
m_ != M ||
n_ != N ) {
1379 for(
size_t i=0UL; i<M; ++i )
1380 for(
size_t j=0UL; j<N; ++j )
1381 v_[i*nn_+j] = array[i][j];
1398 template<
typename Type
1423 template<
typename Type
1458 template<
typename Type
1463 template<
typename MT
1468 using TT = decltype(
trans( *
this ) );
1469 using CT = decltype(
ctrans( *
this ) );
1470 using IT = decltype(
inv( *
this ) );
1476 if( IsSame_v<MT,TT> && (~rhs).isAliased(
this ) ) {
1479 else if( IsSame_v<MT,CT> && (~rhs).isAliased(
this ) ) {
1482 else if( !IsSame_v<MT,IT> && (~rhs).canAlias(
this ) ) {
1487 if( IsSparseMatrix_v<MT> )
1507 template<
typename Type
1512 template<
typename MT
1521 if( (~rhs).canAlias(
this ) ) {
1544 template<
typename Type
1549 template<
typename MT
1558 if( (~rhs).canAlias(
this ) ) {
1581 template<
typename Type
1586 template<
typename MT
1595 if( (~rhs).canAlias(
this ) ) {
1621 template<
typename Type
1638 template<
typename Type
1660 template<
typename Type
1677 template<
typename Type
1700 template<
typename Type
1719 template<
typename Type
1726 size_t nonzeros( 0UL );
1728 for(
size_t i=0UL; i<
m_; ++i )
1729 for(
size_t j=0UL; j<
n_; ++j )
1749 template<
typename Type
1758 const size_t jend( i*nn_ +
n_ );
1759 size_t nonzeros( 0UL );
1761 for(
size_t j=i*nn_; j<jend; ++j )
1775 template<
typename Type
1784 for(
size_t i=0UL; i<
m_; ++i )
1785 for(
size_t j=0UL; j<
n_; ++j )
1786 clear( v_[i*nn_+j] );
1802 template<
typename Type
1812 for(
size_t j=0UL; j<
n_; ++j )
1813 clear( v_[i*nn_+j] );
1825 template<
typename Type
1846 template<
typename Type
1879 template<
typename Type
1892 for(
size_t i=1UL; i<
m_; ++i )
1893 for(
size_t j=0UL; j<i; ++j )
1894 swap( v_[i*nn_+j], v_[j*nn_+i] );
1909 template<
typename Type
1920 for(
size_t i=0UL; i<
m_; ++i ) {
1921 for(
size_t j=0UL; j<i; ++j ) {
1922 cswap( v_[i*nn_+j], v_[j*nn_+i] );
1953 template<
typename Type
1958 template<
typename Other >
1961 for(
size_t i=0UL; i<
m_; ++i )
1962 for(
size_t j=0UL; j<
n_; ++j )
1963 v_[i*nn_+j] *= scalar;
2001 template<
typename Type
2039 template<
typename Type
2070 template<
typename Type
2075 template<
typename Other >
2078 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
2093 template<
typename Type
2098 template<
typename Other >
2101 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
2115 template<
typename Type
2137 template<
typename Type
2144 return (
rows() *
columns() >= SMP_DMATASSIGN_THRESHOLD );
2164 template<
typename Type
2173 return loada( i, j );
2175 return loadu( i, j );
2195 template<
typename Type
2213 return loada( v_+i*nn_+j );
2233 template<
typename Type
2249 return loadu( v_+i*nn_+j );
2270 template<
typename Type
2302 template<
typename Type
2320 storea( v_+i*nn_+j, value );
2341 template<
typename Type
2357 storeu( v_+i*nn_+j, value );
2379 template<
typename Type
2397 stream( v_+i*nn_+j, value );
2413 template<
typename Type
2418 template<
typename MT >
2425 const size_t jpos(
n_ &
size_t(-2) );
2428 for(
size_t i=0UL; i<
m_; ++i ) {
2429 for(
size_t j=0UL; j<jpos; j+=2UL ) {
2430 v_[i*nn_+j ] = (~rhs)(i,j );
2431 v_[i*nn_+j+1UL] = (~rhs)(i,j+1UL);
2434 v_[i*nn_+jpos] = (~rhs)(i,jpos);
2452 template<
typename Type
2457 template<
typename MT >
2466 constexpr
bool remainder( !PF || !IsPadded_v<MT> );
2468 const size_t jpos( ( remainder )?(
n_ &
size_t(-SIMDSIZE) ):(
n_ ) );
2471 if( AF && PF && useStreaming &&
2472 (
m_*
n_ > ( cacheSize / (
sizeof(Type) * 3UL ) ) ) && !(~rhs).isAliased(
this ) )
2474 for(
size_t i=0UL; i<
m_; ++i )
2480 for( ; j<jpos; j+=SIMDSIZE ) {
2481 left.stream( right.load() ); left += SIMDSIZE, right += SIMDSIZE;
2483 for( ; remainder && j<
n_; ++j ) {
2484 *left = *right; ++left; ++right;
2490 for(
size_t i=0UL; i<
m_; ++i )
2494 ConstIterator_t<MT> right( (~rhs).
begin(i) );
2496 for( ; (j+SIMDSIZE*3UL) < jpos; j+=SIMDSIZE*4UL ) {
2497 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2498 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2499 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2500 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2502 for( ; j<jpos; j+=SIMDSIZE ) {
2503 left.store( right.load() ); left+=SIMDSIZE, right+=SIMDSIZE;
2505 for( ; remainder && j<
n_; ++j ) {
2506 *left = *right; ++left; ++right;
2525 template<
typename Type
2530 template<
typename MT >
2538 constexpr
size_t block( BLOCK_SIZE );
2540 for(
size_t ii=0UL; ii<
m_; ii+=block ) {
2541 const size_t iend(
min(
m_, ii+block ) );
2542 for(
size_t jj=0UL; jj<
n_; jj+=block ) {
2543 const size_t jend(
min(
n_, jj+block ) );
2544 for(
size_t i=ii; i<iend; ++i ) {
2545 for(
size_t j=jj; j<jend; ++j ) {
2546 v_[i*nn_+j] = (~rhs)(i,j);
2566 template<
typename Type
2571 template<
typename MT >
2577 for(
size_t i=0UL; i<
m_; ++i )
2578 for(
auto element=(~rhs).
begin(i); element!=(~rhs).
end(i); ++element )
2579 v_[i*nn_+element->index()] = element->value();
2595 template<
typename Type
2600 template<
typename MT >
2608 for(
size_t j=0UL; j<
n_; ++j )
2609 for(
auto element=(~rhs).
begin(j); element!=(~rhs).
end(j); ++element )
2610 v_[element->index()*nn_+j] = element->value();
2626 template<
typename Type
2631 template<
typename MT >
2638 for(
size_t i=0UL; i<
m_; ++i )
2640 if( IsDiagonal_v<MT> )
2642 v_[i*nn_+i] += (~rhs)(i,i);
2646 const size_t jbegin( ( IsUpper_v<MT> )
2647 ?( IsStrictlyUpper_v<MT> ? i+1UL : i )
2649 const size_t jend ( ( IsLower_v<MT> )
2650 ?( IsStrictlyLower_v<MT> ? i : i+1UL )
2656 for( ; (j+2UL) <= jend; j+=2UL ) {
2657 v_[i*nn_+j ] += (~rhs)(i,j );
2658 v_[i*nn_+j+1UL] += (~rhs)(i,j+1UL);
2661 v_[i*nn_+j] += (~rhs)(i,j);
2680 template<
typename Type
2685 template<
typename MT >
2695 constexpr
bool remainder( !PF || !IsPadded_v<MT> );
2697 for(
size_t i=0UL; i<
m_; ++i )
2699 const size_t jbegin( ( IsUpper_v<MT> )
2700 ?( ( IsStrictlyUpper_v<MT> ? i+1UL : i ) &
size_t(-SIMDSIZE) )
2702 const size_t jend ( ( IsLower_v<MT> )
2703 ?( IsStrictlyLower_v<MT> ? i : i+1UL )
2707 const size_t jpos( ( remainder )?( jend &
size_t(-SIMDSIZE) ):( jend ) );
2708 BLAZE_INTERNAL_ASSERT( !remainder || ( jend - ( jend % (SIMDSIZE) ) ) == jpos,
"Invalid end calculation" );
2714 for( ; (j+SIMDSIZE*3UL) < jpos; j+=SIMDSIZE*4UL ) {
2715 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2716 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2717 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2718 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2720 for( ; j<jpos; j+=SIMDSIZE ) {
2721 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2723 for( ; remainder && j<jend; ++j ) {
2724 *left += *right; ++left; ++right;
2742 template<
typename Type
2747 template<
typename MT >
2755 constexpr
size_t block( BLOCK_SIZE );
2757 for(
size_t ii=0UL; ii<
m_; ii+=block ) {
2758 const size_t iend(
min(
m_, ii+block ) );
2759 for(
size_t jj=0UL; jj<
n_; jj+=block )
2761 if( IsLower_v<MT> && ii < jj )
break;
2762 if( IsUpper_v<MT> && ii > jj )
continue;
2764 for(
size_t i=ii; i<iend; ++i )
2766 const size_t jbegin( ( IsUpper_v<MT> )
2767 ?(
max( ( IsStrictlyUpper_v<MT> ? i+1UL : i ), jj ) )
2769 const size_t jend ( ( IsLower_v<MT> )
2770 ?(
min( ( IsStrictlyLower_v<MT> ? i : i+1UL ),
n_, jj+block ) )
2771 :(
min(
n_, jj+block ) ) );
2774 for(
size_t j=jbegin; j<jend; ++j ) {
2775 v_[i*nn_+j] += (~rhs)(i,j);
2795 template<
typename Type
2800 template<
typename MT >
2806 for(
size_t i=0UL; i<
m_; ++i )
2807 for(
auto element=(~rhs).
begin(i); element!=(~rhs).
end(i); ++element )
2808 v_[i*nn_+element->index()] += element->value();
2824 template<
typename Type
2829 template<
typename MT >
2837 for(
size_t j=0UL; j<
n_; ++j )
2838 for(
auto element=(~rhs).
begin(j); element!=(~rhs).
end(j); ++element )
2839 v_[element->index()*nn_+j] += element->value();
2855 template<
typename Type
2860 template<
typename MT >
2867 for(
size_t i=0UL; i<
m_; ++i )
2869 if( IsDiagonal_v<MT> )
2871 v_[i*nn_+i] -= (~rhs)(i,i);
2875 const size_t jbegin( ( IsUpper_v<MT> )
2876 ?( IsStrictlyUpper_v<MT> ? i+1UL : i )
2878 const size_t jend ( ( IsLower_v<MT> )
2879 ?( IsStrictlyLower_v<MT> ? i : i+1UL )
2885 for( ; (j+2UL) <= jend; j+=2UL ) {
2886 v_[i*nn_+j ] -= (~rhs)(i,j );
2887 v_[i*nn_+j+1UL] -= (~rhs)(i,j+1UL);
2890 v_[i*nn_+j] -= (~rhs)(i,j);
2909 template<
typename Type
2914 template<
typename MT >
2924 constexpr
bool remainder( !PF || !IsPadded_v<MT> );
2926 for(
size_t i=0UL; i<
m_; ++i )
2928 const size_t jbegin( ( IsUpper_v<MT> )
2929 ?( ( IsStrictlyUpper_v<MT> ? i+1UL : i ) &
size_t(-SIMDSIZE) )
2931 const size_t jend ( ( IsLower_v<MT> )
2932 ?( IsStrictlyLower_v<MT> ? i : i+1UL )
2936 const size_t jpos( ( remainder )?( jend &
size_t(-SIMDSIZE) ):( jend ) );
2937 BLAZE_INTERNAL_ASSERT( !remainder || ( jend - ( jend % (SIMDSIZE) ) ) == jpos,
"Invalid end calculation" );
2943 for( ; (j+SIMDSIZE*3UL) < jpos; j+=SIMDSIZE*4UL ) {
2944 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2945 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2946 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2947 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2949 for( ; j<jpos; j+=SIMDSIZE ) {
2950 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2952 for( ; remainder && j<jend; ++j ) {
2953 *left -= *right; ++left; ++right;
2971 template<
typename Type
2976 template<
typename MT >
2984 constexpr
size_t block( BLOCK_SIZE );
2986 for(
size_t ii=0UL; ii<
m_; ii+=block ) {
2987 const size_t iend(
min(
m_, ii+block ) );
2988 for(
size_t jj=0UL; jj<
n_; jj+=block )
2990 if( IsLower_v<MT> && ii < jj )
break;
2991 if( IsUpper_v<MT> && ii > jj )
continue;
2993 for(
size_t i=ii; i<iend; ++i )
2995 const size_t jbegin( ( IsUpper_v<MT> )
2996 ?(
max( ( IsStrictlyUpper_v<MT> ? i+1UL : i ), jj ) )
2998 const size_t jend ( ( IsLower_v<MT> )
2999 ?(
min( ( IsStrictlyLower_v<MT> ? i : i+1UL ),
n_, jj+block ) )
3000 :(
min(
n_, jj+block ) ) );
3003 for(
size_t j=jbegin; j<jend; ++j ) {
3004 v_[i*nn_+j] -= (~rhs)(i,j);
3024 template<
typename Type
3029 template<
typename MT >
3035 for(
size_t i=0UL; i<
m_; ++i )
3036 for(
auto element=(~rhs).
begin(i); element!=(~rhs).
end(i); ++element )
3037 v_[i*nn_+element->index()] -= element->value();
3053 template<
typename Type
3058 template<
typename MT >
3066 for(
size_t j=0UL; j<
n_; ++j )
3067 for(
auto element=(~rhs).
begin(j); element!=(~rhs).
end(j); ++element )
3068 v_[element->index()*nn_+j] -= element->value();
3084 template<
typename Type
3089 template<
typename MT >
3096 const size_t jpos(
n_ &
size_t(-2) );
3099 for(
size_t i=0UL; i<
m_; ++i ) {
3100 for(
size_t j=0UL; j<jpos; j+=2UL ) {
3101 v_[i*nn_+j ] *= (~rhs)(i,j );
3102 v_[i*nn_+j+1UL] *= (~rhs)(i,j+1UL);
3105 v_[i*nn_+jpos] *= (~rhs)(i,jpos);
3123 template<
typename Type
3128 template<
typename MT >
3137 constexpr
bool remainder( !PF || !IsPadded_v<MT> );
3139 for(
size_t i=0UL; i<
m_; ++i )
3141 const size_t jpos( ( remainder )?(
n_ &
size_t(-SIMDSIZE) ):(
n_ ) );
3148 for( ; (j+SIMDSIZE*3UL) < jpos; j+=SIMDSIZE*4UL ) {
3149 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
3150 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
3151 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
3152 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
3154 for( ; j<jpos; j+=SIMDSIZE ) {
3155 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
3157 for( ; remainder && j<
n_; ++j ) {
3158 *left *= *right; ++left; ++right;
3176 template<
typename Type
3181 template<
typename MT >
3189 constexpr
size_t block( BLOCK_SIZE );
3191 for(
size_t ii=0UL; ii<
m_; ii+=block ) {
3192 const size_t iend(
min(
m_, ii+block ) );
3193 for(
size_t jj=0UL; jj<
n_; jj+=block ) {
3194 const size_t jend(
min(
n_, jj+block ) );
3195 for(
size_t i=ii; i<iend; ++i ) {
3196 for(
size_t j=jj; j<jend; ++j ) {
3197 v_[i*nn_+j] *= (~rhs)(i,j);
3217 template<
typename Type
3222 template<
typename MT >
3232 for(
size_t i=0UL; i<
m_; ++i )
3233 for(
auto element=(~rhs).
begin(i); element!=(~rhs).
end(i); ++element )
3234 v_[i*nn_+element->index()] = tmp(i,element->index()) * element->value();
3250 template<
typename Type
3255 template<
typename MT >
3267 for(
size_t j=0UL; j<
n_; ++j )
3268 for(
auto element=(~rhs).
begin(j); element!=(~rhs).
end(j); ++element )
3269 v_[element->index()*nn_+j] = tmp(element->index(),j) * element->value();
3294 template<
typename Type
3299 :
public DenseMatrix< CustomMatrix<Type,AF,PF,true,RT>, true >
3332 template<
typename NewType >
3342 template<
size_t NewM
3345 using RRT = Resize_t<RT,NewM,NewN>;
3346 using Other = CustomMatrix<Type,AF,PF,true,RRT>;
3356 static constexpr
bool simdEnabled = IsVectorizable_v<Type>;
3362 static constexpr
bool smpAssignable = !IsSMPAssignable_v<Type>;
3369 explicit inline CustomMatrix( Type* ptr,
size_t m,
size_t n );
3370 explicit inline CustomMatrix( Type* ptr,
size_t m,
size_t n,
size_t mm );
3408 inline
CustomMatrix& operator=( initializer_list< initializer_list<Type> > list );
3410 template< typename Other,
size_t M,
size_t N >
3411 inline
CustomMatrix& operator=( const Other (&array)[M][N] );
3416 template< typename MT,
bool SO > inline
CustomMatrix& operator= ( const Matrix<MT,SO>& rhs );
3417 template< typename MT,
bool SO > inline
CustomMatrix& operator+=( const Matrix<MT,SO>& rhs );
3418 template< typename MT,
bool SO > inline
CustomMatrix& operator-=( const Matrix<MT,SO>& rhs );
3419 template< typename MT,
bool SO > inline
CustomMatrix& operator%=( const Matrix<MT,SO>& rhs );
3426 inline
size_t rows() const noexcept;
3427 inline
size_t columns() const noexcept;
3428 inline
size_t spacing() const noexcept;
3429 inline
size_t capacity() const noexcept;
3430 inline
size_t capacity(
size_t j ) const noexcept;
3432 inline
size_t nonZeros(
size_t j ) const;
3433 inline
void reset();
3434 inline
void reset(
size_t j );
3435 inline
void clear();
3446 template< typename Other > inline
CustomMatrix& scale( const Other& scalar );
3453 inline
void reset( Type* ptr,
size_t m,
size_t n );
3454 inline
void reset( Type* ptr,
size_t m,
size_t n,
size_t mm );
3461 template< typename MT >
3462 static constexpr
bool VectorizedAssign_v =
3463 ( useOptimizedKernels &&
3470 template< typename MT >
3471 static constexpr
bool VectorizedAddAssign_v =
3472 ( useOptimizedKernels &&
3481 template< typename MT >
3482 static constexpr
bool VectorizedSubAssign_v =
3483 ( useOptimizedKernels &&
3492 template< typename MT >
3493 static constexpr
bool VectorizedSchurAssign_v =
3494 ( useOptimizedKernels &&
3509 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
3510 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
3512 inline
bool isAligned () const noexcept;
3524 template< typename MT >
3525 inline auto
assign( const DenseMatrix<MT,true>& rhs ) ->
DisableIf_t< VectorizedAssign_v<MT> >;
3527 template< typename MT >
3528 inline auto
assign( const DenseMatrix<MT,true>& rhs ) ->
EnableIf_t< VectorizedAssign_v<MT> >;
3530 template< typename MT > inline
void assign( const DenseMatrix<MT,false>& rhs );
3531 template< typename MT > inline
void assign( const SparseMatrix<MT,true>& rhs );
3532 template< typename MT > inline
void assign( const SparseMatrix<MT,false>& rhs );
3534 template< typename MT >
3535 inline auto
addAssign( const DenseMatrix<MT,true>& rhs ) ->
DisableIf_t< VectorizedAddAssign_v<MT> >;
3537 template< typename MT >
3538 inline auto
addAssign( const DenseMatrix<MT,true>& rhs ) ->
EnableIf_t< VectorizedAddAssign_v<MT> >;
3540 template< typename MT > inline
void addAssign( const DenseMatrix<MT,false>& rhs );
3541 template< typename MT > inline
void addAssign( const SparseMatrix<MT,true>& rhs );
3542 template< typename MT > inline
void addAssign( const SparseMatrix<MT,false>& rhs );
3544 template< typename MT >
3545 inline auto
subAssign ( const DenseMatrix<MT,true>& rhs ) ->
DisableIf_t< VectorizedSubAssign_v<MT> >;
3547 template< typename MT >
3548 inline auto
subAssign ( const DenseMatrix<MT,true>& rhs ) ->
EnableIf_t< VectorizedSubAssign_v<MT> >;
3550 template< typename MT > inline
void subAssign( const DenseMatrix<MT,false>& rhs );
3551 template< typename MT > inline
void subAssign( const SparseMatrix<MT,true>& rhs );
3552 template< typename MT > inline
void subAssign( const SparseMatrix<MT,false>& rhs );
3554 template< typename MT >
3555 inline auto
schurAssign ( const DenseMatrix<MT,true>& rhs ) ->
DisableIf_t< VectorizedSchurAssign_v<MT> >;
3557 template< typename MT >
3558 inline auto
schurAssign ( const DenseMatrix<MT,true>& rhs ) ->
EnableIf_t< VectorizedSchurAssign_v<MT> >;
3560 template< typename MT > inline
void schurAssign( const DenseMatrix<MT,false>& rhs );
3561 template< typename MT > inline
void schurAssign( const SparseMatrix<MT,true>& rhs );
3562 template< typename MT > inline
void schurAssign( const SparseMatrix<MT,false>& rhs );
3601 template< typename Type
3636 template<
typename Type
3648 if( ptr ==
nullptr ) {
3683 template<
typename Type
3695 using ClearFunctor = If_t< PF || !IsConst_v<Type>, Clear, Noop >;
3697 if( ptr ==
nullptr ) {
3705 if( PF && IsVectorizable_v<Type> && ( mm_ < nextMultiple<size_t>(
m_,
SIMDSIZE ) ) ) {
3709 if( PF && IsVectorizable_v<Type> ) {
3711 for(
size_t j=0UL; j<
n_; ++j )
3712 for(
size_t i=
m_; i<mm_; ++i ) {
3730 template<
typename Type
3750 template<
typename Type
3790 template<
typename Type
3816 template<
typename Type
3843 template<
typename Type
3856 return (*
this)(i,j);
3874 template<
typename Type
3887 return (*
this)(i,j);
3905 template<
typename Type
3930 template<
typename Type
3952 template<
typename Type
3975 template<
typename Type
3996 template<
typename Type
4017 template<
typename Type
4038 template<
typename Type
4059 template<
typename Type
4080 template<
typename Type
4101 template<
typename Type
4130 template<
typename Type
4134 inline CustomMatrix<Type,AF,PF,true,RT>&
4137 for(
size_t j=0UL; j<
n_; ++j )
4138 for(
size_t i=0UL; i<
m_; ++i )
4176 template<
typename Type
4180 inline CustomMatrix<Type,AF,PF,true,RT>&
4191 for(
const auto& rowList : list ) {
4193 for(
const auto& element : rowList ) {
4194 v_[i+j*mm_] = element;
4197 for( ; j<
n_; ++j ) {
4198 clear( v_[i+j*mm_] );
4239 template<
typename Type
4243 template<
typename Other
4246 inline CustomMatrix<Type,AF,PF,true,RT>&
4249 if(
m_ != M ||
n_ != N ) {
4253 for(
size_t j=0UL; j<N; ++j )
4254 for(
size_t i=0UL; i<M; ++i )
4255 v_[i+j*mm_] = array[i][j];
4274 template<
typename Type
4278 inline CustomMatrix<Type,AF,PF,true,RT>&
4281 if( rhs.rows() !=
m_ || rhs.columns() !=
n_ ) {
4300 template<
typename Type
4304 inline CustomMatrix<Type,AF,PF,true,RT>&
4336 template<
typename Type
4340 template<
typename MT
4342 inline CustomMatrix<Type,AF,PF,true,RT>&
4345 using TT = decltype(
trans( *
this ) );
4346 using CT = decltype(
ctrans( *
this ) );
4347 using IT = decltype(
inv( *
this ) );
4353 if( IsSame_v<MT,TT> && (~rhs).isAliased(
this ) ) {
4356 else if( IsSame_v<MT,CT> && (~rhs).isAliased(
this ) ) {
4359 else if( !IsSame_v<MT,IT> && (~rhs).canAlias(
this ) ) {
4360 const ResultType_t<MT> tmp( ~rhs );
4364 if( IsSparseMatrix_v<MT> )
4386 template<
typename Type
4390 template<
typename MT
4392 inline CustomMatrix<Type,AF,PF,true,RT>&
4393 CustomMatrix<Type,AF,PF,true,RT>::operator+=(
const Matrix<MT,SO>& rhs )
4399 if( (~rhs).canAlias(
this ) ) {
4400 const ResultType_t<MT> tmp( ~rhs );
4424 template<
typename Type
4428 template<
typename MT
4430 inline CustomMatrix<Type,AF,PF,true,RT>&
4431 CustomMatrix<Type,AF,PF,true,RT>::operator-=(
const Matrix<MT,SO>& rhs )
4437 if( (~rhs).canAlias(
this ) ) {
4438 const ResultType_t<MT> tmp( ~rhs );
4462 template<
typename Type
4466 template<
typename MT
4468 inline CustomMatrix<Type,AF,PF,true,RT>&
4469 CustomMatrix<Type,AF,PF,true,RT>::operator%=(
const Matrix<MT,SO>& rhs )
4475 if( (~rhs).canAlias(
this ) ) {
4476 const ResultType_t<MT> tmp( ~rhs );
4503 template<
typename Type
4521 template<
typename Type
4542 template<
typename Type
4560 template<
typename Type
4579 template<
typename Type
4599 template<
typename Type
4605 size_t nonzeros( 0UL );
4607 for(
size_t j=0UL; j<
n_; ++j )
4608 for(
size_t i=0UL; i<
m_; ++i )
4625 template<
typename Type
4633 const size_t iend( j*mm_ +
m_ );
4634 size_t nonzeros( 0UL );
4636 for(
size_t i=j*mm_; i<iend; ++i )
4652 template<
typename Type
4660 for(
size_t j=0UL; j<
n_; ++j )
4661 for(
size_t i=0UL; i<
m_; ++i )
4662 clear( v_[i+j*mm_] );
4678 template<
typename Type
4687 for(
size_t i=0UL; i<
m_; ++i )
4688 clear( v_[i+j*mm_] );
4702 template<
typename Type
4724 template<
typename Type
4758 template<
typename Type
4770 for(
size_t j=1UL; j<
n_; ++j )
4771 for(
size_t i=0UL; i<j; ++i )
4772 swap( v_[i+j*mm_], v_[j+i*mm_] );
4789 template<
typename Type
4799 for(
size_t j=0UL; j<
n_; ++j ) {
4800 for(
size_t i=0UL; i<j; ++i ) {
4801 cswap( v_[i+j*mm_], v_[j+i*mm_] );
4834 template<
typename Type
4838 template<
typename Other >
4839 inline CustomMatrix<Type,AF,PF,true,RT>& CustomMatrix<Type,AF,PF,true,RT>::scale(
const Other& scalar )
4841 for(
size_t j=0UL; j<
n_; ++j )
4842 for(
size_t i=0UL; i<
m_; ++i )
4843 v_[i+j*mm_] *= scalar;
4883 template<
typename Type
4891 CustomMatrix tmp( ptr, m, n );
4922 template<
typename Type
4928 CustomMatrix tmp( ptr, m, n, mm );
4954 template<
typename Type
4958 template<
typename Other >
4961 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
4978 template<
typename Type
4982 template<
typename Other >
4985 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
5001 template<
typename Type
5024 template<
typename Type
5030 return (
rows() *
columns() >= SMP_DMATASSIGN_THRESHOLD );
5051 template<
typename Type
5059 return loada( i, j );
5061 return loadu( i, j );
5082 template<
typename Type
5099 return loada( v_+i+j*mm_ );
5120 template<
typename Type
5135 return loadu( v_+i+j*mm_ );
5157 template<
typename Type
5189 template<
typename Type
5206 storea( v_+i+j*mm_, value );
5228 template<
typename Type
5243 storeu( v_+i+j*mm_, value );
5266 template<
typename Type
5283 stream( v_+i+j*mm_, value );
5301 template<
typename Type
5305 template<
typename MT >
5307 -> DisableIf_t< VectorizedAssign_v<MT> >
5312 const size_t ipos(
m_ &
size_t(-2) );
5315 for(
size_t j=0UL; j<
n_; ++j ) {
5316 for(
size_t i=0UL; i<ipos; i+=2UL ) {
5317 v_[i +j*mm_] = (~rhs)(i ,j);
5318 v_[i+1UL+j*mm_] = (~rhs)(i+1UL,j);
5321 v_[ipos+j*mm_] = (~rhs)(ipos,j);
5341 template<
typename Type
5345 template<
typename MT >
5347 -> EnableIf_t< VectorizedAssign_v<MT> >
5354 constexpr
bool remainder( !PF || !IsPadded_v<MT> );
5356 const size_t ipos( ( remainder )?(
m_ &
size_t(-SIMDSIZE) ):(
m_ ) );
5359 if( AF && PF && useStreaming &&
5360 (
m_*
n_ > ( cacheSize / (
sizeof(Type) * 3UL ) ) ) && !(~rhs).isAliased(
this ) )
5362 for(
size_t j=0UL; j<
n_; ++j )
5366 ConstIterator_t<MT> right( (~rhs).
begin(j) );
5368 for( ; i<ipos; i+=SIMDSIZE ) {
5369 left.stream( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5371 for( ; remainder && i<
m_; ++i ) {
5372 *left = *right; ++left; ++right;
5378 for(
size_t j=0UL; j<
n_; ++j )
5382 ConstIterator_t<MT> right( (~rhs).
begin(j) );
5384 for( ; (i+SIMDSIZE*3UL) < ipos; i+=SIMDSIZE*4UL ) {
5385 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5386 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5387 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5388 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5390 for( ; i<ipos; i+=SIMDSIZE ) {
5391 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5393 for( ; remainder && i<
m_; ++i ) {
5394 *left = *right; ++left; ++right;
5415 template<
typename Type
5419 template<
typename MT >
5427 constexpr
size_t block( BLOCK_SIZE );
5429 for(
size_t jj=0UL; jj<
n_; jj+=block ) {
5430 const size_t jend(
min(
n_, jj+block ) );
5431 for(
size_t ii=0UL; ii<
m_; ii+=block ) {
5432 const size_t iend(
min(
m_, ii+block ) );
5433 for(
size_t j=jj; j<jend; ++j ) {
5434 for(
size_t i=ii; i<iend; ++i ) {
5435 v_[i+j*mm_] = (~rhs)(i,j);
5457 template<
typename Type
5461 template<
typename MT >
5467 for(
size_t j=0UL; j<(~rhs).
columns(); ++j )
5468 for(
auto element=(~rhs).begin(j); element!=(~rhs).
end(j); ++element )
5469 v_[element->index()+j*mm_] = element->value();
5487 template<
typename Type
5491 template<
typename MT >
5499 for(
size_t i=0UL; i<(~rhs).
rows(); ++i )
5500 for(
auto element=(~rhs).begin(i); element!=(~rhs).
end(i); ++element )
5501 v_[i+element->index()*mm_] = element->value();
5519 template<
typename Type
5523 template<
typename MT >
5525 -> DisableIf_t< VectorizedAddAssign_v<MT> >
5530 for(
size_t j=0UL; j<
n_; ++j )
5532 if( IsDiagonal_v<MT> )
5534 v_[j+j*mm_] += (~rhs)(j,j);
5538 const size_t ibegin( ( IsLower_v<MT> )
5539 ?( IsStrictlyLower_v<MT> ? j+1UL : j )
5541 const size_t iend ( ( IsUpper_v<MT> )
5542 ?( IsStrictlyUpper_v<MT> ? j : j+1UL )
5548 for( ; (i+2UL) <= iend; i+=2UL ) {
5549 v_[i +j*mm_] += (~rhs)(i ,j);
5550 v_[i+1UL+j*mm_] += (~rhs)(i+1UL,j);
5553 v_[i+j*mm_] += (~rhs)(i,j);
5574 template<
typename Type
5578 template<
typename MT >
5580 -> EnableIf_t< VectorizedAddAssign_v<MT> >
5588 constexpr
bool remainder( !PF || !IsPadded_v<MT> );
5590 for(
size_t j=0UL; j<
n_; ++j )
5592 const size_t ibegin( ( IsLower_v<MT> )
5593 ?( ( IsStrictlyLower_v<MT> ? j+1UL : j ) &
size_t(-SIMDSIZE) )
5595 const size_t iend ( ( IsUpper_v<MT> )
5596 ?( IsStrictlyUpper_v<MT> ? j : j+1UL )
5600 const size_t ipos( ( remainder )?( iend &
size_t(-SIMDSIZE) ):( iend ) );
5601 BLAZE_INTERNAL_ASSERT( !remainder || ( iend - ( iend % (SIMDSIZE) ) ) == ipos,
"Invalid end calculation" );
5605 ConstIterator_t<MT> right( (~rhs).
begin(j) + ibegin );
5607 for( ; (i+SIMDSIZE*3UL) < ipos; i+=SIMDSIZE*4UL ) {
5608 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5609 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5610 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5611 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5613 for( ; i<ipos; i+=SIMDSIZE ) {
5614 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5616 for( ; remainder && i<iend; ++i ) {
5617 *left += *right; ++left; ++right;
5637 template<
typename Type
5641 template<
typename MT >
5649 constexpr
size_t block( BLOCK_SIZE );
5651 for(
size_t jj=0UL; jj<
n_; jj+=block ) {
5652 const size_t jend(
min(
n_, jj+block ) );
5653 for(
size_t ii=0UL; ii<
m_; ii+=block )
5655 if( IsLower_v<MT> && ii < jj )
continue;
5656 if( IsUpper_v<MT> && ii > jj )
break;
5658 for(
size_t j=jj; j<jend; ++j )
5660 const size_t ibegin( ( IsLower_v<MT> )
5661 ?(
max( ( IsStrictlyLower_v<MT> ? j+1UL : j ), ii ) )
5663 const size_t iend ( ( IsUpper_v<MT> )
5664 ?(
min( ( IsStrictlyUpper_v<MT> ? j : j+1UL ),
m_, ii+block ) )
5665 :(
min(
m_, ii+block ) ) );
5668 for(
size_t i=ibegin; i<iend; ++i ) {
5669 v_[i+j*mm_] += (~rhs)(i,j);
5691 template<
typename Type
5695 template<
typename MT >
5701 for(
size_t j=0UL; j<(~rhs).
columns(); ++j )
5702 for(
auto element=(~rhs).begin(j); element!=(~rhs).
end(j); ++element )
5703 v_[element->index()+j*mm_] += element->value();
5721 template<
typename Type
5725 template<
typename MT >
5733 for(
size_t i=0UL; i<(~rhs).
rows(); ++i )
5734 for(
auto element=(~rhs).begin(i); element!=(~rhs).
end(i); ++element )
5735 v_[i+element->index()*mm_] += element->value();
5753 template<
typename Type
5757 template<
typename MT >
5759 -> DisableIf_t< VectorizedSubAssign_v<MT> >
5764 for(
size_t j=0UL; j<
n_; ++j )
5766 if( IsDiagonal_v<MT> )
5768 v_[j+j*mm_] -= (~rhs)(j,j);
5772 const size_t ibegin( ( IsLower_v<MT> )
5773 ?( IsStrictlyLower_v<MT> ? j+1UL : j )
5775 const size_t iend ( ( IsUpper_v<MT> )
5776 ?( IsStrictlyUpper_v<MT> ? j : j+1UL )
5782 for( ; (i+2UL) <= iend; i+=2UL ) {
5783 v_[i +j*mm_] -= (~rhs)(i ,j);
5784 v_[i+1+j*mm_] -= (~rhs)(i+1,j);
5787 v_[i+j*mm_] -= (~rhs)(i,j);
5809 template<
typename Type
5813 template<
typename MT >
5815 -> EnableIf_t< VectorizedSubAssign_v<MT> >
5823 constexpr
bool remainder( !PF || !IsPadded_v<MT> );
5825 for(
size_t j=0UL; j<
n_; ++j )
5827 const size_t ibegin( ( IsLower_v<MT> )
5828 ?( ( IsStrictlyLower_v<MT> ? j+1UL : j ) &
size_t(-SIMDSIZE) )
5830 const size_t iend ( ( IsUpper_v<MT> )
5831 ?( IsStrictlyUpper_v<MT> ? j : j+1UL )
5835 const size_t ipos( ( remainder )?( iend &
size_t(-SIMDSIZE) ):( iend ) );
5836 BLAZE_INTERNAL_ASSERT( !remainder || ( iend - ( iend % (SIMDSIZE) ) ) == ipos,
"Invalid end calculation" );
5840 ConstIterator_t<MT> right( (~rhs).
begin(j) + ibegin );
5842 for( ; (i+SIMDSIZE*3UL) < ipos; i+=SIMDSIZE*4UL ) {
5843 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5844 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5845 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5846 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5848 for( ; i<ipos; i+=SIMDSIZE ) {
5849 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5851 for( ; remainder && i<iend; ++i ) {
5852 *left -= *right; ++left; ++right;
5872 template<
typename Type
5876 template<
typename MT >
5884 constexpr
size_t block( BLOCK_SIZE );
5886 for(
size_t jj=0UL; jj<
n_; jj+=block ) {
5887 const size_t jend(
min(
n_, jj+block ) );
5888 for(
size_t ii=0UL; ii<
m_; ii+=block )
5890 if( IsLower_v<MT> && ii < jj )
continue;
5891 if( IsUpper_v<MT> && ii > jj )
break;
5893 for(
size_t j=jj; j<jend; ++j )
5895 const size_t ibegin( ( IsLower_v<MT> )
5896 ?(
max( ( IsStrictlyLower_v<MT> ? j+1UL : j ), ii ) )
5898 const size_t iend ( ( IsUpper_v<MT> )
5899 ?(
min( ( IsStrictlyUpper_v<MT> ? j : j+1UL ),
m_, ii+block ) )
5900 :(
min(
m_, ii+block ) ) );
5903 for(
size_t i=ibegin; i<iend; ++i ) {
5904 v_[i+j*mm_] -= (~rhs)(i,j);
5926 template<
typename Type
5930 template<
typename MT >
5936 for(
size_t j=0UL; j<(~rhs).
columns(); ++j )
5937 for(
auto element=(~rhs).begin(j); element!=(~rhs).
end(j); ++element )
5938 v_[element->index()+j*mm_] -= element->value();
5956 template<
typename Type
5960 template<
typename MT >
5968 for(
size_t i=0UL; i<(~rhs).
rows(); ++i )
5969 for(
auto element=(~rhs).begin(i); element!=(~rhs).
end(i); ++element )
5970 v_[i+element->index()*mm_] -= element->value();
5988 template<
typename Type
5992 template<
typename MT >
5994 -> DisableIf_t< VectorizedSchurAssign_v<MT> >
5999 const size_t ipos(
m_ &
size_t(-2) );
6002 for(
size_t j=0UL; j<
n_; ++j ) {
6003 for(
size_t i=0UL; i<ipos; i+=2UL ) {
6004 v_[i +j*mm_] *= (~rhs)(i ,j);
6005 v_[i+1UL+j*mm_] *= (~rhs)(i+1UL,j);
6008 v_[ipos+j*mm_] *= (~rhs)(ipos,j);
6029 template<
typename Type
6033 template<
typename MT >
6035 -> EnableIf_t< VectorizedSchurAssign_v<MT> >
6042 constexpr
bool remainder( !PF || !IsPadded_v<MT> );
6044 for(
size_t j=0UL; j<
n_; ++j )
6046 const size_t ipos( ( remainder )?(
m_ &
size_t(-SIMDSIZE) ):(
m_ ) );
6051 ConstIterator_t<MT> right( (~rhs).
begin(j) );
6053 for( ; (i+SIMDSIZE*3UL) < ipos; i+=SIMDSIZE*4UL ) {
6054 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6055 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6056 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6057 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6059 for( ; i<ipos; i+=SIMDSIZE ) {
6060 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6062 for( ; remainder && i<
m_; ++i ) {
6063 *left *= *right; ++left; ++right;
6083 template<
typename Type
6087 template<
typename MT >
6095 constexpr
size_t block( BLOCK_SIZE );
6097 for(
size_t jj=0UL; jj<
n_; jj+=block ) {
6098 const size_t jend(
min(
n_, jj+block ) );
6099 for(
size_t ii=0UL; ii<
m_; ii+=block ) {
6100 const size_t iend(
min(
m_, ii+block ) );
6101 for(
size_t j=jj; j<jend; ++j ) {
6102 for(
size_t i=ii; i<iend; ++i ) {
6103 v_[i+j*mm_] *= (~rhs)(i,j);
6125 template<
typename Type
6129 template<
typename MT >
6139 for(
size_t j=0UL; j<(~rhs).
columns(); ++j )
6140 for(
auto element=(~rhs).begin(j); element!=(~rhs).
end(j); ++element )
6141 v_[element->index()+j*mm_] = tmp(element->index(),j) * element->value();
6159 template<
typename Type
6163 template<
typename MT >
6175 for(
size_t i=0UL; i<(~rhs).
rows(); ++i )
6176 for(
auto element=(~rhs).begin(i); element!=(~rhs).
end(i); ++element )
6177 v_[i+element->index()*mm_] = tmp(i,element->index()) * element->value();
6198 template<
typename Type,
bool AF,
bool PF,
bool SO,
typename RT >
6199 void reset( CustomMatrix<Type,AF,PF,SO,RT>& m );
6201 template<
typename Type,
bool AF,
bool PF,
bool SO,
typename RT >
6202 void reset( CustomMatrix<Type,AF,PF,SO,RT>& m,
size_t i );
6204 template<
typename Type,
bool AF,
bool PF,
bool SO,
typename RT >
6205 void clear( CustomMatrix<Type,AF,PF,SO,RT>& m );
6207 template<
bool RF,
typename Type,
bool AF,
bool PF,
bool SO,
typename RT >
6208 bool isDefault(
const CustomMatrix<Type,AF,PF,SO,RT>& m );
6210 template<
typename Type,
bool AF,
bool PF,
bool SO,
typename RT >
6211 bool isIntact(
const CustomMatrix<Type,AF,PF,SO,RT>& m );
6213 template<
typename Type,
bool AF,
bool PF,
bool SO,
typename RT >
6214 void swap( CustomMatrix<Type,AF,PF,SO,RT>& a, CustomMatrix<Type,AF,PF,SO,RT>& b ) noexcept;
6226 template<
typename Type
6251 template<
typename Type
6270 template<
typename Type
6344 template<
typename Type
6364 template<
typename Type
6386 template<
typename T,
bool AF,
bool PF,
bool SO,
typename RT >
6387 struct HasConstDataAccess< CustomMatrix<T,AF,PF,SO,RT> >
6404 template<
typename T,
bool AF,
bool PF,
bool SO,
typename RT >
6405 struct HasMutableDataAccess< CustomMatrix<T,AF,PF,SO,RT> >
6422 template<
typename T,
bool AF,
bool PF,
bool SO,
typename RT >
6423 struct IsCustom< CustomMatrix<T,AF,PF,SO,RT> >
6440 template<
typename T,
bool PF,
bool SO,
typename RT >
6441 struct IsAligned< CustomMatrix<T,
aligned,PF,SO,RT> >
6458 template<
typename T,
bool AF,
bool PF,
bool SO,
typename RT >
6459 struct IsContiguous< CustomMatrix<T,AF,PF,SO,RT> >
6477 template<
typename T,
bool AF,
bool SO,
typename RT >
6478 struct IsPadded< CustomMatrix<T,AF,
padded,SO,RT> >
Constraint on the data type.
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.This macro encapsulates the default way o...
Definition: Exception.h:235
Header file for auxiliary alias declarations.
Headerfile for the generic min algorithm.
Header file for kernel specific block sizes.
CustomMatrix()
The default constructor for CustomMatrix.
Definition: CustomMatrix.h:729
void swap(CustomMatrix &m) noexcept
Swapping the contents of two matrices.
Definition: CustomMatrix.h:1851
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:2308
typename T1::template Rebind< T2 >::Other Rebind_t
Alias declaration for nested Rebind class templates.The Rebind_t alias declaration provides a conveni...
Definition: Aliases.h:310
Header file for the nextMultiple shim.
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_USER_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERT flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:117
Reference at(size_t i, size_t j)
Checked access to the matrix elements.
Definition: CustomMatrix.h:964
Header file for the alignment flag values.
Header file for the UNUSED_PARAMETER function template.
bool isAligned() const noexcept
Returns whether the matrix is properly aligned in memory.
Definition: CustomMatrix.h:2120
Header file for basic type definitions.
typename If< Condition, T1, T2 >::Type If_t
Auxiliary alias declaration for the If class template.The If_t alias declaration provides a convenien...
Definition: If.h:109
constexpr bool HasSIMDSub_v
Auxiliary variable template for the HasSIMDSub type trait.The HasSIMDSub_v variable template provides...
Definition: HasSIMDSub.h:188
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.The ResultType_t alias declaration provides ...
Definition: Aliases.h:390
Header file for the IsSparseMatrix type trait.
size_t spacing() const noexcept
Returns the spacing between the beginning of two rows/columns.
Definition: CustomMatrix.h:1665
Header file for the serial shim.
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:224
Header file for the IsDiagonal type trait.
Header file for the IsSame and IsStrictlySame type traits.
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
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:3077
MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:372
Generic wrapper for the clear() function.
Definition: Clear.h:59
Rebind_t< RT, RemoveConst_t< NewType > > RRT
The rebound result type.
Definition: CustomMatrix.h:442
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:591
size_t m_
The current number of rows of the compressed matrix.
Definition: CompressedMatrix.h:3289
Header file for the IsIntegral type trait.
typename SIMDTrait< T >::Type SIMDTrait_t
Auxiliary alias declaration for the SIMDTrait class template.The SIMDTrait_t alias declaration provid...
Definition: SIMDTrait.h:315
void ctranspose(Matrix< MT, SO > &matrix)
In-place conjugate transpose of the given matrix.
Definition: Matrix.h:851
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:3084
Iterator begin(size_t i) noexcept
Returns an iterator to the first element of row/column i.
Definition: CustomMatrix.h:1118
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VOLATILE(T)
Constraint on the data type.In case the given data type is a volatile-qualified type, a compilation error is created.
Definition: Volatile.h:79
size_t n_
The current number of columns of the matrix.
Definition: CustomMatrix.h:687
Access proxy for sparse, matrices.The MatrixAccessProxy provides safe access to the elements of a no...
Definition: MatrixAccessProxy.h:101
BLAZE_ALWAYS_INLINE void cswap(T &a, T &b) noexcept(IsNumeric_v< T >)
Swapping two conjugated values/objects.
Definition: Conjugate.h:195
BoolConstant< true > TrueType
Type traits base class.The TrueType class is used as base class for type traits and value traits that...
Definition: TrueType.h:61
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:3085
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:3090
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
Header file for the extended initializer_list functionality.
System settings for performance optimizations.
Header file for the Clear functor.
constexpr void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
DenseIterator< Type, AF > Iterator
Iterator over non-constant elements.
Definition: CustomMatrix.h:433
Iterator end(size_t i) noexcept
Returns an iterator just past the last element of row/column i.
Definition: CustomMatrix.h:1193
constexpr size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:514
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: CustomMatrix.h:1626
typename T::template Resize< Ns... >::Other Resize_t
Alias declaration for nested Resize class templates.The Resize_t alias declaration provides a conveni...
Definition: Aliases.h:370
CustomMatrix & operator=(const Type &set)
Homogenous assignment to all matrix elements.
Definition: CustomMatrix.h:1271
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:80
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:137
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.The ElementType_t alias declaration provide...
Definition: Aliases.h:170
Type * v_
The custom array of elements.
Definition: CustomMatrix.h:689
static constexpr bool simdEnabled
Compilation flag for SIMD optimization.
Definition: CustomMatrix.h:464
Constraint on the data type.
constexpr bool unpadded
Padding flag for unpadded vectors and matrices.Via this flag it is possible to specify custom vectors...
Definition: PaddingFlag.h:64
BLAZE_ALWAYS_INLINE SIMDType load(size_t i, size_t j) const noexcept
Load of a SIMD element of the matrix.
Definition: CustomMatrix.h:2170
Header file for the SparseMatrix base class.
Type * Pointer
Pointer to a non-constant matrix value.
Definition: CustomMatrix.h:430
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.The EnableIf_t alias declaration provides a convenient...
Definition: EnableIf.h:138
Headerfile for the generic max algorithm.
Header file for the DisableIf class template.
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:2861
CustomMatrix & transpose()
In-place transpose of the matrix.
Definition: CustomMatrix.h:1884
Header file for the IsCustom type trait.
Header file for the IsStrictlyUpper type trait.
constexpr bool IsSIMDCombinable_v
Auxiliary variable template for the IsSIMDCombinable type trait.The IsSIMDCombinable_v variable templ...
Definition: IsSIMDCombinable.h:137
SIMDTrait_t< ElementType > SIMDType
SIMD type of the matrix elements.
Definition: CustomMatrix.h:424
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
decltype(auto) ctrans(const DenseMatrix< MT, SO > &dm)
Returns the conjugate transpose matrix of dm.
Definition: DMatMapExpr.h:1364
void swap(CompressedMatrix< Type, SO > &a, CompressedMatrix< Type, SO > &b) noexcept
Swapping the contents of two compressed matrices.
Definition: CompressedMatrix.h:5907
size_t m_
The current number of rows of the matrix.
Definition: CustomMatrix.h:686
Header file for the If class template.
constexpr bool HasSIMDMult_v
Auxiliary variable template for the HasSIMDMult type trait.The HasSIMDMult_v variable template provid...
Definition: HasSIMDMult.h:189
ConstIterator cbegin(size_t i) const noexcept
Returns an iterator to the first element of row/column i.
Definition: CustomMatrix.h:1168
size_t capacity() const noexcept
Returns the maximum capacity of the matrix.
Definition: CustomMatrix.h:1682
Header file for all forward declarations of the math module.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_POINTER_TYPE(T)
Constraint on the data type.In case the given data type T is not a pointer type, a compilation error ...
Definition: Pointer.h:79
Header file for the IsSMPAssignable type trait.
CustomMatrix & ctranspose()
In-place conjugate transpose of the matrix.
Definition: CustomMatrix.h:1914
Type ElementType
Type of the compressed matrix elements.
Definition: CompressedMatrix.h:3080
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:1147
Resize_t< RT, NewM, NewN > RRT
The resized result type.
Definition: CustomMatrix.h:453
CustomMatrix< NewType, AF, PF, SO, RRT > Other
The type of the other CustomMatrix.
Definition: CustomMatrix.h:443
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.This macro encapsulates the default way of Bl...
Definition: Exception.h:331
Header file for the HasSIMDAdd type trait.
Header file for the DenseMatrix base class.
Header file for the DenseIterator class template.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:3086
decltype(auto) inv(const DenseMatrix< MT, SO > &dm)
Calculation of the inverse of the given dense matrix.
Definition: DMatInvExpr.h:423
RT ResultType
Result type for expression template evaluations.
Definition: CustomMatrix.h:415
Header file for all SIMD functionality.
DenseIterator< const Type, AF > ConstIterator
Iterator over constant elements.
Definition: CustomMatrix.h:434
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:2239
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:2347
Constraint on the data type.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_DIAGONAL_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a diagonal matrix type, a compilation error is created.
Definition: Diagonal.h:79
Header file for the IsLower type trait.
Header file for the IsAligned type trait.
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
Header file for the default storage order for all vectors of the Blaze library.
Generic wrapper for the null function.
Definition: Noop.h:59
#define BLAZE_CONSTRAINT_MUST_BE_VECTORIZABLE_TYPE(T)
Constraint on the data type.In case the given data type T is not a vectorizable data type...
Definition: Vectorizable.h:61
Reference operator()(size_t i, size_t j) noexcept
2D-access to the matrix elements.
Definition: CustomMatrix.h:913
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:2276
Header file for the misalignment function.
Header file for the exception macros of the math module.
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:1179
MT::Iterator end(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:438
Rebind mechanism to obtain a CustomMatrix with different data/element type.
Definition: CustomMatrix.h:441
Header file for the EnableIf class template.
Header file for the IsStrictlyLower type trait.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:611
Header file for the IsPadded type trait.
bool isAliased(const Other *alias) const noexcept
Returns whether the matrix is aliased with the given address alias.
Definition: CustomMatrix.h:2099
const Type * ConstPointer
Pointer to a constant matrix value.
Definition: CustomMatrix.h:431
size_t nonZeros() const
Returns the total number of non-zero elements in the matrix.
Definition: CustomMatrix.h:1724
Header file for the IsVectorizable type trait.
typename T::OppositeType OppositeType_t
Alias declaration for nested OppositeType type definitions.The OppositeType_t alias declaration provi...
Definition: Aliases.h:270
bool canAlias(const Other *alias) const noexcept
Returns whether the matrix can alias with the given address alias.
Definition: CustomMatrix.h:2076
Header file for the conjugate shim.
Flag for aligned vectors and matrices.
Definition: AlignmentFlag.h:65
Header file for the IsNumeric type trait.
Header file for the HasConstDataAccess type trait.
Resize mechanism to obtain a CustomMatrix with different fixed dimensions.
Definition: CustomMatrix.h:452
Header file for the RemoveConst type trait.
const Type & ReturnType
Return type for expression template evaluations.
Definition: CustomMatrix.h:425
Header file for the IsSIMDCombinable type trait.
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:2385
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SYMMETRIC_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a symmetric matrix type, a compilation error is created.
Definition: Symmetric.h:79
Header file for the HasSIMDMult type trait.
Header file for the IsConst type trait.
Type ElementType
Type of the matrix elements.
Definition: CustomMatrix.h:423
typename T::TransposeType TransposeType_t
Alias declaration for nested TransposeType type definitions.The TransposeType_t alias declaration pro...
Definition: Aliases.h:470
BLAZE_ALWAYS_INLINE void conjugate(T &a) noexcept(IsNumeric_v< T >)
In-place conjugation of the given value/object.
Definition: Conjugate.h:120
Header file for run time assertion macros.
static constexpr size_t SIMDSIZE
The number of elements packed within a single SIMD element.
Definition: CustomMatrix.h:618
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
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:2632
Header file for the IsContiguous type trait.
void reset()
Reset to the default initial values.
Definition: CustomMatrix.h:1780
Type & Reference
Reference to a non-constant matrix value.
Definition: CustomMatrix.h:428
SIMD characteristics of data types.The SIMDTrait class template provides the SIMD characteristics of ...
Definition: SIMDTrait.h:295
Header file for the cache size of the target architecture.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_REFERENCE_TYPE(T)
Constraint on the data type.In case the given data type T is not a reference type, a compilation error is created.
Definition: Reference.h:79
size_t nn_
The number of elements between two rows.
Definition: CustomMatrix.h:688
Header file for the isDefault shim.
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b) noexcept
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:281
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
constexpr size_t size(const Matrix< MT, SO > &matrix) noexcept
Returns the total number of elements of the matrix.
Definition: Matrix.h:530
Constraint on the data type.
Base class for matrices.The Matrix class is a base class for all dense and sparse matrix classes with...
Definition: Forward.h:109
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
Constraint on the data type.
Constraint on the data type.
Header file for the HasSIMDSub type trait.
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:808
Header file for the HasMutableDataAccess type trait.
Header file for the Noop functor.
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:2201
Pointer data() noexcept
Low-level data access to the matrix elements.
Definition: CustomMatrix.h:1025
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
constexpr size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:498
constexpr bool IsDiagonal_v
Auxiliary variable template for the IsDiagonal type trait.The IsDiagonal_v variable template provides...
Definition: IsDiagonal.h:148
void clear()
Clearing the matrix.
Definition: CustomMatrix.h:1830
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
Header file for the padding flag values.
Implementation of a generic iterator for dense vectors and matrices.The DenseIterator represents a ge...
Definition: DenseIterator.h:58
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:2419
typename T::ConstIterator ConstIterator_t
Alias declaration for nested ConstIterator type definitions.The ConstIterator_t alias declaration pro...
Definition: Aliases.h:110
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 bool checkAlignment(const T *address)
Checks the alignment of the given address.
Definition: AlignmentCheck.h:68
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:3081
decltype(auto) trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:765
size_t n_
The current number of columns of the compressed matrix.
Definition: CompressedMatrix.h:3290
CustomMatrix< Type, AF, PF, SO, RRT > Other
The type of the other CustomMatrix.
Definition: CustomMatrix.h:454
const Type & ConstReference
Reference to a constant matrix value.
Definition: CustomMatrix.h:429
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
Header file for the default transpose flag for all vectors of the Blaze library.
Initializer list type of the Blaze library.
Efficient implementation of a customizable matrix.The CustomMatrix class template provides the functi...
Definition: CustomMatrix.h:406
Header file for the alignment check function.
constexpr bool HasSIMDAdd_v
Auxiliary variable template for the HasSIMDAdd type trait.The HasSIMDAdd_v variable template provides...
Definition: HasSIMDAdd.h:188
OppositeType_t< RT > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: CustomMatrix.h:418
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:263
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: CustomMatrix.h:1643
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:631
#define BLAZE_THROW_LOGIC_ERROR(MESSAGE)
Macro for the emission of a std::logic_error exception.This macro encapsulates the default way of Bla...
Definition: Exception.h:187
Rebind mechanism to obtain a CompressedMatrix with different data/element type.
Definition: CompressedMatrix.h:3093
Header file for the IsUpper type trait.
typename DisableIf< Condition, T >::Type DisableIf_t
Auxiliary type for the DisableIf class template.The DisableIf_t alias declaration provides a convenie...
Definition: DisableIf.h:138
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.In case of an invalid compile time expression, a compilation error is cr...
Definition: StaticAssert.h:112
ConstIterator cend(size_t i) const noexcept
Returns an iterator just past the last element of row/column i.
Definition: CustomMatrix.h:1243
bool canSMPAssign() const noexcept
Returns whether the matrix can be used in SMP assignments.
Definition: CustomMatrix.h:2142
System settings for the inline keywords.
Header file for the thresholds for matrix/vector and matrix/matrix multiplications.
constexpr bool padded
Padding flag for padded vectors and matrices.Via this flag it is possible to specify custom vectors a...
Definition: PaddingFlag.h:86
TransposeType_t< RT > TransposeType
Transpose type for expression template evaluations.
Definition: CustomMatrix.h:421
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101
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:108
Header file for the TrueType type/value trait base class.
Header file for the clear shim.
static constexpr bool smpAssignable
Compilation flag for SMP assignments.
Definition: CustomMatrix.h:470
void transpose(Matrix< MT, SO > &matrix)
In-place transpose of the given matrix.
Definition: Matrix.h:825