35 #ifndef _BLAZE_MATH_DENSE_STATICMATRIX_H_
36 #define _BLAZE_MATH_DENSE_STATICMATRIX_H_
207 template<
typename Type
211 class StaticMatrix :
public DenseMatrix< StaticMatrix<Type,M,N,SO>, SO >
237 template<
typename ET >
255 enum :
bool { smpAssignable =
false };
263 explicit inline StaticMatrix( initializer_list< initializer_list<Type> > list );
265 template<
typename Other >
266 explicit inline StaticMatrix(
size_t m,
size_t n,
const Other* array );
268 template<
typename Other >
269 explicit inline StaticMatrix(
const Other (&array)[M][N] );
272 template<
typename Other,
bool SO2 >
inline StaticMatrix(
const StaticMatrix<Other,M,N,SO2>& m );
273 template<
typename MT ,
bool SO2 >
inline StaticMatrix(
const Matrix<MT,SO2>& m );
284 inline Reference
operator()(
size_t i,
size_t j ) noexcept;
285 inline ConstReference
operator()(
size_t i,
size_t j )
const noexcept;
286 inline Reference
at(
size_t i,
size_t j );
287 inline ConstReference
at(
size_t i,
size_t j )
const;
288 inline Pointer
data () noexcept;
289 inline ConstPointer
data () const noexcept;
290 inline Pointer
data (
size_t i ) noexcept;
291 inline ConstPointer
data (
size_t i ) const noexcept;
292 inline Iterator
begin (
size_t i ) noexcept;
293 inline ConstIterator
begin (
size_t i ) const noexcept;
294 inline ConstIterator
cbegin(
size_t i ) const noexcept;
295 inline Iterator
end (
size_t i ) noexcept;
296 inline ConstIterator
end (
size_t i ) const noexcept;
297 inline ConstIterator
cend (
size_t i ) const noexcept;
305 inline
StaticMatrix& operator=( initializer_list< initializer_list<Type> > list );
307 template< typename Other >
308 inline
StaticMatrix& operator=( const Other (&array)[M][N] );
312 template< typename MT ,
bool SO2 > inline
StaticMatrix& operator= ( const Matrix<MT,SO2>& rhs );
313 template< typename MT ,
bool SO2 > inline
StaticMatrix& operator+=( const Matrix<MT,SO2>& rhs );
314 template< typename MT ,
bool SO2 > inline
StaticMatrix& operator-=( const Matrix<MT,SO2>& rhs );
315 template< typename MT ,
bool SO2 > inline
StaticMatrix& operator*=( const Matrix<MT,SO2>& rhs );
317 template< typename Other >
320 template< typename Other >
328 inline constexpr
size_t rows() const noexcept;
329 inline constexpr
size_t columns() const noexcept;
330 inline constexpr
size_t spacing() const noexcept;
331 inline constexpr
size_t capacity() const noexcept;
332 inline
size_t capacity(
size_t i ) const noexcept;
334 inline
size_t nonZeros(
size_t i ) const;
336 inline
void reset(
size_t i );
339 template< typename Other > inline
StaticMatrix& scale( const Other& scalar );
347 static inline
void* operator new (
std::
size_t size );
348 static inline
void* operator new[](
std::
size_t size );
349 static inline
void* operator new (
std::
size_t size, const
std::nothrow_t& );
350 static inline
void* operator new[](
std::
size_t size, const
std::nothrow_t& );
352 static inline
void operator delete (
void* ptr );
353 static inline
void operator delete[](
void* ptr );
354 static inline
void operator delete (
void* ptr, const
std::nothrow_t& );
355 static inline
void operator delete[](
void* ptr, const
std::nothrow_t& );
362 template< typename MT >
364 struct VectorizedAssign {
366 simdEnabled && MT::simdEnabled &&
367 AreSIMDCombinable< Type, ElementType_<MT> >::value &&
368 IsRowMajorMatrix<MT>::value };
375 template<
typename MT >
377 struct VectorizedAddAssign {
379 simdEnabled && MT::simdEnabled &&
380 AreSIMDCombinable< Type, ElementType_<MT> >::value &&
381 HasSIMDAdd< Type, ElementType_<MT> >::value &&
382 IsRowMajorMatrix<MT>::value &&
383 !IsDiagonal<MT>::value };
390 template<
typename MT >
392 struct VectorizedSubAssign {
394 simdEnabled && MT::simdEnabled &&
395 AreSIMDCombinable< Type, ElementType_<MT> >::value &&
396 HasSIMDSub< Type, ElementType_<MT> >::value &&
397 IsRowMajorMatrix<MT>::value &&
398 !IsDiagonal<MT>::value };
412 inline bool isIntact() const noexcept;
419 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
420 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
433 template< typename MT,
bool SO2 >
434 inline
DisableIf_<VectorizedAssign<MT> > assign( const DenseMatrix<MT,SO2>& rhs );
436 template< typename MT,
bool SO2 >
437 inline
EnableIf_<VectorizedAssign<MT> > assign( const DenseMatrix<MT,SO2>& rhs );
439 template< typename MT > inline
void assign( const SparseMatrix<MT,SO>& rhs );
440 template< typename MT > inline
void assign( const SparseMatrix<MT,!SO>& rhs );
442 template< typename MT,
bool SO2 >
443 inline
DisableIf_<VectorizedAddAssign<MT> > addAssign( const DenseMatrix<MT,SO2>& rhs );
445 template< typename MT,
bool SO2 >
446 inline
EnableIf_<VectorizedAddAssign<MT> > addAssign( const DenseMatrix<MT,SO2>& rhs );
448 template< typename MT > inline
void addAssign( const SparseMatrix<MT,SO>& rhs );
449 template< typename MT > inline
void addAssign( const SparseMatrix<MT,!SO>& rhs );
451 template< typename MT,
bool SO2 >
452 inline
DisableIf_<VectorizedSubAssign<MT> > subAssign( const DenseMatrix<MT,SO2>& rhs );
454 template< typename MT,
bool SO2 >
455 inline
EnableIf_<VectorizedSubAssign<MT> > subAssign( const DenseMatrix<MT,SO2>& rhs );
457 template< typename MT > inline
void subAssign( const SparseMatrix<MT,SO>& rhs );
458 template< typename MT > inline
void subAssign( const SparseMatrix<MT,!SO>& rhs );
474 enum :
size_t { NN = (
usePadding )?( NextMultiple< SizeT<N>, SizeT<SIMDSIZE> >::value ):( N ) };
520 template<
typename Type
530 for(
size_t i=0UL; i<M*NN; ++i )
544 template<
typename Type
553 for(
size_t i=0UL; i<M; ++i ) {
554 for(
size_t j=0UL; j<N; ++j )
557 for(
size_t j=N; j<NN; ++j )
588 template<
typename Type
603 for(
const auto& rowList : list ) {
604 std::fill( std::copy( rowList.begin(), rowList.end(),
v_+i*NN ),
v_+(i+1UL)*NN, Type() );
639 template<
typename Type
643 template<
typename Other >
649 if( m > M || n > N ) {
653 for(
size_t i=0UL; i<m; ++i ) {
654 for(
size_t j=0UL; j<n; ++j )
655 v_[i*NN+j] = array[i*n+j];
658 for(
size_t j=n; j<NN; ++j )
664 for(
size_t i=m; i<M; ++i ) {
665 for(
size_t j=0UL; j<NN; ++j )
695 template<
typename Type
699 template<
typename Other >
705 for(
size_t i=0UL; i<M; ++i ) {
706 for(
size_t j=0UL; j<N; ++j )
707 v_[i*NN+j] = array[i][j];
709 for(
size_t j=N; j<NN; ++j )
725 template<
typename Type
734 for(
size_t i=0UL; i<M*NN; ++i )
747 template<
typename Type
751 template<
typename Other
758 for(
size_t i=0UL; i<M; ++i ) {
759 for(
size_t j=0UL; j<N; ++j )
762 for(
size_t j=N; j<NN; ++j )
781 template<
typename Type
785 template<
typename MT
798 for(
size_t i=0UL; i<M; ++i ) {
829 template<
typename Type
853 template<
typename Type
878 template<
typename Type
907 template<
typename Type
937 template<
typename Type
961 template<
typename Type
981 template<
typename Type
1002 template<
typename Type
1026 template<
typename Type
1050 template<
typename Type
1074 template<
typename Type
1098 template<
typename Type
1122 template<
typename Type
1146 template<
typename Type
1173 template<
typename Type
1179 for(
size_t i=0UL; i<M; ++i )
1180 for(
size_t j=0UL; j<N; ++j )
1211 template<
typename Type
1224 for(
const auto& rowList : list ) {
1225 std::fill( std::copy( rowList.begin(), rowList.end(), v_+i*NN ), v_+(i+1UL)*NN, Type() );
1255 template<
typename Type
1259 template<
typename Other >
1262 for(
size_t i=0UL; i<M; ++i )
1263 for(
size_t j=0UL; j<N; ++j )
1264 v_[i*NN+j] = array[i][j];
1279 template<
typename Type
1285 using blaze::assign;
1287 assign( *
this, ~rhs );
1302 template<
typename Type
1306 template<
typename Other
1311 using blaze::assign;
1313 assign( *
this, ~rhs );
1333 template<
typename Type
1337 template<
typename MT
1341 using blaze::assign;
1347 if( (~rhs).
rows() != M || (~rhs).
columns() != N ) {
1359 assign( *
this, tmp );
1364 assign( *
this, ~rhs );
1384 template<
typename Type
1388 template<
typename MT
1392 using blaze::addAssign;
1394 if( (~rhs).
rows() != M || (~rhs).
columns() != N ) {
1398 if( (~rhs).canAlias(
this ) ) {
1400 addAssign( *
this, tmp );
1403 addAssign( *
this, ~rhs );
1423 template<
typename Type
1427 template<
typename MT
1431 using blaze::subAssign;
1433 if( (~rhs).
rows() != M || (~rhs).
columns() != N ) {
1437 if( (~rhs).canAlias(
this ) ) {
1439 subAssign( *
this, tmp );
1442 subAssign( *
this, ~rhs );
1462 template<
typename Type
1466 template<
typename MT
1470 if( M != N || (~rhs).
rows() != M || (~rhs).
columns() != N ) {
1475 this->operator=( tmp );
1491 template<
typename Type
1495 template<
typename Other >
1499 using blaze::assign;
1501 assign( *
this, (*
this) * rhs );
1519 template<
typename Type
1523 template<
typename Other >
1527 using blaze::assign;
1531 assign( *
this, (*
this) / rhs );
1553 template<
typename Type
1569 template<
typename Type
1588 template<
typename Type
1604 template<
typename Type
1626 template<
typename Type
1646 template<
typename Type
1652 size_t nonzeros( 0UL );
1654 for(
size_t i=0UL; i<M; ++i )
1655 for(
size_t j=0UL; j<N; ++j )
1675 template<
typename Type
1683 const size_t jend( i*NN + N );
1684 size_t nonzeros( 0UL );
1686 for(
size_t j=i*NN; j<jend; ++j )
1700 template<
typename Type
1708 for(
size_t i=0UL; i<M; ++i )
1709 for(
size_t j=0UL; j<N; ++j )
1710 clear( v_[i*NN+j] );
1726 template<
typename Type
1735 for(
size_t j=0UL; j<N; ++j )
1736 clear( v_[i*NN+j] );
1749 template<
typename Type
1759 for(
size_t i=1UL; i<M; ++i )
1760 for(
size_t j=0UL; j<i; ++j )
1761 swap( v_[i*NN+j], v_[j*NN+i] );
1782 template<
typename Type
1808 template<
typename Type
1826 template<
typename Type
1834 for(
size_t i=0UL; i<M; ++i ) {
1835 for(
size_t j=0UL; j<i; ++j ) {
1836 cswap( v_[i*NN+j], v_[j*NN+i] );
1860 template<
typename Type
1886 template<
typename Type
1902 template<
typename Type
1906 template<
typename Other >
1909 for(
size_t i=0UL; i<M; ++i )
1910 for(
size_t j=0UL; j<N; ++j )
1911 v_[i*NN+j] *= scalar;
1924 template<
typename Type
1932 for(
size_t i=0UL; i<M; ++i ) {
1933 for(
size_t j=0UL; j<N; ++j ) {
1934 swap( v_[i*NN+j], m(i,j) );
1959 template<
typename Type
1969 return allocate<StaticMatrix>( 1UL );
1984 template<
typename Type
2008 template<
typename Type
2018 return allocate<StaticMatrix>( 1UL );
2033 template<
typename Type
2042 return allocate<StaticMatrix>( size/
sizeof(
StaticMatrix) );
2053 template<
typename Type
2059 deallocate( static_cast<StaticMatrix*>( ptr ) );
2070 template<
typename Type
2076 deallocate( static_cast<StaticMatrix*>( ptr ) );
2087 template<
typename Type
2093 deallocate( static_cast<StaticMatrix*>( ptr ) );
2104 template<
typename Type
2110 deallocate( static_cast<StaticMatrix*>( ptr ) );
2132 template<
typename Type
2139 for(
size_t i=0UL; i<M; ++i ) {
2140 for(
size_t j=N; j<NN; ++j ) {
2141 if( v_[i*NN+j] != Type() )
2170 template<
typename Type
2174 template<
typename Other >
2177 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
2192 template<
typename Type
2196 template<
typename Other >
2199 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
2213 template<
typename Type
2239 template<
typename Type
2247 return loada( i, j );
2249 return loadu( i, j );
2269 template<
typename Type
2286 return loada( &v_[i*NN+j] );
2306 template<
typename Type
2321 return loadu( &v_[i*NN+j] );
2342 template<
typename Type
2373 template<
typename Type
2390 storea( &v_[i*NN+j], value );
2411 template<
typename Type
2426 storeu( &v_[i*NN+j], value );
2448 template<
typename Type
2465 stream( &v_[i*NN+j], value );
2481 template<
typename Type
2485 template<
typename MT
2492 for(
size_t i=0UL; i<M; ++i ) {
2493 for(
size_t j=0UL; j<N; ++j ) {
2494 v_[i*NN+j] = (~rhs)(i,j);
2512 template<
typename Type
2516 template<
typename MT
2527 const size_t jpos( ( remainder )?( N &
size_t(-SIMDSIZE) ):( N ) );
2528 BLAZE_INTERNAL_ASSERT( !remainder || ( N - ( N % (SIMDSIZE) ) ) == jpos,
"Invalid end calculation" );
2530 for(
size_t i=0UL; i<M; ++i )
2534 for( ; j<jpos; j+=SIMDSIZE ) {
2535 store( i, j, (~rhs).load(i,j) );
2537 for( ; remainder && j<N; ++j ) {
2538 v_[i*NN+j] = (~rhs)(i,j);
2556 template<
typename Type
2560 template<
typename MT >
2565 for(
size_t i=0UL; i<M; ++i )
2567 v_[i*NN+element->index()] = element->value();
2583 template<
typename Type
2587 template<
typename MT >
2594 for(
size_t j=0UL; j<N; ++j )
2596 v_[element->index()*NN+j] = element->value();
2612 template<
typename Type
2616 template<
typename MT
2623 for(
size_t i=0UL; i<M; ++i )
2627 v_[i*NN+i] += (~rhs)(i,i);
2639 for(
size_t j=jbegin; j<jend; ++j ) {
2640 v_[i*NN+j] += (~rhs)(i,j);
2659 template<
typename Type
2663 template<
typename MT
2675 for(
size_t i=0UL; i<M; ++i )
2685 const size_t jpos( ( remainder )?( jend &
size_t(-SIMDSIZE) ):( jend ) );
2686 BLAZE_INTERNAL_ASSERT( !remainder || ( jend - ( jend % (SIMDSIZE) ) ) == jpos,
"Invalid end calculation" );
2690 for( ; j<jpos; j+=SIMDSIZE ) {
2691 store( i, j, load(i,j) + (~rhs).load(i,j) );
2693 for( ; remainder && j<jend; ++j ) {
2694 v_[i*NN+j] += (~rhs)(i,j);
2712 template<
typename Type
2716 template<
typename MT >
2721 for(
size_t i=0UL; i<M; ++i )
2723 v_[i*NN+element->index()] += element->value();
2739 template<
typename Type
2743 template<
typename MT >
2750 for(
size_t j=0UL; j<N; ++j )
2752 v_[element->index()*NN+j] += element->value();
2768 template<
typename Type
2772 template<
typename MT
2779 for(
size_t i=0UL; i<M; ++i )
2783 v_[i*NN+i] -= (~rhs)(i,i);
2795 for(
size_t j=jbegin; j<jend; ++j ) {
2796 v_[i*NN+j] -= (~rhs)(i,j);
2815 template<
typename Type
2819 template<
typename MT
2831 for(
size_t i=0UL; i<M; ++i )
2841 const size_t jpos( ( remainder )?( jend &
size_t(-SIMDSIZE) ):( jend ) );
2842 BLAZE_INTERNAL_ASSERT( !remainder || ( jend - ( jend % (SIMDSIZE) ) ) == jpos,
"Invalid end calculation" );
2846 for( ; j<jpos; j+=SIMDSIZE ) {
2847 store( i, j, load(i,j) - (~rhs).load(i,j) );
2849 for( ; remainder && j<jend; ++j ) {
2850 v_[i*NN+j] -= (~rhs)(i,j);
2868 template<
typename Type
2872 template<
typename MT >
2877 for(
size_t i=0UL; i<M; ++i )
2879 v_[i*NN+element->index()] -= element->value();
2895 template<
typename Type
2899 template<
typename MT >
2906 for(
size_t j=0UL; j<N; ++j )
2908 v_[element->index()*NN+j] -= element->value();
2933 template<
typename Type
2962 template<
typename ET >
2974 enum :
bool { simdEnabled = IsVectorizable<Type>::value };
2980 enum :
bool { smpAssignable =
false };
2988 explicit inline StaticMatrix( initializer_list< initializer_list<Type> > list );
2990 template<
typename Other >
explicit inline StaticMatrix(
size_t m,
size_t n,
const Other* array );
2991 template<
typename Other >
explicit inline StaticMatrix(
const Other (&array)[M][N] );
2994 template<
typename Other,
bool SO >
inline StaticMatrix(
const StaticMatrix<Other,M,N,SO>& m );
2995 template<
typename MT ,
bool SO >
inline StaticMatrix(
const Matrix<MT,SO>& m );
3006 inline Reference
operator()(
size_t i,
size_t j ) noexcept;
3007 inline ConstReference
operator()(
size_t i,
size_t j )
const noexcept;
3008 inline Reference
at(
size_t i,
size_t j );
3009 inline ConstReference
at(
size_t i,
size_t j )
const;
3010 inline Pointer
data () noexcept;
3011 inline ConstPointer
data () const noexcept;
3012 inline Pointer
data (
size_t j ) noexcept;
3013 inline ConstPointer
data (
size_t j ) const noexcept;
3014 inline Iterator
begin (
size_t j ) noexcept;
3015 inline ConstIterator
begin (
size_t j ) const noexcept;
3016 inline ConstIterator
cbegin(
size_t j ) const noexcept;
3017 inline Iterator
end (
size_t j ) noexcept;
3018 inline ConstIterator
end (
size_t j ) const noexcept;
3019 inline ConstIterator
cend (
size_t j ) const noexcept;
3027 inline
StaticMatrix& operator=( initializer_list< initializer_list<Type> > list );
3029 template< typename Other >
3030 inline
StaticMatrix& operator=( const Other (&array)[M][N] );
3034 template< typename MT ,
bool SO > inline
StaticMatrix& operator= ( const Matrix<MT,SO>& rhs );
3035 template< typename MT ,
bool SO > inline
StaticMatrix& operator+=( const Matrix<MT,SO>& rhs );
3036 template< typename MT ,
bool SO > inline
StaticMatrix& operator-=( const Matrix<MT,SO>& rhs );
3037 template< typename MT ,
bool SO > inline
StaticMatrix& operator*=( const Matrix<MT,SO>& rhs );
3039 template< typename Other >
3042 template< typename Other >
3050 inline constexpr
size_t rows() const noexcept;
3051 inline constexpr
size_t columns() const noexcept;
3052 inline constexpr
size_t spacing() const noexcept;
3053 inline constexpr
size_t capacity() const noexcept;
3054 inline
size_t capacity(
size_t j ) const noexcept;
3056 inline
size_t nonZeros(
size_t j ) const;
3057 inline
void reset();
3058 inline
void reset(
size_t i );
3061 template< typename Other > inline
StaticMatrix& scale( const Other& scalar );
3069 static inline
void* operator new (
std::
size_t size );
3070 static inline
void* operator new[](
std::
size_t size );
3071 static inline
void* operator new (
std::
size_t size, const
std::nothrow_t& );
3072 static inline
void* operator new[](
std::
size_t size, const
std::nothrow_t& );
3074 static inline
void operator delete (
void* ptr );
3075 static inline
void operator delete[](
void* ptr );
3076 static inline
void operator delete (
void* ptr, const
std::nothrow_t& );
3077 static inline
void operator delete[](
void* ptr, const
std::nothrow_t& );
3084 template< typename MT >
3085 struct VectorizedAssign {
3087 simdEnabled && MT::simdEnabled &&
3088 AreSIMDCombinable< Type, ElementType_<MT> >::value &&
3089 IsColumnMajorMatrix<MT>::value };
3095 template<
typename MT >
3096 struct VectorizedAddAssign {
3098 simdEnabled && MT::simdEnabled &&
3099 AreSIMDCombinable< Type, ElementType_<MT> >::value &&
3100 HasSIMDAdd< Type, ElementType_<MT> >::value &&
3101 IsColumnMajorMatrix<MT>::value &&
3102 !IsDiagonal<MT>::value };
3108 template<
typename MT >
3109 struct VectorizedSubAssign {
3111 simdEnabled && MT::simdEnabled &&
3112 AreSIMDCombinable< Type, ElementType_<MT> >::value &&
3113 HasSIMDSub< Type, ElementType_<MT> >::value &&
3114 IsColumnMajorMatrix<MT>::value &&
3115 !IsDiagonal<MT>::value };
3128 inline bool isIntact() const noexcept;
3135 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
3136 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
3149 template< typename MT,
bool SO >
3150 inline
DisableIf_<VectorizedAssign<MT> > assign( const DenseMatrix<MT,SO>& rhs );
3152 template< typename MT,
bool SO >
3153 inline
EnableIf_<VectorizedAssign<MT> > assign( const DenseMatrix<MT,SO>& rhs );
3155 template< typename MT > inline
void assign( const SparseMatrix<MT,true>& rhs );
3156 template< typename MT > inline
void assign( const SparseMatrix<MT,false>& rhs );
3158 template< typename MT,
bool SO >
3159 inline
DisableIf_<VectorizedAddAssign<MT> > addAssign( const DenseMatrix<MT,SO>& rhs );
3161 template< typename MT,
bool SO >
3162 inline
EnableIf_<VectorizedAddAssign<MT> > addAssign( const DenseMatrix<MT,SO>& rhs );
3164 template< typename MT > inline
void addAssign( const SparseMatrix<MT,true>& rhs );
3165 template< typename MT > inline
void addAssign( const SparseMatrix<MT,false>& rhs );
3167 template< typename MT,
bool SO >
3168 inline
DisableIf_<VectorizedSubAssign<MT> > subAssign( const DenseMatrix<MT,SO>& rhs );
3170 template< typename MT,
bool SO >
3171 inline
EnableIf_<VectorizedSubAssign<MT> > subAssign( const DenseMatrix<MT,SO>& rhs );
3173 template< typename MT > inline
void subAssign( const SparseMatrix<MT,true>& rhs );
3174 template< typename MT > inline
void subAssign( const SparseMatrix<MT,false>& rhs );
3188 enum :
size_t { MM = (
usePadding )?( NextMultiple< SizeT<M>, SizeT<SIMDSIZE> >::value ):( M ) };
3194 AlignedArray<Type,MM*N>
v_;
3227 template<
typename Type
3235 if( IsNumeric<Type>::value ) {
3236 for(
size_t i=0UL; i<MM*N; ++i )
3252 template<
typename Type
3260 for(
size_t j=0UL; j<N; ++j ) {
3261 for(
size_t i=0UL; i<M; ++i )
3264 for(
size_t i=M; i<MM; ++i )
3265 v_[i+j*MM] = Type();
3297 template<
typename Type
3311 for(
const auto& rowList : list ) {
3313 for(
const auto& element : rowList ) {
3314 v_[i+j*MM] = element;
3318 v_[i+j*MM] = Type();
3325 if( IsNumeric<Type>::value ) {
3326 for( ; i<MM; ++i ) {
3327 for(
size_t j=0UL; j<N; ++j ) {
3328 v_[i+j*MM] = Type();
3366 template<
typename Type
3369 template<
typename Other >
3375 if( m > M || n > N ) {
3379 for(
size_t j=0UL; j<n; ++j ) {
3380 for(
size_t i=0UL; i<m; ++i )
3381 v_[i+j*MM] = array[i+j*m];
3383 if( IsNumeric<Type>::value ) {
3384 for(
size_t i=m; i<MM; ++i )
3385 v_[i+j*MM] = Type();
3389 if( IsNumeric<Type>::value ) {
3390 for(
size_t j=n; j<N; ++j ) {
3391 for(
size_t i=0UL; i<M; ++i )
3392 v_[i+j*MM] = Type();
3423 template<
typename Type
3426 template<
typename Other >
3432 for(
size_t j=0UL; j<N; ++j ) {
3433 for(
size_t i=0UL; i<M; ++i )
3434 v_[i+j*MM] = array[i][j];
3436 for(
size_t i=M; i<MM; ++i )
3437 v_[i+j*MM] = Type();
3454 template<
typename Type
3462 for(
size_t i=0UL; i<MM*N; ++i )
3477 template<
typename Type
3480 template<
typename Other
3487 for(
size_t j=0UL; j<N; ++j ) {
3488 for(
size_t i=0UL; i<M; ++i )
3489 v_[i+j*MM] = m(i,j);
3491 for(
size_t i=M; i<MM; ++i )
3492 v_[i+j*MM] = Type();
3512 template<
typename Type
3515 template<
typename MT
3520 using blaze::assign;
3528 for(
size_t j=0UL; j<N; ++j ) {
3529 for(
size_t i=( IsSparseMatrix<MT>::value ? 0UL : M ); i<MM; ++i ) {
3530 v_[i+j*MM] = Type();
3534 assign( *
this, ~m );
3561 template<
typename Type
3586 template<
typename Type
3612 template<
typename Type
3624 return (*
this)(i,j);
3642 template<
typename Type
3654 return (*
this)(i,j);
3672 template<
typename Type
3675 inline typename StaticMatrix<Type,M,N,true>::Pointer
3696 template<
typename Type
3699 inline typename StaticMatrix<Type,M,N,true>::ConstPointer
3717 template<
typename Type
3720 inline typename StaticMatrix<Type,M,N,true>::Pointer
3739 template<
typename Type
3742 inline typename StaticMatrix<Type,M,N,true>::ConstPointer
3759 template<
typename Type
3779 template<
typename Type
3799 template<
typename Type
3819 template<
typename Type
3839 template<
typename Type
3859 template<
typename Type
3887 template<
typename Type
3890 inline StaticMatrix<Type,M,N,true>&
3893 for(
size_t j=0UL; j<N; ++j )
3894 for(
size_t i=0UL; i<M; ++i )
3927 template<
typename Type
3930 inline StaticMatrix<Type,M,N,true>&
3939 for(
const auto& rowList : list ) {
3941 for(
const auto& element : rowList ) {
3942 v_[i+j*MM] = element;
3946 v_[i+j*MM] = Type();
3979 template<
typename Type
3982 template<
typename Other >
3983 inline StaticMatrix<Type,M,N,true>&
3986 for(
size_t j=0UL; j<N; ++j )
3987 for(
size_t i=0UL; i<M; ++i )
3988 v_[i+j*MM] = array[i][j];
4005 template<
typename Type
4008 inline StaticMatrix<Type,M,N,true>&
4011 using blaze::assign;
4013 assign( *
this, ~rhs );
4030 template<
typename Type
4033 template<
typename Other
4035 inline StaticMatrix<Type,M,N,true>&
4038 using blaze::assign;
4040 assign( *
this, ~rhs );
4062 template<
typename Type
4065 template<
typename MT
4069 using blaze::assign;
4071 typedef TransExprTrait_<This> TT;
4072 typedef CTransExprTrait_<This> CT;
4073 typedef InvExprTrait_<This> IT;
4075 if( (~rhs).
rows() != M || (~rhs).
columns() != N ) {
4079 if( IsSame<MT,TT>::value && (~rhs).isAliased(
this ) ) {
4080 transpose(
typename IsSquare<This>::Type() );
4082 else if( IsSame<MT,CT>::value && (~rhs).isAliased(
this ) ) {
4083 ctranspose(
typename IsSquare<This>::Type() );
4085 else if( !IsSame<MT,IT>::value && (~rhs).canAlias(
this ) ) {
4086 StaticMatrix tmp( ~rhs );
4087 assign( *
this, tmp );
4090 if( IsSparseMatrix<MT>::value )
4092 assign( *
this, ~rhs );
4114 template<
typename Type
4117 template<
typename MT
4121 using blaze::addAssign;
4123 if( (~rhs).
rows() != M || (~rhs).
columns() != N ) {
4127 if( (~rhs).canAlias(
this ) ) {
4128 const ResultType_<MT> tmp( ~rhs );
4129 addAssign( *
this, tmp );
4132 addAssign( *
this, ~rhs );
4154 template<
typename Type
4157 template<
typename MT
4161 using blaze::subAssign;
4163 if( (~rhs).
rows() != M || (~rhs).
columns() != N ) {
4167 if( (~rhs).canAlias(
this ) ) {
4168 const ResultType_<MT> tmp( ~rhs );
4169 subAssign( *
this, tmp );
4172 subAssign( *
this, ~rhs );
4194 template<
typename Type
4197 template<
typename MT
4201 if( M != N || (~rhs).
rows() != M || (~rhs).
columns() != N ) {
4205 const StaticMatrix tmp( *
this * (~rhs) );
4206 this->operator=( tmp );
4224 template<
typename Type
4227 template<
typename Other >
4228 inline EnableIf_<IsNumeric<Other>, StaticMatrix<Type,M,N,true> >&
4231 using blaze::assign;
4233 assign( *
this, (*
this) * rhs );
4253 template<
typename Type
4256 template<
typename Other >
4257 inline EnableIf_<IsNumeric<Other>, StaticMatrix<Type,M,N,true> >&
4260 using blaze::assign;
4264 assign( *
this, (*
this) / rhs );
4288 template<
typename Type
4305 template<
typename Type
4325 template<
typename Type
4342 template<
typename Type
4360 template<
typename Type
4381 template<
typename Type
4386 size_t nonzeros( 0UL );
4388 for(
size_t j=0UL; j<N; ++j )
4389 for(
size_t i=0UL; i<M; ++i )
4406 template<
typename Type
4413 const size_t iend( j*MM + M );
4414 size_t nonzeros( 0UL );
4416 for(
size_t i=j*MM; i<iend; ++i )
4432 template<
typename Type
4439 for(
size_t j=0UL; j<N; ++j )
4440 for(
size_t i=0UL; i<M; ++i )
4441 clear( v_[i+j*MM] );
4457 template<
typename Type
4465 for(
size_t i=0UL; i<M; ++i )
4466 clear( v_[i+j*MM] );
4481 template<
typename Type
4490 for(
size_t j=1UL; j<N; ++j )
4491 for(
size_t i=0UL; i<j; ++i )
4492 swap( v_[i+j*MM], v_[j+i*MM] );
4514 template<
typename Type
4539 template<
typename Type
4557 template<
typename Type
4564 for(
size_t j=0UL; j<N; ++j ) {
4565 for(
size_t i=0UL; i<j; ++i ) {
4566 cswap( v_[i+j*MM], v_[j+i*MM] );
4591 template<
typename Type
4616 template<
typename Type
4632 template<
typename Type
4635 template<
typename Other >
4636 inline StaticMatrix<Type,M,N,true>&
4637 StaticMatrix<Type,M,N,true>::scale(
const Other& scalar )
4639 for(
size_t j=0UL; j<N; ++j )
4640 for(
size_t i=0UL; i<M; ++i )
4641 v_[i+j*MM] *= scalar;
4656 template<
typename Type
4663 for(
size_t j=0UL; j<N; ++j ) {
4664 for(
size_t i=0UL; i<M; ++i ) {
4665 swap( v_[i+j*MM], m(i,j) );
4692 template<
typename Type
4695 inline void* StaticMatrix<Type,M,N,true>::operator
new( std::size_t
size )
4701 return allocate<StaticMatrix>( 1UL );
4718 template<
typename Type
4721 inline void* StaticMatrix<Type,M,N,true>::operator
new[]( std::size_t
size )
4726 return allocate<StaticMatrix>( size/
sizeof(StaticMatrix) );
4743 template<
typename Type
4746 inline void* StaticMatrix<Type,M,N,true>::operator
new( std::size_t
size,
const std::nothrow_t& )
4752 return allocate<StaticMatrix>( 1UL );
4769 template<
typename Type
4772 inline void* StaticMatrix<Type,M,N,true>::operator
new[]( std::size_t
size,
const std::nothrow_t& )
4777 return allocate<StaticMatrix>( size/
sizeof(StaticMatrix) );
4790 template<
typename Type
4793 inline void StaticMatrix<Type,M,N,true>::operator
delete(
void* ptr )
4795 deallocate( static_cast<StaticMatrix*>( ptr ) );
4808 template<
typename Type
4811 inline void StaticMatrix<Type,M,N,true>::operator
delete[](
void* ptr )
4813 deallocate( static_cast<StaticMatrix*>( ptr ) );
4826 template<
typename Type
4829 inline void StaticMatrix<Type,M,N,true>::operator
delete(
void* ptr,
const std::nothrow_t& )
4831 deallocate( static_cast<StaticMatrix*>( ptr ) );
4844 template<
typename Type
4847 inline void StaticMatrix<Type,M,N,true>::operator
delete[](
void* ptr,
const std::nothrow_t& )
4849 deallocate( static_cast<StaticMatrix*>( ptr ) );
4873 template<
typename Type
4878 if( IsNumeric<Type>::value ) {
4879 for(
size_t j=0UL; j<N; ++j ) {
4880 for(
size_t i=M; i<MM; ++i ) {
4881 if( v_[i+j*MM] != Type() )
4912 template<
typename Type
4915 template<
typename Other >
4918 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
4935 template<
typename Type
4938 template<
typename Other >
4941 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
4957 template<
typename Type
4983 template<
typename Type
4990 return loada( i, j );
4992 return loadu( i, j );
5013 template<
typename Type
5029 return loada( &v_[i+j*MM] );
5050 template<
typename Type
5064 return loadu( &v_[i+j*MM] );
5086 template<
typename Type
5117 template<
typename Type
5133 storea( &v_[i+j*MM], value );
5155 template<
typename Type
5169 storeu( &v_[i+j*MM], value );
5192 template<
typename Type
5208 stream( &v_[i+j*MM], value );
5226 template<
typename Type
5229 template<
typename MT
5231 inline DisableIf_<typename StaticMatrix<Type,M,N,true>::BLAZE_TEMPLATE VectorizedAssign<MT> >
5232 StaticMatrix<Type,M,N,true>::assign(
const DenseMatrix<MT,SO>& rhs )
5236 for(
size_t j=0UL; j<N; ++j ) {
5237 for(
size_t i=0UL; i<M; ++i ) {
5238 v_[i+j*MM] = (~rhs)(i,j);
5258 template<
typename Type
5261 template<
typename MT
5263 inline EnableIf_<typename StaticMatrix<Type,M,N,true>::BLAZE_TEMPLATE VectorizedAssign<MT> >
5264 StaticMatrix<Type,M,N,true>::assign(
const DenseMatrix<MT,SO>& rhs )
5270 const bool remainder( !
usePadding || !IsPadded<MT>::value );
5272 const size_t ipos( ( remainder )?( M &
size_t(-SIMDSIZE) ):( M ) );
5273 BLAZE_INTERNAL_ASSERT( !remainder || ( M - ( M % (SIMDSIZE) ) ) == ipos,
"Invalid end calculation" );
5275 for(
size_t j=0UL; j<N; ++j )
5279 for( ; i<ipos; i+=SIMDSIZE ) {
5280 store( i, j, (~rhs).load(i,j) );
5282 for( ; remainder && i<M; ++i ) {
5283 v_[i+j*MM] = (~rhs)(i,j);
5303 template<
typename Type
5306 template<
typename MT >
5307 inline void StaticMatrix<Type,M,N,true>::assign(
const SparseMatrix<MT,true>& rhs )
5311 for(
size_t j=0UL; j<N; ++j )
5312 for( ConstIterator_<MT> element=(~rhs).
begin(j); element!=(~rhs).
end(j); ++element )
5313 v_[element->index()+j*MM] = element->value();
5331 template<
typename Type
5334 template<
typename MT >
5335 inline void StaticMatrix<Type,M,N,true>::assign(
const SparseMatrix<MT,false>& rhs )
5341 for(
size_t i=0UL; i<M; ++i )
5342 for( ConstIterator_<MT> element=(~rhs).
begin(i); element!=(~rhs).
end(i); ++element )
5343 v_[i+element->index()*MM] = element->value();
5361 template<
typename Type
5364 template<
typename MT
5366 inline DisableIf_<typename StaticMatrix<Type,M,N,true>::BLAZE_TEMPLATE VectorizedAddAssign<MT> >
5367 StaticMatrix<Type,M,N,true>::addAssign(
const DenseMatrix<MT,SO>& rhs )
5371 for(
size_t j=0UL; j<N; ++j )
5373 if( IsDiagonal<MT>::value )
5375 v_[j+j*MM] += (~rhs)(j,j);
5379 const size_t ibegin( ( IsLower<MT>::value )
5380 ?( IsStrictlyLower<MT>::value ? j+1UL : j )
5382 const size_t iend ( ( IsUpper<MT>::value )
5383 ?( IsStrictlyUpper<MT>::value ? j : j+1UL )
5387 for(
size_t i=ibegin; i<iend; ++i ) {
5388 v_[i+j*MM] += (~rhs)(i,j);
5409 template<
typename Type
5412 template<
typename MT
5414 inline EnableIf_<typename StaticMatrix<Type,M,N,true>::BLAZE_TEMPLATE VectorizedAddAssign<MT> >
5415 StaticMatrix<Type,M,N,true>::addAssign(
const DenseMatrix<MT,SO>& rhs )
5422 const bool remainder( !
usePadding || !IsPadded<MT>::value );
5424 for(
size_t j=0UL; j<N; ++j )
5426 const size_t ibegin( ( IsLower<MT>::value )
5427 ?( ( IsStrictlyLower<MT>::value ? j+1UL : j ) &
size_t(-SIMDSIZE) )
5429 const size_t iend ( ( IsUpper<MT>::value )
5430 ?( IsStrictlyUpper<MT>::value ? j : j+1UL )
5434 const size_t ipos( ( remainder )?( iend &
size_t(-SIMDSIZE) ):( iend ) );
5435 BLAZE_INTERNAL_ASSERT( !remainder || ( iend - ( iend % (SIMDSIZE) ) ) == ipos,
"Invalid end calculation" );
5439 for( ; i<ipos; i+=SIMDSIZE ) {
5440 store( i, j, load(i,j) + (~rhs).load(i,j) );
5442 for( ; remainder && i<iend; ++i ) {
5443 v_[i+j*MM] += (~rhs)(i,j);
5463 template<
typename Type
5466 template<
typename MT >
5467 inline void StaticMatrix<Type,M,N,true>::addAssign(
const SparseMatrix<MT,true>& rhs )
5471 for(
size_t j=0UL; j<N; ++j )
5472 for( ConstIterator_<MT> element=(~rhs).
begin(j); element!=(~rhs).
end(j); ++element )
5473 v_[element->index()+j*MM] += element->value();
5491 template<
typename Type
5494 template<
typename MT >
5495 inline void StaticMatrix<Type,M,N,true>::addAssign(
const SparseMatrix<MT,false>& rhs )
5501 for(
size_t i=0UL; i<M; ++i )
5502 for( ConstIterator_<MT> element=(~rhs).
begin(i); element!=(~rhs).
end(i); ++element )
5503 v_[i+element->index()*MM] += element->value();
5521 template<
typename Type
5524 template<
typename MT
5526 inline DisableIf_<typename StaticMatrix<Type,M,N,true>::BLAZE_TEMPLATE VectorizedSubAssign<MT> >
5527 StaticMatrix<Type,M,N,true>::subAssign(
const DenseMatrix<MT,SO>& rhs )
5531 for(
size_t j=0UL; j<N; ++j )
5533 if( IsDiagonal<MT>::value )
5535 v_[j+j*MM] -= (~rhs)(j,j);
5539 const size_t ibegin( ( IsLower<MT>::value )
5540 ?( IsStrictlyLower<MT>::value ? j+1UL : j )
5542 const size_t iend ( ( IsUpper<MT>::value )
5543 ?( IsStrictlyUpper<MT>::value ? j : j+1UL )
5547 for(
size_t i=ibegin; i<iend; ++i ) {
5548 v_[i+j*MM] -= (~rhs)(i,j);
5569 template<
typename Type
5572 template<
typename MT
5574 inline EnableIf_<typename StaticMatrix<Type,M,N,true>::BLAZE_TEMPLATE VectorizedSubAssign<MT> >
5575 StaticMatrix<Type,M,N,true>::subAssign(
const DenseMatrix<MT,SO>& rhs )
5582 const bool remainder( !
usePadding || !IsPadded<MT>::value );
5584 for(
size_t j=0UL; j<N; ++j )
5586 const size_t ibegin( ( IsLower<MT>::value )
5587 ?( ( IsStrictlyLower<MT>::value ? j+1UL : j ) &
size_t(-SIMDSIZE) )
5589 const size_t iend ( ( IsUpper<MT>::value )
5590 ?( IsStrictlyUpper<MT>::value ? j : j+1UL )
5594 const size_t ipos( ( remainder )?( iend &
size_t(-SIMDSIZE) ):( iend ) );
5595 BLAZE_INTERNAL_ASSERT( !remainder || ( iend - ( iend % (SIMDSIZE) ) ) == ipos,
"Invalid end calculation" );
5599 for( ; i<ipos; i+=SIMDSIZE ) {
5600 store( i, j, load(i,j) - (~rhs).load(i,j) );
5602 for( ; remainder && i<iend; ++i ) {
5603 v_[i+j*MM] -= (~rhs)(i,j);
5623 template<
typename Type
5626 template<
typename MT >
5627 inline void StaticMatrix<Type,M,N,true>::subAssign(
const SparseMatrix<MT,true>& rhs )
5631 for(
size_t j=0UL; j<N; ++j )
5632 for( ConstIterator_<MT> element=(~rhs).
begin(j); element!=(~rhs).
end(j); ++element )
5633 v_[element->index()+j*MM] -= element->value();
5651 template<
typename Type
5654 template<
typename MT >
5655 inline void StaticMatrix<Type,M,N,true>::subAssign(
const SparseMatrix<MT,false>& rhs )
5661 for(
size_t i=0UL; i<M; ++i )
5662 for( ConstIterator_<MT> element=(~rhs).
begin(i); element!=(~rhs).
end(i); ++element )
5663 v_[i+element->index()*MM] -= element->value();
5689 template<
typename Type
5692 class StaticMatrix<Type,M,0UL,SO>;
5705 template<
typename Type
5708 class StaticMatrix<Type,0UL,N,SO>;
5721 template<
typename Type
5723 class StaticMatrix<Type,0UL,0UL,SO>;
5743 template<
typename Type,
size_t M,
size_t N,
bool SO >
5744 inline void reset( StaticMatrix<Type,M,N,SO>& m );
5746 template<
typename Type,
size_t M,
size_t N,
bool SO >
5747 inline void reset( StaticMatrix<Type,M,N,SO>& m,
size_t i );
5749 template<
typename Type,
size_t M,
size_t N,
bool SO >
5750 inline void clear( StaticMatrix<Type,M,N,SO>& m );
5752 template<
typename Type,
size_t M,
size_t N,
bool SO >
5753 inline bool isDefault(
const StaticMatrix<Type,M,N,SO>& m );
5755 template<
typename Type,
size_t M,
size_t N,
bool SO >
5756 inline bool isIntact(
const StaticMatrix<Type,M,N,SO>& m ) noexcept;
5758 template<
typename Type,
size_t M,
size_t N,
bool SO >
5759 inline void swap( StaticMatrix<Type,M,N,SO>& a, StaticMatrix<Type,M,N,SO>& b ) noexcept;
5771 template<
typename Type
5795 template<
typename Type
5815 template<
typename Type
5843 template<
typename Type
5850 for(
size_t i=0UL; i<M; ++i )
5851 for(
size_t j=0UL; j<N; ++j )
5852 if( !
isDefault( m(i,j) ) )
return false;
5855 for(
size_t j=0UL; j<N; ++j )
5856 for(
size_t i=0UL; i<M; ++i )
5857 if( !
isDefault( m(i,j) ) )
return false;
5883 template<
typename Type
5889 return m.isIntact();
5902 template<
typename Type
5923 template<
typename T,
size_t M,
size_t N,
bool SO >
5924 struct Rows< StaticMatrix<T,M,N,SO> > :
public SizeT<M>
5940 template<
typename T,
size_t M,
size_t N,
bool SO >
5941 struct Columns< StaticMatrix<T,M,N,SO> > :
public SizeT<N>
5957 template<
typename T,
size_t N,
bool SO >
5958 struct IsSquare< StaticMatrix<T,N,N,SO> > :
public TrueType
5974 template<
typename T,
size_t M,
size_t N,
bool SO >
5975 struct HasConstDataAccess< StaticMatrix<T,M,N,SO> > :
public TrueType
5991 template<
typename T,
size_t M,
size_t N,
bool SO >
5992 struct HasMutableDataAccess< StaticMatrix<T,M,N,SO> > :
public TrueType
6008 template<
typename T,
size_t M,
size_t N,
bool SO >
6009 struct IsAligned< StaticMatrix<T,M,N,SO> > :
public BoolConstant<usePadding>
6025 template<
typename T,
size_t M,
size_t N,
bool SO >
6026 struct IsPadded< StaticMatrix<T,M,N,SO> > :
public BoolConstant<usePadding>
6042 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
6043 struct AddTrait< StaticMatrix<T1,M,N,SO>, StaticMatrix<T2,M,N,SO> >
6045 using Type = StaticMatrix< AddTrait_<T1,T2>, M, N, SO >;
6048 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
6049 struct AddTrait< StaticMatrix<T1,M,N,SO1>, StaticMatrix<T2,M,N,SO2> >
6051 using Type = StaticMatrix< AddTrait_<T1,T2>, M, N,
false >;
6067 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
6068 struct SubTrait< StaticMatrix<T1,M,N,SO>, StaticMatrix<T2,M,N,SO> >
6070 using Type = StaticMatrix< SubTrait_<T1,T2>, M, N, SO >;
6073 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
6074 struct SubTrait< StaticMatrix<T1,M,N,SO1>, StaticMatrix<T2,M,N,SO2> >
6076 using Type = StaticMatrix< SubTrait_<T1,T2>, M, N,
false >;
6092 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
6093 struct MultTrait< StaticMatrix<T1,M,N,SO>, T2,
EnableIf_<IsNumeric<T2> > >
6095 using Type = StaticMatrix< MultTrait_<T1,T2>, M, N, SO >;
6098 template<
typename T1,
typename T2,
size_t M,
size_t N,
bool SO >
6099 struct MultTrait< T1, StaticMatrix<T2,M,N,SO>,
EnableIf_<IsNumeric<T1> > >
6101 using Type = StaticMatrix< MultTrait_<T1,T2>, M, N, SO >;
6104 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
6105 struct MultTrait< StaticMatrix<T1,M,N,SO>, StaticVector<T2,N,false> >
6107 using Type = StaticVector< MultTrait_<T1,T2>, M,
false >;
6110 template<
typename T1,
size_t M,
typename T2,
size_t N,
bool SO >
6111 struct MultTrait< StaticVector<T1,M,true>, StaticMatrix<T2,M,N,SO> >
6113 using Type = StaticVector< MultTrait_<T1,T2>, N,
true >;
6116 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2,
size_t L >
6117 struct MultTrait< StaticMatrix<T1,M,N,SO>, HybridVector<T2,L,false> >
6119 using Type = StaticVector< MultTrait_<T1,T2>, M,
false >;
6122 template<
typename T1,
size_t L,
typename T2,
size_t M,
size_t N,
bool SO >
6123 struct MultTrait< HybridVector<T1,L,true>, StaticMatrix<T2,M,N,SO> >
6125 using Type = StaticVector< MultTrait_<T1,T2>, N,
true >;
6128 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
6129 struct MultTrait< StaticMatrix<T1,M,N,SO>, DynamicVector<T2,false> >
6131 using Type = StaticVector< MultTrait_<T1,T2>, M,
false >;
6134 template<
typename T1,
typename T2,
size_t M,
size_t N,
bool SO >
6135 struct MultTrait< DynamicVector<T1,true>, StaticMatrix<T2,M,N,SO> >
6137 using Type = StaticVector< MultTrait_<T1,T2>, N,
true >;
6140 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2,
bool AF,
bool PF >
6141 struct MultTrait< StaticMatrix<T1,M,N,SO>, CustomVector<T2,AF,PF,false> >
6143 using Type = StaticVector< MultTrait_<T1,T2>, M,
false >;
6146 template<
typename T1,
bool AF,
bool PF,
typename T2,
size_t M,
size_t N,
bool SO >
6147 struct MultTrait< CustomVector<T1,AF,PF,true>, StaticMatrix<T2,M,N,SO> >
6149 using Type = StaticVector< MultTrait_<T1,T2>, N,
true >;
6152 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
6153 struct MultTrait< StaticMatrix<T1,M,N,SO>, CompressedVector<T2,false> >
6155 using Type = StaticVector< MultTrait_<T1,T2>, M,
false >;
6158 template<
typename T1,
typename T2,
size_t M,
size_t N,
bool SO >
6159 struct MultTrait< CompressedVector<T1,true>, StaticMatrix<T2,M,N,SO> >
6161 using Type = StaticVector< MultTrait_<T1,T2>, N,
true >;
6164 template<
typename T1,
size_t M,
size_t K,
bool SO1,
typename T2,
size_t N,
bool SO2 >
6165 struct MultTrait< StaticMatrix<T1,M,K,SO1>, StaticMatrix<T2,K,N,SO2> >
6167 using Type = StaticMatrix< MultTrait_<T1,T2>, M, N, SO1 >;
6183 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
6184 struct DivTrait< StaticMatrix<T1,M,N,SO>, T2,
EnableIf_<IsNumeric<T2> > >
6186 using Type = StaticMatrix< DivTrait_<T1,T2>, M, N, SO >;
6202 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
6203 struct MathTrait< StaticMatrix<T1,M,N,SO>, StaticMatrix<T2,M,N,SO> >
6205 using HighType = StaticMatrix< typename MathTrait<T1,T2>::HighType, M, N, SO >;
6206 using LowType = StaticMatrix< typename MathTrait<T1,T2>::LowType , M, N, SO >;
6222 template<
typename T1,
size_t M,
size_t N,
bool SO >
6223 struct SubmatrixTrait< StaticMatrix<T1,M,N,SO> >
6225 using Type = HybridMatrix<T1,M,N,SO>;
6241 template<
typename T1,
size_t M,
size_t N,
bool SO >
6242 struct RowTrait< StaticMatrix<T1,M,N,SO> >
6244 using Type = StaticVector<T1,N,true>;
6260 template<
typename T1,
size_t M,
size_t N,
bool SO >
6261 struct ColumnTrait< StaticMatrix<T1,M,N,SO> >
6263 using Type = StaticVector<T1,M,false>;
Compile time check for vectorizable types.Depending on the available instruction set (SSE...
Definition: IsVectorizable.h:133
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
constexpr size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: StaticMatrix.h:1557
Header file for auxiliary alias declarations.
Compile time check for numeric types.This type trait tests whether or not the given template paramete...
Definition: IsNumeric.h:79
constexpr bool useOptimizedKernels
Configuration switch for optimized kernels.This configuration switch enables/disables all optimized c...
Definition: Optimizations.h:84
bool isIntact() const noexcept
Returns whether the invariants of the static matrix are intact.
Definition: StaticMatrix.h:2136
Header file for the NextMultiple class template.
#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.
Header file for the Rows type trait.
Header file for the UNUSED_PARAMETER function template.
Header file for the subtraction trait.
size_t nonZeros() const
Returns the total number of non-zero elements in the matrix.
Definition: StaticMatrix.h:1650
Header file for basic type definitions.
DenseIterator< const Type, usePadding > ConstIterator
Iterator over constant elements.
Definition: StaticMatrix.h:231
Header file for the row trait.
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
Header file for the IsSparseMatrix type trait.
Header file for the FalseType type/value trait base class.
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:2453
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:258
StaticMatrix()
The default constructor for StaticMatrix.
Definition: StaticMatrix.h:524
StaticMatrix< ET, M, N, SO > Other
The type of the other StaticMatrix.
Definition: StaticMatrix.h:239
BLAZE_ALWAYS_INLINE T1 & operator/=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Division assignment operator for the division of two SIMD packs.
Definition: BasicTypes.h:1339
Header file for the IsSame and IsStrictlySame type traits.
BLAZE_ALWAYS_INLINE MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:188
StaticMatrix< Type, N, M,!SO > TransposeType
Transpose type for expression template evaluations.
Definition: StaticMatrix.h:219
typename SIMDTrait< T >::Type SIMDTrait_
Auxiliary alias declaration for the SIMDTrait class template.The SIMDTrait_ alias declaration provide...
Definition: SIMDTrait.h:315
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:533
StaticMatrix< Type, M, N,!SO > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: StaticMatrix.h:218
typename DisableIf< Condition, T >::Type DisableIf_
Auxiliary type for the DisableIf class template.The DisableIf_ alias declaration provides a convenien...
Definition: DisableIf.h:223
Compile time check for lower triangular matrices.This type trait tests whether or not the given templ...
Definition: IsLower.h:88
BLAZE_ALWAYS_INLINE void ctranspose(Matrix< MT, SO > &matrix)
In-place conjugate transpose of the given matrix.
Definition: Matrix.h:590
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:2347
#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
Header file for the SizeT class template.
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:138
Compile time check for upper triangular matrices.This type trait tests whether or not the given templ...
Definition: IsUpper.h:88
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
Header file for memory allocation and deallocation functionality.
bool canAlias(const Other *alias) const noexcept
Returns whether the matrix can alias with the given address alias.
Definition: StaticMatrix.h:2175
System settings for performance optimizations.
BLAZE_ALWAYS_INLINE T1 & operator*=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Multiplication assignment operator for the multiplication of two SIMD packs.
Definition: BasicTypes.h:1321
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
Reference operator()(size_t i, size_t j) noexcept
2D-access to the matrix elements.
Definition: StaticMatrix.h:834
typename T::ResultType ResultType_
Alias declaration for nested ResultType type definitions.The ResultType_ alias declaration provides a...
Definition: Aliases.h:323
This ResultType
Result type for expression template evaluations.
Definition: StaticMatrix.h:217
AlignedArray< Type, M *NN > v_
The statically allocated matrix elements.
Definition: StaticMatrix.h:480
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:70
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:109
constexpr size_t spacing() const noexcept
Returns the spacing between the beginning of two rows.
Definition: StaticMatrix.h:1592
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:573
Constraint on the data type.
const Type * ConstPointer
Pointer to a constant matrix value.
Definition: StaticMatrix.h:228
Header file for the std::initializer_list aliases.
Header file for the SparseMatrix base class.
Pointer data() noexcept
Low-level data access to the matrix elements.
Definition: StaticMatrix.h:942
Header file for the IsSquare type trait.
bool isAliased(const Other *alias) const noexcept
Returns whether the matrix is aliased with the given address alias.
Definition: StaticMatrix.h:2197
typename TransExprTrait< T >::Type TransExprTrait_
Auxiliary alias declaration for the TransExprTrait class template.The TransExprTrait_ alias declarati...
Definition: TransExprTrait.h:143
const Type & ConstReference
Reference to a constant matrix value.
Definition: StaticMatrix.h:226
Header file for the DisableIf class template.
StaticMatrix & transpose()
In-place transpose of the matrix.
Definition: StaticMatrix.h:1753
Header file for the multiplication trait.
Header file for the IsStrictlyUpper type trait.
typename CTransExprTrait< T >::Type CTransExprTrait_
Auxiliary alias declaration for the CTransExprTrait class template.The CTransExprTrait_ alias declara...
Definition: CTransExprTrait.h:143
Header file for the clear shim.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
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:5148
Header file for all forward declarations of the math module.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2647
#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
Compile time check for data types with padding.This type trait tests whether the given data type empl...
Definition: IsPadded.h:76
Type & Reference
Reference to a non-constant matrix value.
Definition: StaticMatrix.h:225
#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.
Header file for the Columns type trait.
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:2378
Header file for the DenseIterator class template.
void reset()
Reset to the default initial values.
Definition: StaticMatrix.h:1704
Header file for all SIMD functionality.
Constraint on the data type.
StaticMatrix & ctranspose()
In-place conjugate transpose of the matrix.
Definition: StaticMatrix.h:1830
#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.
BLAZE_ALWAYS_INLINE SIMDType load(size_t i, size_t j) const noexcept
Load of a SIMD element of the matrix.
Definition: StaticMatrix.h:2244
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.
Compile time check for diagonal matrices.This type trait tests whether or not the given template para...
Definition: IsDiagonal.h:90
BLAZE_ALWAYS_INLINE size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:330
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
Reference at(size_t i, size_t j)
Checked access to the matrix elements.
Definition: StaticMatrix.h:883
Header file for the default storage order for all vectors of the Blaze library.
DenseMatrix< This, SO > BaseType
Base type of this StaticMatrix instance.
Definition: StaticMatrix.h:216
void swap(StaticMatrix &m) noexcept
Swapping the contents of two static matrices.
Definition: StaticMatrix.h:1928
#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
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
BLAZE_ALWAYS_INLINE 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:254
Iterator end(size_t i) noexcept
Returns an iterator just past the last element of row/column i.
Definition: StaticMatrix.h:1103
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:2645
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:553
Header file for the IsPadded type trait.
Header file for the IsVectorizable type trait.
Header file for the conjugate shim.
Header file for the IsNumeric type trait.
BLAZE_ALWAYS_INLINE const EnableIf_< And< IsIntegral< T >, HasSize< T, 1UL > >, If_< IsSigned< T >, SIMDint8, SIMDuint8 > > set(T value) noexcept
Sets all values in the vector to the given 1-byte integral value.
Definition: Set.h:76
Header file for the HasConstDataAccess type trait.
Type ElementType
Type of the matrix elements.
Definition: StaticMatrix.h:220
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
bool isAligned() const noexcept
Returns whether the matrix is properly aligned in memory.
Definition: StaticMatrix.h:2217
StaticMatrix & operator=(const Type &set)
Homogenous assignment to all matrix elements.
Definition: StaticMatrix.h:1177
const This & CompositeType
Data type for composite expression templates.
Definition: StaticMatrix.h:223
#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
constexpr size_t capacity() const noexcept
Returns the maximum capacity of the matrix.
Definition: StaticMatrix.h:1608
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:1285
size_t determineColumns(initializer_list< initializer_list< Type > > list) noexcept
Determine the maximum number of columns specified by the given initializer list.
Definition: InitializerList.h:80
Header file for run time assertion macros.
Header file for the addition trait.
Header file for the division trait.
Header file for the InvExprTrait class template.
Header file for the submatrix trait.
Constraint on the data type.
Type * Pointer
Pointer to a non-constant matrix value.
Definition: StaticMatrix.h:227
Constraint on the data type.
Iterator begin(size_t i) noexcept
Returns an iterator to the first element of row/column i.
Definition: StaticMatrix.h:1031
Header file for the AlignedArray implementation.
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:2416
#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
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:2646
Header file for the column trait.
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:258
Header file for the TransExprTrait class template.
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:89
Constraint on the data type.
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.
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.The BoolConstant class template represents ...
Definition: IntegralConstant.h:100
EnableIf_< IsBuiltin< T > > deallocate(T *address) noexcept
Deallocation of memory for built-in data types.
Definition: Memory.h:225
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:223
Implementation of a generic iterator for dense vectors and matrices.The DenseIterator represents a ge...
Definition: DenseIterator.h:58
BLAZE_ALWAYS_INLINE EnableIf_< And< IsIntegral< T1 >, HasSize< T1, 1UL > > > storeu(T1 *address, const SIMDi8< T2 > &value) noexcept
Unaligned store of a vector of 1-byte integral values.
Definition: Storeu.h:76
Header file for the mathematical trait.
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
ConstIterator cbegin(size_t i) const noexcept
Returns an iterator to the first element of row/column i.
Definition: StaticMatrix.h:1079
Compile time check for strictly lower triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyLower.h:86
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:314
typename T::ConstIterator ConstIterator_
Alias declaration for nested ConstIterator type definitions.The ConstIterator_ alias declaration prov...
Definition: Aliases.h:103
SIMDTrait_< ElementType > SIMDType
SIMD type of the matrix elements.
Definition: StaticMatrix.h:221
Header file for the AreSIMDCombinable type trait.
constexpr bool usePadding
Configuration of the padding of dense vectors and matrices.This configuration switch enables/disables...
Definition: Optimizations.h:52
Header file for the IsRowMajorMatrix type trait.
const bool rowMajor
Storage order flag for row-major matrices.
Definition: StorageOrder.h:71
ConstIterator cend(size_t i) const noexcept
Returns an iterator just past the last element of row/column i.
Definition: StaticMatrix.h:1151
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:2311
Initializer list type of the Blaze library.
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:134
Rebind mechanism to obtain a StaticMatrix with different data/element type.
Definition: StaticMatrix.h:238
Header file for the IntegralConstant class template.
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:240
Compile time check for sparse matrix types.This type trait tests whether or not the given template pa...
Definition: IsSparseMatrix.h:78
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:2644
Rebind mechanism to obtain a CompressedMatrix with different data/element type.
Definition: CompressedMatrix.h:2654
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:1303
Header file for the IsUpper type trait.
void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
Header file for the CTransExprTrait class template.
StaticMatrix< Type, M, N, SO > This
Type of this StaticMatrix instance.
Definition: StaticMatrix.h:215
#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
constexpr size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: StaticMatrix.h:1573
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:2274
System settings for the inline keywords.
#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
Header file for the TrueType type/value trait base class.
DenseIterator< Type, usePadding > Iterator
Iterator over non-constant elements.
Definition: StaticMatrix.h:230
BLAZE_ALWAYS_INLINE void transpose(Matrix< MT, SO > &matrix)
In-place transpose of the given matrix.
Definition: Matrix.h:564
const Type & ReturnType
Return type for expression template evaluations.
Definition: StaticMatrix.h:222
constexpr bool defaultStorageOrder
The default storage order for all matrices of the Blaze library.This value specifies the default stor...
Definition: StorageOrder.h:56