35 #ifndef _BLAZE_MATH_DENSE_DYNAMICMATRIX_H_ 36 #define _BLAZE_MATH_DENSE_DYNAMICMATRIX_H_ 215 template<
typename Type
216 ,
bool SO = defaultStorageOrder >
244 template<
typename NewType >
253 template<
size_t NewM
280 explicit inline DynamicMatrix(
size_t m,
size_t n,
const Type& init );
283 template<
typename Other >
286 template<
typename Other,
size_t Rows,
size_t Cols >
325 inline DynamicMatrix&
operator=(
const Type& rhs );
328 template<
typename Other,
size_t Rows,
size_t Cols >
329 inline DynamicMatrix&
operator=(
const Other (&array)[Rows][Cols] );
331 inline DynamicMatrix&
operator=(
const DynamicMatrix& rhs );
332 inline DynamicMatrix&
operator=( DynamicMatrix&& rhs ) noexcept;
337 template<
typename MT,
bool SO2 >
inline DynamicMatrix& operator%=(
const Matrix<MT,SO2>& rhs );
344 inline size_t rows()
const noexcept;
345 inline size_t columns()
const noexcept;
346 inline size_t spacing()
const noexcept;
347 inline size_t capacity()
const noexcept;
348 inline size_t capacity(
size_t i )
const noexcept;
350 inline size_t nonZeros(
size_t i )
const;
352 inline void reset(
size_t i );
354 void resize (
size_t m,
size_t n,
bool preserve=
true );
355 inline void extend (
size_t m,
size_t n,
bool preserve=
true );
358 inline void swap( DynamicMatrix& m ) noexcept;
368 template<
typename Other >
inline DynamicMatrix& scale(
const Other& scalar );
375 template<
typename MT >
377 struct VectorizedAssign {
378 enum :
bool { value = useOptimizedKernels &&
379 simdEnabled && MT::simdEnabled &&
387 template<
typename MT >
389 struct VectorizedAddAssign {
390 enum :
bool { value = useOptimizedKernels &&
391 simdEnabled && MT::simdEnabled &&
401 template<
typename MT >
403 struct VectorizedSubAssign {
404 enum :
bool { value = useOptimizedKernels &&
405 simdEnabled && MT::simdEnabled &&
415 template<
typename MT >
417 struct VectorizedSchurAssign {
418 enum :
bool { value = useOptimizedKernels &&
419 simdEnabled && MT::simdEnabled &&
435 inline bool isIntact()
const noexcept;
442 template<
typename Other >
inline bool canAlias (
const Other* alias )
const noexcept;
443 template<
typename Other >
inline bool isAliased(
const Other* alias )
const noexcept;
457 template<
typename MT >
460 template<
typename MT >
467 template<
typename MT >
470 template<
typename MT >
477 template<
typename MT >
480 template<
typename MT >
487 template<
typename MT >
490 template<
typename MT >
503 inline size_t addPadding(
size_t value )
const noexcept;
550 template<
typename Type
571 template<
typename Type
581 for(
size_t i=0UL; i<
m_; ++i ) {
582 for(
size_t j=
n_; j<
nn_; ++j ) {
583 v_[i*nn_+j] = Type();
602 template<
typename Type
607 for(
size_t i=0UL; i<m; ++i ) {
608 for(
size_t j=0UL; j<
n_; ++j ) {
638 template<
typename Type
645 for(
const auto& rowList : list ) {
646 std::fill( std::copy( rowList.begin(), rowList.end(),
begin(i) ),
end(i), Type() );
678 template<
typename Type
680 template<
typename Other >
684 for(
size_t i=0UL; i<m; ++i ) {
685 for(
size_t j=0UL; j<n; ++j ) {
686 v_[i*
nn_+j] = array[i*n+j];
716 template<
typename Type
718 template<
typename Other
724 for(
size_t i=0UL; i<Rows; ++i ) {
725 for(
size_t j=0UL; j<Cols; ++j ) {
726 v_[i*
nn_+j] = array[i][j];
743 template<
typename Type
762 template<
typename Type
785 template<
typename Type
787 template<
typename MT
793 for(
size_t i=0UL; i<
m_; ++i ) {
794 for(
size_t j=0UL; j<
n_; ++j ) {
795 v_[i*
nn_+j] = Type();
818 template<
typename Type
845 template<
typename Type
867 template<
typename Type
890 template<
typename Type
917 template<
typename Type
945 template<
typename Type
967 template<
typename Type
985 template<
typename Type
1004 template<
typename Type
1026 template<
typename Type
1048 template<
typename Type
1070 template<
typename Type
1092 template<
typename Type
1114 template<
typename Type
1136 template<
typename Type
1161 template<
typename Type
1165 for(
size_t i=0UL; i<
m_; ++i )
1166 for(
size_t j=0UL; j<
n_; ++j )
1195 template<
typename Type
1204 for(
const auto& rowList : list ) {
1205 std::fill( std::copy( rowList.begin(), rowList.end(),
v_+i*
nn_ ),
v_+(i+1UL)*
nn_, Type() );
1235 template<
typename Type
1237 template<
typename Other
1242 resize( Rows, Cols,
false );
1244 for(
size_t i=0UL; i<Rows; ++i )
1245 for(
size_t j=0UL; j<Cols; ++j )
1246 v_[i*
nn_+j] = array[i][j];
1262 template<
typename Type
1266 if( &rhs ==
this )
return *
this;
1284 template<
typename Type
1299 rhs.capacity_ = 0UL;
1316 template<
typename Type
1318 template<
typename MT
1360 template<
typename Type
1362 template<
typename MT
1395 template<
typename Type
1397 template<
typename MT
1430 template<
typename Type
1432 template<
typename MT
1468 template<
typename Type
1482 template<
typename Type
1501 template<
typename Type
1515 template<
typename Type
1535 template<
typename Type
1551 template<
typename Type
1555 size_t nonzeros( 0UL );
1557 for(
size_t i=0UL; i<
m_; ++i )
1558 for(
size_t j=0UL; j<
n_; ++j )
1578 template<
typename Type
1584 const size_t jend( i*
nn_ +
n_ );
1585 size_t nonzeros( 0UL );
1587 for(
size_t j=i*
nn_; j<jend; ++j )
1601 template<
typename Type
1607 for(
size_t i=0UL; i<
m_; ++i )
1608 for(
size_t j=0UL; j<
n_; ++j )
1625 template<
typename Type
1632 for(
size_t j=0UL; j<
n_; ++j )
1645 template<
typename Type
1649 resize( 0UL, 0UL,
false );
1688 template<
typename Type
1695 if( m ==
m_ && n ==
n_ )
return;
1702 const size_t min_m(
min( m,
m_ ) );
1703 const size_t min_n(
min( n,
n_ ) );
1705 for(
size_t i=0UL; i<min_m; ++i ) {
1721 for(
size_t i=0UL; i<m; ++i )
1722 for(
size_t j=n; j<nn; ++j )
1723 v_[i*nn+j] = Type();
1747 template<
typename Type
1765 template<
typename Type
1803 template<
typename Type
1820 template<
typename Type
1844 template<
typename Type
1849 return nextMultiple<size_t>( value, SIMDSIZE );
1868 template<
typename Type
1874 constexpr
size_t block( BLOCK_SIZE );
1878 for(
size_t ii=0UL; ii<
m_; ii+=block ) {
1879 const size_t iend(
min( ii+block, m_ ) );
1880 for(
size_t jj=0UL; jj<=ii; jj+=block ) {
1881 for(
size_t i=ii; i<iend; ++i ) {
1882 const size_t jend(
min( jj+block,
n_, i ) );
1883 for(
size_t j=jj; j<jend; ++j ) {
1906 template<
typename Type
1910 constexpr
size_t block( BLOCK_SIZE );
1914 for(
size_t ii=0UL; ii<
m_; ii+=block ) {
1915 const size_t iend(
min( ii+block, m_ ) );
1916 for(
size_t jj=0UL; jj<ii; jj+=block ) {
1917 const size_t jend(
min( jj+block,
n_ ) );
1918 for(
size_t i=ii; i<iend; ++i ) {
1919 for(
size_t j=jj; j<jend; ++j ) {
1924 for(
size_t i=ii; i<iend; ++i ) {
1925 for(
size_t j=ii; j<i; ++j ) {
1960 template<
typename Type
1962 template<
typename Other >
1965 for(
size_t i=0UL; i<
m_; ++i )
1966 for(
size_t j=0UL; j<
n_; ++j )
1967 v_[i*
nn_+j] *= scalar;
1991 template<
typename Type
1999 for(
size_t i=0UL; i<
m_; ++i ) {
2000 for(
size_t j=
n_; j<
nn_; ++j ) {
2001 if(
v_[i*nn_+j] != Type() )
2030 template<
typename Type
2032 template<
typename Other >
2035 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
2050 template<
typename Type
2052 template<
typename Other >
2055 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
2069 template<
typename Type
2073 return ( usePadding ||
columns() % SIMDSIZE == 0UL );
2088 template<
typename Type
2092 return (
rows() *
columns() >= SMP_DMATASSIGN_THRESHOLD );
2112 template<
typename Type
2118 return loada( i, j );
2120 return loadu( i, j );
2140 template<
typename Type
2175 template<
typename Type
2209 template<
typename Type
2238 template<
typename Type
2274 template<
typename Type
2309 template<
typename Type
2340 template<
typename Type
2342 template<
typename MT >
2349 const size_t jpos(
n_ &
size_t(-2) );
2352 for(
size_t i=0UL; i<
m_; ++i ) {
2353 for(
size_t j=0UL; j<jpos; j+=2UL ) {
2354 v_[i*
nn_+j ] = (~rhs)(i,j );
2355 v_[i*
nn_+j+1UL] = (~rhs)(i,j+1UL);
2358 v_[i*
nn_+jpos] = (~rhs)(i,jpos);
2376 template<
typename Type
2378 template<
typename MT >
2389 const size_t jpos( ( remainder )?(
n_ &
size_t(-SIMDSIZE) ):(
n_ ) );
2392 if( usePadding && useStreaming &&
2393 (
m_*
n_ > ( cacheSize / (
sizeof(Type) * 3UL ) ) ) && !(~rhs).
isAliased(
this ) )
2395 for(
size_t i=0UL; i<
m_; ++i )
2401 for( ; j<jpos; j+=SIMDSIZE, left+=SIMDSIZE, right+=SIMDSIZE ) {
2402 left.stream( right.load() );
2404 for( ; remainder && j<
n_; ++j, ++left, ++right ) {
2411 for(
size_t i=0UL; i<
m_; ++i )
2417 for( ; (j+SIMDSIZE*3UL) < jpos; j+=SIMDSIZE*4UL ) {
2418 left.
store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2419 left.
store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2420 left.
store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2421 left.
store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2423 for( ; j<jpos; j+=SIMDSIZE ) {
2424 left.
store( right.load() ); left+=SIMDSIZE, right+=SIMDSIZE;
2426 for( ; remainder && j<
n_; ++j ) {
2427 *left = *right; ++left; ++right;
2446 template<
typename Type
2448 template<
typename MT >
2456 constexpr
size_t block( BLOCK_SIZE );
2458 for(
size_t ii=0UL; ii<
m_; ii+=block ) {
2459 const size_t iend(
min( m_, ii+block ) );
2460 for(
size_t jj=0UL; jj<
n_; jj+=block ) {
2461 const size_t jend(
min( n_, jj+block ) );
2462 for(
size_t i=ii; i<iend; ++i ) {
2463 for(
size_t j=jj; j<jend; ++j ) {
2464 v_[i*
nn_+j] = (~rhs)(i,j);
2484 template<
typename Type
2486 template<
typename MT >
2492 for(
size_t i=0UL; i<
m_; ++i )
2494 v_[i*
nn_+element->index()] = element->value();
2510 template<
typename Type
2512 template<
typename MT >
2520 for(
size_t j=0UL; j<
n_; ++j )
2522 v_[element->index()*
nn_+j] = element->value();
2538 template<
typename Type
2540 template<
typename MT >
2547 for(
size_t i=0UL; i<
m_; ++i )
2551 v_[i*
nn_+i] += (~rhs)(i,i);
2565 for( ; (j+2UL) <= jend; j+=2UL ) {
2566 v_[i*
nn_+j ] += (~rhs)(i,j );
2567 v_[i*
nn_+j+1UL] += (~rhs)(i,j+1UL);
2570 v_[i*
nn_+j] += (~rhs)(i,j);
2589 template<
typename Type
2591 template<
typename MT >
2603 for(
size_t i=0UL; i<
m_; ++i )
2613 const size_t jpos( ( remainder )?( jend &
size_t(-SIMDSIZE) ):( jend ) );
2614 BLAZE_INTERNAL_ASSERT( !remainder || ( jend - ( jend % (SIMDSIZE) ) ) == jpos,
"Invalid end calculation" );
2620 for( ; (j+SIMDSIZE*3UL) < jpos; j+=SIMDSIZE*4UL ) {
2621 left.
store( left.
load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2622 left.
store( left.
load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2623 left.
store( left.
load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2624 left.
store( left.
load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2626 for( ; j<jpos; j+=SIMDSIZE ) {
2627 left.
store( left.
load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2629 for( ; remainder && j<jend; ++j ) {
2630 *left += *right; ++left; ++right;
2648 template<
typename Type
2650 template<
typename MT >
2658 constexpr
size_t block( BLOCK_SIZE );
2660 for(
size_t ii=0UL; ii<
m_; ii+=block ) {
2661 const size_t iend(
min( m_, ii+block ) );
2662 for(
size_t jj=0UL; jj<
n_; jj+=block )
2667 for(
size_t i=ii; i<iend; ++i )
2674 :(
min( n_, jj+block ) ) );
2677 for(
size_t j=jbegin; j<jend; ++j ) {
2678 v_[i*
nn_+j] += (~rhs)(i,j);
2698 template<
typename Type
2700 template<
typename MT >
2706 for(
size_t i=0UL; i<
m_; ++i )
2708 v_[i*
nn_+element->index()] += element->value();
2724 template<
typename Type
2726 template<
typename MT >
2734 for(
size_t j=0UL; j<
n_; ++j )
2736 v_[element->index()*
nn_+j] += element->value();
2752 template<
typename Type
2754 template<
typename MT >
2761 for(
size_t i=0UL; i<
m_; ++i )
2765 v_[i*
nn_+i] -= (~rhs)(i,i);
2779 for( ; (j+2UL) <= jend; j+=2UL ) {
2780 v_[i*
nn_+j ] -= (~rhs)(i,j );
2781 v_[i*
nn_+j+1UL] -= (~rhs)(i,j+1UL);
2784 v_[i*
nn_+j] -= (~rhs)(i,j);
2803 template<
typename Type
2805 template<
typename MT >
2817 for(
size_t i=0UL; i<
m_; ++i )
2827 const size_t jpos( ( remainder )?( jend &
size_t(-SIMDSIZE) ):( jend ) );
2828 BLAZE_INTERNAL_ASSERT( !remainder || ( jend - ( jend % (SIMDSIZE) ) ) == jpos,
"Invalid end calculation" );
2834 for( ; (j+SIMDSIZE*3UL) < jpos; j+=SIMDSIZE*4UL ) {
2835 left.
store( left.
load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2836 left.
store( left.
load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2837 left.
store( left.
load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2838 left.
store( left.
load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2840 for( ; j<jpos; j+=SIMDSIZE ) {
2841 left.
store( left.
load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2843 for( ; remainder && j<jend; ++j ) {
2844 *left -= *right; ++left; ++right;
2862 template<
typename Type
2864 template<
typename MT >
2872 constexpr
size_t block( BLOCK_SIZE );
2874 for(
size_t ii=0UL; ii<
m_; ii+=block ) {
2875 const size_t iend(
min( m_, ii+block ) );
2876 for(
size_t jj=0UL; jj<
n_; jj+=block )
2881 for(
size_t i=ii; i<iend; ++i )
2888 :(
min( n_, jj+block ) ) );
2891 for(
size_t j=jbegin; j<jend; ++j ) {
2892 v_[i*
nn_+j] -= (~rhs)(i,j);
2912 template<
typename Type
2914 template<
typename MT >
2920 for(
size_t i=0UL; i<
m_; ++i )
2922 v_[i*
nn_+element->index()] -= element->value();
2938 template<
typename Type
2940 template<
typename MT >
2948 for(
size_t j=0UL; j<
n_; ++j )
2950 v_[element->index()*
nn_+j] -= element->value();
2966 template<
typename Type
2968 template<
typename MT >
2975 const size_t jpos(
n_ &
size_t(-2) );
2978 for(
size_t i=0UL; i<
m_; ++i ) {
2979 for(
size_t j=0UL; j<jpos; j+=2UL ) {
2980 v_[i*
nn_+j ] *= (~rhs)(i,j );
2981 v_[i*
nn_+j+1UL] *= (~rhs)(i,j+1UL);
2984 v_[i*
nn_+jpos] *= (~rhs)(i,jpos);
3002 template<
typename Type
3004 template<
typename MT >
3015 for(
size_t i=0UL; i<
m_; ++i )
3017 const size_t jpos( ( remainder )?(
n_ &
size_t(-SIMDSIZE) ):(
n_ ) );
3024 for( ; (j+SIMDSIZE*3UL) < jpos; j+=SIMDSIZE*4UL ) {
3025 left.
store( left.
load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
3026 left.
store( left.
load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
3027 left.
store( left.
load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
3028 left.
store( left.
load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
3030 for( ; j<jpos; j+=SIMDSIZE ) {
3031 left.
store( left.
load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
3033 for( ; remainder && j<
n_; ++j ) {
3034 *left *= *right; ++left; ++right;
3052 template<
typename Type
3054 template<
typename MT >
3062 constexpr
size_t block( BLOCK_SIZE );
3064 for(
size_t ii=0UL; ii<
m_; ii+=block ) {
3065 const size_t iend(
min( m_, ii+block ) );
3066 for(
size_t jj=0UL; jj<
n_; jj+=block ) {
3067 const size_t jend(
min( n_, jj+block ) );
3068 for(
size_t i=ii; i<iend; ++i ) {
3069 for(
size_t j=jj; j<jend; ++j ) {
3070 v_[i*
nn_+j] *= (~rhs)(i,j);
3090 template<
typename Type
3092 template<
typename MT >
3100 for(
size_t i=0UL; i<
m_; ++i )
3105 for( ; j<element->index(); ++j )
3107 v_[i*
nn_+j] *= element->value();
3111 for( ; j<
n_; ++j ) {
3130 template<
typename Type
3132 template<
typename MT >
3142 for(
size_t j=0UL; j<
n_; ++j )
3147 for( ; i<element->index(); ++i )
3149 v_[i*
nn_+j] *= element->value();
3153 for( ; i<
m_; ++i ) {
3181 template<
typename Type >
3183 :
public DenseMatrix< DynamicMatrix<Type,true>, true >
3209 template<
typename NewType >
3218 template<
size_t NewM
3245 explicit inline DynamicMatrix(
size_t m,
size_t n,
const Type& init );
3248 template<
typename Other >
explicit inline DynamicMatrix(
size_t m,
size_t n,
const Other* array );
3250 template<
typename Other,
size_t Rows,
size_t Cols >
3251 explicit inline DynamicMatrix(
const Other (&array)[Rows][Cols] );
3289 inline DynamicMatrix&
operator=(
const Type& rhs );
3292 template<
typename Other,
size_t Rows,
size_t Cols >
3293 inline DynamicMatrix&
operator=(
const Other (&array)[Rows][Cols] );
3295 inline DynamicMatrix&
operator=(
const DynamicMatrix& rhs );
3296 inline DynamicMatrix&
operator=( DynamicMatrix&& rhs );
3301 template<
typename MT,
bool SO >
inline DynamicMatrix& operator%=(
const Matrix<MT,SO>& rhs );
3308 inline size_t rows()
const noexcept;
3309 inline size_t columns()
const noexcept;
3310 inline size_t spacing()
const noexcept;
3311 inline size_t capacity()
const noexcept;
3312 inline size_t capacity(
size_t j )
const noexcept;
3314 inline size_t nonZeros(
size_t j )
const;
3315 inline void reset();
3316 inline void reset(
size_t j );
3317 inline void clear();
3318 void resize (
size_t m,
size_t n,
bool preserve=
true );
3319 inline void extend (
size_t m,
size_t n,
bool preserve=
true );
3322 inline void swap( DynamicMatrix& m ) noexcept;
3332 template<
typename Other >
inline DynamicMatrix& scale(
const Other& scalar );
3339 template<
typename MT >
3340 struct VectorizedAssign {
3341 enum :
bool { value = useOptimizedKernels &&
3342 simdEnabled && MT::simdEnabled &&
3349 template<
typename MT >
3350 struct VectorizedAddAssign {
3351 enum :
bool { value = useOptimizedKernels &&
3352 simdEnabled && MT::simdEnabled &&
3361 template<
typename MT >
3362 struct VectorizedSubAssign {
3363 enum :
bool { value = useOptimizedKernels &&
3364 simdEnabled && MT::simdEnabled &&
3373 template<
typename MT >
3374 struct VectorizedSchurAssign {
3375 enum :
bool { value = useOptimizedKernels &&
3376 simdEnabled && MT::simdEnabled &&
3391 inline bool isIntact()
const noexcept;
3398 template<
typename Other >
inline bool canAlias (
const Other* alias )
const noexcept;
3399 template<
typename Other >
inline bool isAliased(
const Other* alias )
const noexcept;
3401 inline bool isAligned ()
const noexcept;
3413 template<
typename MT >
3416 template<
typename MT >
3423 template<
typename MT >
3426 template<
typename MT >
3433 template<
typename MT >
3436 template<
typename MT >
3443 template<
typename MT >
3446 template<
typename MT >
3459 inline size_t addPadding(
size_t minRows )
const noexcept;
3499 template<
typename Type >
3521 template<
typename Type >
3530 for(
size_t j=0UL; j<
n_; ++j ) {
3531 for(
size_t i=
m_; i<mm_; ++i ) {
3532 v_[i+j*mm_] = Type();
3553 template<
typename Type >
3557 for(
size_t j=0UL; j<
n_; ++j ) {
3558 for(
size_t i=0UL; i<
m_; ++i ) {
3590 template<
typename Type >
3596 for(
const auto& rowList : list ) {
3598 for(
const auto& element : rowList ) {
3599 v_[i+j*mm_] = element;
3602 for( ; j<
n_; ++j ) {
3603 v_[i+j*mm_] = Type();
3639 template<
typename Type >
3640 template<
typename Other >
3644 for(
size_t j=0UL; j<n; ++j ) {
3645 for(
size_t i=0UL; i<m; ++i ) {
3646 v_[i+j*mm_] = array[i+j*m];
3678 template<
typename Type >
3679 template<
typename Other
3685 for(
size_t j=0UL; j<Cols; ++j ) {
3686 for(
size_t i=0UL; i<Rows; ++i ) {
3687 v_[i+j*mm_] = array[i][j];
3706 template<
typename Type >
3726 template<
typename Type >
3750 template<
typename Type >
3751 template<
typename MT
3757 for(
size_t j=0UL; j<
n_; ++j ) {
3758 for(
size_t i=0UL; i<
m_; ++i ) {
3759 v_[i+j*mm_] = Type();
3784 template<
typename Type >
3812 template<
typename Type >
3835 template<
typename Type >
3859 template<
typename Type >
3869 return (*
this)(i,j);
3887 template<
typename Type >
3897 return (*
this)(i,j);
3915 template<
typename Type >
3937 template<
typename Type >
3956 template<
typename Type >
3976 template<
typename Type >
3994 template<
typename Type >
4012 template<
typename Type >
4030 template<
typename Type >
4048 template<
typename Type >
4066 template<
typename Type >
4084 template<
typename Type >
4110 template<
typename Type >
4113 for(
size_t j=0UL; j<
n_; ++j )
4114 for(
size_t i=0UL; i<
m_; ++i )
4145 template<
typename Type >
4153 for(
const auto& rowList : list ) {
4155 for(
const auto& element : rowList ) {
4156 v_[i+j*mm_] = element;
4159 for( ; j<
n_; ++j ) {
4160 v_[i+j*mm_] = Type();
4193 template<
typename Type >
4194 template<
typename Other
4199 resize( Rows, Cols,
false );
4201 for(
size_t j=0UL; j<Cols; ++j )
4202 for(
size_t i=0UL; i<Rows; ++i )
4203 v_[i+j*mm_] = array[i][j];
4221 template<
typename Type >
4224 if( &rhs ==
this )
return *
this;
4244 template<
typename Type >
4277 template<
typename Type >
4278 template<
typename MT
4322 template<
typename Type >
4323 template<
typename MT
4358 template<
typename Type >
4359 template<
typename MT
4394 template<
typename Type >
4395 template<
typename MT
4433 template<
typename Type >
4448 template<
typename Type >
4466 template<
typename Type >
4481 template<
typename Type >
4497 template<
typename Type >
4514 template<
typename Type >
4517 size_t nonzeros( 0UL );
4519 for(
size_t j=0UL; j<
n_; ++j )
4520 for(
size_t i=0UL; i<
m_; ++i )
4537 template<
typename Type >
4542 const size_t iend( j*mm_ +
m_ );
4543 size_t nonzeros( 0UL );
4545 for(
size_t i=j*mm_; i<iend; ++i )
4561 template<
typename Type >
4566 for(
size_t j=0UL; j<
n_; ++j )
4567 for(
size_t i=0UL; i<
m_; ++i )
4584 template<
typename Type >
4590 for(
size_t i=0UL; i<
m_; ++i )
4605 template<
typename Type >
4608 resize( 0UL, 0UL,
false );
4649 template<
typename Type >
4655 if( m ==
m_ && n == n_ )
return;
4662 const size_t min_m(
min( m,
m_ ) );
4663 const size_t min_n(
min( n, n_ ) );
4665 for(
size_t j=0UL; j<min_n; ++j ) {
4681 for(
size_t j=0UL; j<n; ++j )
4682 for(
size_t i=m; i<mm; ++i )
4683 v_[i+j*mm] = Type();
4709 template<
typename Type >
4728 template<
typename Type >
4767 template<
typename Type >
4785 template<
typename Type >
4810 template<
typename Type >
4814 return nextMultiple<size_t>( values, SIMDSIZE );
4835 template<
typename Type >
4840 constexpr
size_t block( BLOCK_SIZE );
4844 for(
size_t jj=0UL; jj<
n_; jj+=block ) {
4845 const size_t jend(
min( jj+block, n_ ) );
4846 for(
size_t ii=0UL; ii<=jj; ii+=block ) {
4847 for(
size_t j=jj; j<jend; ++j ) {
4848 const size_t iend(
min( ii+block,
m_, j ) );
4849 for(
size_t i=ii; i<iend; ++i ) {
4874 template<
typename Type >
4877 constexpr
size_t block( BLOCK_SIZE );
4881 for(
size_t jj=0UL; jj<
n_; jj+=block ) {
4882 const size_t jend(
min( jj+block, n_ ) );
4883 for(
size_t ii=0UL; ii<jj; ii+=block ) {
4884 const size_t iend(
min( ii+block,
m_ ) );
4885 for(
size_t j=jj; j<jend; ++j ) {
4886 for(
size_t i=ii; i<iend; ++i ) {
4891 for(
size_t j=jj; j<jend; ++j ) {
4892 for(
size_t i=jj; i<j; ++i ) {
4929 template<
typename Type >
4930 template<
typename Other >
4933 for(
size_t j=0UL; j<
n_; ++j )
4934 for(
size_t i=0UL; i<
m_; ++i )
4935 v_[i+j*mm_] *= scalar;
4961 template<
typename Type >
4968 for(
size_t j=0UL; j<
n_; ++j ) {
4969 for(
size_t i=
m_; i<mm_; ++i ) {
4970 if(
v_[i+j*mm_] != Type() )
5001 template<
typename Type >
5002 template<
typename Other >
5005 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
5022 template<
typename Type >
5023 template<
typename Other >
5026 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
5042 template<
typename Type >
5045 return ( usePadding ||
rows() % SIMDSIZE == 0UL );
5062 template<
typename Type >
5065 return (
rows() *
columns() >= SMP_DMATASSIGN_THRESHOLD );
5086 template<
typename Type >
5091 return loada( i, j );
5093 return loadu( i, j );
5114 template<
typename Type >
5149 template<
typename Type >
5183 template<
typename Type >
5212 template<
typename Type >
5248 template<
typename Type >
5283 template<
typename Type >
5315 template<
typename Type >
5316 template<
typename MT >
5323 const size_t ipos(
m_ &
size_t(-2) );
5326 for(
size_t j=0UL; j<
n_; ++j ) {
5327 for(
size_t i=0UL; i<ipos; i+=2UL ) {
5328 v_[i +j*mm_] = (~rhs)(i ,j);
5329 v_[i+1UL+j*mm_] = (~rhs)(i+1UL,j);
5332 v_[ipos+j*mm_] = (~rhs)(ipos,j);
5352 template<
typename Type >
5353 template<
typename MT >
5364 const size_t ipos( ( remainder )?(
m_ &
size_t(-SIMDSIZE) ):(
m_ ) );
5367 if( usePadding && useStreaming &&
5368 (
m_*n_ > ( cacheSize / (
sizeof(Type) * 3UL ) ) ) && !(~rhs).
isAliased(
this ) )
5370 for(
size_t j=0UL; j<
n_; ++j )
5376 for( ; i<ipos; i+=SIMDSIZE ) {
5377 left.
stream( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5379 for( ; remainder && i<
m_; ++i ) {
5380 *left = *right; ++left; ++right;
5386 for(
size_t j=0UL; j<
n_; ++j )
5392 for( ; (i+SIMDSIZE*3UL) < ipos; i+=SIMDSIZE*4UL ) {
5393 left.
store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5394 left.
store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5395 left.
store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5396 left.
store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5398 for( ; i<ipos; i+=SIMDSIZE ) {
5399 left.
store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5401 for( ; remainder && i<
m_; ++i ) {
5402 *left = *right; ++left; ++right;
5423 template<
typename Type >
5424 template<
typename MT >
5432 constexpr
size_t block( BLOCK_SIZE );
5434 for(
size_t jj=0UL; jj<
n_; jj+=block ) {
5435 const size_t jend(
min( n_, jj+block ) );
5436 for(
size_t ii=0UL; ii<
m_; ii+=block ) {
5437 const size_t iend(
min( m_, ii+block ) );
5438 for(
size_t j=jj; j<jend; ++j ) {
5439 for(
size_t i=ii; i<iend; ++i ) {
5440 v_[i+j*mm_] = (~rhs)(i,j);
5462 template<
typename Type >
5463 template<
typename MT >
5469 for(
size_t j=0UL; j<(~rhs).
columns(); ++j )
5471 v_[element->index()+j*mm_] = element->value();
5489 template<
typename Type >
5490 template<
typename MT >
5498 for(
size_t i=0UL; i<(~rhs).
rows(); ++i )
5500 v_[i+element->index()*mm_] = element->value();
5518 template<
typename Type >
5519 template<
typename MT >
5526 for(
size_t j=0UL; j<
n_; ++j )
5530 v_[j+j*mm_] += (~rhs)(j,j);
5544 for( ; (i+2UL) <= iend; i+=2UL ) {
5545 v_[i +j*mm_] += (~rhs)(i ,j);
5546 v_[i+1UL+j*mm_] += (~rhs)(i+1UL,j);
5549 v_[i+j*mm_] += (~rhs)(i,j);
5570 template<
typename Type >
5571 template<
typename MT >
5583 for(
size_t j=0UL; j<
n_; ++j )
5593 const size_t ipos( ( remainder )?( iend &
size_t(-SIMDSIZE) ):( iend ) );
5594 BLAZE_INTERNAL_ASSERT( !remainder || ( iend - ( iend % (SIMDSIZE) ) ) == ipos,
"Invalid end calculation" );
5600 for( ; (i+SIMDSIZE*3UL) < ipos; i+=SIMDSIZE*4UL ) {
5601 left.
store( left.
load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5602 left.
store( left.
load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5603 left.
store( left.
load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5604 left.
store( left.
load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5606 for( ; i<ipos; i+=SIMDSIZE ) {
5607 left.
store( left.
load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5609 for( ; remainder && i<iend; ++i ) {
5610 *left += *right; ++left; ++right;
5630 template<
typename Type >
5631 template<
typename MT >
5639 constexpr
size_t block( BLOCK_SIZE );
5641 for(
size_t jj=0UL; jj<
n_; jj+=block ) {
5642 const size_t jend(
min( n_, jj+block ) );
5643 for(
size_t ii=0UL; ii<
m_; ii+=block )
5648 for(
size_t j=jj; j<jend; ++j )
5655 :(
min( m_, ii+block ) ) );
5658 for(
size_t i=ibegin; i<iend; ++i ) {
5659 v_[i+j*mm_] += (~rhs)(i,j);
5681 template<
typename Type >
5682 template<
typename MT >
5688 for(
size_t j=0UL; j<(~rhs).
columns(); ++j )
5690 v_[element->index()+j*mm_] += element->value();
5708 template<
typename Type >
5709 template<
typename MT >
5717 for(
size_t i=0UL; i<(~rhs).
rows(); ++i )
5719 v_[i+element->index()*mm_] += element->value();
5737 template<
typename Type >
5738 template<
typename MT >
5745 for(
size_t j=0UL; j<
n_; ++j )
5749 v_[j+j*mm_] -= (~rhs)(j,j);
5763 for( ; (i+2UL) <= iend; i+=2UL ) {
5764 v_[i +j*mm_] -= (~rhs)(i ,j);
5765 v_[i+1+j*mm_] -= (~rhs)(i+1,j);
5768 v_[i+j*mm_] -= (~rhs)(i,j);
5789 template<
typename Type >
5790 template<
typename MT >
5802 for(
size_t j=0UL; j<
n_; ++j )
5812 const size_t ipos( ( remainder )?( iend &
size_t(-SIMDSIZE) ):( iend ) );
5813 BLAZE_INTERNAL_ASSERT( !remainder || ( iend - ( iend % (SIMDSIZE) ) ) == ipos,
"Invalid end calculation" );
5819 for( ; (i+SIMDSIZE*3UL) < ipos; i+=SIMDSIZE*4UL ) {
5820 left.
store( left.
load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5821 left.
store( left.
load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5822 left.
store( left.
load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5823 left.
store( left.
load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5825 for( ; i<ipos; i+=SIMDSIZE ) {
5826 left.
store( left.
load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5828 for( ; remainder && i<iend; ++i ) {
5829 *left -= *right; ++left; ++right;
5849 template<
typename Type >
5850 template<
typename MT >
5858 constexpr
size_t block( BLOCK_SIZE );
5860 for(
size_t jj=0UL; jj<
n_; jj+=block ) {
5861 const size_t jend(
min( n_, jj+block ) );
5862 for(
size_t ii=0UL; ii<
m_; ii+=block )
5867 for(
size_t j=jj; j<jend; ++j )
5874 :(
min( m_, ii+block ) ) );
5877 for(
size_t i=ibegin; i<iend; ++i ) {
5878 v_[i+j*mm_] -= (~rhs)(i,j);
5900 template<
typename Type >
5901 template<
typename MT >
5907 for(
size_t j=0UL; j<(~rhs).
columns(); ++j )
5909 v_[element->index()+j*mm_] -= element->value();
5927 template<
typename Type >
5928 template<
typename MT >
5936 for(
size_t i=0UL; i<(~rhs).
rows(); ++i )
5938 v_[i+element->index()*mm_] -= element->value();
5956 template<
typename Type >
5957 template<
typename MT >
5964 const size_t ipos(
m_ &
size_t(-2) );
5967 for(
size_t j=0UL; j<
n_; ++j ) {
5968 for(
size_t i=0UL; (i+2UL) <= ipos; i+=2UL ) {
5969 v_[i +j*mm_] *= (~rhs)(i ,j);
5970 v_[i+1+j*mm_] *= (~rhs)(i+1,j);
5973 v_[ipos+j*mm_] *= (~rhs)(ipos,j);
5993 template<
typename Type >
5994 template<
typename MT >
6005 for(
size_t j=0UL; j<
n_; ++j )
6007 const size_t ipos( ( remainder )?(
m_ &
size_t(-SIMDSIZE) ):(
m_ ) );
6014 for( ; (i+SIMDSIZE*3UL) < ipos; i+=SIMDSIZE*4UL ) {
6015 left.
store( left.
load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6016 left.
store( left.
load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6017 left.
store( left.
load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6018 left.
store( left.
load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6020 for( ; i<ipos; i+=SIMDSIZE ) {
6021 left.
store( left.
load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6023 for( ; remainder && i<
m_; ++i ) {
6024 *left *= *right; ++left; ++right;
6044 template<
typename Type >
6045 template<
typename MT >
6053 constexpr
size_t block( BLOCK_SIZE );
6055 for(
size_t jj=0UL; jj<
n_; jj+=block ) {
6056 const size_t jend(
min( n_, jj+block ) );
6057 for(
size_t ii=0UL; ii<
m_; ii+=block ) {
6058 const size_t iend(
min( m_, ii+block ) );
6059 for(
size_t j=jj; j<jend; ++j ) {
6060 for(
size_t i=ii; i<iend; ++i ) {
6061 v_[i+j*mm_] *= (~rhs)(i,j);
6083 template<
typename Type >
6084 template<
typename MT >
6092 for(
size_t j=0UL; j<
n_; ++j )
6097 for( ; i<element->index(); ++i )
6099 v_[i+j*mm_] *= element->value();
6103 for( ; i<
m_; ++i ) {
6124 template<
typename Type >
6125 template<
typename MT >
6135 for(
size_t i=0UL; i<
m_; ++i )
6140 for( ; j<element->index(); ++j )
6142 v_[i+j*mm_] *= element->value();
6146 for( ; j<
n_; ++j ) {
6170 template<
typename Type,
bool SO >
6173 template<
typename Type,
bool SO >
6176 template<
typename Type,
bool SO >
6179 template<
bool RF,
typename Type,
bool SO >
6182 template<
typename Type,
bool SO >
6185 template<
typename Type,
bool SO >
6198 template<
typename Type
6220 template<
typename Type
6236 template<
typename Type
6298 template<
typename Type
6315 template<
typename Type
6334 template<
typename T,
bool SO >
6352 template<
typename T,
bool SO >
6370 template<
typename T,
bool SO >
6388 template<
typename T,
bool SO >
6406 template<
typename T,
bool SO >
6407 struct IsPadded< DynamicMatrix<T,SO> >
6424 template<
typename T,
bool SO >
6442 template<
typename T,
bool SO >
6460 template<
typename T1,
bool SO,
typename T2,
size_t M,
size_t N >
6461 struct AddTrait< DynamicMatrix<T1,SO>, StaticMatrix<T2,M,N,SO> >
6466 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2 >
6467 struct AddTrait< DynamicMatrix<T1,SO1>, StaticMatrix<T2,M,N,SO2> >
6472 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
6473 struct AddTrait< StaticMatrix<T1,M,N,SO>, DynamicMatrix<T2,SO> >
6478 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
6479 struct AddTrait< StaticMatrix<T1,M,N,SO1>, DynamicMatrix<T2,SO2> >
6484 template<
typename T1,
bool SO,
typename T2,
size_t M,
size_t N >
6485 struct AddTrait< DynamicMatrix<T1,SO>, HybridMatrix<T2,M,N,SO> >
6490 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2 >
6491 struct AddTrait< DynamicMatrix<T1,SO1>, HybridMatrix<T2,M,N,SO2> >
6496 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
6497 struct AddTrait< HybridMatrix<T1,M,N,SO>, DynamicMatrix<T2,SO> >
6502 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
6503 struct AddTrait< HybridMatrix<T1,M,N,SO1>, DynamicMatrix<T2,SO2> >
6508 template<
typename T1,
bool SO,
typename T2 >
6509 struct AddTrait< DynamicMatrix<T1,SO>, DynamicMatrix<T2,SO> >
6514 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
6515 struct AddTrait< DynamicMatrix<T1,SO1>, DynamicMatrix<T2,SO2> >
6533 template<
typename T1,
bool SO,
typename T2,
size_t M,
size_t N >
6534 struct SubTrait< DynamicMatrix<T1,SO>, StaticMatrix<T2,M,N,SO> >
6539 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2 >
6540 struct SubTrait< DynamicMatrix<T1,SO1>, StaticMatrix<T2,M,N,SO2> >
6545 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
6546 struct SubTrait< StaticMatrix<T1,M,N,SO>, DynamicMatrix<T2,SO> >
6551 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
6552 struct SubTrait< StaticMatrix<T1,M,N,SO1>, DynamicMatrix<T2,SO2> >
6557 template<
typename T1,
bool SO,
typename T2,
size_t M,
size_t N >
6558 struct SubTrait< DynamicMatrix<T1,SO>, HybridMatrix<T2,M,N,SO> >
6563 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2 >
6564 struct SubTrait< DynamicMatrix<T1,SO1>, HybridMatrix<T2,M,N,SO2> >
6569 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
6570 struct SubTrait< HybridMatrix<T1,M,N,SO>, DynamicMatrix<T2,SO> >
6575 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
6576 struct SubTrait< HybridMatrix<T1,M,N,SO1>, DynamicMatrix<T2,SO2> >
6581 template<
typename T1,
bool SO,
typename T2 >
6582 struct SubTrait< DynamicMatrix<T1,SO>, DynamicMatrix<T2,SO> >
6587 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
6588 struct SubTrait< DynamicMatrix<T1,SO1>, DynamicMatrix<T2,SO2> >
6606 template<
typename T1,
bool SO,
typename T2,
size_t M,
size_t N >
6607 struct SchurTrait< DynamicMatrix<T1,SO>, StaticMatrix<T2,M,N,SO> >
6612 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2 >
6613 struct SchurTrait< DynamicMatrix<T1,SO1>, StaticMatrix<T2,M,N,SO2> >
6618 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
6619 struct SchurTrait< StaticMatrix<T1,M,N,SO>, DynamicMatrix<T2,SO> >
6624 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
6625 struct SchurTrait< StaticMatrix<T1,M,N,SO1>, DynamicMatrix<T2,SO2> >
6630 template<
typename T1,
bool SO,
typename T2,
size_t M,
size_t N >
6631 struct SchurTrait< DynamicMatrix<T1,SO>, HybridMatrix<T2,M,N,SO> >
6636 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2 >
6637 struct SchurTrait< DynamicMatrix<T1,SO1>, HybridMatrix<T2,M,N,SO2> >
6642 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
6643 struct SchurTrait< HybridMatrix<T1,M,N,SO>, DynamicMatrix<T2,SO> >
6648 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
6649 struct SchurTrait< HybridMatrix<T1,M,N,SO1>, DynamicMatrix<T2,SO2> >
6654 template<
typename T1,
bool SO,
typename T2 >
6655 struct SchurTrait< DynamicMatrix<T1,SO>, DynamicMatrix<T2,SO> >
6660 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
6661 struct SchurTrait< DynamicMatrix<T1,SO1>, DynamicMatrix<T2,SO2> >
6679 template<
typename T1,
bool SO,
typename T2 >
6680 struct MultTrait< DynamicMatrix<T1,SO>, T2, EnableIf_<IsNumeric<T2> > >
6685 template<
typename T1,
typename T2,
bool SO >
6686 struct MultTrait< T1, DynamicMatrix<T2,SO>, EnableIf_<IsNumeric<T1> > >
6691 template<
typename T1,
bool SO,
typename T2,
size_t N >
6692 struct MultTrait< DynamicMatrix<T1,SO>, StaticVector<T2,N,false> >
6697 template<
typename T1,
size_t N,
typename T2,
bool SO >
6698 struct MultTrait< StaticVector<T1,N,true>, DynamicMatrix<T2,SO> >
6703 template<
typename T1,
bool SO,
typename T2,
size_t N >
6704 struct MultTrait< DynamicMatrix<T1,SO>, HybridVector<T2,N,false> >
6709 template<
typename T1,
size_t N,
typename T2,
bool SO >
6710 struct MultTrait< HybridVector<T1,N,true>, DynamicMatrix<T2,SO> >
6715 template<
typename T1,
bool SO,
typename T2 >
6716 struct MultTrait< DynamicMatrix<T1,SO>, DynamicVector<T2,false> >
6721 template<
typename T1,
typename T2,
bool SO >
6722 struct MultTrait< DynamicVector<T1,true>, DynamicMatrix<T2,SO> >
6727 template<
typename T1,
bool SO,
typename T2,
bool AF,
bool PF >
6728 struct MultTrait< DynamicMatrix<T1,SO>, CustomVector<T2,AF,PF,false> >
6733 template<
typename T1,
bool AF,
bool PF,
typename T2,
bool SO >
6734 struct MultTrait< CustomVector<T1,AF,PF,true>, DynamicMatrix<T2,SO> >
6739 template<
typename T1,
bool SO,
typename T2 >
6740 struct MultTrait< DynamicMatrix<T1,SO>, CompressedVector<T2,false> >
6745 template<
typename T1,
typename T2,
bool SO >
6746 struct MultTrait< CompressedVector<T1,true>, DynamicMatrix<T2,SO> >
6751 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2 >
6752 struct MultTrait< DynamicMatrix<T1,SO1>, StaticMatrix<T2,M,N,SO2> >
6757 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
6758 struct MultTrait< StaticMatrix<T1,M,N,SO1>, DynamicMatrix<T2,SO2> >
6763 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2 >
6764 struct MultTrait< DynamicMatrix<T1,SO1>, HybridMatrix<T2,M,N,SO2> >
6769 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
6770 struct MultTrait< HybridMatrix<T1,M,N,SO1>, DynamicMatrix<T2,SO2> >
6775 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
6776 struct MultTrait< DynamicMatrix<T1,SO1>, DynamicMatrix<T2,SO2> >
6794 template<
typename T1,
bool SO,
typename T2 >
6795 struct DivTrait< DynamicMatrix<T1,SO>, T2, EnableIf_<IsNumeric<T2> > >
6813 template<
typename T,
bool SO,
typename OP >
6832 template<
typename T1,
bool SO,
typename T2,
size_t M,
size_t N,
typename OP >
6833 struct BinaryMapTrait< DynamicMatrix<T1,SO>, StaticMatrix<T2,M,N,SO>, OP >
6838 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2,
typename OP >
6839 struct BinaryMapTrait< DynamicMatrix<T1,SO1>, StaticMatrix<T2,M,N,SO2>, OP >
6844 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2,
typename OP >
6845 struct BinaryMapTrait< StaticMatrix<T1,M,N,SO>, DynamicMatrix<T2,SO>, OP >
6850 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2,
typename OP >
6851 struct BinaryMapTrait< StaticMatrix<T1,M,N,SO1>, DynamicMatrix<T2,SO2>, OP >
6856 template<
typename T1,
bool SO,
typename T2,
size_t M,
size_t N,
typename OP >
6857 struct BinaryMapTrait< DynamicMatrix<T1,SO>, HybridMatrix<T2,M,N,SO>, OP >
6862 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2,
typename OP >
6863 struct BinaryMapTrait< DynamicMatrix<T1,SO1>, HybridMatrix<T2,M,N,SO2>, OP >
6868 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2,
typename OP >
6869 struct BinaryMapTrait< HybridMatrix<T1,M,N,SO>, DynamicMatrix<T2,SO>, OP >
6874 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2,
typename OP >
6875 struct BinaryMapTrait< HybridMatrix<T1,M,N,SO1>, DynamicMatrix<T2,SO2>, OP >
6880 template<
typename T1,
bool SO,
typename T2,
typename OP >
6881 struct BinaryMapTrait< DynamicMatrix<T1,SO>, DynamicMatrix<T2,SO>, OP >
6886 template<
typename T1,
bool SO1,
typename T2,
bool SO2,
typename OP >
6887 struct BinaryMapTrait< DynamicMatrix<T1,SO1>, DynamicMatrix<T2,SO2>, OP >
6905 template<
typename T1,
bool SO,
typename T2 >
6906 struct HighType< DynamicMatrix<T1,SO>, DynamicMatrix<T2,SO> >
6924 template<
typename T1,
bool SO,
typename T2 >
6925 struct LowType< DynamicMatrix<T1,SO>, DynamicMatrix<T2,SO> >
6943 template<
typename T,
bool SO,
size_t I,
size_t J,
size_t M,
size_t N >
6949 template<
typename T,
bool SO >
6968 template<
typename T,
bool SO,
size_t... CRAs >
6969 struct RowTrait< DynamicMatrix<T,SO>, CRAs... >
6987 template<
typename T,
bool SO,
size_t... CRAs >
6988 struct RowsTrait< DynamicMatrix<T,SO>, CRAs... >
7006 template<
typename T,
bool SO,
size_t... CCAs >
7007 struct ColumnTrait< DynamicMatrix<T,SO>, CCAs... >
7025 template<
typename T,
bool SO,
size_t... CCAs >
7044 template<
typename T,
bool SO,
ptrdiff_t... CBAs >
7045 struct BandTrait< DynamicMatrix<T,SO>, CBAs... >
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
Pointer difference type of the Blaze library.
size_t n_
The current number of columns of the matrix.
Definition: DynamicMatrix.h:511
size_t addPadding(size_t value) const noexcept
Add the necessary amount of padding to the given value.
Definition: DynamicMatrix.h:1846
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:2277
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:2071
void reserve(size_t elements)
Setting the minimum capacity of the matrix.
Definition: DynamicMatrix.h:1767
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:1470
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:2115
Header file for basic type definitions.
const SIMDType load() const noexcept
Load of the SIMD element at the current iterator position.
Definition: DenseIterator.h:405
Header file for the row trait.
Type *BLAZE_RESTRICT v_
The dynamically allocated matrix elements.
Definition: DynamicMatrix.h:514
Base template for the SubmatrixTrait class.
Definition: SubmatrixTrait.h:109
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:2178
Base template for the ColumnTrait class.
Definition: ColumnTrait.h:108
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:1163
void resize(size_t m, size_t n, bool preserve=true)
Changing the size of the matrix.
Definition: DynamicMatrix.h:1690
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:552
Header file for the IsSame and IsStrictlySame type traits.
Base template for the SchurTrait class.
Definition: SchurTrait.h:112
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:2212
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:588
Type ElementType
Type of the matrix elements.
Definition: DynamicMatrix.h:227
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:1903
Compile time check for lower triangular matrices.This type trait tests whether or not the given templ...
Definition: IsLower.h:87
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:1139
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:87
Type & Reference
Reference to a non-constant matrix value.
Definition: DynamicMatrix.h:232
Efficient implementation of an arbitrary sized vector.The DynamicVector class template is the represe...
Definition: DynamicVector.h:185
Header file for memory allocation and deallocation functionality.
Header file for the extended initializer_list functionality.
System settings for performance optimizations.
Efficient implementation of a dynamic matrix.The DynamicMatrix class template is the representation ...
Definition: DynamicMatrix.h:217
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:1950
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:2312
Base template for the RowsTrait class.
Definition: RowsTrait.h:109
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:129
Header file for the band trait.
bool canSMPAssign() const noexcept
Returns whether the matrix can be used in SMP assignments.
Definition: DynamicMatrix.h:2090
Constraint on the data type.
~DynamicMatrix()
The destructor for DynamicMatrix.
Definition: DynamicMatrix.h:820
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:1503
SIMDTrait_< ElementType > SIMDType
SIMD type of the matrix elements.
Definition: DynamicMatrix.h:228
Base template for the RowTrait class.
Definition: RowTrait.h:109
Compile time check for the memory layout of data types.This type trait tests whether the given data t...
Definition: IsContiguous.h:86
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:1908
Header file for the clear shim.
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: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:5908
void shrinkToFit()
Requesting the removal of unused capacity.
Definition: DynamicMatrix.h:1805
bool isAliased(const Other *alias) const noexcept
Returns whether the matrix is aliased with the given address alias.
Definition: DynamicMatrix.h:2053
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:234
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:533
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:470
#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:89
void extend(size_t m, size_t n, bool preserve=true)
Extending the size of the matrix.
Definition: DynamicMatrix.h:1749
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:1603
decltype(auto) elements(Vector< VT, TF > &vector, REAs... args)
Creating a view on a selection of elements of the given vector.
Definition: Elements.h:134
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:123
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: DynamicMatrix.h:1484
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:608
Header file for the IsPadded type trait.
const Type & ConstReference
Reference to a constant matrix value.
Definition: DynamicMatrix.h:233
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:2241
Header file for the IsVectorizable type trait.
Pointer data() noexcept
Low-level data access to the matrix elements.
Definition: DynamicMatrix.h:948
Reference operator()(size_t i, size_t j) noexcept
2D-access to the matrix elements.
Definition: DynamicMatrix.h:848
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:512
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
Determines the maximum number of columns specified by the given initializer list. ...
Definition: InitializerList.h:107
Header file for run time assertion macros.
Base template for the AddTrait class.
Definition: AddTrait.h:119
Base template for the MultTrait class.
Definition: MultTrait.h:119
Iterator begin(size_t i) noexcept
Returns an iterator to the first element of row/column i.
Definition: DynamicMatrix.h:1029
Header file for the addition trait.
void clear()
Clearing the matrix.
Definition: DynamicMatrix.h:1647
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:1073
Constraint on the data type.
Header file for the IsContiguous type trait.
Header file for the columns trait.
Headerfile for the generic transfer algorithm.
size_t m_
The current number of rows of the matrix.
Definition: DynamicMatrix.h:510
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:2033
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:1822
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:237
size_t nonZeros() const
Returns the total number of non-zero elements in the matrix.
Definition: DynamicMatrix.h:1553
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:120
Implementation of a generic iterator for dense vectors and matrices.The DenseIterator represents a ge...
Definition: DenseIterator.h:58
Header file for the rows trait.
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:789
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:2143
Iterator end(size_t i) noexcept
Returns an iterator just past the last element of row/column i.
Definition: DynamicMatrix.h:1095
DynamicMatrix< Type, SO > This
Type of this DynamicMatrix instance.
Definition: DynamicMatrix.h:222
Base template for the ColumnsTrait class.
Definition: ColumnsTrait.h:109
Header file for the default transpose flag for all vectors of the Blaze library.
Initializer list type of the Blaze library.
bool isIntact() const noexcept
Returns whether the invariants of the dynamic matrix are intact.
Definition: DynamicMatrix.h:1993
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:513
Header file for the IntegralConstant class template.
Resize mechanism to obtain a DynamicMatrix with different fixed dimensions.
Definition: DynamicMatrix.h:255
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:245
DenseIterator< const Type, usePadding > ConstIterator
Iterator over constant elements.
Definition: DynamicMatrix.h:238
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:628
Base template for the SubTrait class.
Definition: SubTrait.h:119
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:1517
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:893
Base template for the BinaryMapTrait class.
Definition: BinaryMapTrait.h:97
Header file for the IsResizable type trait.
Base template for the UnaryMapTrait class.
Definition: UnaryMapTrait.h:95
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:229
DynamicMatrix & transpose()
In-place transpose of the matrix.
Definition: DynamicMatrix.h:1870
Header file for the HighType type trait.
Header file for the TrueType type/value trait base class.
Base template for the BandTrait class.
Definition: BandTrait.h:109
const Type * ConstPointer
Pointer to a constant matrix value.
Definition: DynamicMatrix.h:235