35 #ifndef _BLAZE_MATH_DENSE_STATICMATRIX_H_
36 #define _BLAZE_MATH_DENSE_STATICMATRIX_H_
200 template<
typename Type
204 class StaticMatrix :
public DenseMatrix< StaticMatrix<Type,M,N,SO>, SO >
239 template<
typename ET >
257 enum { smpAssignable = 0 };
266 template<
typename Other >
explicit inline StaticMatrix(
size_t m,
size_t n,
const Other* array );
267 template<
typename Other >
explicit inline StaticMatrix(
const Other (&array)[M][N] );
270 template<
typename Other,
bool SO2 >
inline StaticMatrix(
const StaticMatrix<Other,M,N,SO2>& m );
271 template<
typename MT ,
bool SO2 >
inline StaticMatrix(
const Matrix<MT,SO2>& m );
274 inline StaticMatrix(
const Type& v1,
const Type& v2,
const Type& v3 );
275 inline StaticMatrix(
const Type& v1,
const Type& v2,
const Type& v3,
const Type& v4 );
276 inline StaticMatrix(
const Type& v1,
const Type& v2,
const Type& v3,
const Type& v4,
const Type& v5 );
277 inline StaticMatrix(
const Type& v1,
const Type& v2,
const Type& v3,
const Type& v4,
const Type& v5,
279 inline StaticMatrix(
const Type& v1,
const Type& v2,
const Type& v3,
const Type& v4,
const Type& v5,
280 const Type& v6,
const Type& v7 );
281 inline StaticMatrix(
const Type& v1,
const Type& v2,
const Type& v3,
const Type& v4,
const Type& v5,
282 const Type& v6,
const Type& v7,
const Type& v8 );
283 inline StaticMatrix(
const Type& v1,
const Type& v2,
const Type& v3,
const Type& v4,
const Type& v5,
284 const Type& v6,
const Type& v7,
const Type& v8,
const Type& v9 );
285 inline StaticMatrix(
const Type& v1,
const Type& v2,
const Type& v3,
const Type& v4,
const Type& v5,
286 const Type& v6,
const Type& v7,
const Type& v8,
const Type& v9,
const Type& v10 );
297 inline Reference
operator()(
size_t i,
size_t j );
298 inline ConstReference
operator()(
size_t i,
size_t j )
const;
299 inline Reference
at(
size_t i,
size_t j );
300 inline ConstReference
at(
size_t i,
size_t j )
const;
301 inline Pointer
data ();
302 inline ConstPointer
data ()
const;
303 inline Pointer
data (
size_t i );
304 inline ConstPointer
data (
size_t i )
const;
305 inline Iterator
begin (
size_t i );
306 inline ConstIterator
begin (
size_t i )
const;
307 inline ConstIterator
cbegin(
size_t i )
const;
308 inline Iterator
end (
size_t i );
309 inline ConstIterator
end (
size_t i )
const;
310 inline ConstIterator
cend (
size_t i )
const;
317 template<
typename Other >
318 inline StaticMatrix& operator=(
const Other (&array)[M][N] );
322 template<
typename Other,
bool SO2 >
inline StaticMatrix& operator= (
const StaticMatrix<Other,M,N,SO2>& rhs );
323 template<
typename MT ,
bool SO2 >
inline StaticMatrix& operator= (
const Matrix<MT,SO2>& rhs );
324 template<
typename MT ,
bool SO2 >
inline StaticMatrix& operator+=(
const Matrix<MT,SO2>& rhs );
325 template<
typename MT ,
bool SO2 >
inline StaticMatrix& operator-=(
const Matrix<MT,SO2>& rhs );
326 template<
typename MT ,
bool SO2 >
inline StaticMatrix& operator*=(
const Matrix<MT,SO2>& rhs );
328 template<
typename Other >
329 inline typename EnableIf< IsNumeric<Other>,
StaticMatrix >::Type&
330 operator*=( Other rhs );
332 template<
typename Other >
333 inline typename EnableIf< IsNumeric<Other>,
StaticMatrix >::Type&
334 operator/=( Other rhs );
341 inline size_t rows()
const;
345 inline size_t capacity(
size_t i )
const;
347 inline size_t nonZeros(
size_t i )
const;
349 inline void reset(
size_t i );
352 template<
typename Other >
inline StaticMatrix& scale(
const Other& scalar );
360 static inline void*
operator new ( std::size_t
size );
361 static inline void*
operator new[]( std::size_t
size );
362 static inline void*
operator new ( std::size_t
size,
const std::nothrow_t& );
363 static inline void*
operator new[]( std::size_t
size,
const std::nothrow_t& );
365 static inline void operator delete (
void* ptr );
366 static inline void operator delete[](
void* ptr );
367 static inline void operator delete (
void* ptr,
const std::nothrow_t& );
368 static inline void operator delete[](
void* ptr,
const std::nothrow_t& );
375 template<
typename MT >
377 struct VectorizedAssign {
379 vectorizable && MT::vectorizable &&
380 IsSame<Type,typename MT::ElementType>::value &&
381 IsRowMajorMatrix<MT>::value };
388 template<
typename MT >
390 struct VectorizedAddAssign {
392 vectorizable && MT::vectorizable &&
393 IsSame<Type,typename MT::ElementType>::value &&
394 IntrinsicTrait<Type>::addition &&
395 IsRowMajorMatrix<MT>::value &&
396 !IsDiagonal<MT>::value };
403 template<
typename MT >
405 struct VectorizedSubAssign {
407 vectorizable && MT::vectorizable &&
408 IsSame<Type,typename MT::ElementType>::value &&
409 IntrinsicTrait<Type>::subtraction &&
410 IsRowMajorMatrix<MT>::value &&
411 !IsDiagonal<MT>::value };
420 template<
typename Other >
inline bool canAlias (
const Other* alias )
const;
421 template<
typename Other >
inline bool isAliased(
const Other* alias )
const;
434 template<
typename MT,
bool SO2 >
435 inline typename DisableIf< VectorizedAssign<MT> >::Type
436 assign(
const DenseMatrix<MT,SO2>& rhs );
438 template<
typename MT,
bool SO2 >
439 inline typename EnableIf< VectorizedAssign<MT> >::Type
440 assign(
const DenseMatrix<MT,SO2>& rhs );
442 template<
typename MT >
inline void assign(
const SparseMatrix<MT,SO>& rhs );
443 template<
typename MT >
inline void assign(
const SparseMatrix<MT,!SO>& rhs );
445 template<
typename MT,
bool SO2 >
446 inline typename DisableIf< VectorizedAddAssign<MT> >::Type
447 addAssign(
const DenseMatrix<MT,SO2>& rhs );
449 template<
typename MT,
bool SO2 >
450 inline typename EnableIf< VectorizedAddAssign<MT> >::Type
451 addAssign(
const DenseMatrix<MT,SO2>& rhs );
453 template<
typename MT >
inline void addAssign(
const SparseMatrix<MT,SO>& rhs );
454 template<
typename MT >
inline void addAssign(
const SparseMatrix<MT,!SO>& rhs );
456 template<
typename MT,
bool SO2 >
457 inline typename DisableIf< VectorizedSubAssign<MT> >::Type
458 subAssign(
const DenseMatrix<MT,SO2>& rhs );
460 template<
typename MT,
bool SO2 >
461 inline typename EnableIf< VectorizedSubAssign<MT> >::Type
462 subAssign(
const DenseMatrix<MT,SO2>& rhs );
464 template<
typename MT >
inline void subAssign(
const SparseMatrix<MT,SO>& rhs );
465 template<
typename MT >
inline void subAssign(
const SparseMatrix<MT,!SO>& rhs );
522 template<
typename Type
532 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 )
590 template<
typename Type
594 template<
typename Other >
600 if( m > M || n > N ) {
604 for(
size_t i=0UL; i<m; ++i ) {
605 for(
size_t j=0UL; j<n; ++j )
606 v_[i*NN+j] = array[i*n+j];
609 for(
size_t j=n; j<
NN; ++j )
615 for(
size_t i=m; i<M; ++i ) {
616 for(
size_t j=0UL; j<
NN; ++j )
644 template<
typename Type
648 template<
typename Other >
654 for(
size_t i=0UL; i<M; ++i ) {
655 for(
size_t j=0UL; j<N; ++j )
656 v_[i*NN+j] = array[i][j];
658 for(
size_t j=N; j<
NN; ++j )
672 template<
typename Type
681 for(
size_t i=0UL; i<M*
NN; ++i )
692 template<
typename Type
696 template<
typename Other
703 for(
size_t i=0UL; i<M; ++i ) {
704 for(
size_t j=0UL; j<N; ++j )
707 for(
size_t j=N; j<
NN; ++j )
724 template<
typename Type
728 template<
typename MT
741 for(
size_t i=0UL; i<M; ++i ) {
769 template<
typename Type
791 for(
size_t i=0UL; i<M; ++i ) {
792 for(
size_t j=N; j<
NN; ++j )
817 template<
typename Type
841 for(
size_t i=0UL; i<M; ++i ) {
842 for(
size_t j=N; j<
NN; ++j )
870 template<
typename Type
875 const Type& v3,
const Type& v4 )
890 else if( M == 2UL ) {
905 for(
size_t i=0UL; i<M; ++i ) {
906 for(
size_t j=N; j<
NN; ++j )
933 template<
typename Type
938 const Type& v4,
const Type& v5 )
962 for(
size_t i=0UL; i<M; ++i ) {
963 for(
size_t j=N; j<
NN; ++j )
994 template<
typename Type
999 const Type& v4,
const Type& v5,
const Type& v6 )
1016 else if( M == 2UL ) {
1026 else if( M == 3UL ) {
1032 v_[2UL*NN+1UL] = v6;
1045 for(
size_t i=0UL; i<M; ++i ) {
1046 for(
size_t j=N; j<
NN; ++j )
1047 v_[i*NN+j] = Type();
1075 template<
typename Type
1080 const Type& v4,
const Type& v5,
const Type& v6,
1109 for(
size_t i=0UL; i<M; ++i ) {
1110 for(
size_t j=N; j<
NN; ++j )
1111 v_[i*NN+j] = Type();
1142 template<
typename Type
1147 const Type& v4,
const Type& v5,
const Type& v6,
1148 const Type& v7,
const Type& v8 )
1167 else if( M == 2UL ) {
1179 else if( M == 4UL ) {
1185 v_[2UL*NN+1UL] = v6;
1187 v_[3UL*NN+1UL] = v8;
1202 for(
size_t i=0UL; i<M; ++i ) {
1203 for(
size_t j=N; j<
NN; ++j )
1204 v_[i*NN+j] = Type();
1237 template<
typename Type
1242 const Type& v4,
const Type& v5,
const Type& v6,
1243 const Type& v7,
const Type& v8,
const Type& v9 )
1263 else if( M == 3UL ) {
1271 v_[2UL*NN+1UL] = v8;
1272 v_[2UL*NN+2UL] = v9;
1288 for(
size_t i=0UL; i<M; ++i ) {
1289 for(
size_t j=N; j<
NN; ++j )
1290 v_[i*NN+j] = Type();
1324 template<
typename Type
1329 const Type& v4,
const Type& v5,
const Type& v6,
1330 const Type& v7,
const Type& v8,
const Type& v9,
1352 else if( M == 2UL ) {
1366 else if( M == 5UL ) {
1372 v_[2UL*NN+1UL] = v6;
1374 v_[3UL*NN+1UL] = v8;
1376 v_[4UL*NN+1UL] = v10;
1393 for(
size_t i=0UL; i<M; ++i ) {
1394 for(
size_t j=N; j<
NN; ++j )
1395 v_[i*NN+j] = Type();
1419 template<
typename Type
1443 template<
typename Type
1468 template<
typename Type
1481 return (*
this)(i,j);
1497 template<
typename Type
1510 return (*
this)(i,j);
1527 template<
typename Type
1551 template<
typename Type
1571 template<
typename Type
1592 template<
typename Type
1616 template<
typename Type
1640 template<
typename Type
1664 template<
typename Type
1688 template<
typename Type
1712 template<
typename Type
1736 template<
typename Type
1778 template<
typename Type
1782 template<
typename Other >
1785 for(
size_t i=0UL; i<M; ++i )
1786 for(
size_t j=0UL; j<N; ++j )
1787 v_[i*NN+j] = array[i][j];
1800 template<
typename Type
1806 for(
size_t i=0UL; i<M; ++i )
1807 for(
size_t j=0UL; j<N; ++j )
1823 template<
typename Type
1829 using blaze::assign;
1831 assign( *
this, ~rhs );
1843 template<
typename Type
1847 template<
typename Other
1852 using blaze::assign;
1854 assign( *
this, ~rhs );
1871 template<
typename Type
1875 template<
typename MT
1879 using blaze::assign;
1884 if( (~rhs).
rows() != M || (~rhs).
columns() != N ) {
1894 else if( (~rhs).canAlias(
this ) ) {
1896 assign( *
this, tmp );
1901 assign( *
this, ~rhs );
1919 template<
typename Type
1923 template<
typename MT
1927 using blaze::addAssign;
1929 if( (~rhs).
rows() != M || (~rhs).
columns() != N ) {
1933 if( (~rhs).canAlias(
this ) ) {
1935 addAssign( *
this, tmp );
1938 addAssign( *
this, ~rhs );
1956 template<
typename Type
1960 template<
typename MT
1964 using blaze::subAssign;
1966 if( (~rhs).
rows() != M || (~rhs).
columns() != N ) {
1970 if( (~rhs).canAlias(
this ) ) {
1972 subAssign( *
this, tmp );
1975 subAssign( *
this, ~rhs );
1993 template<
typename Type
1997 template<
typename MT
2001 if( M != N || (~rhs).
rows() != M || (~rhs).
columns() != N ) {
2006 return this->operator=( tmp );
2018 template<
typename Type
2022 template<
typename Other >
2026 using blaze::assign;
2028 assign( *
this, (*
this) * rhs );
2043 template<
typename Type
2047 template<
typename Other >
2051 using blaze::assign;
2055 assign( *
this, (*
this) / rhs );
2074 template<
typename Type
2090 template<
typename Type
2109 template<
typename Type
2125 template<
typename Type
2147 template<
typename Type
2167 template<
typename Type
2173 size_t nonzeros( 0UL );
2175 for(
size_t i=0UL; i<M; ++i )
2176 for(
size_t j=0UL; j<N; ++j )
2196 template<
typename Type
2204 const size_t jend( i*NN + N );
2205 size_t nonzeros( 0UL );
2207 for(
size_t j=i*NN; j<jend; ++j )
2221 template<
typename Type
2229 for(
size_t i=0UL; i<M; ++i )
2230 for(
size_t j=0UL; j<N; ++j )
2231 clear( v_[i*NN+j] );
2247 template<
typename Type
2256 for(
size_t j=0UL; j<N; ++j )
2257 clear( v_[i*NN+j] );
2270 template<
typename Type
2280 for(
size_t i=1UL; i<M; ++i )
2281 for(
size_t j=0UL; j<i; ++j )
2282 swap( v_[i*NN+j], v_[j*NN+i] );
2303 template<
typename Type
2329 template<
typename Type
2347 template<
typename Type
2355 for(
size_t i=0UL; i<M; ++i ) {
2356 for(
size_t j=0UL; j<i; ++j ) {
2357 cswap( v_[i*NN+j], v_[j*NN+i] );
2381 template<
typename Type
2407 template<
typename Type
2423 template<
typename Type
2427 template<
typename Other >
2430 for(
size_t i=0UL; i<M; ++i )
2431 for(
size_t j=0UL; j<N; ++j )
2432 v_[i*NN+j] *= scalar;
2446 template<
typename Type
2454 for(
size_t i=0UL; i<M; ++i ) {
2455 for(
size_t j=0UL; j<N; ++j ) {
2456 swap( v_[i*NN+j], m(i,j) );
2481 template<
typename Type
2491 return allocate<StaticMatrix>( 1UL );
2506 template<
typename Type
2530 template<
typename Type
2540 return allocate<StaticMatrix>( 1UL );
2555 template<
typename Type
2564 return allocate<StaticMatrix>( size/
sizeof(
StaticMatrix) );
2575 template<
typename Type
2581 deallocate( static_cast<StaticMatrix*>( ptr ) );
2592 template<
typename Type
2598 deallocate( static_cast<StaticMatrix*>( ptr ) );
2609 template<
typename Type
2615 deallocate( static_cast<StaticMatrix*>( ptr ) );
2626 template<
typename Type
2632 deallocate( static_cast<StaticMatrix*>( ptr ) );
2655 template<
typename Type
2659 template<
typename Other >
2662 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
2677 template<
typename Type
2681 template<
typename Other >
2684 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
2698 template<
typename Type
2724 template<
typename Type
2732 return loada( i, j );
2734 return loadu( i, j );
2754 template<
typename Type
2771 return loada( &v_[i*NN+j] );
2791 template<
typename Type
2806 return loadu( &v_[i*NN+j] );
2827 template<
typename Type
2858 template<
typename Type
2875 storea( &v_[i*NN+j], value );
2896 template<
typename Type
2911 storeu( &v_[i*NN+j], value );
2932 template<
typename Type
2949 stream( &v_[i*NN+j], value );
2965 template<
typename Type
2969 template<
typename MT
2976 for(
size_t i=0UL; i<M; ++i ) {
2977 for(
size_t j=0UL; j<N; ++j ) {
2978 v_[i*NN+j] = (~rhs)(i,j);
2996 template<
typename Type
3000 template<
typename MT
3011 const size_t jpos( ( remainder )?( N &
size_t(-
IT::size) ):( N ) );
3014 for(
size_t i=0UL; i<M; ++i )
3019 store( i, j, (~rhs).load(i,j) );
3021 for( ; remainder && j<N; ++j ) {
3022 v_[i*NN+j] = (~rhs)(i,j);
3040 template<
typename Type
3044 template<
typename MT >
3051 for(
size_t i=0UL; i<M; ++i )
3052 for( RhsConstIterator element=(~rhs).
begin(i); element!=(~rhs).
end(i); ++element )
3053 v_[i*NN+element->index()] = element->value();
3069 template<
typename Type
3073 template<
typename MT >
3082 for(
size_t j=0UL; j<N; ++j )
3083 for( RhsConstIterator element=(~rhs).
begin(j); element!=(~rhs).
end(j); ++element )
3084 v_[element->index()*NN+j] = element->value();
3100 template<
typename Type
3104 template<
typename MT
3111 for(
size_t i=0UL; i<M; ++i )
3115 v_[i*NN+i] += (~rhs)(i,i);
3127 for(
size_t j=jbegin; j<jend; ++j ) {
3128 v_[i*NN+j] += (~rhs)(i,j);
3147 template<
typename Type
3151 template<
typename MT
3163 for(
size_t i=0UL; i<M; ++i )
3173 const size_t jpos( ( remainder )?( jend &
size_t(-
IT::size) ):( jend ) );
3179 store( i, j, load(i,j) + (~rhs).load(i,j) );
3181 for( ; remainder && j<jend; ++j ) {
3182 v_[i*NN+j] += (~rhs)(i,j);
3200 template<
typename Type
3204 template<
typename MT >
3211 for(
size_t i=0UL; i<M; ++i )
3212 for( RhsConstIterator element=(~rhs).
begin(i); element!=(~rhs).
end(i); ++element )
3213 v_[i*NN+element->index()] += element->value();
3229 template<
typename Type
3233 template<
typename MT >
3242 for(
size_t j=0UL; j<N; ++j )
3243 for( RhsConstIterator element=(~rhs).
begin(j); element!=(~rhs).
end(j); ++element )
3244 v_[element->index()*NN+j] += element->value();
3260 template<
typename Type
3264 template<
typename MT
3271 for(
size_t i=0UL; i<M; ++i )
3275 v_[i*NN+i] -= (~rhs)(i,i);
3287 for(
size_t j=jbegin; j<jend; ++j ) {
3288 v_[i*NN+j] -= (~rhs)(i,j);
3307 template<
typename Type
3311 template<
typename MT
3323 for(
size_t i=0UL; i<M; ++i )
3333 const size_t jpos( ( remainder )?( jend &
size_t(-
IT::size) ):( jend ) );
3339 store( i, j, load(i,j) - (~rhs).load(i,j) );
3341 for( ; remainder && j<jend; ++j ) {
3342 v_[i*NN+j] -= (~rhs)(i,j);
3360 template<
typename Type
3364 template<
typename MT >
3371 for(
size_t i=0UL; i<M; ++i )
3372 for( RhsConstIterator element=(~rhs).
begin(i); element!=(~rhs).
end(i); ++element )
3373 v_[i*NN+element->index()] -= element->value();
3389 template<
typename Type
3393 template<
typename MT >
3402 for(
size_t j=0UL; j<N; ++j )
3403 for( RhsConstIterator element=(~rhs).
begin(j); element!=(~rhs).
end(j); ++element )
3404 v_[element->index()*NN+j] -= element->value();
3429 template<
typename Type
3467 template<
typename ET >
3479 enum { vectorizable = IsVectorizable<Type>::value };
3485 enum { smpAssignable = 0 };
3494 template<
typename Other >
explicit inline StaticMatrix(
size_t m,
size_t n,
const Other* array );
3495 template<
typename Other >
explicit inline StaticMatrix(
const Other (&array)[M][N] );
3498 template<
typename Other,
bool SO >
inline StaticMatrix(
const StaticMatrix<Other,M,N,SO>& m );
3499 template<
typename MT ,
bool SO >
inline StaticMatrix(
const Matrix<MT,SO>& m );
3502 inline StaticMatrix(
const Type& v1,
const Type& v2,
const Type& v3 );
3503 inline StaticMatrix(
const Type& v1,
const Type& v2,
const Type& v3,
const Type& v4 );
3504 inline StaticMatrix(
const Type& v1,
const Type& v2,
const Type& v3,
const Type& v4,
const Type& v5 );
3505 inline StaticMatrix(
const Type& v1,
const Type& v2,
const Type& v3,
const Type& v4,
const Type& v5,
3507 inline StaticMatrix(
const Type& v1,
const Type& v2,
const Type& v3,
const Type& v4,
const Type& v5,
3508 const Type& v6,
const Type& v7 );
3509 inline StaticMatrix(
const Type& v1,
const Type& v2,
const Type& v3,
const Type& v4,
const Type& v5,
3510 const Type& v6,
const Type& v7,
const Type& v8 );
3511 inline StaticMatrix(
const Type& v1,
const Type& v2,
const Type& v3,
const Type& v4,
const Type& v5,
3512 const Type& v6,
const Type& v7,
const Type& v8,
const Type& v9 );
3513 inline StaticMatrix(
const Type& v1,
const Type& v2,
const Type& v3,
const Type& v4,
const Type& v5,
3514 const Type& v6,
const Type& v7,
const Type& v8,
const Type& v9,
const Type& v10 );
3525 inline Reference
operator()(
size_t i,
size_t j );
3526 inline ConstReference
operator()(
size_t i,
size_t j )
const;
3527 inline Reference
at(
size_t i,
size_t j );
3528 inline ConstReference
at(
size_t i,
size_t j )
const;
3529 inline Pointer
data ();
3530 inline ConstPointer
data ()
const;
3531 inline Pointer
data (
size_t j );
3532 inline ConstPointer
data (
size_t j )
const;
3533 inline Iterator
begin (
size_t j );
3534 inline ConstIterator
begin (
size_t j )
const;
3535 inline ConstIterator
cbegin(
size_t j )
const;
3536 inline Iterator
end (
size_t j );
3537 inline ConstIterator
end (
size_t j )
const;
3538 inline ConstIterator
cend (
size_t j )
const;
3545 template<
typename Other >
3546 inline StaticMatrix& operator=(
const Other (&array)[M][N] );
3550 template<
typename Other,
bool SO >
inline StaticMatrix& operator= (
const StaticMatrix<Other,M,N,SO>& rhs );
3551 template<
typename MT ,
bool SO >
inline StaticMatrix& operator= (
const Matrix<MT,SO>& rhs );
3552 template<
typename MT ,
bool SO >
inline StaticMatrix& operator+=(
const Matrix<MT,SO>& rhs );
3553 template<
typename MT ,
bool SO >
inline StaticMatrix& operator-=(
const Matrix<MT,SO>& rhs );
3554 template<
typename MT ,
bool SO >
inline StaticMatrix& operator*=(
const Matrix<MT,SO>& rhs );
3556 template<
typename Other >
3557 inline typename EnableIf< IsNumeric<Other>,
StaticMatrix >::Type&
3558 operator*=( Other rhs );
3560 template<
typename Other >
3561 inline typename EnableIf< IsNumeric<Other>,
StaticMatrix >::Type&
3562 operator/=( Other rhs );
3569 inline size_t rows()
const;
3570 inline size_t columns()
const;
3571 inline size_t spacing()
const;
3573 inline size_t capacity(
size_t j )
const;
3575 inline size_t nonZeros(
size_t j )
const;
3576 inline void reset();
3577 inline void reset(
size_t i );
3580 template<
typename Other >
inline StaticMatrix& scale(
const Other& scalar );
3588 static inline void*
operator new ( std::size_t
size );
3589 static inline void*
operator new[]( std::size_t
size );
3590 static inline void*
operator new ( std::size_t
size,
const std::nothrow_t& );
3591 static inline void*
operator new[]( std::size_t
size,
const std::nothrow_t& );
3593 static inline void operator delete (
void* ptr );
3594 static inline void operator delete[](
void* ptr );
3595 static inline void operator delete (
void* ptr,
const std::nothrow_t& );
3596 static inline void operator delete[](
void* ptr,
const std::nothrow_t& );
3603 template<
typename MT >
3604 struct VectorizedAssign {
3606 vectorizable && MT::vectorizable &&
3607 IsSame<Type,typename MT::ElementType>::value &&
3608 IsColumnMajorMatrix<MT>::value };
3614 template<
typename MT >
3615 struct VectorizedAddAssign {
3617 vectorizable && MT::vectorizable &&
3618 IsSame<Type,typename MT::ElementType>::value &&
3619 IntrinsicTrait<Type>::addition &&
3620 IsColumnMajorMatrix<MT>::value &&
3621 !IsDiagonal<MT>::value };
3627 template<
typename MT >
3628 struct VectorizedSubAssign {
3630 vectorizable && MT::vectorizable &&
3631 IsSame<Type,typename MT::ElementType>::value &&
3632 IntrinsicTrait<Type>::subtraction &&
3633 IsColumnMajorMatrix<MT>::value &&
3634 !IsDiagonal<MT>::value };
3642 template<
typename Other >
inline bool canAlias (
const Other* alias )
const;
3643 template<
typename Other >
inline bool isAliased(
const Other* alias )
const;
3656 template<
typename MT,
bool SO >
3657 inline typename DisableIf< VectorizedAssign<MT> >::Type
3658 assign(
const DenseMatrix<MT,SO>& rhs );
3660 template<
typename MT,
bool SO >
3661 inline typename EnableIf< VectorizedAssign<MT> >::Type
3662 assign(
const DenseMatrix<MT,SO>& rhs );
3664 template<
typename MT >
inline void assign(
const SparseMatrix<MT,true>& rhs );
3665 template<
typename MT >
inline void assign(
const SparseMatrix<MT,false>& rhs );
3667 template<
typename MT,
bool SO >
3668 inline typename DisableIf< VectorizedAddAssign<MT> >::Type
3669 addAssign(
const DenseMatrix<MT,SO>& rhs );
3671 template<
typename MT,
bool SO >
3672 inline typename EnableIf< VectorizedAddAssign<MT> >::Type
3673 addAssign(
const DenseMatrix<MT,SO>& rhs );
3675 template<
typename MT >
inline void addAssign(
const SparseMatrix<MT,true>& rhs );
3676 template<
typename MT >
inline void addAssign(
const SparseMatrix<MT,false>& rhs );
3678 template<
typename MT,
bool SO >
3679 inline typename DisableIf< VectorizedSubAssign<MT> >::Type
3680 subAssign(
const DenseMatrix<MT,SO>& rhs );
3682 template<
typename MT,
bool SO >
3683 inline typename EnableIf< VectorizedSubAssign<MT> >::Type
3684 subAssign(
const DenseMatrix<MT,SO>& rhs );
3686 template<
typename MT >
inline void subAssign(
const SparseMatrix<MT,true>& rhs );
3687 template<
typename MT >
inline void subAssign(
const SparseMatrix<MT,false>& rhs );
3702 AlignedArray<Type,MM*N>
v_;
3735 template<
typename Type
3743 if( IsNumeric<Type>::value ) {
3744 for(
size_t i=0UL; i<MM*N; ++i )
3758 template<
typename Type
3766 for(
size_t j=0UL; j<N; ++j ) {
3767 for(
size_t i=0UL; i<M; ++i )
3770 for(
size_t i=M; i<MM; ++i )
3771 v_[i+j*MM] = Type();
3805 template<
typename Type
3808 template<
typename Other >
3814 if( m > M || n > N ) {
3818 for(
size_t j=0UL; j<n; ++j ) {
3819 for(
size_t i=0UL; i<m; ++i )
3820 v_[i+j*MM] = array[i+j*m];
3822 if( IsNumeric<Type>::value ) {
3823 for(
size_t i=m; i<MM; ++i )
3824 v_[i+j*MM] = Type();
3828 if( IsNumeric<Type>::value ) {
3829 for(
size_t j=n; j<N; ++j ) {
3830 for(
size_t i=0UL; i<M; ++i )
3831 v_[i+j*MM] = Type();
3860 template<
typename Type
3863 template<
typename Other >
3869 for(
size_t j=0UL; j<N; ++j ) {
3870 for(
size_t i=0UL; i<M; ++i )
3871 v_[i+j*MM] = array[i][j];
3873 for(
size_t i=M; i<MM; ++i )
3874 v_[i+j*MM] = Type();
3889 template<
typename Type
3897 for(
size_t i=0UL; i<MM*N; ++i )
3910 template<
typename Type
3913 template<
typename Other
3920 for(
size_t j=0UL; j<N; ++j ) {
3921 for(
size_t i=0UL; i<M; ++i )
3922 v_[i+j*MM] = m(i,j);
3924 for(
size_t i=M; i<MM; ++i )
3925 v_[i+j*MM] = Type();
3943 template<
typename Type
3946 template<
typename MT
3951 using blaze::assign;
3959 for(
size_t j=0UL; j<N; ++j ) {
3960 for(
size_t i=( IsSparseMatrix<MT>::value ? 0UL : M ); i<MM; ++i ) {
3961 v_[i+j*MM] = Type();
3965 assign( *
this, ~m );
3989 template<
typename Type
4010 for(
size_t j=0UL; j<N; ++j )
4011 for(
size_t i=M; i<MM; ++i ) {
4012 v_[i+j*MM] = Type();
4038 template<
typename Type
4061 for(
size_t j=0UL; j<N; ++j )
4062 for(
size_t i=M; i<MM; ++i ) {
4063 v_[i+j*MM] = Type();
4092 template<
typename Type
4111 else if( N == 2UL ) {
4126 for(
size_t j=0UL; j<N; ++j )
4127 for(
size_t i=M; i<MM; ++i ) {
4128 v_[i+j*MM] = Type();
4156 template<
typename Type
4160 const Type& v4,
const Type& v5 )
4184 for(
size_t j=0UL; j<N; ++j )
4185 for(
size_t i=M; i<MM; ++i ) {
4186 v_[i+j*MM] = Type();
4218 template<
typename Type
4222 const Type& v4,
const Type& v5,
const Type& v6 )
4239 else if( N == 2UL ) {
4249 else if( N == 3UL ) {
4255 v_[2UL*MM+1UL] = v6;
4268 for(
size_t j=0UL; j<N; ++j )
4269 for(
size_t i=M; i<MM; ++i ) {
4270 v_[i+j*MM] = Type();
4300 template<
typename Type
4304 const Type& v4,
const Type& v5,
const Type& v6,
4333 for(
size_t j=0UL; j<N; ++j )
4334 for(
size_t i=M; i<MM; ++i ) {
4335 v_[i+j*MM] = Type();
4369 template<
typename Type
4373 const Type& v4,
const Type& v5,
const Type& v6,
4374 const Type& v7,
const Type& v8 )
4393 else if( N == 2UL ) {
4405 else if( N == 4UL ) {
4411 v_[2UL*MM+1UL] = v6;
4413 v_[3UL*MM+1UL] = v8;
4428 for(
size_t j=0UL; j<N; ++j )
4429 for(
size_t i=M; i<MM; ++i ) {
4430 v_[i+j*MM] = Type();
4465 template<
typename Type
4469 const Type& v4,
const Type& v5,
const Type& v6,
4470 const Type& v7,
const Type& v8,
const Type& v9 )
4490 else if( N == 3UL ) {
4498 v_[2UL*MM+1UL] = v8;
4499 v_[2UL*MM+2UL] = v9;
4515 for(
size_t j=0UL; j<N; ++j )
4516 for(
size_t i=M; i<MM; ++i ) {
4517 v_[i+j*MM] = Type();
4553 template<
typename Type
4557 const Type& v4,
const Type& v5,
const Type& v6,
4558 const Type& v7,
const Type& v8,
const Type& v9,
4580 else if( N == 2UL ) {
4594 else if( N == 5UL ) {
4600 v_[2UL*MM+1UL] = v6;
4602 v_[3UL*MM+1UL] = v8;
4604 v_[4UL*MM+1UL] = v10;
4621 for(
size_t j=0UL; j<N; ++j )
4622 for(
size_t i=M; i<MM; ++i ) {
4623 v_[i+j*MM] = Type();
4649 template<
typename Type
4674 template<
typename Type
4700 template<
typename Type
4712 return (*
this)(i,j);
4730 template<
typename Type
4742 return (*
this)(i,j);
4760 template<
typename Type
4763 inline typename StaticMatrix<Type,M,N,true>::Pointer
4784 template<
typename Type
4787 inline typename StaticMatrix<Type,M,N,true>::ConstPointer
4805 template<
typename Type
4808 inline typename StaticMatrix<Type,M,N,true>::Pointer
4827 template<
typename Type
4830 inline typename StaticMatrix<Type,M,N,true>::ConstPointer
4847 template<
typename Type
4867 template<
typename Type
4887 template<
typename Type
4907 template<
typename Type
4927 template<
typename Type
4947 template<
typename Type
4990 template<
typename Type
4993 template<
typename Other >
4994 inline StaticMatrix<Type,M,N,true>&
4995 StaticMatrix<Type,M,N,true>::operator=(
const Other (&array)[M][N] )
4997 for(
size_t j=0UL; j<N; ++j )
4998 for(
size_t i=0UL; i<M; ++i )
4999 v_[i+j*MM] = array[i][j];
5014 template<
typename Type
5017 inline StaticMatrix<Type,M,N,true>&
5018 StaticMatrix<Type,M,N,true>::operator=(
const Type&
set )
5020 for(
size_t j=0UL; j<N; ++j )
5021 for(
size_t i=0UL; i<M; ++i )
5039 template<
typename Type
5042 inline StaticMatrix<Type,M,N,true>&
5043 StaticMatrix<Type,M,N,true>::operator=(
const StaticMatrix& rhs )
5045 using blaze::assign;
5047 assign( *
this, ~rhs );
5061 template<
typename Type
5064 template<
typename Other
5066 inline StaticMatrix<Type,M,N,true>&
5067 StaticMatrix<Type,M,N,true>::operator=(
const StaticMatrix<Other,M,N,SO>& rhs )
5069 using blaze::assign;
5071 assign( *
this, ~rhs );
5090 template<
typename Type
5093 template<
typename MT
5095 inline StaticMatrix<Type,M,N,true>& StaticMatrix<Type,M,N,true>::operator=(
const Matrix<MT,SO>& rhs )
5097 using blaze::assign;
5099 typedef typename TransExprTrait<This>::Type TT;
5100 typedef typename CTransExprTrait<This>::Type CT;
5102 if( (~rhs).
rows() != M || (~rhs).
columns() != N ) {
5106 if( IsSame<MT,TT>::value && (~rhs).isAliased(
this ) ) {
5107 transpose(
typename IsSquare<This>::Type() );
5109 else if( IsSame<MT,CT>::value && (~rhs).isAliased(
this ) ) {
5110 ctranspose(
typename IsSquare<This>::Type() );
5112 else if( (~rhs).canAlias(
this ) ) {
5113 StaticMatrix tmp( ~rhs );
5114 assign( *
this, tmp );
5117 if( IsSparseMatrix<MT>::value )
5119 assign( *
this, ~rhs );
5139 template<
typename Type
5142 template<
typename MT
5144 inline StaticMatrix<Type,M,N,true>& StaticMatrix<Type,M,N,true>::operator+=(
const Matrix<MT,SO>& rhs )
5146 using blaze::addAssign;
5148 if( (~rhs).
rows() != M || (~rhs).
columns() != N ) {
5152 if( (~rhs).canAlias(
this ) ) {
5154 addAssign( *
this, tmp );
5157 addAssign( *
this, ~rhs );
5177 template<
typename Type
5180 template<
typename MT
5182 inline StaticMatrix<Type,M,N,true>& StaticMatrix<Type,M,N,true>::operator-=(
const Matrix<MT,SO>& rhs )
5184 using blaze::subAssign;
5186 if( (~rhs).
rows() != M || (~rhs).
columns() != N ) {
5190 if( (~rhs).canAlias(
this ) ) {
5192 subAssign( *
this, tmp );
5195 subAssign( *
this, ~rhs );
5215 template<
typename Type
5218 template<
typename MT
5220 inline StaticMatrix<Type,M,N,true>& StaticMatrix<Type,M,N,true>::operator*=(
const Matrix<MT,SO>& rhs )
5222 if( M != N || (~rhs).
rows() != M || (~rhs).
columns() != N ) {
5226 const StaticMatrix tmp( *
this * (~rhs) );
5227 return this->operator=( tmp );
5241 template<
typename Type
5244 template<
typename Other >
5245 inline typename EnableIf< IsNumeric<Other>, StaticMatrix<Type,M,N,true> >::Type&
5246 StaticMatrix<Type,M,N,true>::operator*=( Other rhs )
5248 using blaze::assign;
5250 assign( *
this, (*
this) * rhs );
5267 template<
typename Type
5270 template<
typename Other >
5271 inline typename EnableIf< IsNumeric<Other>, StaticMatrix<Type,M,N,true> >::Type&
5272 StaticMatrix<Type,M,N,true>::operator/=( Other rhs )
5274 using blaze::assign;
5278 assign( *
this, (*
this) / rhs );
5299 template<
typename Type
5316 template<
typename Type
5336 template<
typename Type
5353 template<
typename Type
5371 template<
typename Type
5392 template<
typename Type
5397 size_t nonzeros( 0UL );
5399 for(
size_t j=0UL; j<N; ++j )
5400 for(
size_t i=0UL; i<M; ++i )
5417 template<
typename Type
5424 const size_t iend( j*MM + M );
5425 size_t nonzeros( 0UL );
5427 for(
size_t i=j*MM; i<iend; ++i )
5443 template<
typename Type
5450 for(
size_t j=0UL; j<N; ++j )
5451 for(
size_t i=0UL; i<M; ++i )
5452 clear( v_[i+j*MM] );
5468 template<
typename Type
5476 for(
size_t i=0UL; i<M; ++i )
5477 clear( v_[i+j*MM] );
5492 template<
typename Type
5501 for(
size_t j=1UL; j<N; ++j )
5502 for(
size_t i=0UL; i<j; ++i )
5503 swap( v_[i+j*MM], v_[j+i*MM] );
5525 template<
typename Type
5550 template<
typename Type
5568 template<
typename Type
5575 for(
size_t j=0UL; j<N; ++j ) {
5576 for(
size_t i=0UL; i<j; ++i ) {
5577 cswap( v_[i+j*MM], v_[j+i*MM] );
5602 template<
typename Type
5627 template<
typename Type
5643 template<
typename Type
5646 template<
typename Other >
5647 inline StaticMatrix<Type,M,N,true>&
5648 StaticMatrix<Type,M,N,true>::scale(
const Other& scalar )
5650 for(
size_t j=0UL; j<N; ++j )
5651 for(
size_t i=0UL; i<M; ++i )
5652 v_[i+j*MM] *= scalar;
5668 template<
typename Type
5675 for(
size_t j=0UL; j<N; ++j ) {
5676 for(
size_t i=0UL; i<M; ++i ) {
5677 swap( v_[i+j*MM], m(i,j) );
5704 template<
typename Type
5707 inline void* StaticMatrix<Type,M,N,true>::operator
new( std::size_t
size )
5713 return allocate<StaticMatrix>( 1UL );
5730 template<
typename Type
5733 inline void* StaticMatrix<Type,M,N,true>::operator
new[]( std::size_t
size )
5738 return allocate<StaticMatrix>( size/
sizeof(StaticMatrix) );
5755 template<
typename Type
5758 inline void* StaticMatrix<Type,M,N,true>::operator
new( std::size_t
size,
const std::nothrow_t& )
5764 return allocate<StaticMatrix>( 1UL );
5781 template<
typename Type
5784 inline void* StaticMatrix<Type,M,N,true>::operator
new[]( std::size_t
size,
const std::nothrow_t& )
5789 return allocate<StaticMatrix>( size/
sizeof(StaticMatrix) );
5802 template<
typename Type
5805 inline void StaticMatrix<Type,M,N,true>::operator
delete(
void* ptr )
5807 deallocate( static_cast<StaticMatrix*>( ptr ) );
5820 template<
typename Type
5823 inline void StaticMatrix<Type,M,N,true>::operator
delete[](
void* ptr )
5825 deallocate( static_cast<StaticMatrix*>( ptr ) );
5838 template<
typename Type
5841 inline void StaticMatrix<Type,M,N,true>::operator
delete(
void* ptr,
const std::nothrow_t& )
5843 deallocate( static_cast<StaticMatrix*>( ptr ) );
5856 template<
typename Type
5859 inline void StaticMatrix<Type,M,N,true>::operator
delete[](
void* ptr,
const std::nothrow_t& )
5861 deallocate( static_cast<StaticMatrix*>( ptr ) );
5886 template<
typename Type
5889 template<
typename Other >
5892 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
5909 template<
typename Type
5912 template<
typename Other >
5915 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
5931 template<
typename Type
5957 template<
typename Type
5964 return loada( i, j );
5966 return loadu( i, j );
5987 template<
typename Type
6003 return loada( &v_[i+j*MM] );
6024 template<
typename Type
6038 return loadu( &v_[i+j*MM] );
6060 template<
typename Type
6091 template<
typename Type
6107 storea( &v_[i+j*MM], value );
6129 template<
typename Type
6143 storeu( &v_[i+j*MM], value );
6165 template<
typename Type
6181 stream( &v_[i+j*MM], value );
6199 template<
typename Type
6202 template<
typename MT
6204 inline typename DisableIf< typename StaticMatrix<Type,M,N,true>::BLAZE_TEMPLATE VectorizedAssign<MT> >::Type
6205 StaticMatrix<Type,M,N,true>::assign(
const DenseMatrix<MT,SO>& rhs )
6209 for(
size_t j=0UL; j<N; ++j ) {
6210 for(
size_t i=0UL; i<M; ++i ) {
6211 v_[i+j*MM] = (~rhs)(i,j);
6231 template<
typename Type
6234 template<
typename MT
6236 inline typename EnableIf< typename StaticMatrix<Type,M,N,true>::BLAZE_TEMPLATE VectorizedAssign<MT> >::Type
6237 StaticMatrix<Type,M,N,true>::assign(
const DenseMatrix<MT,SO>& rhs )
6243 const bool remainder( !
usePadding || !IsPadded<MT>::value );
6245 const size_t ipos( ( remainder )?( M &
size_t(-
IT::size) ):( M ) );
6248 for(
size_t j=0UL; j<N; ++j )
6253 store( i, j, (~rhs).load(i,j) );
6255 for( ; remainder && i<M; ++i ) {
6256 v_[i+j*MM] = (~rhs)(i,j);
6276 template<
typename Type
6279 template<
typename MT >
6280 inline void StaticMatrix<Type,M,N,true>::assign(
const SparseMatrix<MT,true>& rhs )
6286 for(
size_t j=0UL; j<N; ++j )
6287 for( RhsConstIterator element=(~rhs).
begin(j); element!=(~rhs).
end(j); ++element )
6288 v_[element->index()+j*MM] = element->value();
6306 template<
typename Type
6309 template<
typename MT >
6310 inline void StaticMatrix<Type,M,N,true>::assign(
const SparseMatrix<MT,false>& rhs )
6318 for(
size_t i=0UL; i<M; ++i )
6319 for( RhsConstIterator element=(~rhs).
begin(i); element!=(~rhs).
end(i); ++element )
6320 v_[i+element->index()*MM] = element->value();
6338 template<
typename Type
6341 template<
typename MT
6343 inline typename DisableIf< typename StaticMatrix<Type,M,N,true>::BLAZE_TEMPLATE VectorizedAddAssign<MT> >::Type
6344 StaticMatrix<Type,M,N,true>::addAssign(
const DenseMatrix<MT,SO>& rhs )
6348 for(
size_t j=0UL; j<N; ++j )
6350 if( IsDiagonal<MT>::value )
6352 v_[j+j*MM] += (~rhs)(j,j);
6356 const size_t ibegin( ( IsLower<MT>::value )
6357 ?( IsStrictlyLower<MT>::value ? j+1UL : j )
6359 const size_t iend ( ( IsUpper<MT>::value )
6360 ?( IsStrictlyUpper<MT>::value ? j : j+1UL )
6364 for(
size_t i=ibegin; i<iend; ++i ) {
6365 v_[i+j*MM] += (~rhs)(i,j);
6386 template<
typename Type
6389 template<
typename MT
6391 inline typename EnableIf< typename StaticMatrix<Type,M,N,true>::BLAZE_TEMPLATE VectorizedAddAssign<MT> >::Type
6392 StaticMatrix<Type,M,N,true>::addAssign(
const DenseMatrix<MT,SO>& rhs )
6399 const bool remainder( !
usePadding || !IsPadded<MT>::value );
6401 for(
size_t j=0UL; j<N; ++j )
6403 const size_t ibegin( ( IsLower<MT>::value )
6404 ?( ( IsStrictlyLower<MT>::value ? j+1UL : j ) &
size_t(-
IT::size) )
6406 const size_t iend ( ( IsUpper<MT>::value )
6407 ?( IsStrictlyUpper<MT>::value ? j : j+1UL )
6411 const size_t ipos( ( remainder )?( iend &
size_t(-
IT::size) ):( iend ) );
6417 store( i, j, load(i,j) + (~rhs).load(i,j) );
6419 for( ; remainder && i<iend; ++i ) {
6420 v_[i+j*MM] += (~rhs)(i,j);
6440 template<
typename Type
6443 template<
typename MT >
6444 inline void StaticMatrix<Type,M,N,true>::addAssign(
const SparseMatrix<MT,true>& rhs )
6450 for(
size_t j=0UL; j<N; ++j )
6451 for( RhsConstIterator element=(~rhs).
begin(j); element!=(~rhs).
end(j); ++element )
6452 v_[element->index()+j*MM] += element->value();
6470 template<
typename Type
6473 template<
typename MT >
6474 inline void StaticMatrix<Type,M,N,true>::addAssign(
const SparseMatrix<MT,false>& rhs )
6482 for(
size_t i=0UL; i<M; ++i )
6483 for( RhsConstIterator element=(~rhs).
begin(i); element!=(~rhs).
end(i); ++element )
6484 v_[i+element->index()*MM] += element->value();
6502 template<
typename Type
6505 template<
typename MT
6507 inline typename DisableIf< typename StaticMatrix<Type,M,N,true>::BLAZE_TEMPLATE VectorizedSubAssign<MT> >::Type
6508 StaticMatrix<Type,M,N,true>::subAssign(
const DenseMatrix<MT,SO>& rhs )
6512 for(
size_t j=0UL; j<N; ++j )
6514 if( IsDiagonal<MT>::value )
6516 v_[j+j*MM] -= (~rhs)(j,j);
6520 const size_t ibegin( ( IsLower<MT>::value )
6521 ?( IsStrictlyLower<MT>::value ? j+1UL : j )
6523 const size_t iend ( ( IsUpper<MT>::value )
6524 ?( IsStrictlyUpper<MT>::value ? j : j+1UL )
6528 for(
size_t i=ibegin; i<iend; ++i ) {
6529 v_[i+j*MM] -= (~rhs)(i,j);
6550 template<
typename Type
6553 template<
typename MT
6555 inline typename EnableIf< typename StaticMatrix<Type,M,N,true>::BLAZE_TEMPLATE VectorizedSubAssign<MT> >::Type
6556 StaticMatrix<Type,M,N,true>::subAssign(
const DenseMatrix<MT,SO>& rhs )
6563 const bool remainder( !
usePadding || !IsPadded<MT>::value );
6565 for(
size_t j=0UL; j<N; ++j )
6567 const size_t ibegin( ( IsLower<MT>::value )
6568 ?( ( IsStrictlyLower<MT>::value ? j+1UL : j ) &
size_t(-
IT::size) )
6570 const size_t iend ( ( IsUpper<MT>::value )
6571 ?( IsStrictlyUpper<MT>::value ? j : j+1UL )
6575 const size_t ipos( ( remainder )?( iend &
size_t(-
IT::size) ):( iend ) );
6581 store( i, j, load(i,j) - (~rhs).load(i,j) );
6583 for( ; remainder && i<iend; ++i ) {
6584 v_[i+j*MM] -= (~rhs)(i,j);
6604 template<
typename Type
6607 template<
typename MT >
6608 inline void StaticMatrix<Type,M,N,true>::subAssign(
const SparseMatrix<MT,true>& rhs )
6614 for(
size_t j=0UL; j<N; ++j )
6615 for( RhsConstIterator element=(~rhs).
begin(j); element!=(~rhs).
end(j); ++element )
6616 v_[element->index()+j*MM] -= element->value();
6634 template<
typename Type
6637 template<
typename MT >
6638 inline void StaticMatrix<Type,M,N,true>::subAssign(
const SparseMatrix<MT,false>& rhs )
6646 for(
size_t i=0UL; i<M; ++i )
6647 for( RhsConstIterator element=(~rhs).
begin(i); element!=(~rhs).
end(i); ++element )
6648 v_[i+element->index()*MM] -= element->value();
6674 template<
typename Type
6677 class StaticMatrix<Type,M,0UL,SO>;
6690 template<
typename Type
6693 class StaticMatrix<Type,0UL,N,SO>;
6706 template<
typename Type
6708 class StaticMatrix<Type,0UL,0UL,SO>;
6728 template<
typename Type,
size_t M,
size_t N,
bool SO >
6729 inline void reset( StaticMatrix<Type,M,N,SO>& m );
6731 template<
typename Type,
size_t M,
size_t N,
bool SO >
6732 inline void reset( StaticMatrix<Type,M,N,SO>& m,
size_t i );
6734 template<
typename Type,
size_t M,
size_t N,
bool SO >
6735 inline void clear( StaticMatrix<Type,M,N,SO>& m );
6737 template<
typename Type,
size_t M,
size_t N,
bool SO >
6738 inline bool isDefault(
const StaticMatrix<Type,M,N,SO>& m );
6740 template<
typename Type,
size_t M,
size_t N,
bool SO >
6741 inline bool isIntact(
const StaticMatrix<Type,M,N,SO>& m );
6743 template<
typename Type,
size_t M,
size_t N,
bool SO >
6744 inline void swap( StaticMatrix<Type,M,N,SO>& a, StaticMatrix<Type,M,N,SO>& b ) ;
6746 template<
typename Type,
size_t M,
size_t N,
bool SO >
6747 inline void move( StaticMatrix<Type,M,N,SO>& dst, StaticMatrix<Type,M,N,SO>& src ) ;
6759 template<
typename Type
6783 template<
typename Type
6803 template<
typename Type
6831 template<
typename Type
6838 for(
size_t i=0UL; i<M; ++i )
6839 for(
size_t j=0UL; j<N; ++j )
6840 if( !
isDefault( m(i,j) ) )
return false;
6843 for(
size_t j=0UL; j<N; ++j )
6844 for(
size_t i=0UL; i<M; ++i )
6845 if( !
isDefault( m(i,j) ) )
return false;
6871 template<
typename Type
6893 template<
typename Type
6913 template<
typename Type
6934 template<
typename T,
size_t M,
size_t N,
bool SO >
6935 struct Rows< StaticMatrix<T,M,N,SO> > :
public SizeT<M>
6951 template<
typename T,
size_t M,
size_t N,
bool SO >
6952 struct Columns< StaticMatrix<T,M,N,SO> > :
public SizeT<N>
6968 template<
typename T,
size_t N,
bool SO >
6969 struct IsSquare< StaticMatrix<T,N,N,SO> > :
public IsTrue<true>
6985 template<
typename T,
size_t M,
size_t N,
bool SO >
6986 struct HasConstDataAccess< StaticMatrix<T,M,N,SO> > :
public IsTrue<true>
7002 template<
typename T,
size_t M,
size_t N,
bool SO >
7003 struct HasMutableDataAccess< StaticMatrix<T,M,N,SO> > :
public IsTrue<true>
7019 template<
typename T,
size_t M,
size_t N,
bool SO >
7020 struct IsAligned< StaticMatrix<T,M,N,SO> > :
public IsTrue<usePadding>
7036 template<
typename T,
size_t M,
size_t N,
bool SO >
7037 struct IsPadded< StaticMatrix<T,M,N,SO> > :
public IsTrue<usePadding>
7053 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
7054 struct AddTrait< StaticMatrix<T1,M,N,SO>, StaticMatrix<T2,M,N,SO> >
7056 typedef StaticMatrix< typename AddTrait<T1,T2>::Type, M, N, SO > Type;
7059 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
7060 struct AddTrait< StaticMatrix<T1,M,N,SO1>, StaticMatrix<T2,M,N,SO2> >
7062 typedef StaticMatrix< typename AddTrait<T1,T2>::Type, M, N,
false > Type;
7078 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
7079 struct SubTrait< StaticMatrix<T1,M,N,SO>, StaticMatrix<T2,M,N,SO> >
7081 typedef StaticMatrix< typename SubTrait<T1,T2>::Type, M, N, SO > Type;
7084 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
7085 struct SubTrait< StaticMatrix<T1,M,N,SO1>, StaticMatrix<T2,M,N,SO2> >
7087 typedef StaticMatrix< typename SubTrait<T1,T2>::Type, M, N,
false > Type;
7103 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
7104 struct MultTrait< StaticMatrix<T1,M,N,SO>, T2, typename EnableIf< IsNumeric<T2> >::Type >
7106 typedef StaticMatrix< typename MultTrait<T1,T2>::Type, M, N, SO > Type;
7109 template<
typename T1,
typename T2,
size_t M,
size_t N,
bool SO >
7110 struct MultTrait< T1, StaticMatrix<T2,M,N,SO>, typename EnableIf< IsNumeric<T1> >::Type >
7112 typedef StaticMatrix< typename MultTrait<T1,T2>::Type, M, N, SO > Type;
7115 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
7116 struct MultTrait< StaticMatrix<T1,M,N,SO>, StaticVector<T2,N,false> >
7118 typedef StaticVector< typename MultTrait<T1,T2>::Type, M,
false > Type;
7121 template<
typename T1,
size_t M,
typename T2,
size_t N,
bool SO >
7122 struct MultTrait< StaticVector<T1,M,true>, StaticMatrix<T2,M,N,SO> >
7124 typedef StaticVector< typename MultTrait<T1,T2>::Type, N,
true > Type;
7127 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2,
size_t L >
7128 struct MultTrait< StaticMatrix<T1,M,N,SO>, HybridVector<T2,L,false> >
7130 typedef StaticVector< typename MultTrait<T1,T2>::Type, M,
false > Type;
7133 template<
typename T1,
size_t L,
typename T2,
size_t M,
size_t N,
bool SO >
7134 struct MultTrait< HybridVector<T1,L,true>, StaticMatrix<T2,M,N,SO> >
7136 typedef StaticVector< typename MultTrait<T1,T2>::Type, N,
true > Type;
7139 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
7140 struct MultTrait< StaticMatrix<T1,M,N,SO>, DynamicVector<T2,false> >
7142 typedef StaticVector< typename MultTrait<T1,T2>::Type, M,
false > Type;
7145 template<
typename T1,
typename T2,
size_t M,
size_t N,
bool SO >
7146 struct MultTrait< DynamicVector<T1,true>, StaticMatrix<T2,M,N,SO> >
7148 typedef StaticVector< typename MultTrait<T1,T2>::Type, N,
true > Type;
7151 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2,
bool AF,
bool PF >
7152 struct MultTrait< StaticMatrix<T1,M,N,SO>, CustomVector<T2,AF,PF,false> >
7154 typedef StaticVector< typename MultTrait<T1,T2>::Type, M,
false > Type;
7157 template<
typename T1,
bool AF,
bool PF,
typename T2,
size_t M,
size_t N,
bool SO >
7158 struct MultTrait< CustomVector<T1,AF,PF,true>, StaticMatrix<T2,M,N,SO> >
7160 typedef StaticVector< typename MultTrait<T1,T2>::Type, N,
true > Type;
7163 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
7164 struct MultTrait< StaticMatrix<T1,M,N,SO>, CompressedVector<T2,false> >
7166 typedef StaticVector< typename MultTrait<T1,T2>::Type, M,
false > Type;
7169 template<
typename T1,
typename T2,
size_t M,
size_t N,
bool SO >
7170 struct MultTrait< CompressedVector<T1,true>, StaticMatrix<T2,M,N,SO> >
7172 typedef StaticVector< typename MultTrait<T1,T2>::Type, N,
true > Type;
7175 template<
typename T1,
size_t M,
size_t K,
bool SO1,
typename T2,
size_t N,
bool SO2 >
7176 struct MultTrait< StaticMatrix<T1,M,K,SO1>, StaticMatrix<T2,K,N,SO2> >
7178 typedef StaticMatrix< typename MultTrait<T1,T2>::Type, M, N, SO1 > Type;
7194 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
7195 struct DivTrait< StaticMatrix<T1,M,N,SO>, T2, typename EnableIf< IsNumeric<T2> >::Type >
7197 typedef StaticMatrix< typename DivTrait<T1,T2>::Type, M, N, SO > Type;
7213 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
7214 struct MathTrait< StaticMatrix<T1,M,N,SO>, StaticMatrix<T2,M,N,SO> >
7216 typedef StaticMatrix< typename MathTrait<T1,T2>::HighType, M, N, SO > HighType;
7217 typedef StaticMatrix< typename MathTrait<T1,T2>::LowType , M, N, SO > LowType;
7233 template<
typename T1,
size_t M,
size_t N,
bool SO >
7234 struct SubmatrixTrait< StaticMatrix<T1,M,N,SO> >
7236 typedef HybridMatrix<T1,M,N,SO> Type;
7252 template<
typename T1,
size_t M,
size_t N,
bool SO >
7253 struct RowTrait< StaticMatrix<T1,M,N,SO> >
7255 typedef StaticVector<T1,N,true> Type;
7271 template<
typename T1,
size_t M,
size_t N,
bool SO >
7272 struct ColumnTrait< StaticMatrix<T1,M,N,SO> >
7274 typedef StaticVector<T1,M,false> Type;
Compile time check for vectorizable types.Depending on the available instruction set (SSE...
Definition: IsVectorizable.h:118
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:116
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exceptionThis macro encapsulates the default way of...
Definition: Exception.h:187
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > >, simd_int16_t >::Type set(T value)
Sets all values in the vector to the given 2-byte integral value.
Definition: Set.h:73
Compile time check for numeric types.This type trait tests whether or not the given template paramete...
Definition: IsNumeric.h:98
BLAZE_ALWAYS_INLINE IntrinsicType loadu(size_t i, size_t j) const
Unaligned load of an intrinsic element of the matrix.
Definition: StaticMatrix.h:2796
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:2171
Header file for basic type definitions.
const bool defaultStorageOrder
The default storage order for all matrices of the Blaze library.This value specifies the default stor...
Definition: StorageOrder.h:56
IntrinsicTrait< Type > IT
Intrinsic trait for the matrix element type.
Definition: StaticMatrix.h:208
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector)
Returns the current size/dimension of the vector.
Definition: Vector.h:252
DenseIterator< const Type, usePadding > ConstIterator
Iterator over constant elements.
Definition: StaticMatrix.h:233
Header file for the row trait.
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:250
bool canAlias(const Other *alias) const
Returns whether the matrix can alias with the given address alias.
Definition: StaticMatrix.h:2660
BLAZE_ALWAYS_INLINE void storea(size_t i, size_t j, const IntrinsicType &value)
Aligned store of an intrinsic element of the matrix.
Definition: StaticMatrix.h:2863
Header file for the IsSparseMatrix type trait.
Header file for the FalseType type/value trait base class.
Header file for the IsDiagonal type trait.
StaticMatrix()
The default constructor for StaticMatrix.
Definition: StaticMatrix.h:526
StaticMatrix< ET, M, N, SO > Other
The type of the other StaticMatrix.
Definition: StaticMatrix.h:241
Header file for the IsSame and IsStrictlySame type traits.
StaticMatrix< Type, N, M,!SO > TransposeType
Transpose type for expression template evaluations.
Definition: StaticMatrix.h:221
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:507
StaticMatrix< Type, M, N,!SO > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: StaticMatrix.h:220
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix)
Returns the current number of rows of the matrix.
Definition: Matrix.h:308
void UNUSED_PARAMETER(const T1 &)
Suppression of unused parameter warnings.
Definition: Unused.h:81
Compile time check for lower triangular matrices.This type trait tests whether or not the given templ...
Definition: IsLower.h:90
BLAZE_ALWAYS_INLINE void ctranspose(Matrix< MT, SO > &matrix)
In-place conjugate transpose of the given matrix.
Definition: Matrix.h:584
static const size_t NN
Alignment adjustment.
Definition: StaticMatrix.h:213
#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:116
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 enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType.
Definition: IsSame.h:158
Compile time check for upper triangular matrices.This type trait tests whether or not the given templ...
Definition: IsUpper.h:90
Iterator end(size_t i)
Returns an iterator just past the last element of row/column i.
Definition: StaticMatrix.h:1693
Header file for memory allocation and deallocation functionality.
void move(CustomMatrix< Type, AF, PF, SO > &dst, CustomMatrix< Type, AF, PF, SO > &src)
Moving the contents of one custom matrix to another.
Definition: CustomMatrix.h:6085
System settings for performance optimizations.
This ResultType
Result type for expression template evaluations.
Definition: StaticMatrix.h:219
AlignedArray< Type, M *NN > v_
The statically allocated matrix elements.
Definition: StaticMatrix.h:482
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:117
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:547
Constraint on the data type.
bool isAligned() const
Returns whether the matrix is properly aligned in memory.
Definition: StaticMatrix.h:2702
const Type * ConstPointer
Pointer to a constant matrix value.
Definition: StaticMatrix.h:230
Header file for the SparseMatrix base class.
Header file for the IsSquare type trait.
BLAZE_ALWAYS_INLINE void store(size_t i, size_t j, const IntrinsicType &value)
Store of an intrinsic element of the matrix.
Definition: StaticMatrix.h:2832
ConstIterator cend(size_t i) const
Returns an iterator just past the last element of row/column i.
Definition: StaticMatrix.h:1741
const Type & ConstReference
Reference to a constant matrix value.
Definition: StaticMatrix.h:228
Header file for the DisableIf class template.
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > >, simd_int16_t >::Type loadu(const T *address)
Loads a vector of 2-byte integral values.
Definition: Loadu.h:74
StaticMatrix & transpose()
In-place transpose of the matrix.
Definition: StaticMatrix.h:2274
void swap(StaticMatrix &m)
Swapping the contents of two static matrices.
Definition: StaticMatrix.h:2450
Header file for the multiplication trait.
Header file for the IsStrictlyUpper type trait.
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.
IT::Type IntrinsicType
Intrinsic type of the matrix elements.
Definition: StaticMatrix.h:223
void swap(CompressedMatrix< Type, SO > &a, CompressedMatrix< Type, SO > &b)
Swapping the contents of two compressed matrices.
Definition: CompressedMatrix.h:4998
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > > >::Type storeu(T *address, const simd_int16_t &value)
Unaligned store of a vector of 2-byte integral values.
Definition: Storeu.h:75
Header file for all forward declarations of the math module.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2592
BLAZE_ALWAYS_INLINE void storeu(size_t i, size_t j, const IntrinsicType &value)
Unaligned store of an intrinsic element of the matrix.
Definition: StaticMatrix.h:2901
#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:116
Compile time check for data types with padding.This type trait tests whether the given data type empl...
Definition: IsPadded.h:75
Type & Reference
Reference to a non-constant matrix value.
Definition: StaticMatrix.h:227
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exceptionThis macro encapsulates the default way of Bla...
Definition: Exception.h:331
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.
EnableIf< IsBuiltin< T > >::Type deallocate(T *address)
Deallocation of memory for built-in data types.
Definition: Memory.h:227
Header file for the DenseIterator class template.
BLAZE_ALWAYS_INLINE void conjugate(T &a)
In-place conjugation of the given value/object.
Definition: Conjugate.h:120
void reset()
Reset to the default initial values.
Definition: StaticMatrix.h:2225
BLAZE_ALWAYS_INLINE IntrinsicType load(size_t i, size_t j) const
Load of an intrinsic element of the matrix.
Definition: StaticMatrix.h:2729
BLAZE_ALWAYS_INLINE void stream(size_t i, size_t j, const IntrinsicType &value)
Aligned, non-temporal store of an intrinsic element of the matrix.
Definition: StaticMatrix.h:2937
Constraint on the data type.
StaticMatrix & ctranspose()
In-place conjugate transpose of the matrix.
Definition: StaticMatrix.h:2351
#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:116
size_t columns() const
Returns the current number of columns of the matrix.
Definition: StaticMatrix.h:2094
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:87
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:92
Reference at(size_t i, size_t j)
Checked access to the matrix elements.
Definition: StaticMatrix.h:1473
Header file for the default storage order for all vectors of the Blaze library.
#define BLAZE_CONSTRAINT_MUST_BE_VECTORIZABLE_TYPE(T)
Constraint on the data type.In case the given data type T is not a vectorizable data type...
Definition: Vectorizable.h:79
size_t capacity() const
Returns the maximum capacity of the matrix.
Definition: StaticMatrix.h:2129
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:187
Compile time check for strictly upper triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyUpper.h:86
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:2590
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:527
bool isAliased(const Other *alias) const
Returns whether the matrix is aliased with the given address alias.
Definition: StaticMatrix.h:2682
ConstIterator cbegin(size_t i) const
Returns an iterator to the first element of row/column i.
Definition: StaticMatrix.h:1669
Header file for the IsPadded type trait.
Iterator begin(size_t i)
Returns an iterator to the first element of row/column i.
Definition: StaticMatrix.h:1621
Reference operator()(size_t i, size_t j)
2D-access to the matrix elements.
Definition: StaticMatrix.h:1424
Header file for the IsVectorizable type trait.
Header file for the conjugate shim.
Header file for the IsNumeric type trait.
Header file for the HasConstDataAccess type trait.
Type ElementType
Type of the matrix elements.
Definition: StaticMatrix.h:222
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > >, simd_int16_t >::Type loada(const T *address)
Loads a vector of 2-byte integral values.
Definition: Loada.h:77
const This & CompositeType
Data type for composite expression templates.
Definition: StaticMatrix.h:225
#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:116
Compile time integral constant wrapper for size_t.The SizeT class template represents an integral wra...
Definition: SizeT.h:72
Intrinsic characteristics of data types.The IntrinsicTrait class template provides the intrinsic char...
Definition: IntrinsicTrait.h:1232
Header file for run time assertion macros.
Pointer data()
Low-level data access to the matrix elements.
Definition: StaticMatrix.h:1532
Header file for the addition trait.
Header file for the division trait.
Header file for the submatrix trait.
Constraint on the data type.
Type * Pointer
Pointer to a non-constant matrix value.
Definition: StaticMatrix.h:229
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:184
Constraint on the data type.
const bool useOptimizedKernels
Configuration switch for optimized kernels.This configuration switch enables/disables all optimized c...
Definition: Optimizations.h:84
Header file for the AlignedArray implementation.
const bool usePadding
Configuration of the padding of dense vectors and matrices.This configuration switch enables/disables...
Definition: Optimizations.h:52
#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:116
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:2591
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 HasMutableDataAccess type trait.
Evaluation of the return type of a conjugate transpose expression.Via this type trait it is possible ...
Definition: CTransExprTrait.h:87
Substitution Failure Is Not An Error (SFINAE) class.The DisableIf class template is an auxiliary tool...
Definition: DisableIf.h:184
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b)
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:256
Implementation of a generic iterator for dense vectors and matrices.The DenseIterator represents a ge...
Definition: DenseIterator.h:59
Header file for all intrinsic functionality.
Header file for the mathematical trait.
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
Evaluation of the return type of a transpose expression.Via this type trait it is possible to evaluat...
Definition: TransExprTrait.h:87
Header file for the IsRowMajorMatrix type trait.
size_t spacing() const
Returns the spacing between the beginning of two rows.
Definition: StaticMatrix.h:2113
const bool rowMajor
Storage order flag for row-major matrices.
Definition: StorageOrder.h:71
BLAZE_ALWAYS_INLINE IntrinsicType loada(size_t i, size_t j) const
Aligned load of an intrinsic element of the matrix.
Definition: StaticMatrix.h:2759
boost::false_type FalseType
Type/value traits base class.The FalseType class is used as base class for type traits and value trai...
Definition: FalseType.h:61
size_t rows() const
Returns the current number of rows of the matrix.
Definition: StaticMatrix.h:2078
Header file for the alignment check function.
BLAZE_ALWAYS_INLINE void cswap(T &a, T &b)
Swapping two conjugated values/objects.
Definition: Conjugate.h:197
Rebind mechanism to obtain a StaticMatrix with different data/element type.
Definition: StaticMatrix.h:240
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2583
Header file for the IsTrue value trait.
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > > >::Type stream(T *address, const simd_int16_t &value)
Aligned, non-temporal store of a vector of 2-byte integral values.
Definition: Stream.h:74
BLAZE_ALWAYS_INLINE size_t columns(const Matrix< MT, SO > &matrix)
Returns the current number of columns of the matrix.
Definition: Matrix.h:324
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:237
Compile time check for sparse matrix types.This type trait tests whether or not the given template pa...
Definition: IsSparseMatrix.h:103
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:2589
Rebind mechanism to obtain a CompressedMatrix with different data/element type.
Definition: CompressedMatrix.h:2599
Header file for the IsUpper type trait.
Header file for exception macros.
boost::true_type 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 the CTransExprTrait class template.
StaticMatrix< Type, M, N, SO > This
Type of this StaticMatrix instance.
Definition: StaticMatrix.h:218
#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:143
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
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > > >::Type storea(T *address, const simd_int16_t &value)
Aligned store of a vector of 2-byte integral values.
Definition: Storea.h:78
Header file for the TrueType type/value trait base class.
DenseIterator< Type, usePadding > Iterator
Iterator over non-constant elements.
Definition: StaticMatrix.h:232
Compile time integral round up operation.The NextMultiple class template rounds up the given template...
Definition: NextMultiple.h:81
BLAZE_ALWAYS_INLINE void transpose(Matrix< MT, SO > &matrix)
In-place transpose of the given matrix.
Definition: Matrix.h:558
const Type & ReturnType
Return type for expression template evaluations.
Definition: StaticMatrix.h:224