35 #ifndef _BLAZE_MATH_VIEWS_DENSEROW_H_
36 #define _BLAZE_MATH_VIEWS_DENSEROW_H_
339 template<
typename MT
340 ,
bool SO = IsRowMajorMatrix<MT>::value
341 ,
bool SF = IsSymmetric<MT>::value >
386 enum { vectorizable = MT::vectorizable };
389 enum { smpAssignable = MT::smpAssignable };
395 explicit inline DenseRow( MT& matrix,
size_t index );
408 inline ConstReference
operator[](
size_t index )
const;
409 inline Reference
at(
size_t index );
410 inline ConstReference
at(
size_t index )
const;
411 inline Pointer
data ();
412 inline ConstPointer
data ()
const;
413 inline Iterator
begin ();
414 inline ConstIterator
begin ()
const;
415 inline ConstIterator
cbegin()
const;
416 inline Iterator
end ();
417 inline ConstIterator
end ()
const;
418 inline ConstIterator
cend ()
const;
428 template<
typename VT >
inline DenseRow&
operator= (
const Vector<VT,true>& rhs );
429 template<
typename VT >
inline DenseRow& operator+=(
const Vector<VT,true>& rhs );
430 template<
typename VT >
inline DenseRow& operator-=(
const Vector<VT,true>& rhs );
431 template<
typename VT >
inline DenseRow& operator*=(
const DenseVector<VT,true>& rhs );
432 template<
typename VT >
inline DenseRow& operator*=(
const SparseVector<VT,true>& rhs );
434 template<
typename Other >
435 inline typename EnableIf< IsNumeric<Other>,
DenseRow >::Type&
436 operator*=( Other rhs );
438 template<
typename Other >
439 inline typename EnableIf< IsNumeric<Other>,
DenseRow >::Type&
440 operator/=( Other rhs );
447 inline size_t size()
const;
451 template<
typename Other >
inline DenseRow& scale(
const Other& scalar );
458 template<
typename VT >
460 struct VectorizedAssign {
462 vectorizable && VT::vectorizable &&
463 IsSame<ElementType,typename VT::ElementType>::value };
470 template<
typename VT >
472 struct VectorizedAddAssign {
474 vectorizable && VT::vectorizable &&
475 IsSame<ElementType,typename VT::ElementType>::value &&
476 IntrinsicTrait<ElementType>::addition };
483 template<
typename VT >
485 struct VectorizedSubAssign {
487 vectorizable && VT::vectorizable &&
488 IsSame<ElementType,typename VT::ElementType>::value &&
489 IntrinsicTrait<ElementType>::subtraction };
496 template<
typename VT >
498 struct VectorizedMultAssign {
500 vectorizable && VT::vectorizable &&
501 IsSame<ElementType,typename VT::ElementType>::value &&
502 IntrinsicTrait<ElementType>::multiplication };
511 template<
typename Other >
512 inline bool canAlias(
const Other* alias )
const;
514 template<
typename MT2,
bool SO2,
bool SF2 >
515 inline bool canAlias(
const DenseRow<MT2,SO2,SF2>* alias )
const;
517 template<
typename Other >
518 inline bool isAliased(
const Other* alias )
const;
520 template<
typename MT2,
bool SO2,
bool SF2 >
521 inline bool isAliased(
const DenseRow<MT2,SO2,SF2>* alias )
const;
535 template<
typename VT >
536 inline typename DisableIf< VectorizedAssign<VT> >::Type
537 assign(
const DenseVector<VT,true>& rhs );
539 template<
typename VT >
540 inline typename EnableIf< VectorizedAssign<VT> >::Type
541 assign(
const DenseVector<VT,true>& rhs );
543 template<
typename VT >
inline void assign(
const SparseVector<VT,true>& rhs );
545 template<
typename VT >
546 inline typename DisableIf< VectorizedAddAssign<VT> >::Type
547 addAssign(
const DenseVector<VT,true>& rhs );
549 template<
typename VT >
550 inline typename EnableIf< VectorizedAddAssign<VT> >::Type
551 addAssign(
const DenseVector<VT,true>& rhs );
553 template<
typename VT >
inline void addAssign(
const SparseVector<VT,true>& rhs );
555 template<
typename VT >
556 inline typename DisableIf< VectorizedSubAssign<VT> >::Type
557 subAssign(
const DenseVector<VT,true>& rhs );
559 template<
typename VT >
560 inline typename EnableIf< VectorizedSubAssign<VT> >::Type
561 subAssign(
const DenseVector<VT,true>& rhs );
563 template<
typename VT >
inline void subAssign(
const SparseVector<VT,true>& rhs );
565 template<
typename VT >
566 inline typename DisableIf< VectorizedMultAssign<VT> >::Type
567 multAssign(
const DenseVector<VT,true>& rhs );
569 template<
typename VT >
570 inline typename EnableIf< VectorizedMultAssign<VT> >::Type
571 multAssign(
const DenseVector<VT,true>& rhs );
573 template<
typename VT >
inline void multAssign(
const SparseVector<VT,true>& rhs );
588 template<
typename MT2,
bool SO2,
bool SF2 >
friend class DenseRow;
590 template<
typename MT2,
bool SO2,
bool SF2 >
593 template<
typename MT2,
bool SO2,
bool SF2 >
596 template<
typename MT2,
bool SO2,
bool SF2,
typename VT >
599 template<
typename MT2,
bool SO2,
bool SF2,
typename VT >
602 template<
typename MT2,
bool SO2,
bool SF2,
typename VT >
605 template<
typename MT2,
bool SO2,
bool SF2,
typename VT >
608 template<
typename MT2,
bool SO2,
bool SF2 >
643 template<
typename MT
650 if(
matrix_.rows() <= index ) {
674 template<
typename MT
680 return matrix_(row_,index);
694 template<
typename MT
701 return const_cast<const MT&
>( matrix_ )(row_,index);
716 template<
typename MT
721 if( index >=
size() ) {
724 return (*
this)[index];
739 template<
typename MT
744 if( index >=
size() ) {
747 return (*
this)[index];
760 template<
typename MT
765 return matrix_.data( row_ );
778 template<
typename MT
783 return matrix_.data( row_ );
795 template<
typename MT
800 return matrix_.begin( row_ );
812 template<
typename MT
817 return matrix_.cbegin( row_ );
829 template<
typename MT
834 return matrix_.cbegin( row_ );
846 template<
typename MT
851 return matrix_.end( row_ );
863 template<
typename MT
868 return matrix_.cend( row_ );
880 template<
typename MT
885 return matrix_.cend( row_ );
908 template<
typename MT
924 for(
size_t j=jbegin; j<jend; ++j )
925 matrix_(row_,j) = rhs;
945 template<
typename MT
950 if( &rhs ==
this )
return *
this;
956 if( !tryAssign( matrix_, rhs, row_, 0UL ) ) {
984 template<
typename MT
987 template<
typename VT >
1000 if( !tryAssign( matrix_, right, row_, 0UL ) ) {
1036 template<
typename MT
1039 template<
typename VT >
1050 Right right( ~rhs );
1052 if( !tryAddAssign( matrix_, right, row_, 0UL ) ) {
1086 template<
typename MT
1089 template<
typename VT >
1100 Right right( ~rhs );
1102 if( !trySubAssign( matrix_, right, row_, 0UL ) ) {
1135 template<
typename MT
1138 template<
typename VT >
1149 Right right( ~rhs );
1151 if( !tryMultAssign( matrix_, right, row_, 0UL ) ) {
1184 template<
typename MT
1187 template<
typename VT >
1200 if( !tryAssign( matrix_, right, row_, 0UL ) ) {
1225 template<
typename MT
1228 template<
typename Other >
1234 return operator=( (*
this) * rhs );
1251 template<
typename MT
1254 template<
typename Other >
1262 return operator=( (*
this) / rhs );
1280 template<
typename MT
1285 return matrix_.columns();
1295 template<
typename MT
1300 return matrix_.capacity( row_ );
1313 template<
typename MT
1318 return matrix_.nonZeros( row_ );
1328 template<
typename MT
1333 matrix_.reset( row_ );
1348 template<
typename MT
1351 template<
typename Other >
1367 for(
size_t j=jbegin; j<jend; ++j ) {
1368 matrix_(row_,j) *= scalar;
1394 template<
typename MT
1397 template<
typename Other >
1400 return matrix_.isAliased( alias );
1415 template<
typename MT
1418 template<
typename MT2
1423 return matrix_.isAliased( &alias->
matrix_ ) && ( row_ == alias->
row_ );
1438 template<
typename MT
1441 template<
typename Other >
1444 return matrix_.isAliased( alias );
1459 template<
typename MT
1462 template<
typename MT2
1467 return matrix_.isAliased( &alias->
matrix_ ) && ( row_ == alias->
row_ );
1481 template<
typename MT
1486 return matrix_.isAligned();
1501 template<
typename MT
1506 return (
size() > SMP_DVECASSIGN_THRESHOLD );
1523 template<
typename MT
1529 return matrix_.load( row_, index );
1546 template<
typename MT
1552 return matrix_.loada( row_, index );
1569 template<
typename MT
1575 return matrix_.loadu( row_, index );
1593 template<
typename MT
1598 matrix_.store( row_, index, value );
1616 template<
typename MT
1621 matrix_.storea( row_, index, value );
1639 template<
typename MT
1644 matrix_.storeu( row_, index, value );
1662 template<
typename MT
1667 matrix_.stream( row_, index, value );
1683 template<
typename MT
1686 template<
typename VT >
1692 const size_t jpos( (~rhs).
size() &
size_t(-2) );
1693 for(
size_t j=0UL; j<jpos; j+=2UL ) {
1694 matrix_(row_,j ) = (~rhs)[j ];
1695 matrix_(row_,j+1UL) = (~rhs)[j+1UL];
1697 if( jpos < (~rhs).size() )
1698 matrix_(row_,jpos) = (~rhs)[jpos];
1714 template<
typename MT
1717 template<
typename VT >
1728 const size_t jpos( ( remainder )?( columns &
size_t(-
IT::size) ):( columns ) );
1736 matrix_.stream( row_, j, (~rhs).load(j) );
1738 for( ; remainder && j<
columns; ++j ) {
1739 matrix_(row_,j) = (~rhs)[j];
1748 matrix_.store( row_, j , it.load() ); it +=
IT::size;
1754 matrix_.store( row_, j, it.load() );
1756 for( ; remainder && j<
columns; ++j, ++it ) {
1757 matrix_(row_,j) = *it;
1775 template<
typename MT
1778 template<
typename VT >
1784 matrix_(row_,element->index()) = element->value();
1800 template<
typename MT
1803 template<
typename VT >
1809 const size_t jpos( (~rhs).
size() &
size_t(-2) );
1810 for(
size_t j=0UL; j<jpos; j+=2UL ) {
1811 matrix_(row_,j ) += (~rhs)[j ];
1812 matrix_(row_,j+1UL) += (~rhs)[j+1UL];
1814 if( jpos < (~rhs).size() )
1815 matrix_(row_,jpos) += (~rhs)[jpos];
1831 template<
typename MT
1834 template<
typename VT >
1845 const size_t jpos( ( remainder )?( columns &
size_t(-
IT::size) ):( columns ) );
1852 matrix_.store( row_, j , matrix_.load(row_,j ) + it.load() ); it +=
IT::size;
1858 matrix_.store( row_, j, matrix_.load(row_,j) + it.load() );
1860 for( ; remainder && j<
columns; ++j, ++it ) {
1861 matrix_(row_,j) += *it;
1878 template<
typename MT
1881 template<
typename VT >
1887 matrix_(row_,element->index()) += element->value();
1903 template<
typename MT
1906 template<
typename VT >
1912 const size_t jpos( (~rhs).
size() &
size_t(-2) );
1913 for(
size_t j=0UL; j<jpos; j+=2UL ) {
1914 matrix_(row_,j ) -= (~rhs)[j ];
1915 matrix_(row_,j+1UL) -= (~rhs)[j+1UL];
1917 if( jpos < (~rhs).size() )
1918 matrix_(row_,jpos) -= (~rhs)[jpos];
1934 template<
typename MT
1937 template<
typename VT >
1948 const size_t jpos( ( remainder )?( columns &
size_t(-
IT::size) ):( columns ) );
1955 matrix_.store( row_, j , matrix_.load(row_,j ) - it.load() ); it +=
IT::size;
1961 matrix_.store( row_, j, matrix_.load(row_,j) - it.load() );
1963 for( ; remainder && j<
columns; ++j, ++it ) {
1964 matrix_(row_,j) -= *it;
1981 template<
typename MT
1984 template<
typename VT >
1990 matrix_(row_,element->index()) -= element->value();
2006 template<
typename MT
2009 template<
typename VT >
2015 const size_t jpos( (~rhs).
size() &
size_t(-2) );
2016 for(
size_t j=0UL; j<jpos; j+=2UL ) {
2017 matrix_(row_,j ) *= (~rhs)[j ];
2018 matrix_(row_,j+1UL) *= (~rhs)[j+1UL];
2020 if( jpos < (~rhs).size() )
2021 matrix_(row_,jpos) *= (~rhs)[jpos];
2037 template<
typename MT
2040 template<
typename VT >
2051 const size_t jpos( ( remainder )?( columns &
size_t(-
IT::size) ):( columns ) );
2058 matrix_.store( row_, j , matrix_.load(row_,j ) * it.load() ); it +=
IT::size;
2064 matrix_.store( row_, j, matrix_.load(row_,j) * it.load() );
2066 for( ; remainder && j<
columns; ++j, ++it ) {
2067 matrix_(row_,j) *= *it;
2084 template<
typename MT
2087 template<
typename VT >
2097 matrix_(row_,element->index()) = tmp[element->index()] * element->value();
2122 template<
typename MT >
2158 template<
typename MatrixType >
2175 typedef typename IfTrue< returnConst
2179 typedef std::random_access_iterator_tag IteratorCategory;
2180 typedef RemoveReference<Reference> ValueType;
2181 typedef ValueType* PointerType;
2182 typedef Reference ReferenceType;
2183 typedef ptrdiff_t DifferenceType;
2186 typedef IteratorCategory iterator_category;
2187 typedef ValueType value_type;
2188 typedef PointerType pointer;
2189 typedef ReferenceType reference;
2190 typedef DifferenceType difference_type;
2196 inline RowIterator()
2210 inline RowIterator( MatrixType& matrix,
size_t row,
size_t column )
2222 template<
typename MatrixType2 >
2223 inline RowIterator(
const RowIterator<MatrixType2>& it )
2226 , column_( it.column_ )
2236 inline RowIterator& operator+=(
size_t inc ) {
2248 inline RowIterator& operator-=(
size_t dec ) {
2259 inline RowIterator& operator++() {
2270 inline const RowIterator operator++(
int ) {
2271 const RowIterator tmp( *
this );
2282 inline RowIterator& operator--() {
2293 inline const RowIterator operator--(
int ) {
2294 const RowIterator tmp( *
this );
2306 inline ReferenceType
operator[](
size_t index )
const {
2316 inline ReferenceType
operator*()
const {
2326 inline PointerType operator->()
const {
2327 return &(*matrix_)(
row_,column_);
2337 template<
typename MatrixType2 >
2338 inline bool operator==(
const RowIterator<MatrixType2>& rhs )
const {
2339 return (
matrix_ == rhs.matrix_ ) && (
row_ == rhs.row_ ) && ( column_ == rhs.column_ );
2349 template<
typename MatrixType2 >
2350 inline bool operator!=(
const RowIterator<MatrixType2>& rhs )
const {
2351 return !( *
this == rhs );
2361 template<
typename MatrixType2 >
2362 inline bool operator<( const RowIterator<MatrixType2>& rhs )
const {
2363 return (
matrix_ == rhs.matrix_ ) && (
row_ == rhs.row_ ) && ( column_ < rhs.column_ );
2373 template<
typename MatrixType2 >
2374 inline bool operator>(
const RowIterator<MatrixType2>& rhs )
const {
2375 return (
matrix_ == rhs.matrix_ ) && (
row_ == rhs.row_ ) && ( column_ > rhs.column_ );
2385 template<
typename MatrixType2 >
2386 inline bool operator<=( const RowIterator<MatrixType2>& rhs )
const {
2387 return (
matrix_ == rhs.matrix_ ) && (
row_ == rhs.row_ ) && ( column_ <= rhs.column_ );
2397 template<
typename MatrixType2 >
2398 inline bool operator>=(
const RowIterator<MatrixType2>& rhs )
const {
2399 return (
matrix_ == rhs.matrix_ ) && (
row_ == rhs.row_ ) && ( column_ >= rhs.column_ );
2409 inline DifferenceType
operator-(
const RowIterator& rhs )
const {
2410 return column_ - rhs.column_;
2421 friend inline const RowIterator
operator+(
const RowIterator& it,
size_t inc ) {
2422 return RowIterator( *it.matrix_, it.row_, it.column_+inc );
2433 friend inline const RowIterator
operator+(
size_t inc,
const RowIterator& it ) {
2434 return RowIterator( *it.matrix_, it.row_, it.column_+inc );
2445 friend inline const RowIterator
operator-(
const RowIterator& it,
size_t dec ) {
2446 return RowIterator( *it.matrix_, it.row_, it.column_-dec );
2458 template<
typename MatrixType2 >
friend class RowIterator;
2473 enum { vectorizable = 0 };
2476 enum { smpAssignable = MT::smpAssignable };
2482 explicit inline DenseRow( MT& matrix,
size_t index );
2495 inline ConstReference
operator[](
size_t index )
const;
2496 inline Reference
at(
size_t index );
2497 inline ConstReference
at(
size_t index )
const;
2498 inline Pointer
data ();
2499 inline ConstPointer
data ()
const;
2500 inline Iterator
begin ();
2501 inline ConstIterator
begin ()
const;
2502 inline ConstIterator
cbegin()
const;
2503 inline Iterator
end ();
2504 inline ConstIterator
end ()
const;
2505 inline ConstIterator
cend ()
const;
2515 template<
typename VT >
inline DenseRow&
operator= (
const Vector<VT,true>& rhs );
2516 template<
typename VT >
inline DenseRow& operator+=(
const Vector<VT,true>& rhs );
2517 template<
typename VT >
inline DenseRow& operator-=(
const Vector<VT,true>& rhs );
2518 template<
typename VT >
inline DenseRow& operator*=(
const DenseVector<VT,true>& rhs );
2519 template<
typename VT >
inline DenseRow& operator*=(
const SparseVector<VT,true>& rhs );
2521 template<
typename Other >
2522 inline typename EnableIf< IsNumeric<Other>,
DenseRow >::Type&
2523 operator*=( Other rhs );
2525 template<
typename Other >
2526 inline typename EnableIf< IsNumeric<Other>,
DenseRow >::Type&
2527 operator/=( Other rhs );
2534 inline size_t size()
const;
2537 inline void reset();
2538 template<
typename Other >
inline DenseRow& scale(
const Other& scalar );
2546 template<
typename Other >
2547 inline bool canAlias(
const Other* alias )
const;
2549 template<
typename MT2,
bool SO2,
bool SF2 >
2550 inline bool canAlias(
const DenseRow<MT2,SO2,SF2>* alias )
const;
2552 template<
typename Other >
2553 inline bool isAliased(
const Other* alias )
const;
2555 template<
typename MT2,
bool SO2,
bool SF2 >
2556 inline bool isAliased(
const DenseRow<MT2,SO2,SF2>* alias )
const;
2561 template<
typename VT >
inline void assign (
const DenseVector <VT,true>& rhs );
2562 template<
typename VT >
inline void assign (
const SparseVector<VT,true>& rhs );
2563 template<
typename VT >
inline void addAssign (
const DenseVector <VT,true>& rhs );
2564 template<
typename VT >
inline void addAssign (
const SparseVector<VT,true>& rhs );
2565 template<
typename VT >
inline void subAssign (
const DenseVector <VT,true>& rhs );
2566 template<
typename VT >
inline void subAssign (
const SparseVector<VT,true>& rhs );
2567 template<
typename VT >
inline void multAssign(
const DenseVector <VT,true>& rhs );
2568 template<
typename VT >
inline void multAssign(
const SparseVector<VT,true>& rhs );
2582 template<
typename MT2,
bool SO2,
bool SF2 >
friend class DenseRow;
2584 template<
typename MT2,
bool SO2,
bool SF2 >
2585 friend bool isIntact(
const DenseRow<MT2,SO2,SF2>&
row );
2587 template<
typename MT2,
bool SO2,
bool SF2 >
2588 friend bool isSame(
const DenseRow<MT2,SO2,SF2>& a,
const DenseRow<MT2,SO2,SF2>& b );
2590 template<
typename MT2,
bool SO2,
bool SF2,
typename VT >
2591 friend bool tryAssign(
const DenseRow<MT2,SO2,SF2>& lhs,
const Vector<VT,true>& rhs,
size_t index );
2593 template<
typename MT2,
bool SO2,
bool SF2,
typename VT >
2594 friend bool tryAddAssign(
const DenseRow<MT2,SO2,SF2>& lhs,
const Vector<VT,true>& rhs,
size_t index );
2596 template<
typename MT2,
bool SO2,
bool SF2,
typename VT >
2597 friend bool trySubAssign(
const DenseRow<MT2,SO2,SF2>& lhs,
const Vector<VT,true>& rhs,
size_t index );
2599 template<
typename MT2,
bool SO2,
bool SF2,
typename VT >
2600 friend bool tryMultAssign(
const DenseRow<MT2,SO2,SF2>& lhs,
const Vector<VT,true>& rhs,
size_t index );
2602 template<
typename MT2,
bool SO2,
bool SF2 >
2603 friend typename DerestrictTrait< DenseRow<MT2,SO2,SF2> >::Type
2604 derestrict( DenseRow<MT2,SO2,SF2>& dm );
2637 template<
typename MT >
2642 if(
matrix_.rows() <= index ) {
2668 template<
typename MT >
2673 return matrix_(row_,index);
2689 template<
typename MT >
2694 return const_cast<const MT&
>( matrix_ )(row_,index);
2711 template<
typename MT >
2715 if( index >=
size() ) {
2718 return (*
this)[index];
2735 template<
typename MT >
2739 if( index >=
size() ) {
2742 return (*
this)[index];
2757 template<
typename MT >
2760 return matrix_.data() + row_;
2775 template<
typename MT >
2778 return matrix_.data() + row_;
2792 template<
typename MT >
2795 return Iterator( matrix_, row_, 0UL );
2809 template<
typename MT >
2826 template<
typename MT >
2843 template<
typename MT >
2860 template<
typename MT >
2877 template<
typename MT >
2905 template<
typename MT >
2908 const size_t jbegin( ( IsUpper<MT>::value )
2909 ?( ( IsUniUpper<MT>::value || IsStrictlyUpper<MT>::value )
2913 const size_t jend ( ( IsLower<MT>::value )
2914 ?( ( IsUniLower<MT>::value || IsStrictlyLower<MT>::value )
2919 for(
size_t j=jbegin; j<jend; ++j )
2920 matrix_(row_,j) = rhs;
2942 template<
typename MT >
2945 if( &rhs ==
this )
return *
this;
2947 if(
size() != rhs.size() ) {
2951 if( !tryAssign( matrix_, rhs, row_, 0UL ) ) {
2955 typename DerestrictTrait<This>::Type left( derestrict( *
this ) );
2981 template<
typename MT >
2982 template<
typename VT >
2993 typedef typename If< IsRestricted<MT>,
typename VT::CompositeType,
const VT& >::Type Right;
2994 Right right( ~rhs );
2996 if( !tryAssign( matrix_, right, row_, 0UL ) ) {
3000 typename DerestrictTrait<This>::Type left( derestrict( *
this ) );
3002 if( IsReference<Right>::value && right.canAlias( &matrix_ ) ) {
3003 const ResultType tmp( right );
3007 if( IsSparseVector<VT>::value )
3034 template<
typename MT >
3035 template<
typename VT >
3036 inline DenseRow<MT,false,false>& DenseRow<MT,false,false>::operator+=(
const Vector<VT,true>& rhs )
3045 typedef typename If< IsRestricted<MT>,
typename VT::CompositeType,
const VT& >::Type Right;
3046 Right right( ~rhs );
3048 if( !tryAddAssign( matrix_, right, row_, 0UL ) ) {
3052 typename DerestrictTrait<This>::Type left( derestrict( *
this ) );
3054 if( IsReference<Right>::value && right.canAlias( &matrix_ ) ) {
3084 template<
typename MT >
3085 template<
typename VT >
3086 inline DenseRow<MT,false,false>& DenseRow<MT,false,false>::operator-=(
const Vector<VT,true>& rhs )
3095 typedef typename If< IsRestricted<MT>,
typename VT::CompositeType,
const VT& >::Type Right;
3096 Right right( ~rhs );
3098 if( !trySubAssign( matrix_, right, row_, 0UL ) ) {
3102 typename DerestrictTrait<This>::Type left( derestrict( *
this ) );
3104 if( IsReference<Right>::value && right.canAlias( &matrix_ ) ) {
3133 template<
typename MT >
3134 template<
typename VT >
3135 inline DenseRow<MT,false,false>& DenseRow<MT,false,false>::operator*=(
const DenseVector<VT,true>& rhs )
3144 typedef typename If< IsRestricted<MT>,
typename VT::CompositeType,
const VT& >::Type Right;
3145 Right right( ~rhs );
3147 if( !tryMultAssign( matrix_, right, row_, 0UL ) ) {
3151 typename DerestrictTrait<This>::Type left( derestrict( *
this ) );
3153 if( IsReference<Right>::value && right.canAlias( &matrix_ ) ) {
3182 template<
typename MT >
3183 template<
typename VT >
3184 inline DenseRow<MT,false,false>& DenseRow<MT,false,false>::operator*=(
const SparseVector<VT,true>& rhs )
3194 const ResultType right( *
this * (~rhs) );
3196 if( !tryAssign( matrix_, right, row_, 0UL ) ) {
3200 typename DerestrictTrait<This>::Type left( derestrict( *
this ) );
3223 template<
typename MT >
3224 template<
typename Other >
3225 inline typename EnableIf< IsNumeric<Other>, DenseRow<MT,false,false> >::Type&
3226 DenseRow<MT,false,false>::operator*=( Other rhs )
3230 return operator=( (*
this) * rhs );
3249 template<
typename MT >
3250 template<
typename Other >
3251 inline typename EnableIf< IsNumeric<Other>, DenseRow<MT,false,false> >::Type&
3252 DenseRow<MT,false,false>::operator/=( Other rhs )
3258 return operator=( (*
this) / rhs );
3278 template<
typename MT >
3281 return matrix_.columns();
3293 template<
typename MT >
3296 return matrix_.columns();
3311 template<
typename MT >
3315 size_t nonzeros( 0UL );
3317 for(
size_t j=0UL; j<
columns; ++j )
3333 template<
typename MT >
3338 const size_t jbegin( ( IsUpper<MT>::value )
3339 ?( ( IsUniUpper<MT>::value || IsStrictlyUpper<MT>::value )
3343 const size_t jend ( ( IsLower<MT>::value )
3344 ?( ( IsUniLower<MT>::value || IsStrictlyLower<MT>::value )
3349 for(
size_t j=jbegin; j<jend; ++j )
3350 clear( matrix_(row_,j) );
3367 template<
typename MT >
3368 template<
typename Other >
3369 inline DenseRow<MT,false,false>& DenseRow<MT,false,false>::scale(
const Other& scalar )
3373 const size_t jbegin( ( IsUpper<MT>::value )
3374 ?( ( IsStrictlyUpper<MT>::value )
3378 const size_t jend ( ( IsLower<MT>::value )
3379 ?( ( IsStrictlyLower<MT>::value )
3384 for(
size_t j=jbegin; j<jend; ++j ) {
3385 matrix_(row_,j) *= scalar;
3413 template<
typename MT >
3414 template<
typename Other >
3417 return matrix_.isAliased( alias );
3434 template<
typename MT >
3435 template<
typename MT2
3440 return matrix_.isAliased( &alias->matrix_ ) && ( row_ == alias->row_ );
3457 template<
typename MT >
3458 template<
typename Other >
3461 return matrix_.isAliased( alias );
3478 template<
typename MT >
3479 template<
typename MT2
3484 return matrix_.isAliased( &alias->matrix_ ) && ( row_ == alias->row_ );
3500 template<
typename MT >
3520 template<
typename MT >
3523 return (
size() > SMP_DVECASSIGN_THRESHOLD );
3541 template<
typename MT >
3542 template<
typename VT >
3543 inline void DenseRow<MT,false,false>::assign(
const DenseVector<VT,true>& rhs )
3547 const size_t jpos( (~rhs).
size() &
size_t(-2) );
3548 for(
size_t j=0UL; j<jpos; j+=2UL ) {
3549 matrix_(row_,j ) = (~rhs)[j ];
3550 matrix_(row_,j+1UL) = (~rhs)[j+1UL];
3552 if( jpos < (~rhs).size() )
3553 matrix_(row_,jpos) = (~rhs)[jpos];
3571 template<
typename MT >
3572 template<
typename VT >
3573 inline void DenseRow<MT,false,false>::assign(
const SparseVector<VT,true>& rhs )
3578 matrix_(row_,element->index()) = element->value();
3596 template<
typename MT >
3597 template<
typename VT >
3598 inline void DenseRow<MT,false,false>::addAssign(
const DenseVector<VT,true>& rhs )
3602 const size_t jpos( (~rhs).
size() &
size_t(-2) );
3603 for(
size_t j=0UL; j<jpos; j+=2UL ) {
3604 matrix_(row_,j ) += (~rhs)[j ];
3605 matrix_(row_,j+1UL) += (~rhs)[j+1UL];
3607 if( jpos < (~rhs).size() )
3608 matrix_(row_,jpos) += (~rhs)[jpos];
3626 template<
typename MT >
3627 template<
typename VT >
3628 inline void DenseRow<MT,false,false>::addAssign(
const SparseVector<VT,true>& rhs )
3633 matrix_(row_,element->index()) += element->value();
3651 template<
typename MT >
3652 template<
typename VT >
3653 inline void DenseRow<MT,false,false>::subAssign(
const DenseVector<VT,true>& rhs )
3657 const size_t jpos( (~rhs).
size() &
size_t(-2) );
3658 for(
size_t j=0UL; j<jpos; j+=2UL ) {
3659 matrix_(row_,j ) -= (~rhs)[j ];
3660 matrix_(row_,j+1UL) -= (~rhs)[j+1UL];
3662 if( jpos < (~rhs).size() )
3663 matrix_(row_,jpos) -= (~rhs)[jpos];
3681 template<
typename MT >
3682 template<
typename VT >
3683 inline void DenseRow<MT,false,false>::subAssign(
const SparseVector<VT,true>& rhs )
3688 matrix_(row_,element->index()) -= element->value();
3706 template<
typename MT >
3707 template<
typename VT >
3708 inline void DenseRow<MT,false,false>::multAssign(
const DenseVector<VT,true>& rhs )
3712 const size_t jpos( (~rhs).
size() &
size_t(-2) );
3713 for(
size_t j=0UL; j<jpos; j+=2UL ) {
3714 matrix_(row_,j ) *= (~rhs)[j ];
3715 matrix_(row_,j+1UL) *= (~rhs)[j+1UL];
3717 if( jpos < (~rhs).size() )
3718 matrix_(row_,jpos) *= (~rhs)[jpos];
3736 template<
typename MT >
3737 template<
typename VT >
3738 inline void DenseRow<MT,false,false>::multAssign(
const SparseVector<VT,true>& rhs )
3742 const ResultType tmp(
serial( *
this ) );
3747 matrix_(row_,element->index()) = tmp[element->index()] * element->value();
3773 template<
typename MT >
3774 class DenseRow<MT,false,true> :
public DenseVector< DenseRow<MT,false,true>, true >
3780 typedef typename If< IsExpression<MT>, MT, MT& >::Type
Operand;
3783 typedef IntrinsicTrait<typename MT::ElementType>
IT;
3788 typedef DenseRow<MT,false,true>
This;
3789 typedef typename RowTrait<MT>::Type
ResultType;
3806 typedef typename If< Or< IsConst<MT>, Not< HasMutableDataAccess<MT> > >
3818 enum { vectorizable = MT::vectorizable };
3821 enum { smpAssignable = MT::smpAssignable };
3827 explicit inline DenseRow( MT& matrix,
size_t index );
3840 inline ConstReference
operator[](
size_t index )
const;
3841 inline Reference
at(
size_t index );
3842 inline ConstReference
at(
size_t index )
const;
3843 inline Pointer
data ();
3844 inline ConstPointer
data ()
const;
3845 inline Iterator
begin ();
3846 inline ConstIterator
begin ()
const;
3847 inline ConstIterator
cbegin()
const;
3848 inline Iterator
end ();
3849 inline ConstIterator
end ()
const;
3850 inline ConstIterator
cend ()
const;
3860 template<
typename VT >
inline DenseRow&
operator= (
const Vector<VT,true>& rhs );
3861 template<
typename VT >
inline DenseRow& operator+=(
const Vector<VT,true>& rhs );
3862 template<
typename VT >
inline DenseRow& operator-=(
const Vector<VT,true>& rhs );
3863 template<
typename VT >
inline DenseRow& operator*=(
const DenseVector<VT,true>& rhs );
3864 template<
typename VT >
inline DenseRow& operator*=(
const SparseVector<VT,true>& rhs );
3866 template<
typename Other >
3867 inline typename EnableIf< IsNumeric<Other>,
DenseRow >::Type&
3868 operator*=( Other rhs );
3870 template<
typename Other >
3871 inline typename EnableIf< IsNumeric<Other>,
DenseRow >::Type&
3872 operator/=( Other rhs );
3879 inline size_t size()
const;
3882 inline void reset();
3883 template<
typename Other >
inline DenseRow& scale(
const Other& scalar );
3890 template<
typename VT >
3891 struct VectorizedAssign {
3893 vectorizable && VT::vectorizable &&
3894 IsSame<ElementType,typename VT::ElementType>::value };
3900 template<
typename VT >
3901 struct VectorizedAddAssign {
3903 vectorizable && VT::vectorizable &&
3904 IsSame<ElementType,typename VT::ElementType>::value &&
3905 IntrinsicTrait<ElementType>::addition };
3911 template<
typename VT >
3912 struct VectorizedSubAssign {
3914 vectorizable && VT::vectorizable &&
3915 IsSame<ElementType,typename VT::ElementType>::value &&
3916 IntrinsicTrait<ElementType>::subtraction };
3922 template<
typename VT >
3923 struct VectorizedMultAssign {
3925 vectorizable && VT::vectorizable &&
3926 IsSame<ElementType,typename VT::ElementType>::value &&
3927 IntrinsicTrait<ElementType>::multiplication };
3935 template<
typename Other >
3936 inline bool canAlias(
const Other* alias )
const;
3938 template<
typename MT2,
bool SO2,
bool SF2 >
3939 inline bool canAlias(
const DenseRow<MT2,SO2,SF2>* alias )
const;
3941 template<
typename Other >
3942 inline bool isAliased(
const Other* alias )
const;
3944 template<
typename MT2,
bool SO2,
bool SF2 >
3945 inline bool isAliased(
const DenseRow<MT2,SO2,SF2>* alias )
const;
3959 template<
typename VT >
3960 inline typename DisableIf< VectorizedAssign<VT> >::Type
3961 assign(
const DenseVector<VT,true>& rhs );
3963 template<
typename VT >
3964 inline typename EnableIf< VectorizedAssign<VT> >::Type
3965 assign(
const DenseVector<VT,true>& rhs );
3967 template<
typename VT >
inline void assign(
const SparseVector<VT,true>& rhs );
3969 template<
typename VT >
3970 inline typename DisableIf< VectorizedAddAssign<VT> >::Type
3971 addAssign(
const DenseVector<VT,true>& rhs );
3973 template<
typename VT >
3974 inline typename EnableIf< VectorizedAddAssign<VT> >::Type
3975 addAssign(
const DenseVector<VT,true>& rhs );
3977 template<
typename VT >
inline void addAssign(
const SparseVector<VT,true>& rhs );
3979 template<
typename VT >
3980 inline typename DisableIf< VectorizedSubAssign<VT> >::Type
3981 subAssign(
const DenseVector<VT,true>& rhs );
3983 template<
typename VT >
3984 inline typename EnableIf< VectorizedSubAssign<VT> >::Type
3985 subAssign(
const DenseVector<VT,true>& rhs );
3987 template<
typename VT >
inline void subAssign(
const SparseVector<VT,true>& rhs );
3989 template<
typename VT >
3990 inline typename DisableIf< VectorizedMultAssign<VT> >::Type
3991 multAssign(
const DenseVector<VT,true>& rhs );
3993 template<
typename VT >
3994 inline typename EnableIf< VectorizedMultAssign<VT> >::Type
3995 multAssign(
const DenseVector<VT,true>& rhs );
3997 template<
typename VT >
inline void multAssign(
const SparseVector<VT,true>& rhs );
4011 template<
typename MT2,
bool SO2,
bool SF2 >
friend class DenseRow;
4013 template<
typename MT2,
bool SO2,
bool SF2 >
4014 friend bool isIntact(
const DenseRow<MT2,SO2,SF2>&
row );
4016 template<
typename MT2,
bool SO2,
bool SF2 >
4017 friend bool isSame(
const DenseRow<MT2,SO2,SF2>& a,
const DenseRow<MT2,SO2,SF2>& b );
4019 template<
typename MT2,
bool SO2,
bool SF2,
typename VT >
4020 friend bool tryAssign(
const DenseRow<MT2,SO2,SF2>& lhs,
const Vector<VT,true>& rhs,
size_t index );
4022 template<
typename MT2,
bool SO2,
bool SF2,
typename VT >
4023 friend bool tryAddAssign(
const DenseRow<MT2,SO2,SF2>& lhs,
const Vector<VT,true>& rhs,
size_t index );
4025 template<
typename MT2,
bool SO2,
bool SF2,
typename VT >
4026 friend bool trySubAssign(
const DenseRow<MT2,SO2,SF2>& lhs,
const Vector<VT,true>& rhs,
size_t index );
4028 template<
typename MT2,
bool SO2,
bool SF2,
typename VT >
4029 friend bool tryMultAssign(
const DenseRow<MT2,SO2,SF2>& lhs,
const Vector<VT,true>& rhs,
size_t index );
4031 template<
typename MT2,
bool SO2,
bool SF2 >
4032 friend typename DerestrictTrait< DenseRow<MT2,SO2,SF2> >::Type
4033 derestrict( DenseRow<MT2,SO2,SF2>& dm );
4066 template<
typename MT >
4071 if(
matrix_.rows() <= index ) {
4097 template<
typename MT >
4102 return matrix_(index,row_);
4118 template<
typename MT >
4123 return const_cast<const MT&
>( matrix_ )(row_,index);
4140 template<
typename MT >
4144 if( index >=
size() ) {
4147 return (*
this)[index];
4164 template<
typename MT >
4168 if( index >=
size() ) {
4171 return (*
this)[index];
4186 template<
typename MT >
4189 return matrix_.data( row_ );
4204 template<
typename MT >
4207 return matrix_.data( row_ );
4221 template<
typename MT >
4224 return matrix_.begin( row_ );
4238 template<
typename MT >
4241 return matrix_.cbegin( row_ );
4255 template<
typename MT >
4258 return matrix_.cbegin( row_ );
4272 template<
typename MT >
4275 return matrix_.end( row_ );
4289 template<
typename MT >
4292 return matrix_.cend( row_ );
4306 template<
typename MT >
4309 return matrix_.cend( row_ );
4330 template<
typename MT >
4333 const size_t ibegin( ( IsLower<MT>::value )
4334 ?( ( IsUniLower<MT>::value || IsStrictlyLower<MT>::value )
4338 const size_t iend ( ( IsUpper<MT>::value )
4339 ?( ( IsUniUpper<MT>::value || IsStrictlyUpper<MT>::value )
4344 for(
size_t i=ibegin; i<iend; ++i )
4345 matrix_(i,row_) = rhs;
4367 template<
typename MT >
4370 if( &rhs ==
this )
return *
this;
4372 if(
size() != rhs.size() ) {
4376 if( !tryAssign( matrix_, rhs, row_, 0UL ) ) {
4380 typename DerestrictTrait<This>::Type left( derestrict( *
this ) );
4406 template<
typename MT >
4407 template<
typename VT >
4417 typedef typename If< IsRestricted<MT>,
typename VT::CompositeType,
const VT& >::Type Right;
4418 Right right( ~rhs );
4420 if( !tryAssign( matrix_, right, row_, 0UL ) ) {
4424 typename DerestrictTrait<This>::Type left( derestrict( *
this ) );
4426 if( IsReference<Right>::value && right.canAlias( &matrix_ ) ) {
4431 if( IsSparseVector<VT>::value )
4458 template<
typename MT >
4459 template<
typename VT >
4460 inline DenseRow<MT,false,true>& DenseRow<MT,false,true>::operator+=(
const Vector<VT,true>& rhs )
4469 typedef typename If< IsRestricted<MT>,
typename VT::CompositeType,
const VT& >::Type Right;
4470 Right right( ~rhs );
4472 if( !tryAddAssign( matrix_, right, row_, 0UL ) ) {
4476 typename DerestrictTrait<This>::Type left( derestrict( *
this ) );
4478 if( IsReference<Right>::value && right.canAlias( &matrix_ ) ) {
4508 template<
typename MT >
4509 template<
typename VT >
4510 inline DenseRow<MT,false,true>& DenseRow<MT,false,true>::operator-=(
const Vector<VT,true>& rhs )
4519 typedef typename If< IsRestricted<MT>,
typename VT::CompositeType,
const VT& >::Type Right;
4520 Right right( ~rhs );
4522 if( !trySubAssign( matrix_, right, row_, 0UL ) ) {
4526 typename DerestrictTrait<This>::Type left( derestrict( *
this ) );
4528 if( IsReference<Right>::value && right.canAlias( &matrix_ ) ) {
4557 template<
typename MT >
4558 template<
typename VT >
4559 inline DenseRow<MT,false,true>& DenseRow<MT,false,true>::operator*=(
const DenseVector<VT,true>& rhs )
4568 typedef typename If< IsRestricted<MT>,
typename VT::CompositeType,
const VT& >::Type Right;
4569 Right right( ~rhs );
4571 if( !tryMultAssign( matrix_, right, row_, 0UL ) ) {
4575 typename DerestrictTrait<This>::Type left( derestrict( *
this ) );
4577 if( IsReference<Right>::value && right.canAlias( &matrix_ ) ) {
4606 template<
typename MT >
4607 template<
typename VT >
4608 inline DenseRow<MT,false,true>& DenseRow<MT,false,true>::operator*=(
const SparseVector<VT,true>& rhs )
4618 const ResultType right( *
this * (~rhs) );
4620 if( !tryAssign( matrix_, right, row_, 0UL ) ) {
4624 typename DerestrictTrait<This>::Type left( derestrict( *
this ) );
4647 template<
typename MT >
4648 template<
typename Other >
4649 inline typename EnableIf< IsNumeric<Other>, DenseRow<MT,false,true> >::Type&
4650 DenseRow<MT,false,true>::operator*=( Other rhs )
4654 return operator=( (*
this) * rhs );
4673 template<
typename MT >
4674 template<
typename Other >
4675 inline typename EnableIf< IsNumeric<Other>, DenseRow<MT,false,true> >::Type&
4676 DenseRow<MT,false,true>::operator/=( Other rhs )
4682 return operator=( (*
this) / rhs );
4702 template<
typename MT >
4705 return matrix_.columns();
4717 template<
typename MT >
4720 return matrix_.capacity( row_ );
4735 template<
typename MT >
4738 return matrix_.nonZeros( row_ );
4750 template<
typename MT >
4753 matrix_.reset( row_ );
4770 template<
typename MT >
4771 template<
typename Other >
4772 inline DenseRow<MT,false,true>& DenseRow<MT,false,true>::scale(
const Other& scalar )
4776 const size_t ibegin( ( IsLower<MT>::value )
4777 ?( ( IsStrictlyLower<MT>::value )
4781 const size_t iend ( ( IsUpper<MT>::value )
4782 ?( ( IsStrictlyUpper<MT>::value )
4787 for(
size_t i=ibegin; i<iend; ++i ) {
4788 matrix_(i,row_) *= scalar;
4816 template<
typename MT >
4817 template<
typename Other >
4820 return matrix_.isAliased( alias );
4837 template<
typename MT >
4838 template<
typename MT2
4843 return matrix_.isAliased( &alias->matrix_ ) && ( row_ == alias->row_ );
4860 template<
typename MT >
4861 template<
typename Other >
4864 return matrix_.isAliased( alias );
4881 template<
typename MT >
4882 template<
typename MT2
4887 return matrix_.isAliased( &alias->matrix_ ) && ( row_ == alias->row_ );
4903 template<
typename MT >
4906 return matrix_.isAligned();
4923 template<
typename MT >
4926 return (
size() > SMP_DVECASSIGN_THRESHOLD );
4945 template<
typename MT >
4949 return matrix_.load( index, row_ );
4968 template<
typename MT >
4972 return matrix_.loada( index, row_ );
4991 template<
typename MT >
4995 return matrix_.loadu( index, row_ );
5015 template<
typename MT >
5018 matrix_.store( index, row_, value );
5038 template<
typename MT >
5041 matrix_.storea( index, row_, value );
5061 template<
typename MT >
5064 matrix_.storeu( index, row_, value );
5084 template<
typename MT >
5087 matrix_.stream( index, row_, value );
5105 template<
typename MT >
5106 template<
typename VT >
5107 inline typename DisableIf< typename DenseRow<MT,false,true>::BLAZE_TEMPLATE VectorizedAssign<VT> >::Type
5108 DenseRow<MT,false,true>::assign(
const DenseVector<VT,true>& rhs )
5112 const size_t ipos( (~rhs).
size() &
size_t(-2) );
5113 for(
size_t i=0UL; i<ipos; i+=2UL ) {
5114 matrix_(i ,row_) = (~rhs)[i ];
5115 matrix_(i+1UL,row_) = (~rhs)[i+1UL];
5117 if( ipos < (~rhs).size() )
5118 matrix_(ipos,row_) = (~rhs)[ipos];
5136 template<
typename MT >
5137 template<
typename VT >
5138 inline typename EnableIf< typename DenseRow<MT,false,true>::BLAZE_TEMPLATE VectorizedAssign<VT> >::Type
5139 DenseRow<MT,false,true>::assign(
const DenseVector<VT,true>& rhs )
5145 const bool remainder( !IsPadded<MT>::value || !IsPadded<VT>::value );
5156 matrix_.stream( i, row_, (~rhs).load(i) );
5158 for( ; remainder && i<
rows; ++i ) {
5159 matrix_(i,row_) = (~rhs)[i];
5168 matrix_.store( i , row_, it.load() ); it +=
IT::size;
5174 matrix_.store( i, row_, it.load() );
5176 for( ; remainder && i<
rows; ++i, ++it ) {
5177 matrix_(i,row_) = *it;
5197 template<
typename MT >
5198 template<
typename VT >
5199 inline void DenseRow<MT,false,true>::assign(
const SparseVector<VT,true>& rhs )
5204 matrix_(element->index(),row_) = element->value();
5222 template<
typename MT >
5223 template<
typename VT >
5224 inline typename DisableIf< typename DenseRow<MT,false,true>::BLAZE_TEMPLATE VectorizedAddAssign<VT> >::Type
5225 DenseRow<MT,false,true>::addAssign(
const DenseVector<VT,true>& rhs )
5229 const size_t ipos( (~rhs).
size() &
size_t(-2) );
5230 for(
size_t i=0UL; i<ipos; i+=2UL ) {
5231 matrix_(i ,row_) += (~rhs)[i ];
5232 matrix_(i+1UL,row_) += (~rhs)[i+1UL];
5234 if( ipos < (~rhs).size() )
5235 matrix_(ipos,row_) += (~rhs)[ipos];
5253 template<
typename MT >
5254 template<
typename VT >
5255 inline typename EnableIf< typename DenseRow<MT,false,true>::BLAZE_TEMPLATE VectorizedAddAssign<VT> >::Type
5256 DenseRow<MT,false,true>::addAssign(
const DenseVector<VT,true>& rhs )
5262 const bool remainder( !IsPadded<MT>::value || !IsPadded<VT>::value );
5272 matrix_.store( i , row_, matrix_.load(i ,row_) + it.load() ); it +=
IT::size;
5278 matrix_.store( i, row_, matrix_.load(i,row_) + it.load() );
5280 for( ; remainder && i<
rows; ++i, ++it ) {
5281 matrix_(i,row_) += *it;
5300 template<
typename MT >
5301 template<
typename VT >
5302 inline void DenseRow<MT,false,true>::addAssign(
const SparseVector<VT,true>& rhs )
5307 matrix_(element->index(),row_) += element->value();
5325 template<
typename MT >
5326 template<
typename VT >
5327 inline typename DisableIf< typename DenseRow<MT,false,true>::BLAZE_TEMPLATE VectorizedSubAssign<VT> >::Type
5328 DenseRow<MT,false,true>::subAssign(
const DenseVector<VT,true>& rhs )
5332 const size_t ipos( (~rhs).
size() &
size_t(-2) );
5333 for(
size_t i=0UL; i<ipos; i+=2UL ) {
5334 matrix_(i ,row_) -= (~rhs)[i ];
5335 matrix_(i+1UL,row_) -= (~rhs)[i+1UL];
5337 if( ipos < (~rhs).size() )
5338 matrix_(ipos,row_) -= (~rhs)[ipos];
5356 template<
typename MT >
5357 template<
typename VT >
5358 inline typename EnableIf< typename DenseRow<MT,false,true>::BLAZE_TEMPLATE VectorizedSubAssign<VT> >::Type
5359 DenseRow<MT,false,true>::subAssign(
const DenseVector<VT,true>& rhs )
5365 const bool remainder( !IsPadded<MT>::value || !IsPadded<VT>::value );
5375 matrix_.store( i , row_, matrix_.load(i ,row_) - it.load() ); it +=
IT::size;
5381 matrix_.store( i, row_, matrix_.load(i,row_) - it.load() );
5383 for( ; remainder && i<
rows; ++i, ++it ) {
5384 matrix_(i,row_) -= *it;
5403 template<
typename MT >
5404 template<
typename VT >
5405 inline void DenseRow<MT,false,true>::subAssign(
const SparseVector<VT,true>& rhs )
5410 matrix_(element->index(),row_) -= element->value();
5428 template<
typename MT >
5429 template<
typename VT >
5430 inline typename DisableIf< typename DenseRow<MT,false,true>::BLAZE_TEMPLATE VectorizedMultAssign<VT> >::Type
5431 DenseRow<MT,false,true>::multAssign(
const DenseVector<VT,true>& rhs )
5435 const size_t ipos( (~rhs).
size() &
size_t(-2) );
5436 for(
size_t i=0UL; i<ipos; i+=2UL ) {
5437 matrix_(i ,row_) *= (~rhs)[i ];
5438 matrix_(i+1UL,row_) *= (~rhs)[i+1UL];
5440 if( ipos < (~rhs).size() )
5441 matrix_(ipos,row_) *= (~rhs)[ipos];
5459 template<
typename MT >
5460 template<
typename VT >
5461 inline typename EnableIf< typename DenseRow<MT,false,true>::BLAZE_TEMPLATE VectorizedMultAssign<VT> >::Type
5462 DenseRow<MT,false,true>::multAssign(
const DenseVector<VT,true>& rhs )
5468 const bool remainder( !IsPadded<MT>::value || !IsPadded<VT>::value );
5478 matrix_.store( i , row_, matrix_.load(i ,row_) * it.load() ); it +=
IT::size;
5484 matrix_.store( i, row_, matrix_.load(i,row_) * it.load() );
5486 for( ; remainder && i<
rows; ++i, ++it ) {
5487 matrix_(i,row_) *= *it;
5506 template<
typename MT >
5507 template<
typename VT >
5508 inline void DenseRow<MT,false,true>::multAssign(
const SparseVector<VT,true>& rhs )
5512 const ResultType tmp(
serial( *
this ) );
5517 matrix_(element->index(),row_) = tmp[element->index()] * element->value();
5538 template<
typename MT,
bool SO,
bool SF >
5539 inline void reset( DenseRow<MT,SO,SF>&
row );
5541 template<
typename MT,
bool SO,
bool SF >
5542 inline void clear( DenseRow<MT,SO,SF>&
row );
5544 template<
typename MT,
bool SO,
bool SF >
5545 inline bool isDefault(
const DenseRow<MT,SO,SF>&
row );
5547 template<
typename MT,
bool SO,
bool SF >
5548 inline bool isIntact(
const DenseRow<MT,SO,SF>&
row );
5550 template<
typename MT,
bool SO,
bool SF >
5551 inline bool isSame(
const DenseRow<MT,SO,SF>& a,
const DenseRow<MT,SO,SF>& b );
5563 template<
typename MT
5582 template<
typename MT
5610 template<
typename MT
5615 for(
size_t i=0UL; i<row.size(); ++i )
5616 if( !
isDefault( row[i] ) )
return false;
5639 template<
typename MT
5644 return ( row.row_ <= row.matrix_.rows() &&
5662 template<
typename MT
5667 return (
isSame( a.matrix_, b.matrix_ ) && ( a.row_ == b.row_ ) );
5687 template<
typename MT
5691 inline bool tryAssign(
const DenseRow<MT,SO,SF>& lhs,
const Vector<VT,true>& rhs,
size_t index )
5696 return tryAssign( lhs.matrix_, ~rhs, lhs.row_, index );
5717 template<
typename MT
5721 inline bool tryAddAssign(
const DenseRow<MT,SO,SF>& lhs,
const Vector<VT,true>& rhs,
size_t index )
5726 return tryAddAssign( lhs.matrix_, ~rhs, lhs.row_, index );
5747 template<
typename MT
5751 inline bool trySubAssign(
const DenseRow<MT,SO,SF>& lhs,
const Vector<VT,true>& rhs,
size_t index )
5756 return trySubAssign( lhs.matrix_, ~rhs, lhs.row_, index );
5777 template<
typename MT
5781 inline bool tryMultAssign(
const DenseRow<MT,SO,SF>& lhs,
const Vector<VT,true>& rhs,
size_t index )
5786 return tryMultAssign( lhs.matrix_, ~rhs, lhs.row_, index );
5807 template<
typename MT
5810 inline typename DerestrictTrait< DenseRow<MT,SO,SF> >::Type
5811 derestrict( DenseRow<MT,SO,SF>&
row )
5813 typedef typename DerestrictTrait< DenseRow<MT,SO,SF> >::Type
ReturnType;
5814 return ReturnType( derestrict( row.matrix_ ), row.row_ );
5830 template<
typename MT,
bool SO,
bool SF >
5831 struct IsRestricted< DenseRow<MT,SO,SF> > :
public IsTrue< IsRestricted<MT>::value >
5847 template<
typename MT,
bool SO,
bool SF >
5848 struct DerestrictTrait< DenseRow<MT,SO,SF> >
5850 typedef DenseRow< typename RemoveReference< typename DerestrictTrait<MT>::Type >::Type > Type;
5866 template<
typename MT,
bool SO,
bool SF >
5867 struct HasConstDataAccess< DenseRow<MT,SO,SF> >
5868 :
public IsTrue< HasConstDataAccess<MT>::value >
5884 template<
typename MT,
bool SO,
bool SF >
5885 struct HasMutableDataAccess< DenseRow<MT,SO,SF> >
5886 :
public IsTrue< HasMutableDataAccess<MT>::value >
5902 template<
typename MT,
bool SO,
bool SF >
5903 struct IsAligned< DenseRow<MT,SO,SF> >
5904 :
public IsTrue< And< IsAligned<MT>, Or< IsRowMajorMatrix<MT>, IsSymmetric<MT> > >::value >
5920 template<
typename MT,
bool SO,
bool SF >
5921 struct IsPadded< DenseRow<MT,SO,SF> >
5922 :
public IsTrue< And< IsPadded<MT>, Or< IsRowMajorMatrix<MT>, IsSymmetric<MT> > >::value >
5938 template<
typename MT,
bool SO,
bool SF,
typename T >
5939 struct AddTrait< DenseRow<MT,SO,SF>, T >
5941 typedef typename AddTrait< typename RowTrait<MT>::Type, T >::Type Type;
5944 template<
typename T,
typename MT,
bool SO,
bool SF >
5945 struct AddTrait< T, DenseRow<MT,SO,SF> >
5947 typedef typename AddTrait< T, typename RowTrait<MT>::Type >::Type Type;
5963 template<
typename MT,
bool SO,
bool SF,
typename T >
5964 struct SubTrait< DenseRow<MT,SO,SF>, T >
5966 typedef typename SubTrait< typename RowTrait<MT>::Type, T >::Type Type;
5969 template<
typename T,
typename MT,
bool SO,
bool SF >
5970 struct SubTrait< T, DenseRow<MT,SO,SF> >
5972 typedef typename SubTrait< T, typename RowTrait<MT>::Type >::Type Type;
5988 template<
typename MT,
bool SO,
bool SF,
typename T >
5989 struct MultTrait< DenseRow<MT,SO,SF>, T >
5991 typedef typename MultTrait< typename RowTrait<MT>::Type, T >::Type Type;
5994 template<
typename T,
typename MT,
bool SO,
bool SF >
5995 struct MultTrait< T, DenseRow<MT,SO,SF> >
5997 typedef typename MultTrait< T, typename RowTrait<MT>::Type >::Type Type;
6013 template<
typename MT,
bool SO,
bool SF,
typename T >
6014 struct CrossTrait< DenseRow<MT,SO,SF>, T >
6016 typedef typename CrossTrait< typename RowTrait<MT>::Type, T >::Type Type;
6019 template<
typename T,
typename MT,
bool SO,
bool SF >
6020 struct CrossTrait< T, DenseRow<MT,SO,SF> >
6022 typedef typename CrossTrait< T, typename RowTrait<MT>::Type >::Type Type;
6038 template<
typename MT,
bool SO,
bool SF,
typename T >
6039 struct DivTrait< DenseRow<MT,SO,SF>, T >
6041 typedef typename DivTrait< typename RowTrait<MT>::Type, T >::Type Type;
6044 template<
typename T,
typename MT,
bool SO,
bool SF >
6045 struct DivTrait< T, DenseRow<MT,SO,SF> >
6047 typedef typename DivTrait< T, typename RowTrait<MT>::Type >::Type Type;
6063 template<
typename MT,
bool SO,
bool SF >
6064 struct SubvectorTrait< DenseRow<MT,SO,SF> >
Pointer data()
Low-level data access to the row elements.
Definition: DenseRow.h:763
Constraint on the data type.
#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
Constraint on the data type.
#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 IsUniUpper type trait.
Compile time type selection.The If class template selects one of the two given types T2 and T3 depend...
Definition: If.h:112
const DMatDMatMultExpr< T1, T2 > operator*(const DenseMatrix< T1, false > &lhs, const DenseMatrix< T2, false > &rhs)
Multiplication operator for the multiplication of two row-major dense matrices ( ).
Definition: DMatDMatMultExpr.h:7820
Header file for the subtraction trait.
ConstIterator cend() const
Returns an iterator just past the last element of the row.
Definition: DenseRow.h:883
Header file for basic type definitions.
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector)
Returns the current size/dimension of the vector.
Definition: Vector.h:252
Operand matrix_
The dense matrix containing the row.
Definition: DenseRow.h:581
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
ConstIterator cbegin() const
Returns an iterator to the first element of the row.
Definition: DenseRow.h:832
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:207
Header file for the row base class.
Header file for the IsDiagonal type trait.
ResultType::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: DenseRow.h:358
#define BLAZE_CONSTRAINT_MUST_NOT_BE_COMPUTATION_TYPE(T)
Constraint on the data type.In case the given data type T is a computational expression (i...
Definition: Computation.h:118
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a dense, N-dimensional matrix type...
Definition: DenseMatrix.h:79
BLAZE_ALWAYS_INLINE bool isSame(const Matrix< MT1, SO1 > &a, const Matrix< MT2, SO2 > &b)
Returns whether the two given matrices represent the same observable state.
Definition: Matrix.h:647
BLAZE_ALWAYS_INLINE void stream(size_t index, const IntrinsicType &value)
Aligned, non-temporal store of an intrinsic element of the dense row.
Definition: DenseRow.h:1665
Header file for the IsSame and IsStrictlySame type traits.
const bool useStreaming
Configuration of the streaming behavior.For large vectors and matrices non-temporal stores can provid...
Definition: Optimizations.h:68
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:507
size_t nonZeros() const
Returns the number of non-zero elements in the row.
Definition: DenseRow.h:1316
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2588
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix)
Returns the current number of rows of the matrix.
Definition: Matrix.h:308
Reference operator[](size_t index)
Subscript operator for the direct access to the row elements.
Definition: DenseRow.h:677
DisableIf< Or< IsComputation< MT >, IsTransExpr< MT > >, typename ColumnExprTrait< MT >::Type >::Type column(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific column of the given matrix.
Definition: Column.h:107
Header file for the And class template.
bool operator>(const NegativeAccuracy< A > &lhs, const T &rhs)
Greater-than comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:366
Header file for the DenseVector base class.
Compile time check for lower triangular matrices.This type trait tests whether or not the given templ...
Definition: IsLower.h:90
#define BLAZE_CONSTRAINT_MUST_NOT_BE_UNITRIANGULAR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a lower or upper unitriangular matrix ty...
Definition: UniTriangular.h:118
If< IsExpression< MT >, MT, MT & >::Type Operand
Composite data type of the dense matrix expression.
Definition: DenseRow.h:348
bool operator>=(const NegativeAccuracy< A > &, const T &rhs)
Greater-or-equal-than comparison between a NegativeAccuracy object and a floating point value...
Definition: Accuracy.h:442
BLAZE_ALWAYS_INLINE IntrinsicType loadu(size_t index) const
Unaligned load of an intrinsic element of the dense row.
Definition: DenseRow.h:1573
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:721
If< Or< IsConst< MT >, Not< HasMutableDataAccess< MT > > >, ConstPointer, ElementType * >::Type Pointer
Pointer to a non-constant row value.
Definition: DenseRow.h:375
#define BLAZE_CONSTRAINT_MUST_BE_SYMMETRIC_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a symmetric matrix type...
Definition: Symmetric.h:78
size_t size() const
Returns the current size/dimension of the row.
Definition: DenseRow.h:1283
Compile time check for upper triangular matrices.This type trait tests whether or not the given templ...
Definition: IsUpper.h:90
Constraints on the storage order of matrix types.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_TRANSEXPR_TYPE(T)
Constraint on the data type.In case the given data type T is a transposition expression (i...
Definition: TransExpr.h:118
System settings for performance optimizations.
Header file for the IsUniLower type trait.
MT::ElementType ElementType
Type of the row elements.
Definition: DenseRow.h:359
void reset()
Reset to the default initial values.
Definition: DenseRow.h:1331
bool canAlias(const Other *alias) const
Returns whether the dense row can alias with the given address alias.
Definition: DenseRow.h:1398
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:547
Constraint on the data type.
Constraint on the data type.
If< IsConst< MT >, ConstIterator, typename MT::Iterator >::Type Iterator
Iterator over non-constant elements.
Definition: DenseRow.h:381
Base template for the RowTrait class.
Definition: RowTrait.h:115
Compile time check for upper unitriangular matrices.This type trait tests whether or not the given te...
Definition: IsUniUpper.h:85
Header file for the DisableIf class template.
Reference at(size_t index)
Checked access to the row elements.
Definition: DenseRow.h:719
Header file for the multiplication trait.
Header file for the IsStrictlyUpper type trait.
Header file for the IsSymmetric 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.
Header file for the If class template.
Header file for the IsFloatingPoint type trait.
#define BLAZE_CONSTRAINT_MUST_BE_COLUMN_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a column-major dense or sparse matri...
Definition: ColumnMajorMatrix.h:79
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2592
#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
Header file for the Or class template.
#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
const DenseIterator< Type, AF > operator+(const DenseIterator< Type, AF > &it, ptrdiff_t inc)
Addition between a DenseIterator and an integral value.
Definition: DenseIterator.h:610
bool isAligned() const
Returns whether the dense row is properly aligned in memory.
Definition: DenseRow.h:1484
Header file for the Not class template.
Header file for the subvector trait.
MT::ConstIterator ConstIterator
Iterator over constant elements.
Definition: DenseRow.h:378
const ElementType * ConstPointer
Pointer to a constant row value.
Definition: DenseRow.h:371
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:70
Compile time check for sparse vector types.This type trait tests whether or not the given template pa...
Definition: IsSparseVector.h:103
Iterator begin()
Returns an iterator to the first element of the row.
Definition: DenseRow.h:798
IT::Type IntrinsicType
Intrinsic type of the row elements.
Definition: DenseRow.h:360
Header file for the IsLower type trait.
Header file for the IsAligned type trait.
const DenseIterator< Type, AF > operator-(const DenseIterator< Type, AF > &it, ptrdiff_t inc)
Subtraction between a DenseIterator and an integral value.
Definition: DenseIterator.h:642
Constraint on the data type.
#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
const size_t row_
The index of the row in the matrix.
Definition: DenseRow.h:582
BLAZE_ALWAYS_INLINE void storea(size_t index, const IntrinsicType &value)
Aligned store of an intrinsic element of the dense row.
Definition: DenseRow.h:1619
Constraint on the data type.
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
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2586
Constraint on the data type.
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
Header file for the IsPadded type trait.
Compile time check for lower unitriangular matrices.This type trait tests whether or not the given te...
Definition: IsUniLower.h:85
Header file for the DerestrictTrait class template.
Constraint on the data type.
Header file for the IsNumeric type trait.
Header file for the HasConstDataAccess type trait.
DenseRow & operator=(const ElementType &rhs)
Homogenous assignment to all row elements.
Definition: DenseRow.h:911
DisableIf< Or< IsComputation< MT >, IsTransExpr< MT > >, typename RowExprTrait< MT >::Type >::Type row(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific row of the given matrix.
Definition: Row.h:107
If< IsConst< MT >, ConstReference, typename MT::Reference >::Type Reference
Reference to a non-constant row value.
Definition: DenseRow.h:368
EnableIf< IsDenseMatrix< MT1 > >::Type smpSubAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:160
Header file for the IsSparseVector type trait.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SYMMETRIC_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a symmetric matrix type, a compilation error is created.
Definition: Symmetric.h:116
#define BLAZE_CONSTRAINT_MUST_BE_ROW_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a row-major dense or sparse matrix t...
Definition: RowMajorMatrix.h:79
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2587
Header file for the IsConst type trait.
RowTrait< MT >::Type ResultType
Result type for expression template evaluations.
Definition: DenseRow.h:357
Intrinsic characteristics of data types.The IntrinsicTrait class template provides the intrinsic char...
Definition: IntrinsicTrait.h:1232
Base class for all rows.The Row class serves as a tag for all rows (i.e. dense and sparse rows)...
Definition: Row.h:63
Header file for run time assertion macros.
bool canSMPAssign() const
Returns whether the dense row can be used in SMP assignments.
Definition: DenseRow.h:1504
EnableIf< IsDenseMatrix< MT1 > >::Type smpAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:98
IntrinsicTrait< typename MT::ElementType > IT
Intrinsic trait for the row element type.
Definition: DenseRow.h:351
Header file for the addition trait.
const DenseRow & CompositeType
Data type for composite expression templates.
Definition: DenseRow.h:362
Header file for the cross product trait.
Header file for the division trait.
DenseRow< MT, SO, SF > This
Type of this DenseRow instance.
Definition: DenseRow.h:356
DenseRow(MT &matrix, size_t index)
The constructor for DenseRow.
Definition: DenseRow.h:646
bool isAliased(const Other *alias) const
Returns whether the dense row is aliased with the given address alias.
Definition: DenseRow.h:1442
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:184
const bool useOptimizedKernels
Configuration switch for optimized kernels.This configuration switch enables/disables all optimized c...
Definition: Optimizations.h:84
Reference to a specific row of a dense matrix.The DenseRow template represents a reference to a speci...
Definition: DenseRow.h:342
Header file for the cache size of the target architecture.
Compile time type negation.The Not class template negates the given compile time condition. In case the given condition would evaluate to true, the nested member enumeration is set to false and vice versa:
Definition: Not.h:70
#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 isDefault shim.
Constraint on the data type.
Constraint on the data type.
Constraints on the storage order of matrix types.
Header file for the HasMutableDataAccess type trait.
Iterator end()
Returns an iterator just past the last element of the row.
Definition: DenseRow.h:849
BLAZE_ALWAYS_INLINE void store(size_t index, const IntrinsicType &value)
Store of an intrinsic element of the dense row.
Definition: DenseRow.h:1596
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.In case the given data type T requires an intermediate evaluation within ...
Definition: RequiresEvaluation.h:118
Evaluation of the return type of the derestrict function.Via this type trait it is possible to evalua...
Definition: DerestrictTrait.h:74
Header file for the IsReference type trait.
Header file for the RemoveReference type trait.
Substitution Failure Is Not An Error (SFINAE) class.The DisableIf class template is an auxiliary tool...
Definition: DisableIf.h:184
Compile time check for constant data types.The IsConst type trait tests whether or not the given temp...
Definition: IsConst.h:94
Header file for all intrinsic functionality.
Compile time check for strictly lower triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyLower.h:86
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a dense, N-dimensional vector type...
Definition: DenseVector.h:79
Header file for the IsRowMajorMatrix type trait.
Base class for N-dimensional vectors.The Vector class is a base class for all arbitrarily sized (N-di...
Definition: Forward.h:164
BLAZE_ALWAYS_INLINE IntrinsicType loada(size_t index) const
Aligned load of an intrinsic element of the dense row.
Definition: DenseRow.h:1550
CompressedMatrix< Type,!SO > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:258
BLAZE_ALWAYS_INLINE IntrinsicType load(size_t index) const
Load of an intrinsic element of the dense row.
Definition: DenseRow.h:1527
EnableIf< IsDenseMatrix< MT1 > >::Type smpAddAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP addition assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:129
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:118
size_t capacity() const
Returns the maximum capacity of the dense row.
Definition: DenseRow.h:1298
bool operator==(const NegativeAccuracy< A > &lhs, const T &rhs)
Equality comparison between a NegativeAccuracy object and a floating point value. ...
Definition: Accuracy.h:249
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2583
Header file for the IsTrue value trait.
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 operator!=(const NegativeAccuracy< A > &lhs, const T &rhs)
Inequality comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:289
Compile time type check.This class tests whether the given template parameter T is a reference type (...
Definition: IsReference.h:94
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:237
#define BLAZE_CONSTRAINT_MUST_BE_ROW_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a row dense or sparse vector type (i...
Definition: RowVector.h:79
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:2589
MT::ConstReference ConstReference
Reference to a constant row value.
Definition: DenseRow.h:365
Header file for the IsUpper type trait.
Header file for exception macros.
const size_t cacheSize
Cache size of the target architecture.This setting specifies the available cache size in Byte of the ...
Definition: CacheSize.h:48
Header file for the IsRestricted type trait.
BLAZE_ALWAYS_INLINE void storeu(size_t index, const IntrinsicType &value)
Unligned store of an intrinsic element of the dense row.
Definition: DenseRow.h:1642
System settings for the inline keywords.
EnableIf< IsDenseVector< VT1 > >::Type smpMultAssign(Vector< VT1, TF1 > &lhs, const Vector< VT2, TF2 > &rhs)
Default implementation of the SMP multiplication assignment of a vector to a dense vector...
Definition: DenseVector.h:189
Header file for the thresholds for matrix/vector and matrix/matrix multiplications.
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101
Constraint on the transpose flag of vector types.
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.
MT::ReturnType ReturnType
Return type for expression template evaluations.
Definition: DenseRow.h:361
Header file for a safe C++ NULL pointer implementation.