35 #ifndef _BLAZE_MATH_DENSE_DYNAMICMATRIX_H_ 36 #define _BLAZE_MATH_DENSE_DYNAMICMATRIX_H_ 210 template<
typename Type
211 ,
bool SO = defaultStorageOrder >
239 template<
typename NewType >
248 template<
size_t NewM
275 explicit inline DynamicMatrix(
size_t m,
size_t n,
const Type& init );
278 template<
typename Other >
281 template<
typename Other,
size_t Rows,
size_t Cols >
320 inline DynamicMatrix&
operator=(
const Type& rhs );
323 template<
typename Other,
size_t Rows,
size_t Cols >
326 inline DynamicMatrix&
operator=(
const DynamicMatrix& rhs );
327 inline DynamicMatrix&
operator=( DynamicMatrix&& rhs ) noexcept;
332 template<
typename MT,
bool SO2 >
inline DynamicMatrix& operator%=(
const Matrix<MT,SO2>& rhs );
335 template<
typename Other >
338 template<
typename Other >
346 inline size_t rows()
const noexcept;
347 inline size_t columns()
const noexcept;
348 inline size_t spacing()
const noexcept;
349 inline size_t capacity()
const noexcept;
350 inline size_t capacity(
size_t i )
const noexcept;
352 inline size_t nonZeros(
size_t i )
const;
354 inline void reset(
size_t i );
356 void resize (
size_t m,
size_t n,
bool preserve=
true );
357 inline void extend (
size_t m,
size_t n,
bool preserve=
true );
358 inline void reserve(
size_t elements );
360 inline void swap( DynamicMatrix& m ) noexcept;
370 template<
typename Other >
inline DynamicMatrix& scale(
const Other& scalar );
377 template<
typename MT >
379 struct VectorizedAssign {
380 enum :
bool { value = useOptimizedKernels &&
381 simdEnabled && MT::simdEnabled &&
389 template<
typename MT >
391 struct VectorizedAddAssign {
392 enum :
bool { value = useOptimizedKernels &&
393 simdEnabled && MT::simdEnabled &&
403 template<
typename MT >
405 struct VectorizedSubAssign {
406 enum :
bool { value = useOptimizedKernels &&
407 simdEnabled && MT::simdEnabled &&
417 template<
typename MT >
419 struct VectorizedSchurAssign {
420 enum :
bool { value = useOptimizedKernels &&
421 simdEnabled && MT::simdEnabled &&
437 inline bool isIntact()
const noexcept;
444 template<
typename Other >
inline bool canAlias (
const Other* alias )
const noexcept;
445 template<
typename Other >
inline bool isAliased(
const Other* alias )
const noexcept;
459 template<
typename MT >
462 template<
typename MT >
469 template<
typename MT >
472 template<
typename MT >
479 template<
typename MT >
482 template<
typename MT >
489 template<
typename MT >
492 template<
typename MT >
505 inline size_t addPadding(
size_t value )
const noexcept;
552 template<
typename Type
573 template<
typename Type
583 for(
size_t i=0UL; i<
m_; ++i ) {
584 for(
size_t j=
n_; j<
nn_; ++j ) {
585 v_[i*nn_+j] = Type();
604 template<
typename Type
613 for(
size_t i=0UL; i<m; ++i ) {
614 for(
size_t j=0UL; j<
n_; ++j )
618 for(
size_t j=n_; j<
nn_; ++j )
619 v_[i*nn_+j] = Type();
648 template<
typename Type
659 for(
const auto& rowList : list ) {
660 std::fill( std::copy( rowList.begin(), rowList.end(),
v_+i*
nn_ ),
v_+(i+1UL)*
nn_, Type() );
692 template<
typename Type
694 template<
typename Other >
702 for(
size_t i=0UL; i<m; ++i ) {
703 for(
size_t j=0UL; j<n; ++j )
704 v_[i*
nn_+j] = array[i*n+j];
707 for(
size_t j=n; j<
nn_; ++j )
708 v_[i*nn_+j] = Type();
738 template<
typename Type
740 template<
typename Other
750 for(
size_t i=0UL; i<Rows; ++i ) {
751 for(
size_t j=0UL; j<Cols; ++j )
752 v_[i*
nn_+j] = array[i][j];
755 for(
size_t j=Cols; j<
nn_; ++j )
756 v_[i*nn_+j] = Type();
773 template<
typename Type
797 template<
typename Type
820 template<
typename Type
822 template<
typename MT
831 for(
size_t i=0UL; i<
m_; ++i ) {
833 j<( IsVectorizable<Type>::value ?
nn_ :
n_ ); ++j ) {
834 v_[i*
nn_+j] = Type();
856 template<
typename Type
883 template<
typename Type
905 template<
typename Type
928 template<
typename Type
955 template<
typename Type
983 template<
typename Type
1005 template<
typename Type
1023 template<
typename Type
1042 template<
typename Type
1064 template<
typename Type
1086 template<
typename Type
1108 template<
typename Type
1130 template<
typename Type
1152 template<
typename Type
1174 template<
typename Type
1199 template<
typename Type
1203 for(
size_t i=0UL; i<
m_; ++i )
1204 for(
size_t j=0UL; j<
n_; ++j )
1233 template<
typename Type
1242 for(
const auto& rowList : list ) {
1243 std::fill( std::copy( rowList.begin(), rowList.end(),
v_+i*
nn_ ),
v_+(i+1UL)*
nn_, Type() );
1273 template<
typename Type
1275 template<
typename Other
1280 resize( Rows, Cols,
false );
1282 for(
size_t i=0UL; i<Rows; ++i )
1283 for(
size_t j=0UL; j<Cols; ++j )
1284 v_[i*
nn_+j] = array[i][j];
1300 template<
typename Type
1304 if( &rhs ==
this )
return *
this;
1322 template<
typename Type
1337 rhs.capacity_ = 0UL;
1354 template<
typename Type
1356 template<
typename MT
1398 template<
typename Type
1400 template<
typename MT
1433 template<
typename Type
1435 template<
typename MT
1468 template<
typename Type
1470 template<
typename MT
1503 template<
typename Type
1505 template<
typename MT
1509 if( (~rhs).
rows() !=
n_ ) {
1528 template<
typename Type
1530 template<
typename Other >
1550 template<
typename Type
1552 template<
typename Other >
1580 template<
typename Type
1594 template<
typename Type
1613 template<
typename Type
1627 template<
typename Type
1647 template<
typename Type
1663 template<
typename Type
1667 size_t nonzeros( 0UL );
1669 for(
size_t i=0UL; i<
m_; ++i )
1670 for(
size_t j=0UL; j<
n_; ++j )
1690 template<
typename Type
1696 const size_t jend( i*
nn_ +
n_ );
1697 size_t nonzeros( 0UL );
1699 for(
size_t j=i*
nn_; j<jend; ++j )
1713 template<
typename Type
1719 for(
size_t i=0UL; i<
m_; ++i )
1720 for(
size_t j=0UL; j<
n_; ++j )
1737 template<
typename Type
1744 for(
size_t j=0UL; j<
n_; ++j )
1757 template<
typename Type
1761 resize( 0UL, 0UL,
false );
1800 template<
typename Type
1806 if( m ==
m_ && n ==
n_ )
return;
1813 const size_t min_m(
min( m,
m_ ) );
1814 const size_t min_n(
min( n,
n_ ) );
1816 for(
size_t i=0UL; i<min_m; ++i ) {
1832 for(
size_t i=0UL; i<m; ++i )
1833 for(
size_t j=n; j<nn; ++j )
1834 v_[i*nn+j] = Type();
1858 template<
typename Type
1876 template<
typename Type
1889 for(
size_t i=
capacity_; i<elements; ++i )
1912 template<
typename Type
1929 template<
typename Type
1951 template<
typename Type
1956 return nextMultiple<size_t>( value, SIMDSIZE );
1975 template<
typename Type
1981 constexpr
size_t block( BLOCK_SIZE );
1985 for(
size_t ii=0UL; ii<
m_; ii+=block ) {
1986 const size_t iend(
min( ii+block, m_ ) );
1987 for(
size_t jj=0UL; jj<=ii; jj+=block ) {
1988 for(
size_t i=ii; i<iend; ++i ) {
1989 const size_t jend(
min( jj+block,
n_, i ) );
1990 for(
size_t j=jj; j<jend; ++j ) {
2013 template<
typename Type
2017 constexpr
size_t block( BLOCK_SIZE );
2021 for(
size_t ii=0UL; ii<
m_; ii+=block ) {
2022 const size_t iend(
min( ii+block, m_ ) );
2023 for(
size_t jj=0UL; jj<ii; jj+=block ) {
2024 const size_t jend(
min( jj+block,
n_ ) );
2025 for(
size_t i=ii; i<iend; ++i ) {
2026 for(
size_t j=jj; j<jend; ++j ) {
2031 for(
size_t i=ii; i<iend; ++i ) {
2032 for(
size_t j=ii; j<i; ++j ) {
2067 template<
typename Type
2069 template<
typename Other >
2072 for(
size_t i=0UL; i<
m_; ++i )
2073 for(
size_t j=0UL; j<
n_; ++j )
2074 v_[i*
nn_+j] *= scalar;
2098 template<
typename Type
2106 for(
size_t i=0UL; i<
m_; ++i ) {
2107 for(
size_t j=
n_; j<
nn_; ++j ) {
2108 if(
v_[i*nn_+j] != Type() )
2137 template<
typename Type
2139 template<
typename Other >
2142 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
2157 template<
typename Type
2159 template<
typename Other >
2162 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
2176 template<
typename Type
2180 return ( usePadding ||
columns() % SIMDSIZE == 0UL );
2195 template<
typename Type
2199 return (
rows() *
columns() >= SMP_DMATASSIGN_THRESHOLD );
2219 template<
typename Type
2225 return loada( i, j );
2227 return loadu( i, j );
2247 template<
typename Type
2282 template<
typename Type
2316 template<
typename Type
2345 template<
typename Type
2381 template<
typename Type
2416 template<
typename Type
2447 template<
typename Type
2449 template<
typename MT >
2456 const size_t jpos(
n_ &
size_t(-2) );
2459 for(
size_t i=0UL; i<
m_; ++i ) {
2460 for(
size_t j=0UL; j<jpos; j+=2UL ) {
2461 v_[i*
nn_+j ] = (~rhs)(i,j );
2462 v_[i*
nn_+j+1UL] = (~rhs)(i,j+1UL);
2465 v_[i*
nn_+jpos] = (~rhs)(i,jpos);
2483 template<
typename Type
2485 template<
typename MT >
2496 const size_t jpos( ( remainder )?(
n_ &
size_t(-SIMDSIZE) ):(
n_ ) );
2499 if( usePadding && useStreaming &&
2500 (
m_*
n_ > ( cacheSize / (
sizeof(Type) * 3UL ) ) ) && !(~rhs).
isAliased(
this ) )
2502 for(
size_t i=0UL; i<
m_; ++i )
2508 for( ; j<jpos; j+=SIMDSIZE, left+=SIMDSIZE, right+=SIMDSIZE ) {
2509 left.stream( right.load() );
2511 for( ; remainder && j<
n_; ++j, ++left, ++right ) {
2518 for(
size_t i=0UL; i<
m_; ++i )
2524 for( ; (j+SIMDSIZE*3UL) < jpos; j+=SIMDSIZE*4UL ) {
2525 left.
store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2526 left.
store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2527 left.
store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2528 left.
store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2530 for( ; j<jpos; j+=SIMDSIZE ) {
2531 left.
store( right.load() ); left+=SIMDSIZE, right+=SIMDSIZE;
2533 for( ; remainder && j<
n_; ++j ) {
2534 *left = *right; ++left; ++right;
2553 template<
typename Type
2555 template<
typename MT >
2563 constexpr
size_t block( BLOCK_SIZE );
2565 for(
size_t ii=0UL; ii<
m_; ii+=block ) {
2566 const size_t iend(
min( m_, ii+block ) );
2567 for(
size_t jj=0UL; jj<
n_; jj+=block ) {
2568 const size_t jend(
min( n_, jj+block ) );
2569 for(
size_t i=ii; i<iend; ++i ) {
2570 for(
size_t j=jj; j<jend; ++j ) {
2571 v_[i*
nn_+j] = (~rhs)(i,j);
2591 template<
typename Type
2593 template<
typename MT >
2599 for(
size_t i=0UL; i<
m_; ++i )
2601 v_[i*
nn_+element->index()] = element->value();
2617 template<
typename Type
2619 template<
typename MT >
2627 for(
size_t j=0UL; j<
n_; ++j )
2629 v_[element->index()*
nn_+j] = element->value();
2645 template<
typename Type
2647 template<
typename MT >
2654 for(
size_t i=0UL; i<
m_; ++i )
2658 v_[i*
nn_+i] += (~rhs)(i,i);
2672 for( ; (j+2UL) <= jend; j+=2UL ) {
2673 v_[i*
nn_+j ] += (~rhs)(i,j );
2674 v_[i*
nn_+j+1UL] += (~rhs)(i,j+1UL);
2677 v_[i*
nn_+j] += (~rhs)(i,j);
2696 template<
typename Type
2698 template<
typename MT >
2710 for(
size_t i=0UL; i<
m_; ++i )
2720 const size_t jpos( ( remainder )?( jend &
size_t(-SIMDSIZE) ):( jend ) );
2721 BLAZE_INTERNAL_ASSERT( !remainder || ( jend - ( jend % (SIMDSIZE) ) ) == jpos,
"Invalid end calculation" );
2727 for( ; (j+SIMDSIZE*3UL) < jpos; j+=SIMDSIZE*4UL ) {
2728 left.
store( left.
load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2729 left.
store( left.
load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2730 left.
store( left.
load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2731 left.
store( left.
load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2733 for( ; j<jpos; j+=SIMDSIZE ) {
2734 left.
store( left.
load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2736 for( ; remainder && j<jend; ++j ) {
2737 *left += *right; ++left; ++right;
2755 template<
typename Type
2757 template<
typename MT >
2765 constexpr
size_t block( BLOCK_SIZE );
2767 for(
size_t ii=0UL; ii<
m_; ii+=block ) {
2768 const size_t iend(
min( m_, ii+block ) );
2769 for(
size_t jj=0UL; jj<
n_; jj+=block )
2774 for(
size_t i=ii; i<iend; ++i )
2781 :(
min( n_, jj+block ) ) );
2784 for(
size_t j=jbegin; j<jend; ++j ) {
2785 v_[i*
nn_+j] += (~rhs)(i,j);
2805 template<
typename Type
2807 template<
typename MT >
2813 for(
size_t i=0UL; i<
m_; ++i )
2815 v_[i*
nn_+element->index()] += element->value();
2831 template<
typename Type
2833 template<
typename MT >
2841 for(
size_t j=0UL; j<
n_; ++j )
2843 v_[element->index()*
nn_+j] += element->value();
2859 template<
typename Type
2861 template<
typename MT >
2868 for(
size_t i=0UL; i<
m_; ++i )
2872 v_[i*
nn_+i] -= (~rhs)(i,i);
2886 for( ; (j+2UL) <= jend; j+=2UL ) {
2887 v_[i*
nn_+j ] -= (~rhs)(i,j );
2888 v_[i*
nn_+j+1UL] -= (~rhs)(i,j+1UL);
2891 v_[i*
nn_+j] -= (~rhs)(i,j);
2910 template<
typename Type
2912 template<
typename MT >
2924 for(
size_t i=0UL; i<
m_; ++i )
2934 const size_t jpos( ( remainder )?( jend &
size_t(-SIMDSIZE) ):( jend ) );
2935 BLAZE_INTERNAL_ASSERT( !remainder || ( jend - ( jend % (SIMDSIZE) ) ) == jpos,
"Invalid end calculation" );
2941 for( ; (j+SIMDSIZE*3UL) < jpos; j+=SIMDSIZE*4UL ) {
2942 left.
store( left.
load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2943 left.
store( left.
load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2944 left.
store( left.
load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2945 left.
store( left.
load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2947 for( ; j<jpos; j+=SIMDSIZE ) {
2948 left.
store( left.
load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2950 for( ; remainder && j<jend; ++j ) {
2951 *left -= *right; ++left; ++right;
2969 template<
typename Type
2971 template<
typename MT >
2979 constexpr
size_t block( BLOCK_SIZE );
2981 for(
size_t ii=0UL; ii<
m_; ii+=block ) {
2982 const size_t iend(
min( m_, ii+block ) );
2983 for(
size_t jj=0UL; jj<
n_; jj+=block )
2988 for(
size_t i=ii; i<iend; ++i )
2995 :(
min( n_, jj+block ) ) );
2998 for(
size_t j=jbegin; j<jend; ++j ) {
2999 v_[i*
nn_+j] -= (~rhs)(i,j);
3019 template<
typename Type
3021 template<
typename MT >
3027 for(
size_t i=0UL; i<
m_; ++i )
3029 v_[i*
nn_+element->index()] -= element->value();
3045 template<
typename Type
3047 template<
typename MT >
3055 for(
size_t j=0UL; j<
n_; ++j )
3057 v_[element->index()*
nn_+j] -= element->value();
3073 template<
typename Type
3075 template<
typename MT >
3082 const size_t jpos(
n_ &
size_t(-2) );
3085 for(
size_t i=0UL; i<
m_; ++i ) {
3086 for(
size_t j=0UL; j<jpos; j+=2UL ) {
3087 v_[i*
nn_+j ] *= (~rhs)(i,j );
3088 v_[i*
nn_+j+1UL] *= (~rhs)(i,j+1UL);
3091 v_[i*
nn_+jpos] *= (~rhs)(i,jpos);
3109 template<
typename Type
3111 template<
typename MT >
3122 for(
size_t i=0UL; i<
m_; ++i )
3124 const size_t jpos( ( remainder )?(
n_ &
size_t(-SIMDSIZE) ):(
n_ ) );
3131 for( ; (j+SIMDSIZE*3UL) < jpos; j+=SIMDSIZE*4UL ) {
3132 left.
store( left.
load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
3133 left.
store( left.
load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
3134 left.
store( left.
load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
3135 left.
store( left.
load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
3137 for( ; j<jpos; j+=SIMDSIZE ) {
3138 left.
store( left.
load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
3140 for( ; remainder && j<
n_; ++j ) {
3141 *left *= *right; ++left; ++right;
3159 template<
typename Type
3161 template<
typename MT >
3169 constexpr
size_t block( BLOCK_SIZE );
3171 for(
size_t ii=0UL; ii<
m_; ii+=block ) {
3172 const size_t iend(
min( m_, ii+block ) );
3173 for(
size_t jj=0UL; jj<
n_; jj+=block ) {
3174 const size_t jend(
min( n_, jj+block ) );
3175 for(
size_t i=ii; i<iend; ++i ) {
3176 for(
size_t j=jj; j<jend; ++j ) {
3177 v_[i*
nn_+j] *= (~rhs)(i,j);
3197 template<
typename Type
3199 template<
typename MT >
3207 for(
size_t i=0UL; i<
m_; ++i )
3212 for( ; j<element->index(); ++j )
3214 v_[i*
nn_+j] *= element->value();
3218 for( ; j<
n_; ++j ) {
3237 template<
typename Type
3239 template<
typename MT >
3249 for(
size_t j=0UL; j<
n_; ++j )
3254 for( ; i<element->index(); ++i )
3256 v_[i*
nn_+j] *= element->value();
3260 for( ; i<
m_; ++i ) {
3288 template<
typename Type >
3290 :
public DenseMatrix< DynamicMatrix<Type,true>, true >
3316 template<
typename NewType >
3325 template<
size_t NewM
3352 explicit inline DynamicMatrix(
size_t m,
size_t n,
const Type& init );
3355 template<
typename Other >
explicit inline DynamicMatrix(
size_t m,
size_t n,
const Other* array );
3357 template<
typename Other,
size_t Rows,
size_t Cols >
3358 explicit inline DynamicMatrix(
const Other (&array)[Rows][Cols] );
3396 inline DynamicMatrix&
operator=(
const Type& rhs );
3399 template<
typename Other,
size_t Rows,
size_t Cols >
3400 inline DynamicMatrix&
operator=(
const Other (&array)[Rows][Cols] );
3402 inline DynamicMatrix&
operator=(
const DynamicMatrix& rhs );
3403 inline DynamicMatrix&
operator=( DynamicMatrix&& rhs );
3408 template<
typename MT,
bool SO >
inline DynamicMatrix& operator%=(
const Matrix<MT,SO>& rhs );
3411 template<
typename Other >
3412 inline EnableIf_<IsNumeric<Other>, DynamicMatrix >& operator*=( Other rhs );
3414 template<
typename Other >
3415 inline EnableIf_<IsNumeric<Other>, DynamicMatrix >&
operator/=( Other rhs );
3422 inline size_t rows()
const noexcept;
3423 inline size_t columns()
const noexcept;
3424 inline size_t spacing()
const noexcept;
3425 inline size_t capacity()
const noexcept;
3426 inline size_t capacity(
size_t j )
const noexcept;
3428 inline size_t nonZeros(
size_t j )
const;
3429 inline void reset();
3430 inline void reset(
size_t j );
3431 inline void clear();
3432 void resize (
size_t m,
size_t n,
bool preserve=
true );
3433 inline void extend (
size_t m,
size_t n,
bool preserve=
true );
3434 inline void reserve(
size_t elements );
3436 inline void swap( DynamicMatrix& m ) noexcept;
3446 template<
typename Other >
inline DynamicMatrix& scale(
const Other& scalar );
3453 template<
typename MT >
3454 struct VectorizedAssign {
3455 enum :
bool { value = useOptimizedKernels &&
3456 simdEnabled && MT::simdEnabled &&
3463 template<
typename MT >
3464 struct VectorizedAddAssign {
3465 enum :
bool { value = useOptimizedKernels &&
3466 simdEnabled && MT::simdEnabled &&
3475 template<
typename MT >
3476 struct VectorizedSubAssign {
3477 enum :
bool { value = useOptimizedKernels &&
3478 simdEnabled && MT::simdEnabled &&
3487 template<
typename MT >
3488 struct VectorizedSchurAssign {
3489 enum :
bool { value = useOptimizedKernels &&
3490 simdEnabled && MT::simdEnabled &&
3505 inline bool isIntact()
const noexcept;
3512 template<
typename Other >
inline bool canAlias (
const Other* alias )
const noexcept;
3513 template<
typename Other >
inline bool isAliased(
const Other* alias )
const noexcept;
3515 inline bool isAligned ()
const noexcept;
3527 template<
typename MT >
3530 template<
typename MT >
3537 template<
typename MT >
3540 template<
typename MT >
3547 template<
typename MT >
3550 template<
typename MT >
3557 template<
typename MT >
3560 template<
typename MT >
3573 inline size_t addPadding(
size_t minRows )
const noexcept;
3613 template<
typename Type >
3635 template<
typename Type >
3644 for(
size_t j=0UL; j<
n_; ++j ) {
3645 for(
size_t i=
m_; i<mm_; ++i ) {
3646 v_[i+j*mm_] = Type();
3667 template<
typename Type >
3675 for(
size_t j=0UL; j<
n_; ++j ) {
3676 for(
size_t i=0UL; i<
m_; ++i )
3680 for(
size_t i=m_; i<mm_; ++i )
3681 v_[i+j*mm_] = Type();
3712 template<
typename Type >
3714 :
m_ ( list.size() )
3722 for(
const auto& rowList : list ) {
3724 for(
const auto& element : rowList ) {
3725 v_[i+j*mm_] = element;
3728 for( ; j<
n_; ++j ) {
3729 v_[i+j*mm_] = Type();
3737 for( ; i<mm_; ++i ) {
3738 for(
size_t j=0UL; j<
n_; ++j ) {
3739 v_[i+j*mm_] = Type();
3774 template<
typename Type >
3775 template<
typename Other >
3783 for(
size_t j=0UL; j<n; ++j ) {
3784 for(
size_t i=0UL; i<m; ++i )
3785 v_[i+j*mm_] = array[i+j*m];
3788 for(
size_t i=m; i<mm_; ++i )
3789 v_[i+j*mm_] = Type();
3821 template<
typename Type >
3822 template<
typename Other
3832 for(
size_t j=0UL; j<Cols; ++j ) {
3833 for(
size_t i=0UL; i<Rows; ++i )
3834 v_[i+j*mm_] = array[i][j];
3837 for(
size_t i=Rows; i<mm_; ++i )
3838 v_[i+j*mm_] = Type();
3857 template<
typename Type >
3882 template<
typename Type >
3906 template<
typename Type >
3907 template<
typename MT
3916 for(
size_t j=0UL; j<
n_; ++j ) {
3918 i<( IsVectorizable<Type>::value ? mm_ :
m_ ); ++i ) {
3919 v_[i+j*mm_] = Type();
3943 template<
typename Type >
3971 template<
typename Type >
3994 template<
typename Type >
4018 template<
typename Type >
4028 return (*
this)(i,j);
4046 template<
typename Type >
4056 return (*
this)(i,j);
4074 template<
typename Type >
4096 template<
typename Type >
4115 template<
typename Type >
4135 template<
typename Type >
4153 template<
typename Type >
4171 template<
typename Type >
4189 template<
typename Type >
4207 template<
typename Type >
4225 template<
typename Type >
4243 template<
typename Type >
4269 template<
typename Type >
4272 for(
size_t j=0UL; j<
n_; ++j )
4273 for(
size_t i=0UL; i<
m_; ++i )
4304 template<
typename Type >
4312 for(
const auto& rowList : list ) {
4314 for(
const auto& element : rowList ) {
4315 v_[i+j*mm_] = element;
4318 for( ; j<
n_; ++j ) {
4319 v_[i+j*mm_] = Type();
4352 template<
typename Type >
4353 template<
typename Other
4358 resize( Rows, Cols,
false );
4360 for(
size_t j=0UL; j<Cols; ++j )
4361 for(
size_t i=0UL; i<Rows; ++i )
4362 v_[i+j*mm_] = array[i][j];
4380 template<
typename Type >
4383 if( &rhs ==
this )
return *
this;
4403 template<
typename Type >
4436 template<
typename Type >
4437 template<
typename MT
4481 template<
typename Type >
4482 template<
typename MT
4517 template<
typename Type >
4518 template<
typename MT
4553 template<
typename Type >
4554 template<
typename MT
4589 template<
typename Type >
4590 template<
typename MT
4594 if( (~rhs).
rows() != n_ ) {
4617 template<
typename Type >
4618 template<
typename Other >
4640 template<
typename Type >
4641 template<
typename Other >
4671 template<
typename Type >
4686 template<
typename Type >
4704 template<
typename Type >
4719 template<
typename Type >
4735 template<
typename Type >
4752 template<
typename Type >
4755 size_t nonzeros( 0UL );
4757 for(
size_t j=0UL; j<
n_; ++j )
4758 for(
size_t i=0UL; i<
m_; ++i )
4775 template<
typename Type >
4780 const size_t iend( j*mm_ +
m_ );
4781 size_t nonzeros( 0UL );
4783 for(
size_t i=j*mm_; i<iend; ++i )
4799 template<
typename Type >
4804 for(
size_t j=0UL; j<
n_; ++j )
4805 for(
size_t i=0UL; i<
m_; ++i )
4822 template<
typename Type >
4828 for(
size_t i=0UL; i<
m_; ++i )
4843 template<
typename Type >
4846 resize( 0UL, 0UL,
false );
4887 template<
typename Type >
4892 if( m ==
m_ && n == n_ )
return;
4899 const size_t min_m(
min( m,
m_ ) );
4900 const size_t min_n(
min( n, n_ ) );
4902 for(
size_t j=0UL; j<min_n; ++j ) {
4918 for(
size_t j=0UL; j<n; ++j )
4919 for(
size_t i=m; i<mm; ++i )
4920 v_[i+j*mm] = Type();
4946 template<
typename Type >
4965 template<
typename Type >
4977 for(
size_t i=
capacity_; i<elements; ++i )
5002 template<
typename Type >
5020 template<
typename Type >
5043 template<
typename Type >
5047 return nextMultiple<size_t>( values, SIMDSIZE );
5068 template<
typename Type >
5073 constexpr
size_t block( BLOCK_SIZE );
5077 for(
size_t jj=0UL; jj<
n_; jj+=block ) {
5078 const size_t jend(
min( jj+block, n_ ) );
5079 for(
size_t ii=0UL; ii<=jj; ii+=block ) {
5080 for(
size_t j=jj; j<jend; ++j ) {
5081 const size_t iend(
min( ii+block,
m_, j ) );
5082 for(
size_t i=ii; i<iend; ++i ) {
5107 template<
typename Type >
5110 constexpr
size_t block( BLOCK_SIZE );
5114 for(
size_t jj=0UL; jj<
n_; jj+=block ) {
5115 const size_t jend(
min( jj+block, n_ ) );
5116 for(
size_t ii=0UL; ii<jj; ii+=block ) {
5117 const size_t iend(
min( ii+block,
m_ ) );
5118 for(
size_t j=jj; j<jend; ++j ) {
5119 for(
size_t i=ii; i<iend; ++i ) {
5124 for(
size_t j=jj; j<jend; ++j ) {
5125 for(
size_t i=jj; i<j; ++i ) {
5162 template<
typename Type >
5163 template<
typename Other >
5166 for(
size_t j=0UL; j<
n_; ++j )
5167 for(
size_t i=0UL; i<
m_; ++i )
5168 v_[i+j*mm_] *= scalar;
5194 template<
typename Type >
5201 for(
size_t j=0UL; j<
n_; ++j ) {
5202 for(
size_t i=
m_; i<mm_; ++i ) {
5203 if(
v_[i+j*mm_] != Type() )
5234 template<
typename Type >
5235 template<
typename Other >
5238 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
5255 template<
typename Type >
5256 template<
typename Other >
5259 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
5275 template<
typename Type >
5278 return ( usePadding ||
rows() % SIMDSIZE == 0UL );
5295 template<
typename Type >
5298 return (
rows() *
columns() >= SMP_DMATASSIGN_THRESHOLD );
5319 template<
typename Type >
5324 return loada( i, j );
5326 return loadu( i, j );
5347 template<
typename Type >
5382 template<
typename Type >
5416 template<
typename Type >
5445 template<
typename Type >
5481 template<
typename Type >
5516 template<
typename Type >
5548 template<
typename Type >
5549 template<
typename MT >
5556 const size_t ipos(
m_ &
size_t(-2) );
5559 for(
size_t j=0UL; j<
n_; ++j ) {
5560 for(
size_t i=0UL; i<ipos; i+=2UL ) {
5561 v_[i +j*mm_] = (~rhs)(i ,j);
5562 v_[i+1UL+j*mm_] = (~rhs)(i+1UL,j);
5565 v_[ipos+j*mm_] = (~rhs)(ipos,j);
5585 template<
typename Type >
5586 template<
typename MT >
5597 const size_t ipos( ( remainder )?(
m_ &
size_t(-SIMDSIZE) ):(
m_ ) );
5600 if( usePadding && useStreaming &&
5601 (
m_*n_ > ( cacheSize / (
sizeof(Type) * 3UL ) ) ) && !(~rhs).
isAliased(
this ) )
5603 for(
size_t j=0UL; j<
n_; ++j )
5609 for( ; i<ipos; i+=SIMDSIZE ) {
5610 left.
stream( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5612 for( ; remainder && i<
m_; ++i ) {
5613 *left = *right; ++left; ++right;
5619 for(
size_t j=0UL; j<
n_; ++j )
5625 for( ; (i+SIMDSIZE*3UL) < ipos; i+=SIMDSIZE*4UL ) {
5626 left.
store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5627 left.
store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5628 left.
store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5629 left.
store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5631 for( ; i<ipos; i+=SIMDSIZE ) {
5632 left.
store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5634 for( ; remainder && i<
m_; ++i ) {
5635 *left = *right; ++left; ++right;
5656 template<
typename Type >
5657 template<
typename MT >
5665 constexpr
size_t block( BLOCK_SIZE );
5667 for(
size_t jj=0UL; jj<
n_; jj+=block ) {
5668 const size_t jend(
min( n_, jj+block ) );
5669 for(
size_t ii=0UL; ii<
m_; ii+=block ) {
5670 const size_t iend(
min( m_, ii+block ) );
5671 for(
size_t j=jj; j<jend; ++j ) {
5672 for(
size_t i=ii; i<iend; ++i ) {
5673 v_[i+j*mm_] = (~rhs)(i,j);
5695 template<
typename Type >
5696 template<
typename MT >
5702 for(
size_t j=0UL; j<(~rhs).
columns(); ++j )
5704 v_[element->index()+j*mm_] = element->value();
5722 template<
typename Type >
5723 template<
typename MT >
5731 for(
size_t i=0UL; i<(~rhs).
rows(); ++i )
5733 v_[i+element->index()*mm_] = element->value();
5751 template<
typename Type >
5752 template<
typename MT >
5759 for(
size_t j=0UL; j<
n_; ++j )
5763 v_[j+j*mm_] += (~rhs)(j,j);
5777 for( ; (i+2UL) <= iend; i+=2UL ) {
5778 v_[i +j*mm_] += (~rhs)(i ,j);
5779 v_[i+1UL+j*mm_] += (~rhs)(i+1UL,j);
5782 v_[i+j*mm_] += (~rhs)(i,j);
5803 template<
typename Type >
5804 template<
typename MT >
5816 for(
size_t j=0UL; j<
n_; ++j )
5826 const size_t ipos( ( remainder )?( iend &
size_t(-SIMDSIZE) ):( iend ) );
5827 BLAZE_INTERNAL_ASSERT( !remainder || ( iend - ( iend % (SIMDSIZE) ) ) == ipos,
"Invalid end calculation" );
5833 for( ; (i+SIMDSIZE*3UL) < ipos; i+=SIMDSIZE*4UL ) {
5834 left.
store( left.
load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5835 left.
store( left.
load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5836 left.
store( left.
load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5837 left.
store( left.
load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5839 for( ; i<ipos; i+=SIMDSIZE ) {
5840 left.
store( left.
load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5842 for( ; remainder && i<iend; ++i ) {
5843 *left += *right; ++left; ++right;
5863 template<
typename Type >
5864 template<
typename MT >
5872 constexpr
size_t block( BLOCK_SIZE );
5874 for(
size_t jj=0UL; jj<
n_; jj+=block ) {
5875 const size_t jend(
min( n_, jj+block ) );
5876 for(
size_t ii=0UL; ii<
m_; ii+=block )
5881 for(
size_t j=jj; j<jend; ++j )
5888 :(
min( m_, ii+block ) ) );
5891 for(
size_t i=ibegin; i<iend; ++i ) {
5892 v_[i+j*mm_] += (~rhs)(i,j);
5914 template<
typename Type >
5915 template<
typename MT >
5921 for(
size_t j=0UL; j<(~rhs).
columns(); ++j )
5923 v_[element->index()+j*mm_] += element->value();
5941 template<
typename Type >
5942 template<
typename MT >
5950 for(
size_t i=0UL; i<(~rhs).
rows(); ++i )
5952 v_[i+element->index()*mm_] += element->value();
5970 template<
typename Type >
5971 template<
typename MT >
5978 for(
size_t j=0UL; j<
n_; ++j )
5982 v_[j+j*mm_] -= (~rhs)(j,j);
5996 for( ; (i+2UL) <= iend; i+=2UL ) {
5997 v_[i +j*mm_] -= (~rhs)(i ,j);
5998 v_[i+1+j*mm_] -= (~rhs)(i+1,j);
6001 v_[i+j*mm_] -= (~rhs)(i,j);
6022 template<
typename Type >
6023 template<
typename MT >
6035 for(
size_t j=0UL; j<
n_; ++j )
6045 const size_t ipos( ( remainder )?( iend &
size_t(-SIMDSIZE) ):( iend ) );
6046 BLAZE_INTERNAL_ASSERT( !remainder || ( iend - ( iend % (SIMDSIZE) ) ) == ipos,
"Invalid end calculation" );
6052 for( ; (i+SIMDSIZE*3UL) < ipos; i+=SIMDSIZE*4UL ) {
6053 left.
store( left.
load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
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;
6058 for( ; i<ipos; i+=SIMDSIZE ) {
6059 left.
store( left.
load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6061 for( ; remainder && i<iend; ++i ) {
6062 *left -= *right; ++left; ++right;
6082 template<
typename Type >
6083 template<
typename MT >
6091 constexpr
size_t block( BLOCK_SIZE );
6093 for(
size_t jj=0UL; jj<
n_; jj+=block ) {
6094 const size_t jend(
min( n_, jj+block ) );
6095 for(
size_t ii=0UL; ii<
m_; ii+=block )
6100 for(
size_t j=jj; j<jend; ++j )
6107 :(
min( m_, ii+block ) ) );
6110 for(
size_t i=ibegin; i<iend; ++i ) {
6111 v_[i+j*mm_] -= (~rhs)(i,j);
6133 template<
typename Type >
6134 template<
typename MT >
6140 for(
size_t j=0UL; j<(~rhs).
columns(); ++j )
6142 v_[element->index()+j*mm_] -= element->value();
6160 template<
typename Type >
6161 template<
typename MT >
6169 for(
size_t i=0UL; i<(~rhs).
rows(); ++i )
6171 v_[i+element->index()*mm_] -= element->value();
6189 template<
typename Type >
6190 template<
typename MT >
6197 const size_t ipos(
m_ &
size_t(-2) );
6200 for(
size_t j=0UL; j<
n_; ++j ) {
6201 for(
size_t i=0UL; (i+2UL) <= ipos; i+=2UL ) {
6202 v_[i +j*mm_] *= (~rhs)(i ,j);
6203 v_[i+1+j*mm_] *= (~rhs)(i+1,j);
6206 v_[ipos+j*mm_] *= (~rhs)(ipos,j);
6226 template<
typename Type >
6227 template<
typename MT >
6238 for(
size_t j=0UL; j<
n_; ++j )
6240 const size_t ipos( ( remainder )?(
m_ &
size_t(-SIMDSIZE) ):(
m_ ) );
6247 for( ; (i+SIMDSIZE*3UL) < ipos; i+=SIMDSIZE*4UL ) {
6248 left.
store( left.
load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6249 left.
store( left.
load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6250 left.
store( left.
load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6251 left.
store( left.
load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6253 for( ; i<ipos; i+=SIMDSIZE ) {
6254 left.
store( left.
load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6256 for( ; remainder && i<
m_; ++i ) {
6257 *left *= *right; ++left; ++right;
6277 template<
typename Type >
6278 template<
typename MT >
6286 constexpr
size_t block( BLOCK_SIZE );
6288 for(
size_t jj=0UL; jj<
n_; jj+=block ) {
6289 const size_t jend(
min( n_, jj+block ) );
6290 for(
size_t ii=0UL; ii<
m_; ii+=block ) {
6291 const size_t iend(
min( m_, ii+block ) );
6292 for(
size_t j=jj; j<jend; ++j ) {
6293 for(
size_t i=ii; i<iend; ++i ) {
6294 v_[i+j*mm_] *= (~rhs)(i,j);
6316 template<
typename Type >
6317 template<
typename MT >
6325 for(
size_t j=0UL; j<
n_; ++j )
6330 for( ; i<element->index(); ++i )
6332 v_[i+j*mm_] *= element->value();
6336 for( ; i<
m_; ++i ) {
6357 template<
typename Type >
6358 template<
typename MT >
6368 for(
size_t i=0UL; i<
m_; ++i )
6373 for( ; j<element->index(); ++j )
6375 v_[i+j*mm_] *= element->value();
6379 for( ; j<
n_; ++j ) {
6403 template<
typename Type,
bool SO >
6406 template<
typename Type,
bool SO >
6409 template<
typename Type,
bool SO >
6412 template<
bool RF,
typename Type,
bool SO >
6415 template<
typename Type,
bool SO >
6418 template<
typename Type,
bool SO >
6431 template<
typename Type
6453 template<
typename Type
6469 template<
typename Type
6531 template<
typename Type
6548 template<
typename Type
6567 template<
typename T,
bool SO >
6585 template<
typename T,
bool SO >
6603 template<
typename T,
bool SO >
6621 template<
typename T,
bool SO >
6622 struct IsPadded< DynamicMatrix<T,SO> >
6639 template<
typename T,
bool SO >
6657 template<
typename T,
bool SO >
6675 template<
typename T1,
bool SO,
typename T2,
size_t M,
size_t N >
6676 struct AddTrait< DynamicMatrix<T1,SO>, StaticMatrix<T2,M,N,SO> >
6681 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2 >
6682 struct AddTrait< DynamicMatrix<T1,SO1>, StaticMatrix<T2,M,N,SO2> >
6687 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
6688 struct AddTrait< StaticMatrix<T1,M,N,SO>, DynamicMatrix<T2,SO> >
6693 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
6694 struct AddTrait< StaticMatrix<T1,M,N,SO1>, DynamicMatrix<T2,SO2> >
6699 template<
typename T1,
bool SO,
typename T2,
size_t M,
size_t N >
6700 struct AddTrait< DynamicMatrix<T1,SO>, HybridMatrix<T2,M,N,SO> >
6705 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2 >
6706 struct AddTrait< DynamicMatrix<T1,SO1>, HybridMatrix<T2,M,N,SO2> >
6711 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
6712 struct AddTrait< HybridMatrix<T1,M,N,SO>, DynamicMatrix<T2,SO> >
6717 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
6718 struct AddTrait< HybridMatrix<T1,M,N,SO1>, DynamicMatrix<T2,SO2> >
6723 template<
typename T1,
bool SO,
typename T2 >
6724 struct AddTrait< DynamicMatrix<T1,SO>, DynamicMatrix<T2,SO> >
6729 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
6730 struct AddTrait< DynamicMatrix<T1,SO1>, DynamicMatrix<T2,SO2> >
6748 template<
typename T1,
bool SO,
typename T2,
size_t M,
size_t N >
6749 struct SubTrait< DynamicMatrix<T1,SO>, StaticMatrix<T2,M,N,SO> >
6754 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2 >
6755 struct SubTrait< DynamicMatrix<T1,SO1>, StaticMatrix<T2,M,N,SO2> >
6760 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
6761 struct SubTrait< StaticMatrix<T1,M,N,SO>, DynamicMatrix<T2,SO> >
6766 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
6767 struct SubTrait< StaticMatrix<T1,M,N,SO1>, DynamicMatrix<T2,SO2> >
6772 template<
typename T1,
bool SO,
typename T2,
size_t M,
size_t N >
6773 struct SubTrait< DynamicMatrix<T1,SO>, HybridMatrix<T2,M,N,SO> >
6778 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2 >
6779 struct SubTrait< DynamicMatrix<T1,SO1>, HybridMatrix<T2,M,N,SO2> >
6784 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
6785 struct SubTrait< HybridMatrix<T1,M,N,SO>, DynamicMatrix<T2,SO> >
6790 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
6791 struct SubTrait< HybridMatrix<T1,M,N,SO1>, DynamicMatrix<T2,SO2> >
6796 template<
typename T1,
bool SO,
typename T2 >
6797 struct SubTrait< DynamicMatrix<T1,SO>, DynamicMatrix<T2,SO> >
6802 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
6803 struct SubTrait< DynamicMatrix<T1,SO1>, DynamicMatrix<T2,SO2> >
6821 template<
typename T1,
bool SO,
typename T2,
size_t M,
size_t N >
6822 struct SchurTrait< DynamicMatrix<T1,SO>, StaticMatrix<T2,M,N,SO> >
6827 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2 >
6828 struct SchurTrait< DynamicMatrix<T1,SO1>, StaticMatrix<T2,M,N,SO2> >
6833 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
6834 struct SchurTrait< StaticMatrix<T1,M,N,SO>, DynamicMatrix<T2,SO> >
6839 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
6840 struct SchurTrait< StaticMatrix<T1,M,N,SO1>, DynamicMatrix<T2,SO2> >
6845 template<
typename T1,
bool SO,
typename T2,
size_t M,
size_t N >
6846 struct SchurTrait< DynamicMatrix<T1,SO>, HybridMatrix<T2,M,N,SO> >
6851 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2 >
6852 struct SchurTrait< DynamicMatrix<T1,SO1>, HybridMatrix<T2,M,N,SO2> >
6857 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
6858 struct SchurTrait< HybridMatrix<T1,M,N,SO>, DynamicMatrix<T2,SO> >
6863 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
6864 struct SchurTrait< HybridMatrix<T1,M,N,SO1>, DynamicMatrix<T2,SO2> >
6869 template<
typename T1,
bool SO,
typename T2 >
6870 struct SchurTrait< DynamicMatrix<T1,SO>, DynamicMatrix<T2,SO> >
6875 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
6876 struct SchurTrait< DynamicMatrix<T1,SO1>, DynamicMatrix<T2,SO2> >
6894 template<
typename T1,
bool SO,
typename T2 >
6895 struct MultTrait< DynamicMatrix<T1,SO>, T2, EnableIf_<IsNumeric<T2> > >
6900 template<
typename T1,
typename T2,
bool SO >
6901 struct MultTrait< T1, DynamicMatrix<T2,SO>, EnableIf_<IsNumeric<T1> > >
6906 template<
typename T1,
bool SO,
typename T2,
size_t N >
6907 struct MultTrait< DynamicMatrix<T1,SO>, StaticVector<T2,N,false> >
6912 template<
typename T1,
size_t N,
typename T2,
bool SO >
6913 struct MultTrait< StaticVector<T1,N,true>, DynamicMatrix<T2,SO> >
6918 template<
typename T1,
bool SO,
typename T2,
size_t N >
6919 struct MultTrait< DynamicMatrix<T1,SO>, HybridVector<T2,N,false> >
6924 template<
typename T1,
size_t N,
typename T2,
bool SO >
6925 struct MultTrait< HybridVector<T1,N,true>, DynamicMatrix<T2,SO> >
6930 template<
typename T1,
bool SO,
typename T2 >
6931 struct MultTrait< DynamicMatrix<T1,SO>, DynamicVector<T2,false> >
6936 template<
typename T1,
typename T2,
bool SO >
6937 struct MultTrait< DynamicVector<T1,true>, DynamicMatrix<T2,SO> >
6942 template<
typename T1,
bool SO,
typename T2,
bool AF,
bool PF >
6943 struct MultTrait< DynamicMatrix<T1,SO>, CustomVector<T2,AF,PF,false> >
6948 template<
typename T1,
bool AF,
bool PF,
typename T2,
bool SO >
6949 struct MultTrait< CustomVector<T1,AF,PF,true>, DynamicMatrix<T2,SO> >
6954 template<
typename T1,
bool SO,
typename T2 >
6955 struct MultTrait< DynamicMatrix<T1,SO>, CompressedVector<T2,false> >
6960 template<
typename T1,
typename T2,
bool SO >
6961 struct MultTrait< CompressedVector<T1,true>, DynamicMatrix<T2,SO> >
6966 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2 >
6967 struct MultTrait< DynamicMatrix<T1,SO1>, StaticMatrix<T2,M,N,SO2> >
6972 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
6973 struct MultTrait< StaticMatrix<T1,M,N,SO1>, DynamicMatrix<T2,SO2> >
6978 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2 >
6979 struct MultTrait< DynamicMatrix<T1,SO1>, HybridMatrix<T2,M,N,SO2> >
6984 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
6985 struct MultTrait< HybridMatrix<T1,M,N,SO1>, DynamicMatrix<T2,SO2> >
6990 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
6991 struct MultTrait< DynamicMatrix<T1,SO1>, DynamicMatrix<T2,SO2> >
7009 template<
typename T1,
bool SO,
typename T2 >
7010 struct DivTrait< DynamicMatrix<T1,SO>, T2, EnableIf_<IsNumeric<T2> > >
7028 template<
typename T,
bool SO,
typename OP >
7047 template<
typename T1,
bool SO,
typename T2,
size_t M,
size_t N,
typename OP >
7048 struct BinaryMapTrait< DynamicMatrix<T1,SO>, StaticMatrix<T2,M,N,SO>, OP >
7053 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2,
typename OP >
7054 struct BinaryMapTrait< DynamicMatrix<T1,SO1>, StaticMatrix<T2,M,N,SO2>, OP >
7059 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2,
typename OP >
7060 struct BinaryMapTrait< StaticMatrix<T1,M,N,SO>, DynamicMatrix<T2,SO>, OP >
7065 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2,
typename OP >
7066 struct BinaryMapTrait< StaticMatrix<T1,M,N,SO1>, DynamicMatrix<T2,SO2>, OP >
7071 template<
typename T1,
bool SO,
typename T2,
size_t M,
size_t N,
typename OP >
7072 struct BinaryMapTrait< DynamicMatrix<T1,SO>, HybridMatrix<T2,M,N,SO>, OP >
7077 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2,
typename OP >
7078 struct BinaryMapTrait< DynamicMatrix<T1,SO1>, HybridMatrix<T2,M,N,SO2>, OP >
7083 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2,
typename OP >
7084 struct BinaryMapTrait< HybridMatrix<T1,M,N,SO>, DynamicMatrix<T2,SO>, OP >
7089 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2,
typename OP >
7090 struct BinaryMapTrait< HybridMatrix<T1,M,N,SO1>, DynamicMatrix<T2,SO2>, OP >
7095 template<
typename T1,
bool SO,
typename T2,
typename OP >
7096 struct BinaryMapTrait< DynamicMatrix<T1,SO>, DynamicMatrix<T2,SO>, OP >
7101 template<
typename T1,
bool SO1,
typename T2,
bool SO2,
typename OP >
7102 struct BinaryMapTrait< DynamicMatrix<T1,SO1>, DynamicMatrix<T2,SO2>, OP >
7120 template<
typename T1,
bool SO,
typename T2 >
7121 struct HighType< DynamicMatrix<T1,SO>, DynamicMatrix<T2,SO> >
7139 template<
typename T1,
bool SO,
typename T2 >
7140 struct LowType< DynamicMatrix<T1,SO>, DynamicMatrix<T2,SO> >
7158 template<
typename T,
bool SO >
7177 template<
typename T,
bool SO >
7178 struct RowTrait< DynamicMatrix<T,SO> >
7196 template<
typename T,
bool SO >
Compile time check for vectorizable types.Depending on the available instruction set (SSE...
Definition: IsVectorizable.h:135
Constraint on the data type.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_CONST(T)
Constraint on the data type.In case the given data type is a const-qualified type, a compilation error is created.
Definition: Const.h:79
#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
size_t n_
The current number of columns of the matrix.
Definition: DynamicMatrix.h:513
size_t addPadding(size_t value) const noexcept
Add the necessary amount of padding to the given value.
Definition: DynamicMatrix.h:1953
Header file for auxiliary alias declarations.
Headerfile for the generic min algorithm.
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: DynamicMatrix.h:2384
Header file for kernel specific block sizes.
Availability of a SIMD subtraction for the given data types.Depending on the available instruction se...
Definition: HasSIMDSub.h:171
Header file for mathematical functions.
Header file for the Schur product trait.
bool isAligned() const noexcept
Returns whether the matrix is properly aligned in memory.
Definition: DynamicMatrix.h:2178
void reserve(size_t elements)
Setting the minimum capacity of the matrix.
Definition: DynamicMatrix.h:1878
Compile time check for low-level access to constant data.This type trait tests whether the given data...
Definition: HasConstDataAccess.h:75
#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
Header file for the alignment flag values.
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: DynamicMatrix.h:1582
Header file for the UNUSED_PARAMETER function template.
EnableIf_< IsDenseMatrix< MT1 > > smpSchurAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP Schur product assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:196
Header file for the subtraction trait.
BLAZE_ALWAYS_INLINE SIMDType load(size_t i, size_t j) const noexcept
Load of a SIMD element of the matrix.
Definition: DynamicMatrix.h:2222
Header file for basic type definitions.
const SIMDType load() const noexcept
Load of the SIMD element at the current iterator position.
Definition: DenseIterator.h:403
Header file for the row trait.
Type *BLAZE_RESTRICT v_
The dynamically allocated matrix elements.
Definition: DynamicMatrix.h:516
Base template for the SubmatrixTrait class.
Definition: SubmatrixTrait.h:128
BLAZE_ALWAYS_INLINE SIMDType loadu(size_t i, size_t j) const noexcept
Unaligned load of a SIMD element of the matrix.
Definition: DynamicMatrix.h:2285
Base template for the ColumnTrait class.
Definition: ColumnTrait.h:127
BLAZE_ALWAYS_INLINE EnableIf_< And< IsIntegral< T1 >, HasSize< T1, 1UL > > > storea(T1 *address, const SIMDi8< T2 > &value) noexcept
Aligned store of a vector of 1-byte integral values.
Definition: Storea.h:79
EnableIf_< IsDenseMatrix< MT1 > > smpSubAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:164
Header file for the IsSparseMatrix type trait.
DynamicMatrix & operator=(const Type &rhs)
Homogenous assignment to all matrix elements.
Definition: DynamicMatrix.h:1201
void resize(size_t m, size_t n, bool preserve=true)
Changing the size of the matrix.
Definition: DynamicMatrix.h:1802
Header file for the IsDiagonal type trait.
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector) noexcept
Returns the current size/dimension of the vector.
Definition: Vector.h:265
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
DynamicMatrix() noexcept
The default constructor for DynamicMatrix.
Definition: DynamicMatrix.h:554
BLAZE_ALWAYS_INLINE T1 & operator/=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Division assignment operator for the division of two SIMD packs.
Definition: BasicTypes.h:1411
Header file for the IsSame and IsStrictlySame type traits.
Base template for the SchurTrait class.
Definition: SchurTrait.h:124
BLAZE_ALWAYS_INLINE void store(size_t i, size_t j, const SIMDType &value) noexcept
Store of a SIMD element of the matrix.
Definition: DynamicMatrix.h:2319
Availability of a SIMD multiplication for the given data types.Depending on the available instruction...
Definition: HasSIMDMult.h:172
typename SIMDTrait< T >::Type SIMDTrait_
Auxiliary alias declaration for the SIMDTrait class template.The SIMDTrait_ alias declaration provide...
Definition: SIMDTrait.h:316
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:560
Type ElementType
Type of the matrix elements.
Definition: DynamicMatrix.h:222
typename DisableIf< Condition, T >::Type DisableIf_
Auxiliary type for the DisableIf class template.The DisableIf_ alias declaration provides a convenien...
Definition: DisableIf.h:224
const ElementType_< MT > min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1762
Compile time check for lower triangular matrices.This type trait tests whether or not the given templ...
Definition: IsLower.h:88
Availability of a SIMD addition for the given data types.Depending on the available instruction set (...
Definition: HasSIMDAdd.h:171
#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
ConstIterator cend(size_t i) const noexcept
Returns an iterator just past the last element of row/column i.
Definition: DynamicMatrix.h:1177
Type relationship analysis.This class tests if the two data types A and B are equal. For this type comparison, the cv-qualifiers of both data types are ignored. If A and B are the same data type (ignoring the cv-qualifiers), then the value member constant is set to true, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to false, Type is FalseType, and the class derives from FalseType.
Definition: IsSame.h:140
Compile time check for upper triangular matrices.This type trait tests whether or not the given templ...
Definition: IsUpper.h:88
Type & Reference
Reference to a non-constant matrix value.
Definition: DynamicMatrix.h:227
Efficient implementation of an arbitrary sized vector.The DynamicVector class template is the represe...
Definition: DynamicVector.h:183
Header file for memory allocation and deallocation functionality.
System settings for performance optimizations.
Efficient implementation of a dynamic matrix.The DynamicMatrix class template is the representation ...
Definition: DynamicMatrix.h:212
BLAZE_ALWAYS_INLINE T1 & operator*=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Multiplication assignment operator for the multiplication of two SIMD packs.
Definition: BasicTypes.h:1393
Compile time check for data types.This type trait tests whether or not the given types can be combine...
Definition: IsSIMDCombinable.h:120
BLAZE_ALWAYS_INLINE const EnableIf_< And< IsIntegral< T >, HasSize< T, 1UL > >, If_< IsSigned< T >, SIMDint8, SIMDuint8 > > loadu(const T *address) noexcept
Loads a vector of 1-byte integral values.
Definition: Loadu.h:77
typename T::ResultType ResultType_
Alias declaration for nested ResultType type definitions.The ResultType_ alias declaration provides a...
Definition: Aliases.h:343
const ElementType_< MT > max(const DenseMatrix< MT, SO > &dm)
Returns the largest element of the dense matrix.
Definition: DenseMatrix.h:1809
EnableIf_< IsDenseMatrix< MT1 > > smpAddAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP addition assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:133
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: DynamicMatrix.h:2419
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:78
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:129
bool canSMPAssign() const noexcept
Returns whether the matrix can be used in SMP assignments.
Definition: DynamicMatrix.h:2197
Constraint on the data type.
~DynamicMatrix()
The destructor for DynamicMatrix.
Definition: DynamicMatrix.h:858
Header file for the std::initializer_list aliases.
Header file for the SparseMatrix base class.
Compile time check for low-level access to mutable data.This type trait tests whether the given data ...
Definition: HasMutableDataAccess.h:75
Compile time check for the alignment of data types.This type trait tests whether the given data type ...
Definition: IsAligned.h:87
EnableIf_< IsBuiltin< T >, T *> allocate(size_t size)
Aligned array allocation for built-in data types.
Definition: Memory.h:155
size_t spacing() const noexcept
Returns the spacing between the beginning of two rows/columns.
Definition: DynamicMatrix.h:1615
SIMDTrait_< ElementType > SIMDType
SIMD type of the matrix elements.
Definition: DynamicMatrix.h:223
Base template for the RowTrait class.
Definition: RowTrait.h:127
Headerfile for the generic max algorithm.
typename TransExprTrait< T >::Type TransExprTrait_
Auxiliary alias declaration for the TransExprTrait class template.The TransExprTrait_ alias declarati...
Definition: TransExprTrait.h:112
Header file for the DisableIf class template.
Header file for the LowType type trait.
Base template for the HighType type trait.
Definition: HighType.h:133
Header file for the multiplication trait.
Header file for the IsStrictlyUpper type trait.
Header file for the unary map trait.
typename CTransExprTrait< T >::Type CTransExprTrait_
Auxiliary alias declaration for the CTransExprTrait class template.The CTransExprTrait_ alias declara...
Definition: CTransExprTrait.h:112
DynamicMatrix & ctranspose()
In-place conjugate transpose of the matrix.
Definition: DynamicMatrix.h:2015
Header file for the clear shim.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
#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:1359
Header file for nested template disabiguation.
void swap(CompressedMatrix< Type, SO > &a, CompressedMatrix< Type, SO > &b) noexcept
Swapping the contents of two compressed matrices.
Definition: CompressedMatrix.h:5924
void shrinkToFit()
Requesting the removal of unused capacity.
Definition: DynamicMatrix.h:1914
bool isAliased(const Other *alias) const noexcept
Returns whether the matrix is aliased with the given address alias.
Definition: DynamicMatrix.h:2160
Header file for the IsShrinkable type trait.
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.
Compile time check for data types with padding.This type trait tests whether the given data type empl...
Definition: IsPadded.h:76
EnableIf_< IsDenseMatrix< MT1 > > smpAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:102
#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
Type * Pointer
Pointer to a non-constant matrix value.
Definition: DynamicMatrix.h:229
Header file for the HasSIMDAdd type trait.
Efficient implementation of a fixed-sized matrix.The StaticMatrix class template is the representatio...
Definition: Forward.h:60
Header file for the DenseMatrix base class.
Header file for the DenseIterator class template.
void stream(const SIMDType &value) const noexcept
Aligned, non-temporal store of the SIMD element at the current iterator position. ...
Definition: DenseIterator.h:531
Header file for all SIMD functionality.
Constraint on the data type.
void store(const SIMDType &value) const noexcept
Store of the SIMD element at the current iterator position.
Definition: DenseIterator.h:468
#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.
Compile time check for diagonal matrices.This type trait tests whether or not the given template para...
Definition: IsDiagonal.h:90
void extend(size_t m, size_t n, bool preserve=true)
Extending the size of the matrix.
Definition: DynamicMatrix.h:1860
BLAZE_ALWAYS_INLINE const EnableIf_< And< IsIntegral< T >, HasSize< T, 1UL > >, If_< IsSigned< T >, SIMDint8, SIMDuint8 > > loada(const T *address) noexcept
Loads a vector of 1-byte integral values.
Definition: Loada.h:80
#define BLAZE_RESTRICT
Platform dependent setup of the restrict keyword.
Definition: Restrict.h:81
Header file for the default storage order for all vectors of the Blaze library.
#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
void reset()
Reset to the default initial values.
Definition: DynamicMatrix.h:1715
Header file for the exception macros of the math module.
Compile time check for strictly upper triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyUpper.h:86
Compile time check for data types.This type trait tests whether or not the given template parameter i...
Definition: IsSMPAssignable.h:119
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: DynamicMatrix.h:1596
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:580
Header file for the IsPadded type trait.
const Type & ConstReference
Reference to a constant matrix value.
Definition: DynamicMatrix.h:228
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: DynamicMatrix.h:2348
Header file for the IsVectorizable type trait.
Pointer data() noexcept
Low-level data access to the matrix elements.
Definition: DynamicMatrix.h:986
Reference operator()(size_t i, size_t j) noexcept
2D-access to the matrix elements.
Definition: DynamicMatrix.h:886
Compile time check for shrinkable data types.This type trait tests whether the given data type is a s...
Definition: IsShrinkable.h:75
Header file for the conjugate shim.
Header file for the IsNumeric type trait.
Base template for the LowType type trait.
Definition: LowType.h:133
Header file for the HasConstDataAccess type trait.
Compile time check for resizable data types.This type trait tests whether the given data type is a re...
Definition: IsResizable.h:75
size_t nn_
The alignment adjusted number of columns.
Definition: DynamicMatrix.h:514
BLAZE_ALWAYS_INLINE EnableIf_< And< IsIntegral< T1 >, HasSize< 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:75
Header file for the IsSIMDCombinable type trait.
#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 binary map trait.
BLAZE_ALWAYS_INLINE T1 & operator+=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Addition assignment operator for the addition of two SIMD packs.
Definition: BasicTypes.h:1357
size_t determineColumns(initializer_list< initializer_list< Type > > list) noexcept
Determine the maximum number of columns specified by the given initializer list.
Definition: InitializerList.h:80
Header file for run time assertion macros.
Base template for the AddTrait class.
Definition: AddTrait.h:139
Base template for the MultTrait class.
Definition: MultTrait.h:139
Iterator begin(size_t i) noexcept
Returns an iterator to the first element of row/column i.
Definition: DynamicMatrix.h:1067
Header file for the addition trait.
void clear()
Clearing the matrix.
Definition: DynamicMatrix.h:1759
Header file for the division trait.
Header file for the InvExprTrait class template.
Header file for the submatrix trait.
ConstIterator cbegin(size_t i) const noexcept
Returns an iterator to the first element of row/column i.
Definition: DynamicMatrix.h:1111
Constraint on the data type.
Headerfile for the generic transfer algorithm.
size_t m_
The current number of rows of the matrix.
Definition: DynamicMatrix.h:512
Header file for the reset shim.
SIMD characteristics of data types.The SIMDTrait class template provides the SIMD characteristics of ...
Definition: SIMDTrait.h:296
Header file for the cache size of the target architecture.
Efficient implementation of a dynamically sized matrix with static memory.The HybridMatrix class temp...
Definition: Forward.h:58
#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
Header file for the column trait.
Header file for the isDefault shim.
System settings for the restrict keyword.
Header file for the TransExprTrait class template.
bool canAlias(const Other *alias) const noexcept
Returns whether the matrix can alias with the given address alias.
Definition: DynamicMatrix.h:2140
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:101
Constraint on the data type.
void swap(DynamicMatrix &m) noexcept
Swapping the contents of two matrices.
Definition: DynamicMatrix.h:1931
Constraint on the data type.
Header file for the HasSIMDSub type trait.
BLAZE_ALWAYS_INLINE void conjugate(T &a) noexcept(IsNumeric< T >::value)
In-place conjugation of the given value/object.
Definition: Conjugate.h:120
Header file for the HasMutableDataAccess type trait.
DenseIterator< Type, usePadding > Iterator
Iterator over non-constant elements.
Definition: DynamicMatrix.h:232
size_t nonZeros() const
Returns the total number of non-zero elements in the matrix.
Definition: DynamicMatrix.h:1665
EnableIf_< IsBuiltin< T > > deallocate(T *address) noexcept
Deallocation of memory for built-in data types.
Definition: Memory.h:230
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:224
Base template for the DivTrait class.
Definition: DivTrait.h:139
Implementation of a generic iterator for dense vectors and matrices.The DenseIterator represents a ge...
Definition: DenseIterator.h:58
BLAZE_ALWAYS_INLINE EnableIf_< And< IsIntegral< T1 >, HasSize< T1, 1UL > > > storeu(T1 *address, const SIMDi8< T2 > &value) noexcept
Unaligned store of a vector of 1-byte integral values.
Definition: Storeu.h:76
BLAZE_ALWAYS_INLINE void cswap(T &a, T &b) noexcept(IsNumeric< T >::value)
Swapping two conjugated values/objects.
Definition: Conjugate.h:195
BLAZE_ALWAYS_INLINE bool checkAlignment(const T *address)
Checks the alignment of the given address.
Definition: AlignmentCheck.h:68
Compile time check for strictly lower triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyLower.h:86
typename T::ConstIterator ConstIterator_
Alias declaration for nested ConstIterator type definitions.The ConstIterator_ alias declaration prov...
Definition: Aliases.h:103
decltype(auto) trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:790
BLAZE_ALWAYS_INLINE SIMDType loada(size_t i, size_t j) const noexcept
Aligned load of a SIMD element of the matrix.
Definition: DynamicMatrix.h:2250
Iterator end(size_t i) noexcept
Returns an iterator just past the last element of row/column i.
Definition: DynamicMatrix.h:1133
DynamicMatrix< Type, SO > This
Type of this DynamicMatrix instance.
Definition: DynamicMatrix.h:217
Initializer list type of the Blaze library.
bool isIntact() const noexcept
Returns whether the invariants of the dynamic matrix are intact.
Definition: DynamicMatrix.h:2100
Header file for the alignment check function.
typename InvExprTrait< T >::Type InvExprTrait_
Auxiliary alias declaration for the InvExprTrait class template.The InvExprTrait_ alias declaration p...
Definition: InvExprTrait.h:123
size_t capacity_
The maximum capacity of the matrix.
Definition: DynamicMatrix.h:515
Header file for the IntegralConstant class template.
Resize mechanism to obtain a DynamicMatrix with different fixed dimensions.
Definition: DynamicMatrix.h:250
Compile time evaluation of the number of rows of a matrix.The Rows type trait evaluates the number of...
Definition: Rows.h:75
Compile time check for sparse matrix types.This type trait tests whether or not the given template pa...
Definition: IsSparseMatrix.h:103
Rebind mechanism to obtain a DynamicMatrix with different data/element type.
Definition: DynamicMatrix.h:240
DenseIterator< const Type, usePadding > ConstIterator
Iterator over constant elements.
Definition: DynamicMatrix.h:233
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:600
Base template for the SubTrait class.
Definition: SubTrait.h:139
BLAZE_ALWAYS_INLINE T1 & operator-=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Subtraction assignment operator for the subtraction of two SIMD packs.
Definition: BasicTypes.h:1375
Header file for the IsUpper type trait.
void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
size_t capacity() const noexcept
Returns the maximum capacity of the matrix.
Definition: DynamicMatrix.h:1629
Header file for the CTransExprTrait class template.
OutputIterator transfer(InputIterator first, InputIterator last, OutputIterator dest)
Transfers the elements from the given source range to the destination range.
Definition: Transfer.h:70
Reference at(size_t i, size_t j)
Checked access to the matrix elements.
Definition: DynamicMatrix.h:931
Base template for the BinaryMapTrait class.
Definition: BinaryMapTrait.h:119
Header file for the IsResizable type trait.
Base template for the UnaryMapTrait class.
Definition: UnaryMapTrait.h:117
System settings for the inline keywords.
Header file for the thresholds for matrix/vector and matrix/matrix multiplications.
#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
const Type & ReturnType
Return type for expression template evaluations.
Definition: DynamicMatrix.h:224
DynamicMatrix & transpose()
In-place transpose of the matrix.
Definition: DynamicMatrix.h:1977
Header file for the HighType type trait.
Header file for the TrueType type/value trait base class.
const Type * ConstPointer
Pointer to a constant matrix value.
Definition: DynamicMatrix.h:230