35 #ifndef _BLAZE_MATH_DENSE_STATICMATRIX_H_ 36 #define _BLAZE_MATH_DENSE_STATICMATRIX_H_ 208 template<
typename Type
212 class StaticMatrix :
public DenseMatrix< StaticMatrix<Type,M,N,SO>, SO >
238 template<
typename NewType >
247 template<
size_t NewM
266 enum :
bool { smpAssignable =
false };
276 template<
typename Other >
279 template<
typename Other >
295 inline Reference
operator()(
size_t i,
size_t j ) noexcept;
296 inline ConstReference
operator()(
size_t i,
size_t j )
const noexcept;
297 inline Reference
at(
size_t i,
size_t j );
298 inline ConstReference
at(
size_t i,
size_t j )
const;
299 inline Pointer
data () noexcept;
300 inline ConstPointer
data ()
const noexcept;
301 inline Pointer
data (
size_t i ) noexcept;
302 inline ConstPointer
data (
size_t i )
const noexcept;
303 inline Iterator
begin (
size_t i ) noexcept;
304 inline ConstIterator
begin (
size_t i )
const noexcept;
305 inline ConstIterator
cbegin(
size_t i )
const noexcept;
306 inline Iterator
end (
size_t i ) noexcept;
307 inline ConstIterator
end (
size_t i )
const noexcept;
308 inline ConstIterator
cend (
size_t i )
const noexcept;
315 inline StaticMatrix&
operator=(
const Type&
set );
318 template<
typename Other >
321 inline StaticMatrix&
operator= (
const StaticMatrix& rhs );
328 template<
typename Other >
331 template<
typename Other >
339 inline constexpr
size_t rows()
const noexcept;
340 inline constexpr
size_t columns()
const noexcept;
341 inline constexpr
size_t spacing()
const noexcept;
342 inline constexpr
size_t capacity()
const noexcept;
343 inline size_t capacity(
size_t i )
const noexcept;
345 inline size_t nonZeros(
size_t i )
const;
347 inline void reset(
size_t i );
348 inline void swap( StaticMatrix& m ) noexcept;
358 template<
typename Other >
inline StaticMatrix& scale(
const Other& scalar );
365 static inline void*
operator new ( std::size_t
size );
366 static inline void*
operator new[]( std::size_t
size );
367 static inline void*
operator new ( std::size_t
size,
const std::nothrow_t& );
368 static inline void*
operator new[]( std::size_t
size,
const std::nothrow_t& );
370 static inline void operator delete (
void* ptr );
371 static inline void operator delete[](
void* ptr );
372 static inline void operator delete (
void* ptr,
const std::nothrow_t& );
373 static inline void operator delete[](
void* ptr,
const std::nothrow_t& );
380 template<
typename MT >
382 struct VectorizedAssign {
384 simdEnabled && MT::simdEnabled &&
393 template<
typename MT >
395 struct VectorizedAddAssign {
397 simdEnabled && MT::simdEnabled &&
408 template<
typename MT >
410 struct VectorizedSubAssign {
412 simdEnabled && MT::simdEnabled &&
430 inline bool isIntact()
const noexcept;
437 template<
typename Other >
inline bool canAlias (
const Other* alias )
const noexcept;
438 template<
typename Other >
inline bool isAliased(
const Other* alias )
const noexcept;
451 template<
typename MT,
bool SO2 >
454 template<
typename MT,
bool SO2 >
460 template<
typename MT,
bool SO2 >
463 template<
typename MT,
bool SO2 >
469 template<
typename MT,
bool SO2 >
472 template<
typename MT,
bool SO2 >
538 template<
typename Type
548 for(
size_t i=0UL; i<M*NN; ++i )
562 template<
typename Type
571 for(
size_t i=0UL; i<M; ++i ) {
572 for(
size_t j=0UL; j<N; ++j )
575 for(
size_t j=N; j<NN; ++j )
606 template<
typename Type
621 for(
const auto& rowList : list ) {
622 std::fill( std::copy( rowList.begin(), rowList.end(),
v_+i*NN ),
v_+(i+1UL)*NN, Type() );
657 template<
typename Type
661 template<
typename Other >
667 if( m > M || n > N ) {
671 for(
size_t i=0UL; i<m; ++i ) {
672 for(
size_t j=0UL; j<n; ++j )
673 v_[i*NN+j] = array[i*n+j];
676 for(
size_t j=n; j<NN; ++j )
682 for(
size_t i=m; i<M; ++i ) {
683 for(
size_t j=0UL; j<NN; ++j )
713 template<
typename Type
717 template<
typename Other >
723 for(
size_t i=0UL; i<M; ++i ) {
724 for(
size_t j=0UL; j<N; ++j )
725 v_[i*NN+j] = array[i][j];
727 for(
size_t j=N; j<NN; ++j )
743 template<
typename Type
752 for(
size_t i=0UL; i<M*NN; ++i )
765 template<
typename Type
769 template<
typename Other
776 for(
size_t i=0UL; i<M; ++i ) {
777 for(
size_t j=0UL; j<N; ++j )
780 for(
size_t j=N; j<NN; ++j )
799 template<
typename Type
803 template<
typename MT
816 for(
size_t i=0UL; i<M; ++i ) {
847 template<
typename Type
871 template<
typename Type
896 template<
typename Type
925 template<
typename Type
955 template<
typename Type
979 template<
typename Type
999 template<
typename Type
1020 template<
typename Type
1044 template<
typename Type
1068 template<
typename Type
1092 template<
typename Type
1116 template<
typename Type
1140 template<
typename Type
1164 template<
typename Type
1191 template<
typename Type
1197 for(
size_t i=0UL; i<M; ++i )
1198 for(
size_t j=0UL; j<N; ++j )
1229 template<
typename Type
1242 for(
const auto& rowList : list ) {
1243 std::fill( std::copy( rowList.begin(), rowList.end(),
v_+i*NN ),
v_+(i+1UL)*NN, Type() );
1273 template<
typename Type
1277 template<
typename Other >
1280 for(
size_t i=0UL; i<M; ++i )
1281 for(
size_t j=0UL; j<N; ++j )
1282 v_[i*NN+j] = array[i][j];
1297 template<
typename Type
1303 using blaze::assign;
1305 assign( *
this, ~rhs );
1320 template<
typename Type
1324 template<
typename Other
1329 using blaze::assign;
1331 assign( *
this, ~rhs );
1351 template<
typename Type
1355 template<
typename MT
1359 using blaze::assign;
1365 if( (~rhs).
rows() != M || (~rhs).
columns() != N ) {
1377 assign( *
this, tmp );
1382 assign( *
this, ~rhs );
1402 template<
typename Type
1406 template<
typename MT
1410 using blaze::addAssign;
1412 if( (~rhs).
rows() != M || (~rhs).
columns() != N ) {
1418 addAssign( *
this, tmp );
1421 addAssign( *
this, ~rhs );
1441 template<
typename Type
1445 template<
typename MT
1449 using blaze::subAssign;
1451 if( (~rhs).
rows() != M || (~rhs).
columns() != N ) {
1457 subAssign( *
this, tmp );
1460 subAssign( *
this, ~rhs );
1480 template<
typename Type
1484 template<
typename MT
1488 if( M != N || (~rhs).
rows() != M || (~rhs).
columns() != N ) {
1509 template<
typename Type
1513 template<
typename Other >
1517 using blaze::assign;
1519 assign( *
this, (*
this) * rhs );
1537 template<
typename Type
1541 template<
typename Other >
1545 using blaze::assign;
1549 assign( *
this, (*
this) / rhs );
1571 template<
typename Type
1587 template<
typename Type
1606 template<
typename Type
1622 template<
typename Type
1644 template<
typename Type
1664 template<
typename Type
1670 size_t nonzeros( 0UL );
1672 for(
size_t i=0UL; i<M; ++i )
1673 for(
size_t j=0UL; j<N; ++j )
1693 template<
typename Type
1701 const size_t jend( i*NN + N );
1702 size_t nonzeros( 0UL );
1704 for(
size_t j=i*NN; j<jend; ++j )
1718 template<
typename Type
1726 for(
size_t i=0UL; i<M; ++i )
1727 for(
size_t j=0UL; j<N; ++j )
1744 template<
typename Type
1753 for(
size_t j=0UL; j<N; ++j )
1765 template<
typename Type
1773 for(
size_t i=0UL; i<M; ++i ) {
1774 for(
size_t j=0UL; j<N; ++j ) {
1775 swap(
v_[i*NN+j], m(i,j) );
1798 template<
typename Type
1808 for(
size_t i=1UL; i<M; ++i )
1809 for(
size_t j=0UL; j<i; ++j )
1831 template<
typename Type
1857 template<
typename Type
1875 template<
typename Type
1883 for(
size_t i=0UL; i<M; ++i ) {
1884 for(
size_t j=0UL; j<i; ++j ) {
1909 template<
typename Type
1935 template<
typename Type
1951 template<
typename Type
1955 template<
typename Other >
1958 for(
size_t i=0UL; i<M; ++i )
1959 for(
size_t j=0UL; j<N; ++j )
1960 v_[i*NN+j] *= scalar;
1985 template<
typename Type
1995 return allocate<StaticMatrix>( 1UL );
2010 template<
typename Type
2034 template<
typename Type
2044 return allocate<StaticMatrix>( 1UL );
2059 template<
typename Type
2068 return allocate<StaticMatrix>( size/
sizeof(
StaticMatrix) );
2079 template<
typename Type
2085 deallocate( static_cast<StaticMatrix*>( ptr ) );
2096 template<
typename Type
2102 deallocate( static_cast<StaticMatrix*>( ptr ) );
2113 template<
typename Type
2119 deallocate( static_cast<StaticMatrix*>( ptr ) );
2130 template<
typename Type
2136 deallocate( static_cast<StaticMatrix*>( ptr ) );
2158 template<
typename Type
2165 for(
size_t i=0UL; i<M; ++i ) {
2166 for(
size_t j=N; j<NN; ++j ) {
2167 if(
v_[i*NN+j] != Type() )
2196 template<
typename Type
2200 template<
typename Other >
2203 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
2218 template<
typename Type
2222 template<
typename Other >
2225 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
2239 template<
typename Type
2265 template<
typename Type
2273 return loada( i, j );
2275 return loadu( i, j );
2295 template<
typename Type
2332 template<
typename Type
2368 template<
typename Type
2399 template<
typename Type
2437 template<
typename Type
2474 template<
typename Type
2507 template<
typename Type
2511 template<
typename MT
2518 for(
size_t i=0UL; i<M; ++i ) {
2519 for(
size_t j=0UL; j<N; ++j ) {
2520 v_[i*NN+j] = (~rhs)(i,j);
2538 template<
typename Type
2542 template<
typename MT
2553 const size_t jpos( ( remainder )?( N &
size_t(-SIMDSIZE) ):( N ) );
2554 BLAZE_INTERNAL_ASSERT( !remainder || ( N - ( N % (SIMDSIZE) ) ) == jpos,
"Invalid end calculation" );
2556 for(
size_t i=0UL; i<M; ++i )
2560 for( ; j<jpos; j+=SIMDSIZE ) {
2563 for( ; remainder && j<N; ++j ) {
2564 v_[i*NN+j] = (~rhs)(i,j);
2582 template<
typename Type
2586 template<
typename MT >
2591 for(
size_t i=0UL; i<M; ++i )
2593 v_[i*NN+element->index()] = element->value();
2609 template<
typename Type
2613 template<
typename MT >
2620 for(
size_t j=0UL; j<N; ++j )
2622 v_[element->index()*NN+j] = element->value();
2638 template<
typename Type
2642 template<
typename MT
2649 for(
size_t i=0UL; i<M; ++i )
2653 v_[i*NN+i] += (~rhs)(i,i);
2665 for(
size_t j=jbegin; j<jend; ++j ) {
2666 v_[i*NN+j] += (~rhs)(i,j);
2685 template<
typename Type
2689 template<
typename MT
2701 for(
size_t i=0UL; i<M; ++i )
2711 const size_t jpos( ( remainder )?( jend &
size_t(-SIMDSIZE) ):( jend ) );
2712 BLAZE_INTERNAL_ASSERT( !remainder || ( jend - ( jend % (SIMDSIZE) ) ) == jpos,
"Invalid end calculation" );
2716 for( ; j<jpos; j+=SIMDSIZE ) {
2719 for( ; remainder && j<jend; ++j ) {
2720 v_[i*NN+j] += (~rhs)(i,j);
2738 template<
typename Type
2742 template<
typename MT >
2747 for(
size_t i=0UL; i<M; ++i )
2749 v_[i*NN+element->index()] += element->value();
2765 template<
typename Type
2769 template<
typename MT >
2776 for(
size_t j=0UL; j<N; ++j )
2778 v_[element->index()*NN+j] += element->value();
2794 template<
typename Type
2798 template<
typename MT
2805 for(
size_t i=0UL; i<M; ++i )
2809 v_[i*NN+i] -= (~rhs)(i,i);
2821 for(
size_t j=jbegin; j<jend; ++j ) {
2822 v_[i*NN+j] -= (~rhs)(i,j);
2841 template<
typename Type
2845 template<
typename MT
2857 for(
size_t i=0UL; i<M; ++i )
2867 const size_t jpos( ( remainder )?( jend &
size_t(-SIMDSIZE) ):( jend ) );
2868 BLAZE_INTERNAL_ASSERT( !remainder || ( jend - ( jend % (SIMDSIZE) ) ) == jpos,
"Invalid end calculation" );
2872 for( ; j<jpos; j+=SIMDSIZE ) {
2875 for( ; remainder && j<jend; ++j ) {
2876 v_[i*NN+j] -= (~rhs)(i,j);
2894 template<
typename Type
2898 template<
typename MT >
2903 for(
size_t i=0UL; i<M; ++i )
2905 v_[i*NN+element->index()] -= element->value();
2921 template<
typename Type
2925 template<
typename MT >
2932 for(
size_t j=0UL; j<N; ++j )
2934 v_[element->index()*NN+j] -= element->value();
2959 template<
typename Type
2988 template<
typename NewType >
2997 template<
size_t NewM
3016 enum :
bool { smpAssignable =
false };
3026 template<
typename Other >
explicit inline StaticMatrix(
size_t m,
size_t n,
const Other* array );
3027 template<
typename Other >
explicit inline StaticMatrix(
const Other (&array)[M][N] );
3042 inline Reference
operator()(
size_t i,
size_t j ) noexcept;
3043 inline ConstReference
operator()(
size_t i,
size_t j )
const noexcept;
3044 inline Reference
at(
size_t i,
size_t j );
3045 inline ConstReference
at(
size_t i,
size_t j )
const;
3046 inline Pointer
data () noexcept;
3047 inline ConstPointer
data ()
const noexcept;
3048 inline Pointer
data (
size_t j ) noexcept;
3049 inline ConstPointer
data (
size_t j )
const noexcept;
3050 inline Iterator
begin (
size_t j ) noexcept;
3051 inline ConstIterator
begin (
size_t j )
const noexcept;
3052 inline ConstIterator
cbegin(
size_t j )
const noexcept;
3053 inline Iterator
end (
size_t j ) noexcept;
3054 inline ConstIterator
end (
size_t j )
const noexcept;
3055 inline ConstIterator
cend (
size_t j )
const noexcept;
3062 inline StaticMatrix&
operator=(
const Type&
set );
3065 template<
typename Other >
3066 inline StaticMatrix&
operator=(
const Other (&array)[M][N] );
3068 inline StaticMatrix&
operator= (
const StaticMatrix& rhs );
3075 template<
typename Other >
3076 inline EnableIf_<IsNumeric<Other>, StaticMatrix >& operator*=( Other rhs );
3078 template<
typename Other >
3079 inline EnableIf_<IsNumeric<Other>, StaticMatrix >&
operator/=( Other rhs );
3086 inline constexpr
size_t rows()
const noexcept;
3087 inline constexpr
size_t columns()
const noexcept;
3088 inline constexpr
size_t spacing()
const noexcept;
3089 inline constexpr
size_t capacity()
const noexcept;
3090 inline size_t capacity(
size_t j )
const noexcept;
3092 inline size_t nonZeros(
size_t j )
const;
3093 inline void reset();
3094 inline void reset(
size_t i );
3095 inline void swap( StaticMatrix& m ) noexcept;
3105 template<
typename Other >
inline StaticMatrix& scale(
const Other& scalar );
3112 static inline void*
operator new ( std::size_t
size );
3113 static inline void*
operator new[]( std::size_t
size );
3114 static inline void*
operator new ( std::size_t
size,
const std::nothrow_t& );
3115 static inline void*
operator new[]( std::size_t
size,
const std::nothrow_t& );
3117 static inline void operator delete (
void* ptr );
3118 static inline void operator delete[](
void* ptr );
3119 static inline void operator delete (
void* ptr,
const std::nothrow_t& );
3120 static inline void operator delete[](
void* ptr,
const std::nothrow_t& );
3127 template<
typename MT >
3128 struct VectorizedAssign {
3130 simdEnabled && MT::simdEnabled &&
3138 template<
typename MT >
3139 struct VectorizedAddAssign {
3141 simdEnabled && MT::simdEnabled &&
3151 template<
typename MT >
3152 struct VectorizedSubAssign {
3154 simdEnabled && MT::simdEnabled &&
3171 inline bool isIntact()
const noexcept;
3178 template<
typename Other >
inline bool canAlias (
const Other* alias )
const noexcept;
3179 template<
typename Other >
inline bool isAliased(
const Other* alias )
const noexcept;
3192 template<
typename MT,
bool SO >
3195 template<
typename MT,
bool SO >
3201 template<
typename MT,
bool SO >
3204 template<
typename MT,
bool SO >
3210 template<
typename MT,
bool SO >
3213 template<
typename MT,
bool SO >
3270 template<
typename Type
3279 for(
size_t i=0UL; i<MM*N; ++i )
3295 template<
typename Type
3303 for(
size_t j=0UL; j<N; ++j ) {
3304 for(
size_t i=0UL; i<M; ++i )
3307 for(
size_t i=M; i<MM; ++i )
3308 v_[i+j*MM] = Type();
3340 template<
typename Type
3354 for(
const auto& rowList : list ) {
3356 for(
const auto& element : rowList ) {
3357 v_[i+j*MM] = element;
3361 v_[i+j*MM] = Type();
3369 for( ; i<MM; ++i ) {
3370 for(
size_t j=0UL; j<N; ++j ) {
3371 v_[i+j*MM] = Type();
3409 template<
typename Type
3412 template<
typename Other >
3418 if( m > M || n > N ) {
3422 for(
size_t j=0UL; j<n; ++j ) {
3423 for(
size_t i=0UL; i<m; ++i )
3424 v_[i+j*MM] = array[i+j*m];
3427 for(
size_t i=m; i<MM; ++i )
3428 v_[i+j*MM] = Type();
3433 for(
size_t j=n; j<N; ++j ) {
3434 for(
size_t i=0UL; i<M; ++i )
3435 v_[i+j*MM] = Type();
3466 template<
typename Type
3469 template<
typename Other >
3475 for(
size_t j=0UL; j<N; ++j ) {
3476 for(
size_t i=0UL; i<M; ++i )
3477 v_[i+j*MM] = array[i][j];
3479 for(
size_t i=M; i<MM; ++i )
3480 v_[i+j*MM] = Type();
3497 template<
typename Type
3505 for(
size_t i=0UL; i<MM*N; ++i )
3520 template<
typename Type
3523 template<
typename Other
3530 for(
size_t j=0UL; j<N; ++j ) {
3531 for(
size_t i=0UL; i<M; ++i )
3532 v_[i+j*MM] = m(i,j);
3534 for(
size_t i=M; i<MM; ++i )
3535 v_[i+j*MM] = Type();
3555 template<
typename Type
3558 template<
typename MT
3563 using blaze::assign;
3571 for(
size_t j=0UL; j<N; ++j ) {
3573 v_[i+j*MM] = Type();
3577 assign( *
this, ~m );
3604 template<
typename Type
3629 template<
typename Type
3655 template<
typename Type
3667 return (*
this)(i,j);
3685 template<
typename Type
3697 return (*
this)(i,j);
3715 template<
typename Type
3739 template<
typename Type
3760 template<
typename Type
3782 template<
typename Type
3802 template<
typename Type
3822 template<
typename Type
3842 template<
typename Type
3862 template<
typename Type
3882 template<
typename Type
3902 template<
typename Type
3930 template<
typename Type
3936 for(
size_t j=0UL; j<N; ++j )
3937 for(
size_t i=0UL; i<M; ++i )
3970 template<
typename Type
3982 for(
const auto& rowList : list ) {
3984 for(
const auto& element : rowList ) {
3985 v_[i+j*MM] = element;
3989 v_[i+j*MM] = Type();
4022 template<
typename Type
4025 template<
typename Other >
4029 for(
size_t j=0UL; j<N; ++j )
4030 for(
size_t i=0UL; i<M; ++i )
4031 v_[i+j*MM] = array[i][j];
4048 template<
typename Type
4054 using blaze::assign;
4056 assign( *
this, ~rhs );
4073 template<
typename Type
4076 template<
typename Other
4081 using blaze::assign;
4083 assign( *
this, ~rhs );
4105 template<
typename Type
4108 template<
typename MT
4112 using blaze::assign;
4118 if( (~rhs).
rows() != M || (~rhs).
columns() != N ) {
4130 assign( *
this, tmp );
4135 assign( *
this, ~rhs );
4157 template<
typename Type
4160 template<
typename MT
4164 using blaze::addAssign;
4166 if( (~rhs).
rows() != M || (~rhs).
columns() != N ) {
4172 addAssign( *
this, tmp );
4175 addAssign( *
this, ~rhs );
4197 template<
typename Type
4200 template<
typename MT
4204 using blaze::subAssign;
4206 if( (~rhs).
rows() != M || (~rhs).
columns() != N ) {
4212 subAssign( *
this, tmp );
4215 subAssign( *
this, ~rhs );
4237 template<
typename Type
4240 template<
typename MT
4244 if( M != N || (~rhs).
rows() != M || (~rhs).
columns() != N ) {
4267 template<
typename Type
4270 template<
typename Other >
4274 using blaze::assign;
4276 assign( *
this, (*
this) * rhs );
4296 template<
typename Type
4299 template<
typename Other >
4303 using blaze::assign;
4307 assign( *
this, (*
this) / rhs );
4331 template<
typename Type
4348 template<
typename Type
4368 template<
typename Type
4385 template<
typename Type
4403 template<
typename Type
4424 template<
typename Type
4429 size_t nonzeros( 0UL );
4431 for(
size_t j=0UL; j<N; ++j )
4432 for(
size_t i=0UL; i<M; ++i )
4449 template<
typename Type
4456 const size_t iend( j*MM + M );
4457 size_t nonzeros( 0UL );
4459 for(
size_t i=j*MM; i<iend; ++i )
4475 template<
typename Type
4482 for(
size_t j=0UL; j<N; ++j )
4483 for(
size_t i=0UL; i<M; ++i )
4500 template<
typename Type
4508 for(
size_t i=0UL; i<M; ++i )
4522 template<
typename Type
4529 for(
size_t j=0UL; j<N; ++j ) {
4530 for(
size_t i=0UL; i<M; ++i ) {
4531 swap(
v_[i+j*MM], m(i,j) );
4556 template<
typename Type
4565 for(
size_t j=1UL; j<N; ++j )
4566 for(
size_t i=0UL; i<j; ++i )
4589 template<
typename Type
4614 template<
typename Type
4632 template<
typename Type
4639 for(
size_t j=0UL; j<N; ++j ) {
4640 for(
size_t i=0UL; i<j; ++i ) {
4666 template<
typename Type
4691 template<
typename Type
4707 template<
typename Type
4710 template<
typename Other >
4714 for(
size_t j=0UL; j<N; ++j )
4715 for(
size_t i=0UL; i<M; ++i )
4716 v_[i+j*MM] *= scalar;
4743 template<
typename Type
4752 return allocate<StaticMatrix>( 1UL );
4769 template<
typename Type
4777 return allocate<StaticMatrix>( size/
sizeof(
StaticMatrix) );
4794 template<
typename Type
4803 return allocate<StaticMatrix>( 1UL );
4820 template<
typename Type
4828 return allocate<StaticMatrix>( size/
sizeof(
StaticMatrix) );
4841 template<
typename Type
4846 deallocate( static_cast<StaticMatrix*>( ptr ) );
4859 template<
typename Type
4864 deallocate( static_cast<StaticMatrix*>( ptr ) );
4877 template<
typename Type
4882 deallocate( static_cast<StaticMatrix*>( ptr ) );
4895 template<
typename Type
4900 deallocate( static_cast<StaticMatrix*>( ptr ) );
4924 template<
typename Type
4930 for(
size_t j=0UL; j<N; ++j ) {
4931 for(
size_t i=M; i<MM; ++i ) {
4932 if(
v_[i+j*MM] != Type() )
4963 template<
typename Type
4966 template<
typename Other >
4969 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
4986 template<
typename Type
4989 template<
typename Other >
4992 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
5008 template<
typename Type
5034 template<
typename Type
5041 return loada( i, j );
5043 return loadu( i, j );
5064 template<
typename Type
5101 template<
typename Type
5137 template<
typename Type
5168 template<
typename Type
5206 template<
typename Type
5243 template<
typename Type
5277 template<
typename Type
5280 template<
typename MT
5287 for(
size_t j=0UL; j<N; ++j ) {
5288 for(
size_t i=0UL; i<M; ++i ) {
5289 v_[i+j*MM] = (~rhs)(i,j);
5309 template<
typename Type
5312 template<
typename MT
5323 const size_t ipos( ( remainder )?( M &
size_t(-SIMDSIZE) ):( M ) );
5324 BLAZE_INTERNAL_ASSERT( !remainder || ( M - ( M % (SIMDSIZE) ) ) == ipos,
"Invalid end calculation" );
5326 for(
size_t j=0UL; j<N; ++j )
5330 for( ; i<ipos; i+=SIMDSIZE ) {
5333 for( ; remainder && i<M; ++i ) {
5334 v_[i+j*MM] = (~rhs)(i,j);
5354 template<
typename Type
5357 template<
typename MT >
5362 for(
size_t j=0UL; j<N; ++j )
5364 v_[element->index()+j*MM] = element->value();
5382 template<
typename Type
5385 template<
typename MT >
5392 for(
size_t i=0UL; i<M; ++i )
5394 v_[i+element->index()*MM] = element->value();
5412 template<
typename Type
5415 template<
typename MT
5422 for(
size_t j=0UL; j<N; ++j )
5426 v_[j+j*MM] += (~rhs)(j,j);
5438 for(
size_t i=ibegin; i<iend; ++i ) {
5439 v_[i+j*MM] += (~rhs)(i,j);
5460 template<
typename Type
5463 template<
typename MT
5475 for(
size_t j=0UL; j<N; ++j )
5485 const size_t ipos( ( remainder )?( iend &
size_t(-SIMDSIZE) ):( iend ) );
5486 BLAZE_INTERNAL_ASSERT( !remainder || ( iend - ( iend % (SIMDSIZE) ) ) == ipos,
"Invalid end calculation" );
5490 for( ; i<ipos; i+=SIMDSIZE ) {
5493 for( ; remainder && i<iend; ++i ) {
5494 v_[i+j*MM] += (~rhs)(i,j);
5514 template<
typename Type
5517 template<
typename MT >
5522 for(
size_t j=0UL; j<N; ++j )
5524 v_[element->index()+j*MM] += element->value();
5542 template<
typename Type
5545 template<
typename MT >
5552 for(
size_t i=0UL; i<M; ++i )
5554 v_[i+element->index()*MM] += element->value();
5572 template<
typename Type
5575 template<
typename MT
5582 for(
size_t j=0UL; j<N; ++j )
5586 v_[j+j*MM] -= (~rhs)(j,j);
5598 for(
size_t i=ibegin; i<iend; ++i ) {
5599 v_[i+j*MM] -= (~rhs)(i,j);
5620 template<
typename Type
5623 template<
typename MT
5635 for(
size_t j=0UL; j<N; ++j )
5645 const size_t ipos( ( remainder )?( iend &
size_t(-SIMDSIZE) ):( iend ) );
5646 BLAZE_INTERNAL_ASSERT( !remainder || ( iend - ( iend % (SIMDSIZE) ) ) == ipos,
"Invalid end calculation" );
5650 for( ; i<ipos; i+=SIMDSIZE ) {
5653 for( ; remainder && i<iend; ++i ) {
5654 v_[i+j*MM] -= (~rhs)(i,j);
5674 template<
typename Type
5677 template<
typename MT >
5682 for(
size_t j=0UL; j<N; ++j )
5684 v_[element->index()+j*MM] -= element->value();
5702 template<
typename Type
5705 template<
typename MT >
5712 for(
size_t i=0UL; i<M; ++i )
5714 v_[i+element->index()*MM] -= element->value();
5740 template<
typename Type
5756 template<
typename Type
5772 template<
typename Type
5794 template<
typename Type,
size_t M,
size_t N,
bool SO >
5797 template<
typename Type,
size_t M,
size_t N,
bool SO >
5800 template<
typename Type,
size_t M,
size_t N,
bool SO >
5803 template<
bool RF,
typename Type,
size_t M,
size_t N,
bool SO >
5806 template<
typename Type,
size_t M,
size_t N,
bool SO >
5809 template<
typename Type,
size_t M,
size_t N,
bool SO >
5822 template<
typename Type
5846 template<
typename Type
5866 template<
typename Type
5909 for(
size_t i=0UL; i<M; ++i )
5910 for(
size_t j=0UL; j<N; ++j )
5911 if( !isDefault<RF>( m(i,j) ) )
return false;
5914 for(
size_t j=0UL; j<N; ++j )
5915 for(
size_t i=0UL; i<M; ++i )
5916 if( !isDefault<RF>( m(i,j) ) )
return false;
5942 template<
typename Type
5948 return m.isIntact();
5961 template<
typename Type
5982 template<
typename T,
size_t M,
size_t N,
bool SO >
5983 struct Rows< StaticMatrix<T,M,N,SO> > :
public SizeT<M>
5999 template<
typename T,
size_t M,
size_t N,
bool SO >
6000 struct Columns< StaticMatrix<T,M,N,SO> > :
public SizeT<N>
6016 template<
typename T,
size_t N,
bool SO >
6033 template<
typename T,
size_t M,
size_t N,
bool SO >
6050 template<
typename T,
size_t M,
size_t N,
bool SO >
6067 template<
typename T,
size_t M,
size_t N,
bool SO >
6084 template<
typename T,
size_t M,
size_t N,
bool SO >
6101 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
6102 struct AddTrait< StaticMatrix<T1,M,N,SO>, StaticMatrix<T2,M,N,SO> >
6107 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
6108 struct AddTrait< StaticMatrix<T1,M,N,SO1>, StaticMatrix<T2,M,N,SO2> >
6126 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
6127 struct SubTrait< StaticMatrix<T1,M,N,SO>, StaticMatrix<T2,M,N,SO> >
6132 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
6133 struct SubTrait< StaticMatrix<T1,M,N,SO1>, StaticMatrix<T2,M,N,SO2> >
6151 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
6152 struct MultTrait< StaticMatrix<T1,M,N,SO>, T2, EnableIf_<IsNumeric<T2> > >
6157 template<
typename T1,
typename T2,
size_t M,
size_t N,
bool SO >
6158 struct MultTrait< T1, StaticMatrix<T2,M,N,SO>, EnableIf_<IsNumeric<T1> > >
6163 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
6164 struct MultTrait< StaticMatrix<T1,M,N,SO>, StaticVector<T2,N,false> >
6169 template<
typename T1,
size_t M,
typename T2,
size_t N,
bool SO >
6170 struct MultTrait< StaticVector<T1,M,true>, StaticMatrix<T2,M,N,SO> >
6175 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2,
size_t L >
6176 struct MultTrait< StaticMatrix<T1,M,N,SO>, HybridVector<T2,L,false> >
6181 template<
typename T1,
size_t L,
typename T2,
size_t M,
size_t N,
bool SO >
6182 struct MultTrait< HybridVector<T1,L,true>, StaticMatrix<T2,M,N,SO> >
6187 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
6188 struct MultTrait< StaticMatrix<T1,M,N,SO>, DynamicVector<T2,false> >
6193 template<
typename T1,
typename T2,
size_t M,
size_t N,
bool SO >
6194 struct MultTrait< DynamicVector<T1,true>, StaticMatrix<T2,M,N,SO> >
6199 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2,
bool AF,
bool PF >
6200 struct MultTrait< StaticMatrix<T1,M,N,SO>, CustomVector<T2,AF,PF,false> >
6205 template<
typename T1,
bool AF,
bool PF,
typename T2,
size_t M,
size_t N,
bool SO >
6206 struct MultTrait< CustomVector<T1,AF,PF,true>, StaticMatrix<T2,M,N,SO> >
6211 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
6212 struct MultTrait< StaticMatrix<T1,M,N,SO>, CompressedVector<T2,false> >
6217 template<
typename T1,
typename T2,
size_t M,
size_t N,
bool SO >
6218 struct MultTrait< CompressedVector<T1,true>, StaticMatrix<T2,M,N,SO> >
6223 template<
typename T1,
size_t M,
size_t K,
bool SO1,
typename T2,
size_t N,
bool SO2 >
6224 struct MultTrait< StaticMatrix<T1,M,K,SO1>, StaticMatrix<T2,K,N,SO2> >
6242 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
6243 struct DivTrait< StaticMatrix<T1,M,N,SO>, T2, EnableIf_<IsNumeric<T2> > >
6261 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
6262 struct HighType< StaticMatrix<T1,M,N,SO>, StaticMatrix<T2,M,N,SO> >
6280 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
6281 struct LowType< StaticMatrix<T1,M,N,SO>, StaticMatrix<T2,M,N,SO> >
6299 template<
typename T1,
size_t M,
size_t N,
bool SO >
6318 template<
typename T1,
size_t M,
size_t N,
bool SO >
6319 struct RowTrait< StaticMatrix<T1,M,N,SO> >
6337 template<
typename T1,
size_t M,
size_t N,
bool SO >
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
#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.
Compile time check for numeric types.This type trait tests whether or not the given template paramete...
Definition: IsNumeric.h:79
Availability of a SIMD subtraction for the given data types.Depending on the available instruction se...
Definition: HasSIMDSub.h:163
Header file for mathematical functions.
constexpr size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: StaticMatrix.h:1575
constexpr bool useOptimizedKernels
Configuration switch for optimized kernels.This configuration switch enables/disables all optimized c...
Definition: Optimizations.h:84
Compile time check for low-level access to constant data.This type trait tests whether the given data...
Definition: HasConstDataAccess.h:75
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_USER_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERT flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:117
Header file for the alignment flag values.
Header file for the Rows type trait.
Header file for the UNUSED_PARAMETER function template.
Header file for the subtraction trait.
Header file for basic type definitions.
DenseIterator< const Type, usePadding > ConstIterator
Iterator over constant elements.
Definition: StaticMatrix.h:232
Header file for the row trait.
Base template for the SubmatrixTrait class.
Definition: SubmatrixTrait.h:118
Base template for the ColumnTrait class.
Definition: ColumnTrait.h:117
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:2479
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:261
StaticMatrix()
The default constructor for StaticMatrix.
Definition: StaticMatrix.h:542
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
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.
StaticMatrix< Type, N, M,!SO > TransposeType
Transpose type for expression template evaluations.
Definition: StaticMatrix.h:220
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.
StaticMatrix< Type, M, N,!SO > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: StaticMatrix.h:219
Resize mechanism to obtain a StaticMatrix with different fixed dimensions.
Definition: StaticMatrix.h:249
typename DisableIf< Condition, T >::Type DisableIf_
Auxiliary type for the DisableIf class template.The DisableIf_ alias declaration provides a convenien...
Definition: DisableIf.h:223
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:2337
Compile time check for lower triangular matrices.This type trait tests whether or not the given templ...
Definition: IsLower.h:88
Availability of a SIMD addition for the given data types.Depending on the available instruction set (...
Definition: HasSIMDAdd.h:163
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:2373
#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
Header file for memory allocation and deallocation functionality.
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
Compile time check for data types.This type trait tests whether or not the given types can be combine...
Definition: IsSIMDCombinable.h:120
BLAZE_ALWAYS_INLINE const EnableIf_< And< IsIntegral< T >, HasSize< T, 1UL > >, If_< IsSigned< T >, SIMDint8, SIMDuint8 > > loadu(const T *address) noexcept
Loads a vector of 1-byte integral values.
Definition: Loadu.h:77
Reference operator()(size_t i, size_t j) noexcept
2D-access to the matrix elements.
Definition: StaticMatrix.h:852
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:218
AlignedArray< Type, M *NN > v_
The statically allocated matrix elements.
Definition: StaticMatrix.h:498
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:71
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:119
ConstIterator cend(size_t i) const noexcept
Returns an iterator just past the last element of row/column i.
Definition: StaticMatrix.h:1169
bool isAliased(const Other *alias) const noexcept
Returns whether the matrix is aliased with the given address alias.
Definition: StaticMatrix.h:2223
Constraint on the data type.
Efficient implementation of a fixed-sized vector.The StaticVector class template is the representatio...
Definition: Forward.h:61
const Type * ConstPointer
Pointer to a constant matrix value.
Definition: StaticMatrix.h:229
Header file for the std::initializer_list aliases.
Header file for the SparseMatrix base class.
StaticMatrix< Type, NewM, NewN, SO > Other
The type of the other StaticMatrix.
Definition: StaticMatrix.h:250
Pointer data() noexcept
Low-level data access to the matrix elements.
Definition: StaticMatrix.h:960
Compile time check for low-level access to mutable data.This type trait tests whether the given data ...
Definition: HasMutableDataAccess.h:75
bool isIntact() const noexcept
Returns whether the invariants of the static matrix are intact.
Definition: StaticMatrix.h:2162
Header file for the IsSquare type trait.
Compile time check for the alignment of data types.This type trait tests whether the given data type ...
Definition: IsAligned.h:87
Base template for the RowTrait class.
Definition: RowTrait.h:117
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:227
Header file for the DisableIf class template.
Header file for the LowType type trait.
Base template for the HighType type trait.
Definition: HighType.h:133
StaticMatrix & transpose()
In-place transpose of the matrix.
Definition: StaticMatrix.h:1802
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:5635
Compile time check for row-major matrix types.This type trait tests whether or not the given template...
Definition: IsRowMajorMatrix.h:83
bool canAlias(const Other *alias) const noexcept
Returns whether the matrix can alias with the given address alias.
Definition: StaticMatrix.h:2201
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
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:226
#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:2404
Header file for the DenseIterator class template.
void reset()
Reset to the default initial values.
Definition: StaticMatrix.h:1722
Header file for all SIMD functionality.
Constraint on the data type.
StaticMatrix & ctranspose()
In-place conjugate transpose of the matrix.
Definition: StaticMatrix.h:1879
#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.
Compile time check for diagonal matrices.This type trait tests whether or not the given template para...
Definition: IsDiagonal.h:90
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
constexpr size_t spacing() const noexcept
Returns the spacing between the beginning of two rows.
Definition: StaticMatrix.h:1610
ConstIterator cbegin(size_t i) const noexcept
Returns an iterator to the first element of row/column i.
Definition: StaticMatrix.h:1097
Reference at(size_t i, size_t j)
Checked access to the matrix elements.
Definition: StaticMatrix.h:901
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:217
void swap(StaticMatrix &m) noexcept
Swapping the contents of two static matrices.
Definition: StaticMatrix.h:1769
#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.
constexpr size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: StaticMatrix.h:1591
Compile time check for strictly upper triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyUpper.h:86
Iterator end(size_t i) noexcept
Returns an iterator just past the last element of row/column i.
Definition: StaticMatrix.h:1121
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.
bool isAligned() const noexcept
Returns whether the matrix is properly aligned in memory.
Definition: StaticMatrix.h:2243
Header file for the IsVectorizable type trait.
Header file for the conjugate shim.
Header file for the IsNumeric type trait.
Base template for the LowType type trait.
Definition: LowType.h:133
Header file for the HasConstDataAccess type trait.
Type ElementType
Type of the matrix elements.
Definition: StaticMatrix.h:221
BLAZE_ALWAYS_INLINE EnableIf_< And< IsIntegral< T1 >, HasSize< T1, 1UL > > > stream(T1 *address, const SIMDi8< T2 > &value) noexcept
Aligned, non-temporal store of a vector of 1-byte integral values.
Definition: Stream.h:75
Header file for the IsSIMDCombinable type trait.
StaticMatrix & operator=(const Type &set)
Homogenous assignment to all matrix elements.
Definition: StaticMatrix.h:1195
const This & CompositeType
Data type for composite expression templates.
Definition: StaticMatrix.h:224
#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
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: Functions.h:261
Compile time integral constant wrapper for size_t.The SizeT class template represents an integral wra...
Definition: SizeT.h:72
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.
Base template for the AddTrait class.
Definition: AddTrait.h:143
Compile time check for column-major matrix types.This type trait tests whether or not the given templ...
Definition: IsColumnMajorMatrix.h:83
Base template for the MultTrait class.
Definition: MultTrait.h:143
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:228
Constraint on the data type.
size_t nonZeros() const
Returns the total number of non-zero elements in the matrix.
Definition: StaticMatrix.h:1668
Iterator begin(size_t i) noexcept
Returns an iterator to the first element of row/column i.
Definition: StaticMatrix.h:1049
Header file for the AlignedArray implementation.
SIMD characteristics of data types.The SIMDTrait class template provides the SIMD characteristics of ...
Definition: SIMDTrait.h:296
Efficient implementation of a dynamically sized matrix with static memory.The HybridMatrix class temp...
Definition: Forward.h:58
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:2442
BLAZE_ALWAYS_INLINE SIMDType load(size_t i, size_t j) const noexcept
Load of a SIMD element of the matrix.
Definition: StaticMatrix.h:2270
constexpr size_t capacity() const noexcept
Returns the maximum capacity of the matrix.
Definition: StaticMatrix.h:1626
#define BLAZE_CONSTRAINT_MUST_NOT_BE_REFERENCE_TYPE(T)
Constraint on the data type.In case the given data type T is not a reference type, a compilation error is created.
Definition: Reference.h:79
Header file for the column trait.
Header file for the isDefault shim.
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:94
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.
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
Base template for the DivTrait class.
Definition: DivTrait.h:143
Implementation of a generic iterator for dense vectors and matrices.The DenseIterator represents a ge...
Definition: DenseIterator.h:58
BLAZE_ALWAYS_INLINE EnableIf_< And< IsIntegral< T1 >, HasSize< T1, 1UL > > > storeu(T1 *address, const SIMDi8< T2 > &value) noexcept
Unaligned store of a vector of 1-byte integral values.
Definition: Storeu.h:76
BLAZE_ALWAYS_INLINE void cswap(T &a, T &b) noexcept(IsNumeric< T >::value)
Swapping two conjugated values/objects.
Definition: Conjugate.h:195
BLAZE_ALWAYS_INLINE bool checkAlignment(const T *address)
Checks the alignment of the given address.
Definition: AlignmentCheck.h:68
Compile time check for strictly lower triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyLower.h:86
typename T::ConstIterator ConstIterator_
Alias declaration for nested ConstIterator type definitions.The ConstIterator_ alias declaration prov...
Definition: Aliases.h:103
SIMDTrait_< ElementType > SIMDType
SIMD type of the matrix elements.
Definition: StaticMatrix.h:222
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
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:239
Header file for the IntegralConstant class template.
Compile time evaluation of the number of columns of a matrix.The Columns type trait evaluates the num...
Definition: Columns.h:76
Compile time evaluation of the number of rows of a matrix.The Rows type trait evaluates the number of...
Definition: Rows.h:76
Compile time check for sparse matrix types.This type trait tests whether or not the given template pa...
Definition: IsSparseMatrix.h:78
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:573
Base template for the SubTrait class.
Definition: SubTrait.h:143
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:216
#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:2300
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 HighType type trait.
Header file for the TrueType type/value trait base class.
DenseIterator< Type, usePadding > Iterator
Iterator over non-constant elements.
Definition: StaticMatrix.h:231
StaticMatrix< NewType, M, N, SO > Other
The type of the other StaticMatrix.
Definition: StaticMatrix.h:240
const Type & ReturnType
Return type for expression template evaluations.
Definition: StaticMatrix.h:223
constexpr bool defaultStorageOrder
The default storage order for all matrices of the Blaze library.This value specifies the default stor...
Definition: StorageOrder.h:56