35 #ifndef _BLAZE_MATH_DENSE_STATICMATRIX_H_ 36 #define _BLAZE_MATH_DENSE_STATICMATRIX_H_ 221 template<
typename Type
224 ,
bool SO = defaultStorageOrder >
226 :
public DenseMatrix< StaticMatrix<Type,M,N,SO>, SO >
264 template<
typename NewType >
273 template<
size_t NewM
302 template<
typename Other >
303 explicit inline StaticMatrix(
size_t m,
size_t n,
const Other* array );
305 template<
typename Other,
size_t Rows,
size_t Cols >
306 explicit inline StaticMatrix(
const Other (&array)[Rows][Cols] );
310 template<
typename Other,
bool SO2 >
313 template<
typename MT,
bool SO2 >
334 inline constexpr
Pointer data (
size_t i ) noexcept;
339 inline constexpr
Iterator end (
size_t i ) noexcept;
351 template< typename Other,
size_t Rows,
size_t Cols >
352 inline
StaticMatrix& operator=( const Other (&array)[Rows][Cols] );
356 template< typename Other,
bool SO2 >
359 template< typename MT,
bool SO2 > inline
StaticMatrix& operator= ( const
Matrix<MT,SO2>& rhs );
360 template< typename MT,
bool SO2 > inline
StaticMatrix& operator+=( const
Matrix<MT,SO2>& rhs );
361 template< typename MT,
bool SO2 > inline
StaticMatrix& operator-=( const
Matrix<MT,SO2>& rhs );
362 template< typename MT,
bool SO2 > inline
StaticMatrix& operator%=( const
Matrix<MT,SO2>& rhs );
369 static inline constexpr
size_t rows() noexcept;
370 static inline constexpr
size_t columns() noexcept;
371 static inline constexpr
size_t spacing() noexcept;
372 static inline constexpr
size_t capacity() noexcept;
373 inline
size_t capacity(
size_t i ) const noexcept;
375 inline
size_t nonZeros(
size_t i ) const;
376 inline constexpr
void reset();
377 inline
void reset(
size_t i );
388 template< typename Other > inline
StaticMatrix& scale( const Other& scalar );
395 static inline
void* operator new (
std::
size_t size );
396 static inline
void* operator new[](
std::
size_t size );
397 static inline
void* operator new (
std::
size_t size, const
std::nothrow_t& );
398 static inline
void* operator new[](
std::
size_t size, const
std::nothrow_t& );
400 static inline
void operator delete (
void* ptr );
401 static inline
void operator delete[](
void* ptr );
402 static inline
void operator delete (
void* ptr, const
std::nothrow_t& );
403 static inline
void operator delete[](
void* ptr, const
std::nothrow_t& );
410 template< typename MT >
412 static constexpr
bool VectorizedAssign_v =
413 ( useOptimizedKernels &&
422 template< typename MT >
424 static constexpr
bool VectorizedAddAssign_v =
425 ( useOptimizedKernels &&
436 template< typename MT >
438 static constexpr
bool VectorizedSubAssign_v =
439 ( useOptimizedKernels &&
450 template< typename MT >
452 static constexpr
bool VectorizedSchurAssign_v =
453 ( useOptimizedKernels &&
465 inline constexpr
bool isIntact() const noexcept;
472 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
473 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
475 static inline constexpr
bool isAligned() noexcept;
486 template< typename MT,
bool SO2 >
489 template< typename MT,
bool SO2 >
495 template< typename MT,
bool SO2 >
498 template< typename MT,
bool SO2 >
504 template< typename MT,
bool SO2 >
507 template< typename MT,
bool SO2 >
513 template< typename MT,
bool SO2 >
516 template< typename MT,
bool SO2 >
586 template< typename Type
595 if( IsNumeric_v<Type> ) {
596 for(
size_t i=0UL; i<M*
NN; ++i )
610 template<
typename Type
619 for(
size_t i=0UL; i<M; ++i ) {
620 for(
size_t j=0UL; j<N; ++j )
623 for(
size_t j=N; j<
NN; ++j )
655 template<
typename Type
670 for(
const auto& rowList : list ) {
672 for(
const auto& element : rowList ) {
673 v_[i*
NN+j] = element;
710 template<
typename Type
714 template<
typename Other >
720 if( m > M || n > N ) {
724 for(
size_t i=0UL; i<m; ++i ) {
725 for(
size_t j=0UL; j<n; ++j )
726 v_[i*
NN+j] = array[i*n+j];
728 if( IsNumeric_v<Type> ) {
729 for(
size_t j=n; j<
NN; ++j )
734 if( IsNumeric_v<Type> ) {
735 for(
size_t i=m; i<M; ++i ) {
736 for(
size_t j=0UL; j<
NN; ++j )
766 template<
typename Type
770 template<
typename Other
779 for(
size_t i=0UL; i<M; ++i ) {
780 for(
size_t j=0UL; j<N; ++j )
781 v_[i*
NN+j] = array[i][j];
783 for(
size_t j=N; j<
NN; ++j )
799 template<
typename Type
818 template<
typename Type
822 template<
typename Other
829 for(
size_t i=0UL; i<M; ++i ) {
830 for(
size_t j=0UL; j<N; ++j )
833 for(
size_t j=N; j<
NN; ++j )
852 template<
typename Type
856 template<
typename MT
869 for(
size_t i=0UL; i<M; ++i ) {
870 for(
size_t j=( IsSparseMatrix_v<MT> ? 0UL : N ); j<
NN; ++j ) {
900 template<
typename Type
924 template<
typename Type
949 template<
typename Type
978 template<
typename Type
1008 template<
typename Type
1032 template<
typename Type
1052 template<
typename Type
1073 template<
typename Type
1097 template<
typename Type
1121 template<
typename Type
1145 template<
typename Type
1169 template<
typename Type
1193 template<
typename Type
1217 template<
typename Type
1244 template<
typename Type
1250 for(
size_t i=0UL; i<M; ++i )
1251 for(
size_t j=0UL; j<N; ++j )
1285 template<
typename Type
1298 for(
const auto& rowList : list ) {
1300 for(
const auto& element : rowList ) {
1301 v_[i*NN+j] = element;
1305 v_[i*NN+j] = Type();
1338 template<
typename Type
1342 template<
typename Other
1350 for(
size_t i=0UL; i<M; ++i )
1351 for(
size_t j=0UL; j<N; ++j )
1352 v_[i*NN+j] = array[i][j];
1369 template<
typename Type
1391 template<
typename Type
1395 template<
typename Other
1400 using blaze::assign;
1402 assign( *
this, ~rhs );
1422 template<
typename Type
1426 template<
typename MT
1430 using blaze::assign;
1432 using TT = decltype(
trans( *
this ) );
1433 using CT = decltype(
ctrans( *
this ) );
1434 using IT = decltype(
inv( *
this ) );
1436 if( (~rhs).
rows() != M || (~rhs).
columns() != N ) {
1440 if( IsSame_v<MT,TT> && (~rhs).isAliased(
this ) ) {
1443 else if( IsSame_v<MT,CT> && (~rhs).isAliased(
this ) ) {
1446 else if( !IsSame_v<MT,IT> && (~rhs).canAlias(
this ) ) {
1448 assign( *
this, tmp );
1451 if( IsSparseMatrix_v<MT> )
1453 assign( *
this, ~rhs );
1473 template<
typename Type
1477 template<
typename MT
1481 using blaze::addAssign;
1483 if( (~rhs).
rows() != M || (~rhs).
columns() != N ) {
1487 if( (~rhs).canAlias(
this ) ) {
1489 addAssign( *
this, tmp );
1492 addAssign( *
this, ~rhs );
1512 template<
typename Type
1516 template<
typename MT
1520 using blaze::subAssign;
1522 if( (~rhs).
rows() != M || (~rhs).
columns() != N ) {
1526 if( (~rhs).canAlias(
this ) ) {
1528 subAssign( *
this, tmp );
1531 subAssign( *
this, ~rhs );
1551 template<
typename Type
1555 template<
typename MT
1559 using blaze::schurAssign;
1561 if( (~rhs).
rows() != M || (~rhs).
columns() != N ) {
1565 if( (~rhs).canAlias(
this ) ) {
1567 schurAssign( *
this, tmp );
1570 schurAssign( *
this, ~rhs );
1593 template<
typename Type
1609 template<
typename Type
1628 template<
typename Type
1644 template<
typename Type
1666 template<
typename Type
1686 template<
typename Type
1692 size_t nonzeros( 0UL );
1694 for(
size_t i=0UL; i<M; ++i )
1695 for(
size_t j=0UL; j<N; ++j )
1715 template<
typename Type
1723 const size_t jend( i*NN + N );
1724 size_t nonzeros( 0UL );
1726 for(
size_t j=i*NN; j<jend; ++j )
1740 template<
typename Type
1748 for(
size_t i=0UL; i<M; ++i )
1749 for(
size_t j=0UL; j<N; ++j )
1750 clear( v_[i*NN+j] );
1766 template<
typename Type
1775 for(
size_t j=0UL; j<N; ++j )
1776 clear( v_[i*NN+j] );
1787 template<
typename Type
1795 for(
size_t i=0UL; i<M; ++i ) {
1796 for(
size_t j=0UL; j<N; ++j ) {
1797 swap( v_[i*NN+j], m(i,j) );
1820 template<
typename Type
1830 for(
size_t i=1UL; i<M; ++i )
1831 for(
size_t j=0UL; j<i; ++j )
1832 swap( v_[i*NN+j], v_[j*NN+i] );
1853 template<
typename Type
1879 template<
typename Type
1897 template<
typename Type
1905 for(
size_t i=0UL; i<M; ++i ) {
1906 for(
size_t j=0UL; j<i; ++j ) {
1907 cswap( v_[i*NN+j], v_[j*NN+i] );
1931 template<
typename Type
1957 template<
typename Type
1984 template<
typename Type
1988 template<
typename Other >
1991 for(
size_t i=0UL; i<M; ++i )
1992 for(
size_t j=0UL; j<N; ++j )
1993 v_[i*NN+j] *= scalar;
2018 template<
typename Type
2028 return allocate<StaticMatrix>( 1UL );
2043 template<
typename Type
2067 template<
typename Type
2077 return allocate<StaticMatrix>( 1UL );
2092 template<
typename Type
2112 template<
typename Type
2118 deallocate( static_cast<StaticMatrix*>( ptr ) );
2129 template<
typename Type
2135 deallocate( static_cast<StaticMatrix*>( ptr ) );
2146 template<
typename Type
2152 deallocate( static_cast<StaticMatrix*>( ptr ) );
2163 template<
typename Type
2169 deallocate( static_cast<StaticMatrix*>( ptr ) );
2191 template<
typename Type
2197 if( IsNumeric_v<Type> ) {
2198 for(
size_t i=0UL; i<M; ++i ) {
2199 for(
size_t j=N; j<NN; ++j ) {
2200 if( v_[i*NN+j] != Type() )
2229 template<
typename Type
2233 template<
typename Other >
2236 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
2251 template<
typename Type
2255 template<
typename Other >
2258 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
2272 template<
typename Type
2298 template<
typename Type
2306 return loada( i, j );
2308 return loadu( i, j );
2328 template<
typename Type
2345 return loada( &v_[i*NN+j] );
2365 template<
typename Type
2380 return loadu( &v_[i*NN+j] );
2401 template<
typename Type
2432 template<
typename Type
2449 storea( &v_[i*NN+j], value );
2470 template<
typename Type
2485 storeu( &v_[i*NN+j], value );
2507 template<
typename Type
2524 stream( &v_[i*NN+j], value );
2540 template<
typename Type
2544 template<
typename MT
2551 for(
size_t i=0UL; i<M; ++i ) {
2552 for(
size_t j=0UL; j<N; ++j ) {
2553 v_[i*NN+j] = (~rhs)(i,j);
2571 template<
typename Type
2575 template<
typename MT
2584 constexpr
bool remainder( !usePadding || !IsPadded_v<MT> );
2586 constexpr
size_t jpos( ( remainder )?( N &
size_t(-SIMDSIZE) ):( N ) );
2587 BLAZE_INTERNAL_ASSERT( !remainder || ( N - ( N % (SIMDSIZE) ) ) == jpos,
"Invalid end calculation" );
2589 for(
size_t i=0UL; i<M; ++i )
2593 for( ; j<jpos; j+=SIMDSIZE ) {
2594 store( i, j, (~rhs).load(i,j) );
2596 for( ; remainder && j<N; ++j ) {
2597 v_[i*NN+j] = (~rhs)(i,j);
2615 template<
typename Type
2619 template<
typename MT >
2624 for(
size_t i=0UL; i<M; ++i )
2625 for(
auto element=(~rhs).
begin(i); element!=(~rhs).
end(i); ++element )
2626 v_[i*NN+element->index()] = element->value();
2642 template<
typename Type
2646 template<
typename MT >
2653 for(
size_t j=0UL; j<N; ++j )
2654 for(
auto element=(~rhs).
begin(j); element!=(~rhs).
end(j); ++element )
2655 v_[element->index()*NN+j] = element->value();
2671 template<
typename Type
2675 template<
typename MT
2682 for(
size_t i=0UL; i<M; ++i )
2684 if( IsDiagonal_v<MT> )
2686 v_[i*NN+i] += (~rhs)(i,i);
2690 const size_t jbegin( ( IsUpper_v<MT> )
2691 ?( IsStrictlyUpper_v<MT> ? i+1UL : i )
2693 const size_t jend ( ( IsLower_v<MT> )
2694 ?( IsStrictlyLower_v<MT> ? i : i+1UL )
2698 for(
size_t j=jbegin; j<jend; ++j ) {
2699 v_[i*NN+j] += (~rhs)(i,j);
2718 template<
typename Type
2722 template<
typename MT
2732 constexpr
bool remainder( !usePadding || !IsPadded_v<MT> );
2734 for(
size_t i=0UL; i<M; ++i )
2736 const size_t jbegin( ( IsUpper_v<MT> )
2737 ?( ( IsStrictlyUpper_v<MT> ? i+1UL : i ) &
size_t(-SIMDSIZE) )
2739 const size_t jend ( ( IsLower_v<MT> )
2740 ?( IsStrictlyLower_v<MT> ? i : i+1UL )
2744 const size_t jpos( ( remainder )?( jend &
size_t(-SIMDSIZE) ):( jend ) );
2745 BLAZE_INTERNAL_ASSERT( !remainder || ( jend - ( jend % (SIMDSIZE) ) ) == jpos,
"Invalid end calculation" );
2749 for( ; j<jpos; j+=SIMDSIZE ) {
2750 store( i, j, load(i,j) + (~rhs).load(i,j) );
2752 for( ; remainder && j<jend; ++j ) {
2753 v_[i*NN+j] += (~rhs)(i,j);
2771 template<
typename Type
2775 template<
typename MT >
2780 for(
size_t i=0UL; i<M; ++i )
2781 for(
auto element=(~rhs).
begin(i); element!=(~rhs).
end(i); ++element )
2782 v_[i*NN+element->index()] += element->value();
2798 template<
typename Type
2802 template<
typename MT >
2809 for(
size_t j=0UL; j<N; ++j )
2810 for(
auto element=(~rhs).
begin(j); element!=(~rhs).
end(j); ++element )
2811 v_[element->index()*NN+j] += element->value();
2827 template<
typename Type
2831 template<
typename MT
2838 for(
size_t i=0UL; i<M; ++i )
2840 if( IsDiagonal_v<MT> )
2842 v_[i*NN+i] -= (~rhs)(i,i);
2846 const size_t jbegin( ( IsUpper_v<MT> )
2847 ?( IsStrictlyUpper_v<MT> ? i+1UL : i )
2849 const size_t jend ( ( IsLower_v<MT> )
2850 ?( IsStrictlyLower_v<MT> ? i : i+1UL )
2854 for(
size_t j=jbegin; j<jend; ++j ) {
2855 v_[i*NN+j] -= (~rhs)(i,j);
2874 template<
typename Type
2878 template<
typename MT
2888 constexpr
bool remainder( !usePadding || !IsPadded_v<MT> );
2890 for(
size_t i=0UL; i<M; ++i )
2892 const size_t jbegin( ( IsUpper_v<MT> )
2893 ?( ( IsStrictlyUpper_v<MT> ? i+1UL : i ) &
size_t(-SIMDSIZE) )
2895 const size_t jend ( ( IsLower_v<MT> )
2896 ?( IsStrictlyLower_v<MT> ? i : i+1UL )
2900 const size_t jpos( ( remainder )?( jend &
size_t(-SIMDSIZE) ):( jend ) );
2901 BLAZE_INTERNAL_ASSERT( !remainder || ( jend - ( jend % (SIMDSIZE) ) ) == jpos,
"Invalid end calculation" );
2905 for( ; j<jpos; j+=SIMDSIZE ) {
2906 store( i, j, load(i,j) - (~rhs).load(i,j) );
2908 for( ; remainder && j<jend; ++j ) {
2909 v_[i*NN+j] -= (~rhs)(i,j);
2927 template<
typename Type
2931 template<
typename MT >
2936 for(
size_t i=0UL; i<M; ++i )
2937 for(
auto element=(~rhs).
begin(i); element!=(~rhs).
end(i); ++element )
2938 v_[i*NN+element->index()] -= element->value();
2954 template<
typename Type
2958 template<
typename MT >
2965 for(
size_t j=0UL; j<N; ++j )
2966 for(
auto element=(~rhs).
begin(j); element!=(~rhs).
end(j); ++element )
2967 v_[element->index()*NN+j] -= element->value();
2983 template<
typename Type
2987 template<
typename MT
2994 for(
size_t i=0UL; i<M; ++i ) {
2995 for(
size_t j=0UL; j<N; ++j ) {
2996 v_[i*NN+j] *= (~rhs)(i,j);
3014 template<
typename Type
3018 template<
typename MT
3027 constexpr
bool remainder( !usePadding || !IsPadded_v<MT> );
3029 constexpr
size_t jpos( ( remainder )?( N &
size_t(-SIMDSIZE) ):( N ) );
3030 BLAZE_INTERNAL_ASSERT( !remainder || ( N - ( N % (SIMDSIZE) ) ) == jpos,
"Invalid end calculation" );
3032 for(
size_t i=0UL; i<M; ++i )
3036 for( ; j<jpos; j+=SIMDSIZE ) {
3037 store( i, j, load(i,j) * (~rhs).load(i,j) );
3039 for( ; remainder && j<N; ++j ) {
3040 v_[i*NN+j] *= (~rhs)(i,j);
3058 template<
typename Type
3062 template<
typename MT >
3071 for(
size_t i=0UL; i<M; ++i )
3072 for(
auto element=(~rhs).
begin(i); element!=(~rhs).
end(i); ++element )
3073 v_[i*NN+element->index()] = tmp.v_[i*NN+element->index()] * element->value();
3089 template<
typename Type
3093 template<
typename MT >
3104 for(
size_t j=0UL; j<N; ++j )
3105 for(
auto element=(~rhs).
begin(j); element!=(~rhs).
end(j); ++element )
3106 v_[element->index()*NN+j] = tmp.v_[element->index()*NN+j] * element->value();
3131 template<
typename Type
3135 :
public DenseMatrix< StaticMatrix<Type,M,N,true>, true >
3146 static constexpr
bool align = ( usePadding || MM %
SIMDSIZE == 0UL );
3173 template<
typename NewType >
3182 template<
size_t NewM
3185 using Other = StaticMatrix<Type,NewM,NewN,true>;
3195 static constexpr
bool simdEnabled = IsVectorizable_v<Type>;
3209 explicit inline constexpr
StaticMatrix( initializer_list< initializer_list<Type> > list );
3211 template<
typename Other >
3212 explicit inline StaticMatrix(
size_t m,
size_t n,
const Other* array );
3214 template<
typename Other,
size_t Rows,
size_t Cols >
3215 explicit inline StaticMatrix(
const Other (&array)[Rows][Cols] );
3219 template<
typename Other,
bool SO >
3220 inline StaticMatrix(
const StaticMatrix<Other,M,N,SO>& m );
3222 template<
typename MT,
bool SO >
3243 inline constexpr
Pointer data (
size_t j ) noexcept;
3248 inline constexpr
Iterator end (
size_t j ) noexcept;
3258 inline constexpr
StaticMatrix& operator=( initializer_list< initializer_list<Type> > list );
3260 template< typename Other,
size_t Rows,
size_t Cols >
3261 inline
StaticMatrix& operator=( const Other (&array)[Rows][Cols] );
3265 template< typename Other,
bool SO >
3268 template< typename MT,
bool SO > inline
StaticMatrix& operator= ( const Matrix<MT,SO>& rhs );
3269 template< typename MT,
bool SO > inline
StaticMatrix& operator+=( const Matrix<MT,SO>& rhs );
3270 template< typename MT,
bool SO > inline
StaticMatrix& operator-=( const Matrix<MT,SO>& rhs );
3271 template< typename MT,
bool SO > inline
StaticMatrix& operator%=( const Matrix<MT,SO>& rhs );
3278 static inline constexpr
size_t rows() noexcept;
3279 static inline constexpr
size_t columns() noexcept;
3280 static inline constexpr
size_t spacing() noexcept;
3281 static inline constexpr
size_t capacity() noexcept;
3282 inline
size_t capacity(
size_t j ) const noexcept;
3284 inline
size_t nonZeros(
size_t j ) const;
3285 inline constexpr
void reset();
3286 inline
void reset(
size_t i );
3297 template< typename Other > inline
StaticMatrix& scale( const Other& scalar );
3304 static inline
void* operator new (
std::
size_t size );
3305 static inline
void* operator new[](
std::
size_t size );
3306 static inline
void* operator new (
std::
size_t size, const
std::nothrow_t& );
3307 static inline
void* operator new[](
std::
size_t size, const
std::nothrow_t& );
3309 static inline
void operator delete (
void* ptr );
3310 static inline
void operator delete[](
void* ptr );
3311 static inline
void operator delete (
void* ptr, const
std::nothrow_t& );
3312 static inline
void operator delete[](
void* ptr, const
std::nothrow_t& );
3319 template< typename MT >
3320 static constexpr
bool VectorizedAssign_v =
3321 ( useOptimizedKernels &&
3329 template< typename MT >
3330 static constexpr
bool VectorizedAddAssign_v =
3331 ( useOptimizedKernels &&
3341 template< typename MT >
3342 static constexpr
bool VectorizedSubAssign_v =
3343 ( useOptimizedKernels &&
3353 template< typename MT >
3354 static constexpr
bool VectorizedSchurAssign_v =
3355 ( useOptimizedKernels &&
3366 inline constexpr
bool isIntact() const noexcept;
3373 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
3374 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
3376 static inline constexpr
bool isAligned() noexcept;
3387 template< typename MT,
bool SO >
3388 inline auto
assign( const DenseMatrix<MT,SO>& rhs ) ->
DisableIf_t< VectorizedAssign_v<MT> >;
3390 template< typename MT,
bool SO >
3391 inline auto
assign( const DenseMatrix<MT,SO>& rhs ) ->
EnableIf_t< VectorizedAssign_v<MT> >;
3393 template< typename MT > inline
void assign( const SparseMatrix<MT,true>& rhs );
3394 template< typename MT > inline
void assign( const SparseMatrix<MT,false>& rhs );
3396 template< typename MT,
bool SO >
3397 inline auto
addAssign( const DenseMatrix<MT,SO>& rhs ) ->
DisableIf_t< VectorizedAddAssign_v<MT> >;
3399 template< typename MT,
bool SO >
3400 inline auto
addAssign( const DenseMatrix<MT,SO>& rhs ) ->
EnableIf_t< VectorizedAddAssign_v<MT> >;
3402 template< typename MT > inline
void addAssign( const SparseMatrix<MT,true>& rhs );
3403 template< typename MT > inline
void addAssign( const SparseMatrix<MT,false>& rhs );
3405 template< typename MT,
bool SO >
3406 inline auto
subAssign( const DenseMatrix<MT,SO>& rhs ) ->
DisableIf_t< VectorizedSubAssign_v<MT> >;
3408 template< typename MT,
bool SO >
3409 inline auto
subAssign( const DenseMatrix<MT,SO>& rhs ) ->
EnableIf_t< VectorizedSubAssign_v<MT> >;
3411 template< typename MT > inline
void subAssign( const SparseMatrix<MT,true>& rhs );
3412 template< typename MT > inline
void subAssign( const SparseMatrix<MT,false>& rhs );
3414 template< typename MT,
bool SO >
3417 template< typename MT,
bool SO >
3418 inline auto
schurAssign( const DenseMatrix<MT,SO>& rhs ) ->
EnableIf_t< VectorizedSchurAssign_v<MT> >;
3420 template< typename MT > inline
void schurAssign( const SparseMatrix<MT,true>& rhs );
3421 template< typename MT > inline
void schurAssign( const SparseMatrix<MT,false>& rhs );
3477 template< typename Type
3485 if( IsNumeric_v<Type> ) {
3486 for(
size_t i=0UL; i<MM*N; ++i )
3502 template<
typename Type
3510 for(
size_t j=0UL; j<N; ++j ) {
3511 for(
size_t i=0UL; i<M; ++i )
3514 for(
size_t i=M; i<MM; ++i )
3515 v_[i+j*MM] = Type();
3547 template<
typename Type
3561 for(
const auto& rowList : list ) {
3563 for(
const auto& element : rowList ) {
3564 v_[i+j*MM] = element;
3603 template<
typename Type
3606 template<
typename Other >
3612 if( m > M || n > N ) {
3616 for(
size_t j=0UL; j<n; ++j ) {
3617 for(
size_t i=0UL; i<m; ++i )
3618 v_[i+j*MM] = array[i+j*m];
3620 if( IsNumeric_v<Type> ) {
3621 for(
size_t i=m; i<MM; ++i )
3622 v_[i+j*MM] = Type();
3626 if( IsNumeric_v<Type> ) {
3627 for(
size_t j=n; j<N; ++j ) {
3628 for(
size_t i=0UL; i<MM; ++i )
3629 v_[i+j*MM] = Type();
3660 template<
typename Type
3663 template<
typename Other
3672 for(
size_t j=0UL; j<N; ++j ) {
3673 for(
size_t i=0UL; i<M; ++i )
3674 v_[i+j*MM] = array[i][j];
3676 for(
size_t i=M; i<MM; ++i )
3677 v_[i+j*MM] = Type();
3694 template<
typename Type
3714 template<
typename Type
3717 template<
typename Other
3724 for(
size_t j=0UL; j<N; ++j ) {
3725 for(
size_t i=0UL; i<M; ++i )
3726 v_[i+j*MM] = m(i,j);
3728 for(
size_t i=M; i<MM; ++i )
3729 v_[i+j*MM] = Type();
3749 template<
typename Type
3752 template<
typename MT
3757 using blaze::assign;
3765 for(
size_t j=0UL; j<N; ++j ) {
3766 for(
size_t i=( IsSparseMatrix_v<MT> ? 0UL : M ); i<MM; ++i ) {
3767 v_[i+j*MM] = Type();
3798 template<
typename Type
3823 template<
typename Type
3849 template<
typename Type
3861 return (*
this)(i,j);
3879 template<
typename Type
3891 return (*
this)(i,j);
3909 template<
typename Type
3933 template<
typename Type
3954 template<
typename Type
3976 template<
typename Type
3996 template<
typename Type
4016 template<
typename Type
4036 template<
typename Type
4056 template<
typename Type
4076 template<
typename Type
4096 template<
typename Type
4124 template<
typename Type
4127 inline constexpr StaticMatrix<Type,M,N,true>&
4130 for(
size_t j=0UL; j<N; ++j )
4131 for(
size_t i=0UL; i<M; ++i )
4166 template<
typename Type
4169 inline constexpr StaticMatrix<Type,M,N,true>&
4178 for(
const auto& rowList : list ) {
4180 for(
const auto& element : rowList ) {
4181 v_[i+j*MM] = element;
4185 v_[i+j*MM] = Type();
4220 template<
typename Type
4223 template<
typename Other
4226 inline StaticMatrix<Type,M,N,true>&
4231 for(
size_t j=0UL; j<N; ++j )
4232 for(
size_t i=0UL; i<M; ++i )
4233 v_[i+j*MM] = array[i][j];
4252 template<
typename Type
4255 inline constexpr StaticMatrix<Type,M,N,true>&
4275 template<
typename Type
4278 template<
typename Other
4280 inline StaticMatrix<Type,M,N,true>&
4283 using blaze::assign;
4285 assign( *
this, ~rhs );
4307 template<
typename Type
4310 template<
typename MT
4314 using blaze::assign;
4316 using TT = decltype(
trans( *
this ) );
4317 using CT = decltype(
ctrans( *
this ) );
4318 using IT = decltype(
inv( *
this ) );
4320 if( (~rhs).
rows() != M || (~rhs).
columns() != N ) {
4324 if( IsSame_v<MT,TT> && (~rhs).isAliased(
this ) ) {
4325 transpose(
typename IsSquare<This>::Type() );
4327 else if( IsSame_v<MT,CT> && (~rhs).isAliased(
this ) ) {
4328 ctranspose(
typename IsSquare<This>::Type() );
4330 else if( !IsSame_v<MT,IT> && (~rhs).canAlias(
this ) ) {
4331 StaticMatrix tmp( ~rhs );
4332 assign( *
this, tmp );
4335 if( IsSparseMatrix_v<MT> )
4337 assign( *
this, ~rhs );
4359 template<
typename Type
4362 template<
typename MT
4364 inline StaticMatrix<Type,M,N,true>& StaticMatrix<Type,M,N,true>::operator+=(
const Matrix<MT,SO>& rhs )
4366 using blaze::addAssign;
4368 if( (~rhs).
rows() != M || (~rhs).
columns() != N ) {
4372 if( (~rhs).canAlias(
this ) ) {
4373 const ResultType_t<MT> tmp( ~rhs );
4374 addAssign( *
this, tmp );
4377 addAssign( *
this, ~rhs );
4399 template<
typename Type
4402 template<
typename MT
4404 inline StaticMatrix<Type,M,N,true>& StaticMatrix<Type,M,N,true>::operator-=(
const Matrix<MT,SO>& rhs )
4406 using blaze::subAssign;
4408 if( (~rhs).
rows() != M || (~rhs).
columns() != N ) {
4412 if( (~rhs).canAlias(
this ) ) {
4413 const ResultType_t<MT> tmp( ~rhs );
4414 subAssign( *
this, tmp );
4417 subAssign( *
this, ~rhs );
4439 template<
typename Type
4442 template<
typename MT
4444 inline StaticMatrix<Type,M,N,true>& StaticMatrix<Type,M,N,true>::operator%=(
const Matrix<MT,SO>& rhs )
4446 using blaze::schurAssign;
4448 if( (~rhs).
rows() != M || (~rhs).
columns() != N ) {
4452 if( (~rhs).canAlias(
this ) ) {
4453 const ResultType_t<MT> tmp( ~rhs );
4454 schurAssign( *
this, tmp );
4457 schurAssign( *
this, ~rhs );
4482 template<
typename Type
4499 template<
typename Type
4519 template<
typename Type
4536 template<
typename Type
4554 template<
typename Type
4575 template<
typename Type
4580 size_t nonzeros( 0UL );
4582 for(
size_t j=0UL; j<N; ++j )
4583 for(
size_t i=0UL; i<M; ++i )
4600 template<
typename Type
4607 const size_t iend( j*MM + M );
4608 size_t nonzeros( 0UL );
4610 for(
size_t i=j*MM; i<iend; ++i )
4626 template<
typename Type
4633 for(
size_t j=0UL; j<N; ++j )
4634 for(
size_t i=0UL; i<M; ++i )
4635 clear( v_[i+j*MM] );
4651 template<
typename Type
4659 for(
size_t i=0UL; i<M; ++i )
4660 clear( v_[i+j*MM] );
4673 template<
typename Type
4680 for(
size_t j=0UL; j<N; ++j ) {
4681 for(
size_t i=0UL; i<M; ++i ) {
4682 swap( v_[i+j*MM], m(i,j) );
4707 template<
typename Type
4716 for(
size_t j=1UL; j<N; ++j )
4717 for(
size_t i=0UL; i<j; ++i )
4718 swap( v_[i+j*MM], v_[j+i*MM] );
4740 template<
typename Type
4765 template<
typename Type
4783 template<
typename Type
4790 for(
size_t j=0UL; j<N; ++j ) {
4791 for(
size_t i=0UL; i<j; ++i ) {
4792 cswap( v_[i+j*MM], v_[j+i*MM] );
4817 template<
typename Type
4842 template<
typename Type
4869 template<
typename Type
4872 template<
typename Other >
4873 inline StaticMatrix<Type,M,N,true>&
4874 StaticMatrix<Type,M,N,true>::scale(
const Other& scalar )
4876 for(
size_t j=0UL; j<N; ++j )
4877 for(
size_t i=0UL; i<M; ++i )
4878 v_[i+j*MM] *= scalar;
4905 template<
typename Type
4908 inline void* StaticMatrix<Type,M,N,true>::operator
new( std::size_t
size )
4914 return allocate<StaticMatrix>( 1UL );
4931 template<
typename Type
4934 inline void* StaticMatrix<Type,M,N,true>::operator
new[]( std::size_t
size )
4939 return allocate<StaticMatrix>(
size/
sizeof(StaticMatrix) );
4956 template<
typename Type
4959 inline void* StaticMatrix<Type,M,N,true>::operator
new( std::size_t
size,
const std::nothrow_t& )
4965 return allocate<StaticMatrix>( 1UL );
4982 template<
typename Type
4985 inline void* StaticMatrix<Type,M,N,true>::operator
new[]( std::size_t
size,
const std::nothrow_t& )
4990 return allocate<StaticMatrix>(
size/
sizeof(StaticMatrix) );
5003 template<
typename Type
5006 inline void StaticMatrix<Type,M,N,true>::operator
delete(
void* ptr )
5008 deallocate( static_cast<StaticMatrix*>( ptr ) );
5021 template<
typename Type
5024 inline void StaticMatrix<Type,M,N,true>::operator
delete[](
void* ptr )
5026 deallocate( static_cast<StaticMatrix*>( ptr ) );
5039 template<
typename Type
5042 inline void StaticMatrix<Type,M,N,true>::operator
delete(
void* ptr,
const std::nothrow_t& )
5044 deallocate( static_cast<StaticMatrix*>( ptr ) );
5057 template<
typename Type
5060 inline void StaticMatrix<Type,M,N,true>::operator
delete[](
void* ptr,
const std::nothrow_t& )
5062 deallocate( static_cast<StaticMatrix*>( ptr ) );
5086 template<
typename Type
5091 if( IsNumeric_v<Type> ) {
5092 for(
size_t j=0UL; j<N; ++j ) {
5093 for(
size_t i=M; i<MM; ++i ) {
5094 if( v_[i+j*MM] != Type() )
5125 template<
typename Type
5128 template<
typename Other >
5131 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
5148 template<
typename Type
5151 template<
typename Other >
5154 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
5170 template<
typename Type
5196 template<
typename Type
5203 return loada( i, j );
5205 return loadu( i, j );
5226 template<
typename Type
5242 return loada( &v_[i+j*MM] );
5263 template<
typename Type
5277 return loadu( &v_[i+j*MM] );
5299 template<
typename Type
5330 template<
typename Type
5346 storea( &v_[i+j*MM], value );
5368 template<
typename Type
5382 storeu( &v_[i+j*MM], value );
5405 template<
typename Type
5421 stream( &v_[i+j*MM], value );
5439 template<
typename Type
5442 template<
typename MT
5445 -> DisableIf_t< VectorizedAssign_v<MT> >
5449 for(
size_t j=0UL; j<N; ++j ) {
5450 for(
size_t i=0UL; i<M; ++i ) {
5451 v_[i+j*MM] = (~rhs)(i,j);
5471 template<
typename Type
5474 template<
typename MT
5477 -> EnableIf_t< VectorizedAssign_v<MT> >
5483 constexpr
bool remainder( !usePadding || !IsPadded_v<MT> );
5485 constexpr
size_t ipos( ( remainder )?( M &
size_t(-SIMDSIZE) ):( M ) );
5486 BLAZE_INTERNAL_ASSERT( !remainder || ( M - ( M % (SIMDSIZE) ) ) == ipos,
"Invalid end calculation" );
5488 for(
size_t j=0UL; j<N; ++j )
5492 for( ; i<ipos; i+=SIMDSIZE ) {
5493 store( i, j, (~rhs).load(i,j) );
5495 for( ; remainder && i<M; ++i ) {
5496 v_[i+j*MM] = (~rhs)(i,j);
5516 template<
typename Type
5519 template<
typename MT >
5524 for(
size_t j=0UL; j<N; ++j )
5525 for(
auto element=(~rhs).
begin(j); element!=(~rhs).
end(j); ++element )
5526 v_[element->index()+j*MM] = element->value();
5544 template<
typename Type
5547 template<
typename MT >
5554 for(
size_t i=0UL; i<M; ++i )
5555 for(
auto element=(~rhs).
begin(i); element!=(~rhs).
end(i); ++element )
5556 v_[i+element->index()*MM] = element->value();
5574 template<
typename Type
5577 template<
typename MT
5580 -> DisableIf_t< VectorizedAddAssign_v<MT> >
5584 for(
size_t j=0UL; j<N; ++j )
5586 if( IsDiagonal_v<MT> )
5588 v_[j+j*MM] += (~rhs)(j,j);
5592 const size_t ibegin( ( IsLower_v<MT> )
5593 ?( IsStrictlyLower_v<MT> ? j+1UL : j )
5595 const size_t iend ( ( IsUpper_v<MT> )
5596 ?( IsStrictlyUpper_v<MT> ? j : j+1UL )
5600 for(
size_t i=ibegin; i<iend; ++i ) {
5601 v_[i+j*MM] += (~rhs)(i,j);
5622 template<
typename Type
5625 template<
typename MT
5628 -> EnableIf_t< VectorizedAddAssign_v<MT> >
5635 constexpr
bool remainder( !usePadding || !IsPadded_v<MT> );
5637 for(
size_t j=0UL; j<N; ++j )
5639 const size_t ibegin( ( IsLower_v<MT> )
5640 ?( ( IsStrictlyLower_v<MT> ? j+1UL : j ) &
size_t(-SIMDSIZE) )
5642 const size_t iend ( ( IsUpper_v<MT> )
5643 ?( IsStrictlyUpper_v<MT> ? j : j+1UL )
5647 const size_t ipos( ( remainder )?( iend &
size_t(-SIMDSIZE) ):( iend ) );
5648 BLAZE_INTERNAL_ASSERT( !remainder || ( iend - ( iend % (SIMDSIZE) ) ) == ipos,
"Invalid end calculation" );
5652 for( ; i<ipos; i+=SIMDSIZE ) {
5653 store( i, j, load(i,j) + (~rhs).load(i,j) );
5655 for( ; remainder && i<iend; ++i ) {
5656 v_[i+j*MM] += (~rhs)(i,j);
5676 template<
typename Type
5679 template<
typename MT >
5684 for(
size_t j=0UL; j<N; ++j )
5685 for(
auto element=(~rhs).
begin(j); element!=(~rhs).
end(j); ++element )
5686 v_[element->index()+j*MM] += element->value();
5704 template<
typename Type
5707 template<
typename MT >
5714 for(
size_t i=0UL; i<M; ++i )
5715 for(
auto element=(~rhs).
begin(i); element!=(~rhs).
end(i); ++element )
5716 v_[i+element->index()*MM] += element->value();
5734 template<
typename Type
5737 template<
typename MT
5740 -> DisableIf_t< VectorizedSubAssign_v<MT> >
5744 for(
size_t j=0UL; j<N; ++j )
5746 if( IsDiagonal_v<MT> )
5748 v_[j+j*MM] -= (~rhs)(j,j);
5752 const size_t ibegin( ( IsLower_v<MT> )
5753 ?( IsStrictlyLower_v<MT> ? j+1UL : j )
5755 const size_t iend ( ( IsUpper_v<MT> )
5756 ?( IsStrictlyUpper_v<MT> ? j : j+1UL )
5760 for(
size_t i=ibegin; i<iend; ++i ) {
5761 v_[i+j*MM] -= (~rhs)(i,j);
5782 template<
typename Type
5785 template<
typename MT
5788 -> EnableIf_t< VectorizedSubAssign_v<MT> >
5795 constexpr
bool remainder( !usePadding || !IsPadded_v<MT> );
5797 for(
size_t j=0UL; j<N; ++j )
5799 const size_t ibegin( ( IsLower_v<MT> )
5800 ?( ( IsStrictlyLower_v<MT> ? j+1UL : j ) &
size_t(-SIMDSIZE) )
5802 const size_t iend ( ( IsUpper_v<MT> )
5803 ?( IsStrictlyUpper_v<MT> ? j : j+1UL )
5807 const size_t ipos( ( remainder )?( iend &
size_t(-SIMDSIZE) ):( iend ) );
5808 BLAZE_INTERNAL_ASSERT( !remainder || ( iend - ( iend % (SIMDSIZE) ) ) == ipos,
"Invalid end calculation" );
5812 for( ; i<ipos; i+=SIMDSIZE ) {
5813 store( i, j, load(i,j) - (~rhs).load(i,j) );
5815 for( ; remainder && i<iend; ++i ) {
5816 v_[i+j*MM] -= (~rhs)(i,j);
5836 template<
typename Type
5839 template<
typename MT >
5844 for(
size_t j=0UL; j<N; ++j )
5845 for(
auto element=(~rhs).
begin(j); element!=(~rhs).
end(j); ++element )
5846 v_[element->index()+j*MM] -= element->value();
5864 template<
typename Type
5867 template<
typename MT >
5874 for(
size_t i=0UL; i<M; ++i )
5875 for(
auto element=(~rhs).
begin(i); element!=(~rhs).
end(i); ++element )
5876 v_[i+element->index()*MM] -= element->value();
5894 template<
typename Type
5897 template<
typename MT
5900 -> DisableIf_t< VectorizedSchurAssign_v<MT> >
5904 for(
size_t j=0UL; j<N; ++j ) {
5905 for(
size_t i=0UL; i<M; ++i ) {
5906 v_[i+j*MM] *= (~rhs)(i,j);
5926 template<
typename Type
5929 template<
typename MT
5932 -> EnableIf_t< VectorizedSchurAssign_v<MT> >
5938 constexpr
bool remainder( !usePadding || !IsPadded_v<MT> );
5940 constexpr
size_t ipos( ( remainder )?( M &
size_t(-SIMDSIZE) ):( M ) );
5941 BLAZE_INTERNAL_ASSERT( !remainder || ( M - ( M % (SIMDSIZE) ) ) == ipos,
"Invalid end calculation" );
5943 for(
size_t j=0UL; j<N; ++j )
5947 for( ; i<ipos; i+=SIMDSIZE ) {
5948 store( i, j, load(i,j) * (~rhs).load(i,j) );
5950 for( ; remainder && i<M; ++i ) {
5951 v_[i+j*MM] *= (~rhs)(i,j);
5971 template<
typename Type
5974 template<
typename MT >
5979 const StaticMatrix tmp(
serial( *
this ) );
5983 for(
size_t j=0UL; j<N; ++j )
5984 for(
auto element=(~rhs).
begin(j); element!=(~rhs).
end(j); ++element )
5985 v_[element->index()+j*MM] = tmp.v_[element->index()+j*MM] * element->value();
6003 template<
typename Type
6006 template<
typename MT >
6013 const StaticMatrix tmp(
serial( *
this ) );
6017 for(
size_t i=0UL; i<M; ++i )
6018 for(
auto element=(~rhs).
begin(i); element!=(~rhs).
end(i); ++element )
6019 v_[i+element->index()*MM] = tmp.v_[i+element->index()*MM] * element->value();
6040 template<
typename Type,
size_t M,
size_t N,
bool SO >
6041 void reset( StaticMatrix<Type,M,N,SO>& m );
6043 template<
typename Type,
size_t M,
size_t N,
bool SO >
6044 void reset( StaticMatrix<Type,M,N,SO>& m,
size_t i );
6046 template<
typename Type,
size_t M,
size_t N,
bool SO >
6047 void clear( StaticMatrix<Type,M,N,SO>& m );
6049 template<
bool RF,
typename Type,
size_t M,
size_t N,
bool SO >
6050 bool isDefault(
const StaticMatrix<Type,M,N,SO>& m );
6052 template<
typename Type,
size_t M,
size_t N,
bool SO >
6053 bool isIntact(
const StaticMatrix<Type,M,N,SO>& m ) noexcept;
6055 template<
typename Type,
size_t M,
size_t N,
bool SO >
6056 void swap( StaticMatrix<Type,M,N,SO>& a, StaticMatrix<Type,M,N,SO>& b ) noexcept;
6068 template<
typename Type
6092 template<
typename Type
6112 template<
typename Type
6155 for(
size_t i=0UL; i<M; ++i )
6156 for(
size_t j=0UL; j<N; ++j )
6157 if( !isDefault<RF>( m(i,j) ) )
return false;
6160 for(
size_t j=0UL; j<N; ++j )
6161 for(
size_t i=0UL; i<M; ++i )
6162 if( !isDefault<RF>( m(i,j) ) )
return false;
6188 template<
typename Type
6194 return m.isIntact();
6207 template<
typename Type
6228 template<
typename T,
size_t M,
size_t N,
bool SO >
6229 struct Size< StaticMatrix<T,M,N,SO>, 0UL >
6233 template<
typename T,
size_t M,
size_t N,
bool SO >
6234 struct Size< StaticMatrix<T,M,N,SO>, 1UL >
6251 template<
typename T,
size_t M,
size_t N,
bool SO >
6252 struct MaxSize< StaticMatrix<T,M,N,SO>, 0UL >
6256 template<
typename T,
size_t M,
size_t N,
bool SO >
6257 struct MaxSize< StaticMatrix<T,M,N,SO>, 1UL >
6274 template<
typename T,
size_t N,
bool SO >
6275 struct IsSquare< StaticMatrix<T,N,N,SO> >
6292 template<
typename T,
size_t M,
size_t N,
bool SO >
6293 struct HasConstDataAccess< StaticMatrix<T,M,N,SO> >
6310 template<
typename T,
size_t M,
size_t N,
bool SO >
6311 struct HasMutableDataAccess< StaticMatrix<T,M,N,SO> >
6328 template<
typename T,
size_t M,
size_t N,
bool SO >
6329 struct IsStatic< StaticMatrix<T,M,N,SO> >
6346 template<
typename T,
size_t M,
size_t N,
bool SO >
6347 struct IsAligned< StaticMatrix<T,M,N,SO> >
6348 :
public BoolConstant< StaticMatrix<T,M,N,SO>::isAligned() >
6364 template<
typename T,
size_t M,
size_t N,
bool SO >
6365 struct IsContiguous< StaticMatrix<T,M,N,SO> >
6382 template<
typename T,
size_t M,
size_t N,
bool SO >
6383 struct IsPadded< StaticMatrix<T,M,N,SO> >
6400 template<
typename T1,
typename T2 >
6401 struct AddTraitEval2< T1, T2
6409 using ET1 = ElementType_t<T1>;
6410 using ET2 = ElementType_t<T2>;
6412 static constexpr
size_t M =
max( Size_v<T1,0UL>, Size_v<T2,0UL> );
6413 static constexpr
size_t N =
max( Size_v<T1,1UL>, Size_v<T2,1UL> );
6415 static constexpr
bool SO1 = StorageOrder_v<T1>;
6416 static constexpr
bool SO2 = StorageOrder_v<T2>;
6418 static constexpr
bool SO = ( IsDenseMatrix_v<T1> && IsDenseMatrix_v<T2>
6419 ? ( IsSymmetric_v<T1> ^ IsSymmetric_v<T2>
6420 ? ( IsSymmetric_v<T1>
6428 using Type = StaticMatrix< AddTrait_t<ET1,ET2>, M, N, SO >;
6444 template<
typename T1,
typename T2 >
6445 struct SubTraitEval2< T1, T2
6453 using ET1 = ElementType_t<T1>;
6454 using ET2 = ElementType_t<T2>;
6456 static constexpr
size_t M =
max( Size_v<T1,0UL>, Size_v<T2,0UL> );
6457 static constexpr
size_t N =
max( Size_v<T1,1UL>, Size_v<T2,1UL> );
6459 static constexpr
bool SO1 = StorageOrder_v<T1>;
6460 static constexpr
bool SO2 = StorageOrder_v<T2>;
6462 static constexpr
bool SO = ( IsDenseMatrix_v<T1> && IsDenseMatrix_v<T2>
6463 ? ( IsSymmetric_v<T1> ^ IsSymmetric_v<T2>
6464 ? ( IsSymmetric_v<T1>
6472 using Type = StaticMatrix< SubTrait_t<ET1,ET2>, M, N, SO >;
6488 template<
typename T1,
typename T2 >
6489 struct SchurTraitEval2< T1, T2
6491 IsDenseMatrix_v<T2> &&
6497 using ET1 = ElementType_t<T1>;
6498 using ET2 = ElementType_t<T2>;
6500 static constexpr
size_t M =
max( Size_v<T1,0UL>, Size_v<T2,0UL> );
6501 static constexpr
size_t N =
max( Size_v<T1,1UL>, Size_v<T2,1UL> );
6503 static constexpr
bool SO1 = StorageOrder_v<T1>;
6504 static constexpr
bool SO2 = StorageOrder_v<T2>;
6506 static constexpr
bool SO = ( IsSymmetric_v<T1> ^ IsSymmetric_v<T2>
6507 ? ( IsSymmetric_v<T1>
6512 using Type = StaticMatrix< MultTrait_t<ET1,ET2>, M, N, SO >;
6528 template<
typename T1,
typename T2 >
6529 struct MultTraitEval2< T1, T2
6535 using ET1 = ElementType_t<T1>;
6537 static constexpr
size_t M = Size_v<T1,0UL>;
6538 static constexpr
size_t N = Size_v<T1,1UL>;
6540 using Type = StaticMatrix< MultTrait_t<ET1,T2>, M, N, StorageOrder_v<T1> >;
6543 template<
typename T1,
typename T2 >
6544 struct MultTraitEval2< T1, T2
6550 using ET2 = ElementType_t<T2>;
6552 static constexpr
size_t M = Size_v<T2,0UL>;
6553 static constexpr
size_t N = Size_v<T2,1UL>;
6555 using Type = StaticMatrix< MultTrait_t<T1,ET2>, M, N, StorageOrder_v<T2> >;
6558 template<
typename T1,
typename T2 >
6559 struct MultTraitEval2< T1, T2
6561 IsRowVector_v<T2> &&
6565 using ET1 = ElementType_t<T1>;
6566 using ET2 = ElementType_t<T2>;
6568 static constexpr
size_t M = Size_v<T1,0UL>;
6569 static constexpr
size_t N = Size_v<T2,0UL>;
6571 using Type = StaticMatrix< MultTrait_t<ET1,ET2>, M, N,
false >;
6574 template<
typename T1,
typename T2 >
6575 struct MultTraitEval2< T1, T2
6583 using ET1 = ElementType_t<T1>;
6584 using ET2 = ElementType_t<T2>;
6586 static constexpr
size_t M = ( Size_v<T1,0UL> !=
DefaultSize_v ? Size_v<T1,0UL> : Size_v<T2,0UL> );
6587 static constexpr
size_t N = ( Size_v<T2,1UL> !=
DefaultSize_v ? Size_v<T2,1UL> : Size_v<T1,1UL> );
6589 static constexpr
bool SO = ( IsSparseMatrix_v<T1> ? StorageOrder_v<T2> : StorageOrder_v<T1> );
6591 using Type = StaticMatrix< MultTrait_t<ET1,ET2>, M, N, SO >;
6607 template<
typename T1,
typename T2 >
6608 struct DivTraitEval2< T1, T2
6614 using ET1 = ElementType_t<T1>;
6616 static constexpr
size_t M = Size_v<T1,0UL>;
6617 static constexpr
size_t N = Size_v<T1,1UL>;
6619 using Type = StaticMatrix< DivTrait_t<ET1,T2>, M, N, StorageOrder_v<T1> >;
6635 template<
typename T,
typename OP >
6636 struct UnaryMapTraitEval2< T, OP
6641 using ET = ElementType_t<T>;
6643 using Type = StaticMatrix< MapTrait_t<ET,OP>, Size_v<T,0UL>, Size_v<T,1UL>, StorageOrder_v<T> >;
6651 template<
typename T1,
typename T2,
typename OP >
6652 struct BinaryMapTraitEval2< T1, T2, OP
6660 using ET1 = ElementType_t<T1>;
6661 using ET2 = ElementType_t<T2>;
6663 static constexpr
size_t M =
max( Size_v<T1,0UL>, Size_v<T2,0UL> );
6664 static constexpr
size_t N =
max( Size_v<T1,1UL>, Size_v<T2,1UL> );
6666 static constexpr
bool SO1 = StorageOrder_v<T1>;
6667 static constexpr
bool SO2 = StorageOrder_v<T2>;
6669 static constexpr
bool SO = ( IsDenseMatrix_v<T1> && IsDenseMatrix_v<T2>
6670 ? ( IsSymmetric_v<T1> ^ IsSymmetric_v<T2>
6671 ? ( IsSymmetric_v<T1>
6679 using Type = StaticMatrix< MapTrait_t<ET1,ET2,OP>, M, N, SO >;
6695 template<
typename T
6697 struct ExpandTraitEval2< T, E
6702 static constexpr
size_t M = ( IsColumnVector_v<T> ? Size_v<T,0UL> : E );
6703 static constexpr
size_t N = ( IsColumnVector_v<T> ? E : Size_v<T,0UL> );
6707 using Type = StaticMatrix< ElementType_t<T>, M, N, TF >;
6723 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
6724 struct HighType< StaticMatrix<T1,M,N,SO>, StaticMatrix<T2,M,N,SO> >
6726 using Type = StaticMatrix< typename HighType<T1,T2>::Type, M, N, SO >;
6742 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
6743 struct LowType< StaticMatrix<T1,M,N,SO>, StaticMatrix<T2,M,N,SO> >
6745 using Type = StaticMatrix< typename LowType<T1,T2>::Type, M, N, SO >;
6761 template<
typename MT,
size_t I,
size_t J,
size_t M,
size_t N >
6762 struct SubmatrixTraitEval2< MT, I, J, M, N
6764 IsDenseMatrix_v<MT> > >
6766 using Type = StaticMatrix< RemoveConst_t< ElementType_t<MT> >, M, N, StorageOrder_v<MT> >;
6782 template<
typename MT,
size_t M >
6783 struct RowsTraitEval2< MT, M
6785 IsDenseMatrix_v<MT> &&
6788 using Type = StaticMatrix< RemoveConst_t< ElementType_t<MT> >, M, Size_v<MT,1UL>,
false >;
6804 template<
typename MT,
size_t N >
6805 struct ColumnsTraitEval2< MT, N
6807 IsDenseMatrix_v<MT> &&
6810 using Type = StaticMatrix< RemoveConst_t< ElementType_t<MT> >, Size_v<MT,0UL>, N,
true >;
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
BoolConstant< false > FalseType
Type/value traits base class.The FalseType class is used as base class for type traits and value trai...
Definition: FalseType.h:61
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.This macro encapsulates the default way o...
Definition: Exception.h:235
Header file for auxiliary alias declarations.
Headerfile for the generic min algorithm.
Header file for the Schur product trait.
Header file for the nextMultiple shim.
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_USER_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERT flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:117
Header file for the AlignmentOf type trait.
static constexpr bool simdEnabled
Compilation flag for SIMD optimization.
Definition: StaticMatrix.h:286
Header file for the UNUSED_PARAMETER function template.
Header file for the subtraction trait.
Header file for basic type definitions.
constexpr StaticMatrix & operator=(const Type &set)
Homogenous assignment to all matrix elements.
Definition: StaticMatrix.h:1248
constexpr bool HasSIMDSub_v
Auxiliary variable template for the HasSIMDSub type trait.The HasSIMDSub_v variable template provides...
Definition: HasSIMDSub.h:188
constexpr bool IsMatrix_v
Auxiliary variable template for the IsMatrix type trait.The IsMatrix_v variable template provides a c...
Definition: IsMatrix.h:139
constexpr Reference operator()(size_t i, size_t j) noexcept
2D-access to the matrix elements.
Definition: StaticMatrix.h:905
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.The ResultType_t alias declaration provides ...
Definition: Aliases.h:390
Header file for the IsSparseMatrix type trait.
Header file for the serial shim.
Header file for the FalseType type/value trait base class.
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:224
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: StaticMatrix.h:2512
Header file for the IsDiagonal type trait.
StaticMatrix()
The default constructor for StaticMatrix.
Definition: StaticMatrix.h:590
constexpr void reset()
Reset to the default initial values.
Definition: StaticMatrix.h:1744
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
Header file for the IsSame and IsStrictlySame type traits.
BLAZE_ALWAYS_INLINE const EnableIf_t< IsIntegral_v< T > &&HasSize_v< T, 1UL >, If_t< IsSigned_v< T >, SIMDint8, SIMDuint8 > > loadu(const T *address) noexcept
Loads a vector of 1-byte integral values.
Definition: Loadu.h:76
MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:372
static constexpr bool isAligned() noexcept
Returns whether the matrix is properly aligned in memory.
Definition: StaticMatrix.h:2276
Header file for the IsColumnMajorMatrix type trait.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:591
Header file for the IsRowVector type trait.
Resize mechanism to obtain a StaticMatrix with different fixed dimensions.
Definition: StaticMatrix.h:275
typename SIMDTrait< T >::Type SIMDTrait_t
Auxiliary alias declaration for the SIMDTrait class template.The SIMDTrait_t alias declaration provid...
Definition: SIMDTrait.h:315
BLAZE_ALWAYS_INLINE SIMDType loadu(size_t i, size_t j) const noexcept
Unaligned load of a SIMD element of the matrix.
Definition: StaticMatrix.h:2370
void ctranspose(Matrix< MT, SO > &matrix)
In-place conjugate transpose of the given matrix.
Definition: Matrix.h:851
BLAZE_ALWAYS_INLINE void store(size_t i, size_t j, const SIMDType &value) noexcept
Store of a SIMD element of the matrix.
Definition: StaticMatrix.h:2406
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:3084
#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
Type ElementType
Type of the matrix elements.
Definition: StaticMatrix.h:247
Access proxy for sparse, matrices.The MatrixAccessProxy provides safe access to the elements of a no...
Definition: MatrixAccessProxy.h:101
BLAZE_ALWAYS_INLINE void cswap(T &a, T &b) noexcept(IsNumeric_v< T >)
Swapping two conjugated values/objects.
Definition: Conjugate.h:195
auto assign(const DenseMatrix< MT, SO2 > &rhs) -> DisableIf_t< VectorizedAssign_v< MT > >
Default implementation of the assignment of a dense matrix.
Definition: StaticMatrix.h:2546
BoolConstant< true > TrueType
Type traits base class.The TrueType class is used as base class for type traits and value traits that...
Definition: TrueType.h:61
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:3085
Header file for memory allocation and deallocation functionality.
const Type & ConstReference
Reference to a constant matrix value.
Definition: StaticMatrix.h:253
Type & Reference
Reference to a non-constant matrix value.
Definition: StaticMatrix.h:252
BLAZE_ALWAYS_INLINE EnableIf_t< IsIntegral_v< T1 > &&HasSize_v< T1, 1UL > > storeu(T1 *address, const SIMDi8< T2 > &value) noexcept
Unaligned store of a vector of 1-byte integral values.
Definition: Storeu.h:75
static constexpr bool smpAssignable
Compilation flag for SMP assignments.
Definition: StaticMatrix.h:292
Header file for the extended initializer_list functionality.
System settings for performance optimizations.
constexpr void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
auto addAssign(const DenseMatrix< MT, SO2 > &rhs) -> DisableIf_t< VectorizedAddAssign_v< MT > >
Default implementation of the addition assignment of a row-major dense matrix.
Definition: StaticMatrix.h:2677
static constexpr size_t Alignment
Alignment of the data elements.
Definition: StaticMatrix.h:536
Header file for the MaxSize type trait.
static constexpr size_t columns() noexcept
Returns the current number of columns of the matrix.
Definition: StaticMatrix.h:1613
constexpr size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:514
constexpr bool rowMajor
Storage order flag for row-major matrices.
Definition: StorageOrder.h:71
constexpr Iterator end(size_t i) noexcept
Returns an iterator just past the last element of row/column i.
Definition: StaticMatrix.h:1174
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:80
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:137
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.The ElementType_t alias declaration provide...
Definition: Aliases.h:170
bool isAliased(const Other *alias) const noexcept
Returns whether the matrix is aliased with the given address alias.
Definition: StaticMatrix.h:2256
Constraint on the data type.
static constexpr size_t NN
Alignment adjustment.
Definition: StaticMatrix.h:234
Header file for the IsMatrix type trait.
Header file for the SparseMatrix base class.
Header file for the IsSquare type trait.
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.The EnableIf_t alias declaration provides a convenient...
Definition: EnableIf.h:138
constexpr bool columnMajor
Storage order flag for column-major matrices.
Definition: StorageOrder.h:99
Headerfile for the generic max algorithm.
Header file for the DisableIf class template.
DenseIterator< Type, align > Iterator
Iterator over non-constant elements.
Definition: StaticMatrix.h:257
Header file for the LowType type trait.
constexpr ConstIterator cend(size_t i) const noexcept
Returns an iterator just past the last element of row/column i.
Definition: StaticMatrix.h:1222
StaticMatrix & transpose()
In-place transpose of the matrix.
Definition: StaticMatrix.h:1824
Header file for the multiplication trait.
Header file for the IsStrictlyUpper type trait.
constexpr ConstIterator cbegin(size_t i) const noexcept
Returns an iterator to the first element of row/column i.
Definition: StaticMatrix.h:1150
constexpr bool IsSIMDCombinable_v
Auxiliary variable template for the IsSIMDCombinable type trait.The IsSIMDCombinable_v variable templ...
Definition: IsSIMDCombinable.h:137
Header file for the IsSymmetric type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
decltype(auto) ctrans(const DenseMatrix< MT, SO > &dm)
Returns the conjugate transpose matrix of dm.
Definition: DMatMapExpr.h:1364
void swap(CompressedMatrix< Type, SO > &a, CompressedMatrix< Type, SO > &b) noexcept
Swapping the contents of two compressed matrices.
Definition: CompressedMatrix.h:5907
AlignedArray< Type, M *NN, Alignment > AlignedStorage
Type of the aligned storage.
Definition: StaticMatrix.h:540
constexpr bool HasSIMDMult_v
Auxiliary variable template for the HasSIMDMult type trait.The HasSIMDMult_v variable template provid...
Definition: HasSIMDMult.h:189
bool canAlias(const Other *alias) const noexcept
Returns whether the matrix can alias with the given address alias.
Definition: StaticMatrix.h:2234
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
Type ElementType
Type of the compressed matrix elements.
Definition: CompressedMatrix.h:3080
Header file for the expand trait.
constexpr bool IsColumnVector_v
Auxiliary variable template for the IsColumnVector type trait.The IsColumnVector_v variable template ...
Definition: IsColumnVector.h:143
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.This macro encapsulates the default way of Bl...
Definition: Exception.h:331
Header file for the HasSIMDAdd type trait.
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.
DenseIterator< const Type, align > ConstIterator
Iterator over constant elements.
Definition: StaticMatrix.h:258
constexpr bool IsColumnMajorMatrix_v
Auxiliary variable template for the IsColumnMajorMatrix type trait.The IsColumnMajorMatrix_v variable...
Definition: IsColumnMajorMatrix.h:146
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: StaticMatrix.h:2437
Header file for the DenseIterator class template.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:3086
decltype(auto) inv(const DenseMatrix< MT, SO > &dm)
Calculation of the inverse of the given dense matrix.
Definition: DMatInvExpr.h:423
constexpr Iterator begin(size_t i) noexcept
Returns an iterator to the first element of row/column i.
Definition: StaticMatrix.h:1102
constexpr bool IsNumeric_v
Auxiliary variable template for the IsNumeric type trait.The IsNumeric_v variable template provides a...
Definition: IsNumeric.h:143
Header file for all SIMD functionality.
Constraint on the data type.
StaticMatrix & ctranspose()
In-place conjugate transpose of the matrix.
Definition: StaticMatrix.h:1901
#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.
Compile time check for square matrices.This type trait tests whether or not the given template parame...
Definition: IsSquare.h:88
Header file for the IsAligned type trait.
constexpr bool IsDenseVector_v
Auxiliary variable template for the IsDenseVector type trait.The IsDenseVector_v variable template pr...
Definition: IsDenseVector.h:139
BLAZE_ALWAYS_INLINE EnableIf_t< IsIntegral_v< T1 > &&HasSize_v< T1, 1UL > > storea(T1 *address, const SIMDi8< T2 > &value) noexcept
Aligned store of a vector of 1-byte integral values.
Definition: Storea.h:78
Reference at(size_t i, size_t j)
Checked access to the matrix elements.
Definition: StaticMatrix.h:954
Header file for the default storage order for all vectors of the Blaze library.
constexpr bool IsRowMajorMatrix_v
Auxiliary variable template for the IsRowMajorMatrix type trait.The IsRowMajorMatrix_v variable templ...
Definition: IsRowMajorMatrix.h:146
StaticMatrix< Type, NewM, NewN, SO > Other
The type of the other StaticMatrix.
Definition: StaticMatrix.h:276
void swap(StaticMatrix &m) noexcept
Swapping the contents of two static matrices.
Definition: StaticMatrix.h:1791
#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
AlignedStorage v_
The statically allocated matrix elements.
Definition: StaticMatrix.h:546
Header file for the exception macros of the math module.
decltype(auto) max(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise maximum of the dense matrices lhs and rhs.
Definition: DMatDMatMapExpr.h:1179
MT::Iterator end(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:438
Header file for the IsDenseMatrix type trait.
const Type & ReturnType
Return type for expression template evaluations.
Definition: StaticMatrix.h:249
Header file for the EnableIf class template.
Header file for the IsStrictlyLower type trait.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:611
Header file for the IsPadded type trait.
auto subAssign(const DenseMatrix< MT, SO2 > &rhs) -> DisableIf_t< VectorizedSubAssign_v< MT > >
Default implementation of the subtraction assignment of a dense matrix.
Definition: StaticMatrix.h:2833
Header file for the IsVectorizable type trait.
Header file for the conjugate shim.
Header file for the IsNumeric type trait.
Header file for the HasConstDataAccess type trait.
IntegralConstant< ptrdiff_t, N > PtrdiffT
Compile time integral constant wrapper for ptrdiff_t.The PtrdiffT class template represents an integr...
Definition: PtrdiffT.h:72
Header file for the RemoveConst type trait.
Header file for the IsSIMDCombinable type trait.
Header file for the PtrdiffT class template.
#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.
constexpr Pointer data() noexcept
Low-level data access to the matrix elements.
Definition: StaticMatrix.h:1013
BLAZE_ALWAYS_INLINE constexpr auto nextMultiple(T1 value, T2 factor) noexcept
Rounds up an integral value to the next multiple of a given factor.
Definition: NextMultiple.h:68
StaticMatrix< NewType, M, N, SO > Other
The type of the other StaticMatrix.
Definition: StaticMatrix.h:266
BLAZE_ALWAYS_INLINE void conjugate(T &a) noexcept(IsNumeric_v< T >)
In-place conjugation of the given value/object.
Definition: Conjugate.h:120
Header file for run time assertion macros.
Header file for the addition trait.
Header file for the division trait.
constexpr bool isIntact() const noexcept
Returns whether the invariants of the static matrix are intact.
Definition: StaticMatrix.h:2195
Header file for the submatrix trait.
Constraint on the data type.
Header file for the IsContiguous type trait.
Header file for the columns trait.
Constraint on the data type.
auto schurAssign(const DenseMatrix< MT, SO2 > &rhs) -> DisableIf_t< VectorizedSchurAssign_v< MT > >
Default implementation of the Schur product assignment of a dense matrix.
Definition: StaticMatrix.h:2989
size_t nonZeros() const
Returns the total number of non-zero elements in the matrix.
Definition: StaticMatrix.h:1690
Header file for the AlignedArray implementation.
SIMD characteristics of data types.The SIMDTrait class template provides the SIMD characteristics of ...
Definition: SIMDTrait.h:295
Header file for the IsStatic type trait.
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: StaticMatrix.h:2475
BLAZE_ALWAYS_INLINE SIMDType load(size_t i, size_t j) const noexcept
Load of a SIMD element of the matrix.
Definition: StaticMatrix.h:2303
#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 isDefault shim.
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b) noexcept
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:281
BLAZE_ALWAYS_INLINE const EnableIf_t< IsIntegral_v< T > &&HasSize_v< T, 1UL >, If_t< IsSigned_v< T >, SIMDint8, SIMDuint8 > > set(T value) noexcept
Sets all values in the vector to the given 1-byte integral value.
Definition: Set.h:75
constexpr size_t size(const Matrix< MT, SO > &matrix) noexcept
Returns the total number of elements of the matrix.
Definition: Matrix.h:530
Constraint on the data type.
Base class for matrices.The Matrix class is a base class for all dense and sparse matrix classes with...
Definition: Forward.h:109
Constraint on the data type.
Constraint on the data type.
Header file for the HasSIMDSub type trait.
constexpr bool IsDenseMatrix_v
Auxiliary variable template for the IsDenseMatrix type trait.The IsDenseMatrix_v variable template pr...
Definition: IsDenseMatrix.h:139
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:808
Header file for the HasMutableDataAccess type trait.
constexpr ptrdiff_t DefaultSize_v
Default size of the Size type trait.
Definition: Size.h:72
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.The BoolConstant class template represents ...
Definition: IntegralConstant.h:101
constexpr size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:498
constexpr bool IsDiagonal_v
Auxiliary variable template for the IsDiagonal type trait.The IsDiagonal_v variable template provides...
Definition: IsDiagonal.h:148
static constexpr size_t rows() noexcept
Returns the current number of rows of the matrix.
Definition: StaticMatrix.h:1597
BLAZE_ALWAYS_INLINE const EnableIf_t< IsIntegral_v< T > &&HasSize_v< T, 1UL >, If_t< IsSigned_v< T >, SIMDint8, SIMDuint8 > > loada(const T *address) noexcept
Loads a vector of 1-byte integral values.
Definition: Loada.h:79
Header file for the IsDenseVector type trait.
Implementation of a generic iterator for dense vectors and matrices.The DenseIterator represents a ge...
Definition: DenseIterator.h:58
SIMDTrait_t< ElementType > SIMDType
SIMD type of the matrix elements.
Definition: StaticMatrix.h:248
Header file for the rows trait.
BLAZE_ALWAYS_INLINE EnableIf_t< IsIntegral_v< T1 > &&HasSize_v< T1, 1UL > > stream(T1 *address, const SIMDi8< T2 > &value) noexcept
Aligned, non-temporal store of a vector of 1-byte integral values.
Definition: Stream.h:74
BLAZE_ALWAYS_INLINE bool checkAlignment(const T *address)
Checks the alignment of the given address.
Definition: AlignmentCheck.h:68
static constexpr size_t spacing() noexcept
Returns the spacing between the beginning of two rows.
Definition: StaticMatrix.h:1632
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:3081
decltype(auto) trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:765
constexpr size_t AlignmentOf_v
Auxiliary variable template for the AlignmentOf type trait.The AlignmentOf_v variable template provid...
Definition: AlignmentOf.h:238
Header file for the IsRowMajorMatrix type trait.
const Type * ConstPointer
Pointer to a constant matrix value.
Definition: StaticMatrix.h:255
EnableIf_t< IsBuiltin_v< T > > deallocate(T *address) noexcept
Deallocation of memory for built-in data types.
Definition: Memory.h:224
Header file for the default transpose flag for all vectors of the Blaze library.
Initializer list type of the Blaze library.
static constexpr bool align
Compilation switch for the choice of alignment.
Definition: StaticMatrix.h:237
Header file for the alignment check function.
constexpr bool HasSIMDAdd_v
Auxiliary variable template for the HasSIMDAdd type trait.The HasSIMDAdd_v variable template provides...
Definition: HasSIMDAdd.h:188
Rebind mechanism to obtain a StaticMatrix with different data/element type.
Definition: StaticMatrix.h:265
Header file for the StorageOrder type trait.
Header file for the IntegralConstant class template.
constexpr Infinity inf
Global Infinity instance.The blaze::inf instance can be used wherever a built-in data type is expecte...
Definition: Infinity.h:1080
Header file for the map trait.
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:263
static constexpr size_t SIMDSIZE
The number of elements packed within a single SIMD vector.
Definition: StaticMatrix.h:231
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:631
static constexpr size_t capacity() noexcept
Returns the maximum capacity of the matrix.
Definition: StaticMatrix.h:1648
Rebind mechanism to obtain a CompressedMatrix with different data/element type.
Definition: CompressedMatrix.h:3093
Type * Pointer
Pointer to a non-constant matrix value.
Definition: StaticMatrix.h:254
Header file for the IsUpper type trait.
typename DisableIf< Condition, T >::Type DisableIf_t
Auxiliary type for the DisableIf class template.The DisableIf_t alias declaration provides a convenie...
Definition: DisableIf.h:138
Header file for the IsColumnVector type trait.
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.In case of an invalid compile time expression, a compilation error is cr...
Definition: StaticAssert.h:112
BLAZE_ALWAYS_INLINE SIMDType loada(size_t i, size_t j) const noexcept
Aligned load of a SIMD element of the matrix.
Definition: StaticMatrix.h:2333
StaticMatrix< Type, M, N, SO > This
Type of this StaticMatrix instance.
Definition: StaticMatrix.h:242
System settings for the inline keywords.
Header file for the Size type trait.
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101
constexpr size_t determineColumns(initializer_list< initializer_list< Type > > list) noexcept
Determines the maximum number of columns specified by the given initializer list. ...
Definition: InitializerList.h:108
Header file for the HighType type trait.
Header file for the TrueType type/value trait base class.
Header file for the clear shim.
void transpose(Matrix< MT, SO > &matrix)
In-place transpose of the given matrix.
Definition: Matrix.h:825