35 #ifndef _BLAZE_MATH_VIEWS_DENSECOLUMN_H_
36 #define _BLAZE_MATH_VIEWS_DENSECOLUMN_H_
339 template<
typename MT
340 ,
bool SO = IsColumnMajorMatrix<MT>::value
341 ,
bool SF = IsSymmetric<MT>::value >
386 enum { vectorizable = MT::vectorizable };
389 enum { smpAssignable = MT::smpAssignable };
395 explicit inline DenseColumn( 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;
429 template<
typename VT >
inline DenseColumn& operator+=(
const Vector<VT,false>& rhs );
430 template<
typename VT >
inline DenseColumn& operator-=(
const Vector<VT,false>& rhs );
431 template<
typename VT >
inline DenseColumn& operator*=(
const DenseVector<VT,false>& rhs );
432 template<
typename VT >
inline DenseColumn& operator*=(
const SparseVector<VT,false>& rhs );
434 template<
typename Other >
435 inline typename EnableIf< IsNumeric<Other>,
DenseColumn >::Type&
436 operator*=( Other rhs );
438 template<
typename Other >
439 inline typename EnableIf< IsNumeric<Other>,
DenseColumn >::Type&
440 operator/=( Other rhs );
447 inline size_t size()
const;
451 template<
typename Other >
inline DenseColumn& 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 DenseColumn<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 DenseColumn<MT2,SO2,SF2>* alias )
const;
535 template<
typename VT >
536 inline typename DisableIf< VectorizedAssign<VT> >::Type
537 assign(
const DenseVector<VT,false>& rhs );
539 template<
typename VT >
540 inline typename EnableIf< VectorizedAssign<VT> >::Type
541 assign(
const DenseVector<VT,false>& rhs );
543 template<
typename VT >
inline void assign(
const SparseVector<VT,false>& rhs );
545 template<
typename VT >
546 inline typename DisableIf< VectorizedAddAssign<VT> >::Type
547 addAssign(
const DenseVector<VT,false>& rhs );
549 template<
typename VT >
550 inline typename EnableIf< VectorizedAddAssign<VT> >::Type
551 addAssign(
const DenseVector<VT,false>& rhs );
553 template<
typename VT >
inline void addAssign(
const SparseVector<VT,false>& rhs );
555 template<
typename VT >
556 inline typename DisableIf< VectorizedSubAssign<VT> >::Type
557 subAssign(
const DenseVector<VT,false>& rhs );
559 template<
typename VT >
560 inline typename EnableIf< VectorizedSubAssign<VT> >::Type
561 subAssign(
const DenseVector<VT,false>& rhs );
563 template<
typename VT >
inline void subAssign(
const SparseVector<VT,false>& rhs );
565 template<
typename VT >
566 inline typename DisableIf< VectorizedMultAssign<VT> >::Type
567 multAssign(
const DenseVector<VT,false>& rhs );
569 template<
typename VT >
570 inline typename EnableIf< VectorizedMultAssign<VT> >::Type
571 multAssign(
const DenseVector<VT,false>& rhs );
573 template<
typename VT >
inline void multAssign(
const SparseVector<VT,false>& rhs );
588 template<
typename MT2,
bool SO2,
bool SF2 >
friend class DenseColumn;
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_.columns() <= index ) {
674 template<
typename MT
680 return matrix_(index,col_);
694 template<
typename MT
701 return const_cast<const MT&
>( matrix_ )(index,col_);
716 template<
typename MT
721 if( index >=
size() ) {
724 return (*
this)[index];
739 template<
typename MT
745 if( index >=
size() ) {
748 return (*
this)[index];
761 template<
typename MT
766 return matrix_.data( col_ );
779 template<
typename MT
784 return matrix_.data( col_ );
796 template<
typename MT
801 return matrix_.begin( col_ );
813 template<
typename MT
818 return matrix_.cbegin( col_ );
830 template<
typename MT
835 return matrix_.cbegin( col_ );
847 template<
typename MT
852 return matrix_.end( col_ );
864 template<
typename MT
869 return matrix_.cend( col_ );
881 template<
typename MT
886 return matrix_.cend( col_ );
909 template<
typename MT
925 for(
size_t i=ibegin; i<iend; ++i )
926 matrix_(i,col_) = rhs;
946 template<
typename MT
951 if( &rhs ==
this )
return *
this;
957 if( !tryAssign( matrix_, rhs, 0UL, col_ ) ) {
985 template<
typename MT
988 template<
typename VT >
1001 if( !tryAssign( matrix_, right, 0UL, col_ ) ) {
1037 template<
typename MT
1040 template<
typename VT >
1051 Right right( ~rhs );
1053 if( !tryAddAssign( matrix_, right, 0UL, col_ ) ) {
1087 template<
typename MT
1090 template<
typename VT >
1101 Right right( ~rhs );
1103 if( !trySubAssign( matrix_, right, 0UL, col_ ) ) {
1136 template<
typename MT
1139 template<
typename VT >
1150 Right right( ~rhs );
1152 if( !tryMultAssign( matrix_, right, 0UL, col_ ) ) {
1185 template<
typename MT
1188 template<
typename VT >
1201 if( !tryAssign( matrix_, right, 0UL, col_ ) ) {
1226 template<
typename MT
1229 template<
typename Other >
1235 return operator=( (*
this) * rhs );
1252 template<
typename MT
1255 template<
typename Other >
1263 return operator=( (*
this) / rhs );
1281 template<
typename MT
1286 return matrix_.rows();
1296 template<
typename MT
1301 return matrix_.capacity( col_ );
1314 template<
typename MT
1319 return matrix_.nonZeros( col_ );
1329 template<
typename MT
1334 matrix_.reset( col_ );
1349 template<
typename MT
1352 template<
typename Other >
1368 for(
size_t i=ibegin; i<iend; ++i ) {
1369 matrix_(i,col_) *= scalar;
1395 template<
typename MT
1398 template<
typename Other >
1401 return matrix_.isAliased( alias );
1416 template<
typename MT
1419 template<
typename MT2
1424 return matrix_.isAliased( alias->
matrix_ ) && ( col_ == alias->
col_ );
1439 template<
typename MT
1442 template<
typename Other >
1445 return matrix_.isAliased( alias );
1460 template<
typename MT
1463 template<
typename MT2
1468 return matrix_.isAliased( &alias->
matrix_ ) && ( col_ == alias->
col_ );
1482 template<
typename MT
1487 return matrix_.isAligned();
1502 template<
typename MT
1507 return (
size() > SMP_DVECASSIGN_THRESHOLD );
1524 template<
typename MT
1530 return matrix_.load( index, col_ );
1547 template<
typename MT
1553 return matrix_.loada( index, col_ );
1570 template<
typename MT
1576 return matrix_.loadu( index, col_ );
1594 template<
typename MT
1599 matrix_.store( index, col_, value );
1617 template<
typename MT
1622 matrix_.storea( index, col_, value );
1640 template<
typename MT
1645 matrix_.storeu( index, col_, value );
1663 template<
typename MT
1668 matrix_.stream( index, col_, value );
1684 template<
typename MT
1687 template<
typename VT >
1693 const size_t ipos( (~rhs).
size() &
size_t(-2) );
1694 for(
size_t i=0UL; i<ipos; i+=2UL ) {
1695 matrix_(i ,col_) = (~rhs)[i ];
1696 matrix_(i+1UL,col_) = (~rhs)[i+1UL];
1698 if( ipos < (~rhs).size() )
1699 matrix_(ipos,col_) = (~rhs)[ipos];
1715 template<
typename MT
1718 template<
typename VT >
1729 const size_t ipos( ( remainder )?( rows &
size_t(-
IT::size) ):( rows ) );
1737 matrix_.stream( i, col_, (~rhs).load(i) );
1739 for( ; remainder && i<
rows; ++i ) {
1740 matrix_(i,col_) = (~rhs)[i];
1749 matrix_.store( i , col_, it.load() ); it+=
IT::size;
1755 matrix_.store( i, col_, it.load() );
1757 for( ; remainder && i<
rows; ++i, ++it ) {
1758 matrix_(i,col_) = *it;
1776 template<
typename MT
1779 template<
typename VT >
1785 matrix_(element->index(),col_) = element->value();
1801 template<
typename MT
1804 template<
typename VT >
1810 const size_t ipos( (~rhs).
size() &
size_t(-2) );
1811 for(
size_t i=0UL; i<ipos; i+=2UL ) {
1812 matrix_(i ,col_) += (~rhs)[i ];
1813 matrix_(i+1UL,col_) += (~rhs)[i+1UL];
1815 if( ipos < (~rhs).size() )
1816 matrix_(ipos,col_) += (~rhs)[ipos];
1832 template<
typename MT
1835 template<
typename VT >
1846 const size_t ipos( ( remainder )?( rows &
size_t(-
IT::size) ):( rows ) );
1853 matrix_.store( i , col_, matrix_.load(i ,col_) + it.load() ); it +=
IT::size;
1859 matrix_.store( i, col_, matrix_.load(i,col_) + it.load() );
1861 for( ; remainder && i<
rows; ++i, ++it ) {
1862 matrix_(i,col_) += *it;
1879 template<
typename MT
1882 template<
typename VT >
1888 matrix_(element->index(),col_) += element->value();
1904 template<
typename MT
1907 template<
typename VT >
1913 const size_t ipos( (~rhs).
size() &
size_t(-2) );
1914 for(
size_t i=0UL; i<ipos; i+=2UL ) {
1915 matrix_(i ,col_) -= (~rhs)[i ];
1916 matrix_(i+1UL,col_) -= (~rhs)[i+1UL];
1918 if( ipos < (~rhs).size() )
1919 matrix_(ipos,col_) -= (~rhs)[ipos];
1935 template<
typename MT
1938 template<
typename VT >
1949 const size_t ipos( ( remainder )?( rows &
size_t(-
IT::size) ):( rows ) );
1956 matrix_.store( i , col_, matrix_.load(i ,col_) - it.load() ); it +=
IT::size;
1962 matrix_.store( i, col_, matrix_.load(i,col_) - it.load() );
1964 for( ; remainder && i<
rows; ++i, ++it ) {
1965 matrix_(i,col_) -= *it;
1982 template<
typename MT
1985 template<
typename VT >
1991 matrix_(element->index(),col_) -= element->value();
2007 template<
typename MT
2010 template<
typename VT >
2016 const size_t ipos( (~rhs).
size() &
size_t(-2) );
2017 for(
size_t i=0UL; i<ipos; i+=2UL ) {
2018 matrix_(i ,col_) *= (~rhs)[i ];
2019 matrix_(i+1UL,col_) *= (~rhs)[i+1UL];
2021 if( ipos < (~rhs).size() )
2022 matrix_(ipos,col_) *= (~rhs)[ipos];
2038 template<
typename MT
2041 template<
typename VT >
2052 const size_t ipos( ( remainder )?( rows &
size_t(-
IT::size) ):( rows ) );
2059 matrix_.store( i , col_, matrix_.load(i ,col_) * it.load() ); it +=
IT::size;
2065 matrix_.store( i, col_, matrix_.load(i,col_) * it.load() );
2067 for( ; remainder && i<
rows; ++i, ++it ) {
2068 matrix_(i,col_) *= *it;
2085 template<
typename MT
2088 template<
typename VT >
2098 matrix_(element->index(),col_) = tmp[element->index()] * element->value();
2123 template<
typename MT >
2159 template<
typename MatrixType >
2160 class ColumnIterator
2176 typedef typename IfTrue< returnConst
2180 typedef std::random_access_iterator_tag IteratorCategory;
2181 typedef RemoveReference<Reference> ValueType;
2182 typedef ValueType* PointerType;
2183 typedef Reference ReferenceType;
2184 typedef ptrdiff_t DifferenceType;
2187 typedef IteratorCategory iterator_category;
2188 typedef ValueType value_type;
2189 typedef PointerType pointer;
2190 typedef ReferenceType reference;
2191 typedef DifferenceType difference_type;
2197 inline ColumnIterator()
2211 inline ColumnIterator( MatrixType& matrix,
size_t row,
size_t column )
2223 template<
typename MatrixType2 >
2224 inline ColumnIterator(
const ColumnIterator<MatrixType2>& it )
2227 , column_( it.column_ )
2237 inline ColumnIterator& operator+=(
size_t inc ) {
2249 inline ColumnIterator& operator-=(
size_t dec ) {
2260 inline ColumnIterator& operator++() {
2271 inline const ColumnIterator operator++(
int ) {
2272 const ColumnIterator tmp( *
this );
2283 inline ColumnIterator& operator--() {
2294 inline const ColumnIterator operator--(
int ) {
2295 const ColumnIterator tmp( *
this );
2307 inline ReferenceType
operator[](
size_t index )
const {
2308 return (*
matrix_)(row_+index,column_);
2317 inline ReferenceType
operator*()
const {
2318 return (*
matrix_)(row_,column_);
2327 inline PointerType operator->()
const {
2328 return &(*matrix_)(row_,column_);
2338 template<
typename MatrixType2 >
2339 inline bool operator==(
const ColumnIterator<MatrixType2>& rhs )
const {
2340 return (
matrix_ == rhs.matrix_ ) && ( row_ == rhs.row_ ) && ( column_ == rhs.column_ );
2350 template<
typename MatrixType2 >
2351 inline bool operator!=(
const ColumnIterator<MatrixType2>& rhs )
const {
2352 return !( *
this == rhs );
2362 template<
typename MatrixType2 >
2363 inline bool operator<( const ColumnIterator<MatrixType2>& rhs )
const {
2364 return (
matrix_ == rhs.matrix_ ) && ( row_ < rhs.row_ ) && ( column_ == rhs.column_ );
2374 template<
typename MatrixType2 >
2375 inline bool operator>(
const ColumnIterator<MatrixType2>& rhs )
const {
2376 return (
matrix_ == rhs.matrix_ ) && ( row_ > rhs.row_ ) && ( column_ == rhs.column_ );
2386 template<
typename MatrixType2 >
2387 inline bool operator<=( const ColumnIterator<MatrixType2>& rhs )
const {
2388 return (
matrix_ == rhs.matrix_ ) && ( row_ <= rhs.row_ ) && ( column_ == rhs.column_ );
2398 template<
typename MatrixType2 >
2399 inline bool operator>=(
const ColumnIterator<MatrixType2>& rhs )
const {
2400 return (
matrix_ == rhs.matrix_ ) && ( row_ >= rhs.row_ ) && ( column_ == rhs.column_ );
2410 inline DifferenceType
operator-(
const ColumnIterator& rhs )
const {
2411 return row_ - rhs.row_;
2422 friend inline const ColumnIterator
operator+(
const ColumnIterator& it,
size_t inc ) {
2423 return ColumnIterator( *it.matrix_, it.row_+inc, it.column_ );
2434 friend inline const ColumnIterator
operator+(
size_t inc,
const ColumnIterator& it ) {
2435 return ColumnIterator( *it.matrix_, it.row_+inc, it.column_ );
2446 friend inline const ColumnIterator
operator-(
const ColumnIterator& it,
size_t dec ) {
2447 return ColumnIterator( *it.matrix_, it.row_-dec, it.column_ );
2459 template<
typename MatrixType2 >
friend class ColumnIterator;
2474 enum { vectorizable = 0 };
2477 enum { smpAssignable = MT::smpAssignable };
2483 explicit inline DenseColumn( MT& matrix,
size_t index );
2496 inline ConstReference
operator[](
size_t index )
const;
2497 inline Reference
at(
size_t index );
2498 inline ConstReference
at(
size_t index )
const;
2499 inline Pointer
data ();
2500 inline ConstPointer
data ()
const;
2501 inline Iterator
begin ();
2502 inline ConstIterator
begin ()
const;
2503 inline ConstIterator
cbegin()
const;
2504 inline Iterator
end ();
2505 inline ConstIterator
end ()
const;
2506 inline ConstIterator
cend ()
const;
2517 template<
typename VT >
inline DenseColumn& operator+=(
const Vector<VT,false>& rhs );
2518 template<
typename VT >
inline DenseColumn& operator-=(
const Vector<VT,false>& rhs );
2519 template<
typename VT >
inline DenseColumn& operator*=(
const DenseVector<VT,false>& rhs );
2520 template<
typename VT >
inline DenseColumn& operator*=(
const SparseVector<VT,false>& rhs );
2522 template<
typename Other >
2523 inline typename EnableIf< IsNumeric<Other>,
DenseColumn >::Type&
2524 operator*=( Other rhs );
2526 template<
typename Other >
2527 inline typename EnableIf< IsNumeric<Other>,
DenseColumn >::Type&
2528 operator/=( Other rhs );
2535 inline size_t size()
const;
2538 inline void reset();
2539 template<
typename Other >
inline DenseColumn& scale(
const Other& scalar );
2547 template<
typename Other >
2548 inline bool canAlias (
const Other* alias )
const;
2550 template<
typename MT2,
bool SO2,
bool SF2 >
2551 inline bool canAlias (
const DenseColumn<MT2,SO2,SF2>* alias )
const;
2553 template<
typename Other >
2554 inline bool isAliased(
const Other* alias )
const;
2556 template<
typename MT2,
bool SO2,
bool SF2 >
2557 inline bool isAliased(
const DenseColumn<MT2,SO2,SF2>* alias )
const;
2562 template<
typename VT >
inline void assign (
const DenseVector <VT,false>& rhs );
2563 template<
typename VT >
inline void assign (
const SparseVector<VT,false>& rhs );
2564 template<
typename VT >
inline void addAssign (
const DenseVector <VT,false>& rhs );
2565 template<
typename VT >
inline void addAssign (
const SparseVector<VT,false>& rhs );
2566 template<
typename VT >
inline void subAssign (
const DenseVector <VT,false>& rhs );
2567 template<
typename VT >
inline void subAssign (
const SparseVector<VT,false>& rhs );
2568 template<
typename VT >
inline void multAssign(
const DenseVector <VT,false>& rhs );
2569 template<
typename VT >
inline void multAssign(
const SparseVector<VT,false>& rhs );
2583 template<
typename MT2,
bool SO2,
bool SF2 >
friend class DenseColumn;
2585 template<
typename MT2,
bool SO2,
bool SF2 >
2588 template<
typename MT2,
bool SO2,
bool SF2 >
2589 friend bool isSame(
const DenseColumn<MT2,SO2,SF2>& a,
const DenseColumn<MT2,SO2,SF2>& b );
2591 template<
typename MT2,
bool SO2,
bool SF2,
typename VT >
2592 friend bool tryAssign(
const DenseColumn<MT2,SO2,SF2>& lhs,
const Vector<VT,false>& rhs,
size_t index );
2594 template<
typename MT2,
bool SO2,
bool SF2,
typename VT >
2595 friend bool tryAddAssign(
const DenseColumn<MT2,SO2,SF2>& lhs,
const Vector<VT,false>& rhs,
size_t index );
2597 template<
typename MT2,
bool SO2,
bool SF2,
typename VT >
2598 friend bool trySubAssign(
const DenseColumn<MT2,SO2,SF2>& lhs,
const Vector<VT,false>& rhs,
size_t index );
2600 template<
typename MT2,
bool SO2,
bool SF2,
typename VT >
2601 friend bool tryMultAssign(
const DenseColumn<MT2,SO2,SF2>& lhs,
const Vector<VT,false>& rhs,
size_t index );
2603 template<
typename MT2,
bool SO2,
bool SF2 >
2604 friend typename DerestrictTrait< DenseColumn<MT2,SO2,SF2> >::Type
2605 derestrict( DenseColumn<MT2,SO2,SF2>& dm );
2638 template<
typename MT >
2643 if(
matrix_.columns() <= index ) {
2669 template<
typename MT >
2674 return matrix_(index,col_);
2690 template<
typename MT >
2695 return const_cast<const MT&
>( matrix_ )(index,col_);
2712 template<
typename MT >
2716 if( index >=
size() ) {
2719 return (*
this)[index];
2736 template<
typename MT >
2740 if( index >=
size() ) {
2743 return (*
this)[index];
2758 template<
typename MT >
2761 return matrix_.data() + col_;
2776 template<
typename MT >
2779 return matrix_.data() + col_;
2793 template<
typename MT >
2796 return Iterator( matrix_, 0UL, col_ );
2810 template<
typename MT >
2828 template<
typename MT >
2846 template<
typename MT >
2863 template<
typename MT >
2881 template<
typename MT >
2910 template<
typename MT >
2911 inline DenseColumn<MT,false,false>&
2914 const size_t ibegin( ( IsLower<MT>::value )
2915 ?( ( IsUniLower<MT>::value || IsStrictlyLower<MT>::value )
2919 const size_t iend ( ( IsUpper<MT>::value )
2920 ?( ( IsUniUpper<MT>::value || IsStrictlyUpper<MT>::value )
2925 for(
size_t i=ibegin; i<iend; ++i )
2926 matrix_(i,col_) = rhs;
2948 template<
typename MT >
2949 inline DenseColumn<MT,false,false>&
2952 if( &rhs ==
this )
return *
this;
2954 if(
size() != rhs.size() ) {
2958 if( !tryAssign( matrix_, rhs, 0UL, col_ ) ) {
2962 typename DerestrictTrait<This>::Type left( derestrict( *
this ) );
2988 template<
typename MT >
2989 template<
typename VT >
2990 inline DenseColumn<MT,false,false>&
3001 typedef typename If< IsRestricted<MT>,
typename VT::CompositeType,
const VT& >::Type Right;
3002 Right right( ~rhs );
3004 if( !tryAssign( matrix_, right, 0UL, col_ ) ) {
3008 typename DerestrictTrait<This>::Type left( derestrict( *
this ) );
3010 if( IsReference<Right>::value && right.canAlias( &matrix_ ) ) {
3011 const ResultType tmp( right );
3015 if( IsSparseVector<VT>::value )
3042 template<
typename MT >
3043 template<
typename VT >
3044 inline DenseColumn<MT,false,false>&
3045 DenseColumn<MT,false,false>::operator+=(
const Vector<VT,false>& rhs )
3054 typedef typename If< IsRestricted<MT>,
typename VT::CompositeType,
const VT& >::Type Right;
3055 Right right( ~rhs );
3057 if( !tryAddAssign( matrix_, right, 0UL, col_ ) ) {
3061 typename DerestrictTrait<This>::Type left( derestrict( *
this ) );
3063 if( IsReference<Right>::value && right.canAlias( &matrix_ ) ) {
3093 template<
typename MT >
3094 template<
typename VT >
3095 inline DenseColumn<MT,false,false>&
3096 DenseColumn<MT,false,false>::operator-=(
const Vector<VT,false>& rhs )
3105 typedef typename If< IsRestricted<MT>,
typename VT::CompositeType,
const VT& >::Type Right;
3106 Right right( ~rhs );
3108 if( !trySubAssign( matrix_, right, 0UL, col_ ) ) {
3112 typename DerestrictTrait<This>::Type left( derestrict( *
this ) );
3114 if( IsReference<Right>::value && right.canAlias( &matrix_ ) ) {
3143 template<
typename MT >
3144 template<
typename VT >
3145 inline DenseColumn<MT,false,false>&
3146 DenseColumn<MT,false,false>::operator*=(
const DenseVector<VT,false>& rhs )
3155 typedef typename If< IsRestricted<MT>,
typename VT::CompositeType,
const VT& >::Type Right;
3156 Right right( ~rhs );
3158 if( !tryMultAssign( matrix_, right, 0UL, col_ ) ) {
3162 typename DerestrictTrait<This>::Type left( derestrict( *
this ) );
3164 if( IsReference<Right>::value && right.canAlias( &matrix_ ) ) {
3193 template<
typename MT >
3194 template<
typename VT >
3195 inline DenseColumn<MT,false,false>&
3196 DenseColumn<MT,false,false>::operator*=(
const SparseVector<VT,false>& rhs )
3206 const ResultType right( *
this * (~rhs) );
3208 if( !tryAssign( matrix_, right, 0UL, col_ ) ) {
3212 typename DerestrictTrait<This>::Type left( derestrict( *
this ) );
3235 template<
typename MT >
3236 template<
typename Other >
3237 inline typename EnableIf< IsNumeric<Other>, DenseColumn<MT,false,false> >::Type&
3238 DenseColumn<MT,false,false>::operator*=( Other rhs )
3242 return operator=( (*
this) * rhs );
3261 template<
typename MT >
3262 template<
typename Other >
3263 inline typename EnableIf< IsNumeric<Other>, DenseColumn<MT,false,false> >::Type&
3264 DenseColumn<MT,false,false>::operator/=( Other rhs )
3270 return operator=( (*
this) / rhs );
3290 template<
typename MT >
3293 return matrix_.rows();
3305 template<
typename MT >
3308 return matrix_.rows();
3323 template<
typename MT >
3327 size_t nonzeros( 0UL );
3329 for(
size_t i=0UL; i<
rows; ++i )
3345 template<
typename MT >
3350 const size_t ibegin( ( IsLower<MT>::value )
3351 ?( ( IsUniLower<MT>::value || IsStrictlyLower<MT>::value )
3355 const size_t iend ( ( IsUpper<MT>::value )
3356 ?( ( IsUniUpper<MT>::value || IsStrictlyUpper<MT>::value )
3361 for(
size_t i=ibegin; i<iend; ++i )
3362 clear( matrix_(i,col_) );
3379 template<
typename MT >
3380 template<
typename Other >
3381 inline DenseColumn<MT,false,false>& DenseColumn<MT,false,false>::scale(
const Other& scalar )
3385 const size_t ibegin( ( IsLower<MT>::value )
3386 ?( ( IsStrictlyLower<MT>::value )
3390 const size_t iend ( ( IsUpper<MT>::value )
3391 ?( ( IsStrictlyUpper<MT>::value )
3396 for(
size_t i=ibegin; i<iend; ++i ) {
3397 matrix_(i,col_) *= scalar;
3425 template<
typename MT >
3426 template<
typename Other >
3429 return matrix_.isAliased( alias );
3446 template<
typename MT >
3447 template<
typename MT2
3452 return matrix_.isAliased( &alias->matrix_ ) && ( col_ == alias->col_ );
3469 template<
typename MT >
3470 template<
typename Other >
3473 return matrix_.isAliased( alias );
3490 template<
typename MT >
3491 template<
typename MT2
3496 return matrix_.isAliased( &alias->matrix_ ) && ( col_ == alias->col_ );
3512 template<
typename MT >
3532 template<
typename MT >
3535 return (
size() > SMP_DVECASSIGN_THRESHOLD );
3553 template<
typename MT >
3554 template<
typename VT >
3555 inline void DenseColumn<MT,false,false>::assign(
const DenseVector<VT,false>& rhs )
3559 const size_t ipos( (~rhs).
size() &
size_t(-2) );
3560 for(
size_t i=0UL; i<ipos; i+=2UL ) {
3561 matrix_(i ,col_) = (~rhs)[i ];
3562 matrix_(i+1UL,col_) = (~rhs)[i+1UL];
3564 if( ipos < (~rhs).size() )
3565 matrix_(ipos,col_) = (~rhs)[ipos];
3583 template<
typename MT >
3584 template<
typename VT >
3585 inline void DenseColumn<MT,false,false>::assign(
const SparseVector<VT,false>& rhs )
3590 matrix_(element->index(),col_) = element->value();
3608 template<
typename MT >
3609 template<
typename VT >
3610 inline void DenseColumn<MT,false,false>::addAssign(
const DenseVector<VT,false>& rhs )
3614 const size_t ipos( (~rhs).
size() &
size_t(-2) );
3615 for(
size_t i=0UL; i<ipos; i+=2UL ) {
3616 matrix_(i ,col_) += (~rhs)[i ];
3617 matrix_(i+1UL,col_) += (~rhs)[i+1UL];
3619 if( ipos < (~rhs).size() )
3620 matrix_(ipos,col_) += (~rhs)[ipos];
3638 template<
typename MT >
3639 template<
typename VT >
3640 inline void DenseColumn<MT,false,false>::addAssign(
const SparseVector<VT,false>& rhs )
3645 matrix_(element->index(),col_) += element->value();
3663 template<
typename MT >
3664 template<
typename VT >
3665 inline void DenseColumn<MT,false,false>::subAssign(
const DenseVector<VT,false>& rhs )
3669 const size_t ipos( (~rhs).
size() &
size_t(-2) );
3670 for(
size_t i=0UL; i<ipos; i+=2UL ) {
3671 matrix_(i ,col_) -= (~rhs)[i ];
3672 matrix_(i+1UL,col_) -= (~rhs)[i+1UL];
3674 if( ipos < (~rhs).size() )
3675 matrix_(ipos,col_) -= (~rhs)[ipos];
3693 template<
typename MT >
3694 template<
typename VT >
3695 inline void DenseColumn<MT,false,false>::subAssign(
const SparseVector<VT,false>& rhs )
3700 matrix_(element->index(),col_) -= element->value();
3718 template<
typename MT >
3719 template<
typename VT >
3720 inline void DenseColumn<MT,false,false>::multAssign(
const DenseVector<VT,false>& rhs )
3724 const size_t ipos( (~rhs).
size() &
size_t(-2) );
3725 for(
size_t i=0UL; i<ipos; i+=2UL ) {
3726 matrix_(i ,col_) *= (~rhs)[i ];
3727 matrix_(i+1UL,col_) *= (~rhs)[i+1UL];
3729 if( ipos < (~rhs).size() )
3730 matrix_(ipos,col_) *= (~rhs)[ipos];
3748 template<
typename MT >
3749 template<
typename VT >
3750 inline void DenseColumn<MT,false,false>::multAssign(
const SparseVector<VT,false>& rhs )
3754 const ResultType tmp(
serial( *
this ) );
3759 matrix_(element->index(),col_) = tmp[element->index()] * element->value();
3785 template<
typename MT >
3786 class DenseColumn<MT,false,true> :
public DenseVector< DenseColumn<MT,false,true>, false >
3792 typedef typename If< IsExpression<MT>, MT, MT& >::Type
Operand;
3795 typedef IntrinsicTrait<typename MT::ElementType>
IT;
3800 typedef DenseColumn<MT,false,true>
This;
3801 typedef typename ColumnTrait<MT>::Type
ResultType;
3818 typedef typename If< Or< IsConst<MT>, Not< HasMutableDataAccess<MT> > >
3830 enum { vectorizable = MT::vectorizable };
3833 enum { smpAssignable = MT::smpAssignable };
3839 explicit inline DenseColumn( MT& matrix,
size_t index );
3852 inline ConstReference
operator[](
size_t index )
const;
3853 inline Reference
at(
size_t index );
3854 inline ConstReference
at(
size_t index )
const;
3855 inline Pointer
data ();
3856 inline ConstPointer
data ()
const;
3857 inline Iterator
begin ();
3858 inline ConstIterator
begin ()
const;
3859 inline ConstIterator
cbegin()
const;
3860 inline Iterator
end ();
3861 inline ConstIterator
end ()
const;
3862 inline ConstIterator
cend ()
const;
3873 template<
typename VT >
inline DenseColumn& operator+=(
const Vector<VT,false>& rhs );
3874 template<
typename VT >
inline DenseColumn& operator-=(
const Vector<VT,false>& rhs );
3875 template<
typename VT >
inline DenseColumn& operator*=(
const DenseVector<VT,false>& rhs );
3876 template<
typename VT >
inline DenseColumn& operator*=(
const SparseVector<VT,false>& rhs );
3878 template<
typename Other >
3879 inline typename EnableIf< IsNumeric<Other>,
DenseColumn >::Type&
3880 operator*=( Other rhs );
3882 template<
typename Other >
3883 inline typename EnableIf< IsNumeric<Other>,
DenseColumn >::Type&
3884 operator/=( Other rhs );
3891 inline size_t size()
const;
3894 inline void reset();
3895 template<
typename Other >
inline DenseColumn& scale(
const Other& scalar );
3902 template<
typename VT >
3903 struct VectorizedAssign {
3905 vectorizable && VT::vectorizable &&
3906 IsSame<ElementType,typename VT::ElementType>::value };
3912 template<
typename VT >
3913 struct VectorizedAddAssign {
3915 vectorizable && VT::vectorizable &&
3916 IsSame<ElementType,typename VT::ElementType>::value &&
3917 IntrinsicTrait<ElementType>::addition };
3923 template<
typename VT >
3924 struct VectorizedSubAssign {
3926 vectorizable && VT::vectorizable &&
3927 IsSame<ElementType,typename VT::ElementType>::value &&
3928 IntrinsicTrait<ElementType>::subtraction };
3934 template<
typename VT >
3935 struct VectorizedMultAssign {
3937 vectorizable && VT::vectorizable &&
3938 IsSame<ElementType,typename VT::ElementType>::value &&
3939 IntrinsicTrait<ElementType>::multiplication };
3947 template<
typename Other >
3948 inline bool canAlias(
const Other* alias )
const;
3950 template<
typename MT2,
bool SO2,
bool SF2 >
3951 inline bool canAlias(
const DenseColumn<MT2,SO2,SF2>* alias )
const;
3953 template<
typename Other >
3954 inline bool isAliased(
const Other* alias )
const;
3956 template<
typename MT2,
bool SO2,
bool SF2 >
3957 inline bool isAliased(
const DenseColumn<MT2,SO2,SF2>* alias )
const;
3971 template<
typename VT >
3972 inline typename DisableIf< VectorizedAssign<VT> >::Type
3973 assign(
const DenseVector<VT,false>& rhs );
3975 template<
typename VT >
3976 inline typename EnableIf< VectorizedAssign<VT> >::Type
3977 assign(
const DenseVector<VT,false>& rhs );
3979 template<
typename VT >
inline void assign(
const SparseVector<VT,false>& rhs );
3981 template<
typename VT >
3982 inline typename DisableIf< VectorizedAddAssign<VT> >::Type
3983 addAssign(
const DenseVector<VT,false>& rhs );
3985 template<
typename VT >
3986 inline typename EnableIf< VectorizedAddAssign<VT> >::Type
3987 addAssign(
const DenseVector<VT,false>& rhs );
3989 template<
typename VT >
inline void addAssign(
const SparseVector<VT,false>& rhs );
3991 template<
typename VT >
3992 inline typename DisableIf< VectorizedSubAssign<VT> >::Type
3993 subAssign(
const DenseVector<VT,false>& rhs );
3995 template<
typename VT >
3996 inline typename EnableIf< VectorizedSubAssign<VT> >::Type
3997 subAssign(
const DenseVector<VT,false>& rhs );
3999 template<
typename VT >
inline void subAssign(
const SparseVector<VT,false>& rhs );
4001 template<
typename VT >
4002 inline typename DisableIf< VectorizedMultAssign<VT> >::Type
4003 multAssign(
const DenseVector<VT,false>& rhs );
4005 template<
typename VT >
4006 inline typename EnableIf< VectorizedMultAssign<VT> >::Type
4007 multAssign(
const DenseVector<VT,false>& rhs );
4009 template<
typename VT >
inline void multAssign(
const SparseVector<VT,false>& rhs );
4023 template<
typename MT2,
bool SO2,
bool SF2 >
friend class DenseColumn;
4025 template<
typename MT2,
bool SO2,
bool SF2 >
4028 template<
typename MT2,
bool SO2,
bool SF2 >
4029 friend bool isSame(
const DenseColumn<MT2,SO2,SF2>& a,
const DenseColumn<MT2,SO2,SF2>& b );
4031 template<
typename MT2,
bool SO2,
bool SF2,
typename VT >
4032 friend bool tryAssign(
const DenseColumn<MT2,SO2,SF2>& lhs,
const Vector<VT,false>& rhs,
size_t index );
4034 template<
typename MT2,
bool SO2,
bool SF2,
typename VT >
4035 friend bool tryAddAssign(
const DenseColumn<MT2,SO2,SF2>& lhs,
const Vector<VT,false>& rhs,
size_t index );
4037 template<
typename MT2,
bool SO2,
bool SF2,
typename VT >
4038 friend bool trySubAssign(
const DenseColumn<MT2,SO2,SF2>& lhs,
const Vector<VT,false>& rhs,
size_t index );
4040 template<
typename MT2,
bool SO2,
bool SF2,
typename VT >
4041 friend bool tryMultAssign(
const DenseColumn<MT2,SO2,SF2>& lhs,
const Vector<VT,false>& rhs,
size_t index );
4043 template<
typename MT2,
bool SO2,
bool SF2 >
4044 friend typename DerestrictTrait< DenseColumn<MT2,SO2,SF2> >::Type
4045 derestrict( DenseColumn<MT2,SO2,SF2>& dm );
4078 template<
typename MT >
4083 if(
matrix_.columns() <= index ) {
4109 template<
typename MT >
4114 return matrix_(col_,index);
4130 template<
typename MT >
4135 return const_cast<const MT&
>( matrix_ )(index,col_);
4152 template<
typename MT >
4156 if( index >=
size() ) {
4159 return (*
this)[index];
4176 template<
typename MT >
4180 if( index >=
size() ) {
4183 return (*
this)[index];
4198 template<
typename MT >
4201 return matrix_.data( col_ );
4216 template<
typename MT >
4219 return matrix_.data( col_ );
4233 template<
typename MT >
4236 return matrix_.begin( col_ );
4250 template<
typename MT >
4253 return matrix_.cbegin( col_ );
4267 template<
typename MT >
4270 return matrix_.cbegin( col_ );
4284 template<
typename MT >
4287 return matrix_.end( col_ );
4301 template<
typename MT >
4304 return matrix_.cend( col_ );
4318 template<
typename MT >
4321 return matrix_.cend( col_ );
4342 template<
typename MT >
4345 const size_t jbegin( ( IsUpper<MT>::value )
4346 ?( ( IsUniUpper<MT>::value || IsStrictlyUpper<MT>::value )
4350 const size_t jend ( ( IsLower<MT>::value )
4351 ?( ( IsUniLower<MT>::value || IsStrictlyLower<MT>::value )
4356 for(
size_t j=jbegin; j<jend; ++j )
4357 matrix_(col_,j) = rhs;
4379 template<
typename MT >
4382 if( &rhs ==
this )
return *
this;
4384 if(
size() != rhs.size() ) {
4388 if( !tryAssign( matrix_, rhs, 0UL, col_ ) ) {
4392 typename DerestrictTrait<This>::Type left( derestrict( *
this ) );
4418 template<
typename MT >
4419 template<
typename VT >
4420 inline DenseColumn<MT,false,true>&
4430 typedef typename If< IsRestricted<MT>,
typename VT::CompositeType,
const VT& >::Type Right;
4431 Right right( ~rhs );
4433 if( !tryAssign( matrix_, right, 0UL, col_ ) ) {
4437 typename DerestrictTrait<This>::Type left( derestrict( *
this ) );
4439 if( IsReference<Right>::value && right.canAlias( &matrix_ ) ) {
4444 if( IsSparseVector<VT>::value )
4471 template<
typename MT >
4472 template<
typename VT >
4473 inline DenseColumn<MT,false,true>&
4474 DenseColumn<MT,false,true>::operator+=(
const Vector<VT,false>& rhs )
4483 typedef typename If< IsRestricted<MT>,
typename VT::CompositeType,
const VT& >::Type Right;
4484 Right right( ~rhs );
4486 if( !tryAddAssign( matrix_, right, 0UL, col_ ) ) {
4490 typename DerestrictTrait<This>::Type left( derestrict( *
this ) );
4492 if( IsReference<Right>::value && right.canAlias( &matrix_ ) ) {
4522 template<
typename MT >
4523 template<
typename VT >
4524 inline DenseColumn<MT,false,true>&
4525 DenseColumn<MT,false,true>::operator-=(
const Vector<VT,false>& rhs )
4534 typedef typename If< IsRestricted<MT>,
typename VT::CompositeType,
const VT& >::Type Right;
4535 Right right( ~rhs );
4537 if( !trySubAssign( matrix_, right, 0UL, col_ ) ) {
4541 typename DerestrictTrait<This>::Type left( derestrict( *
this ) );
4543 if( IsReference<Right>::value && right.canAlias( &matrix_ ) ) {
4572 template<
typename MT >
4573 template<
typename VT >
4574 inline DenseColumn<MT,false,true>&
4575 DenseColumn<MT,false,true>::operator*=(
const DenseVector<VT,false>& rhs )
4584 typedef typename If< IsRestricted<MT>,
typename VT::CompositeType,
const VT& >::Type Right;
4585 Right right( ~rhs );
4587 if( !tryMultAssign( matrix_, right, 0UL, col_ ) ) {
4591 typename DerestrictTrait<This>::Type left( derestrict( *
this ) );
4593 if( IsReference<Right>::value && right.canAlias( &matrix_ ) ) {
4622 template<
typename MT >
4623 template<
typename VT >
4624 inline DenseColumn<MT,false,true>&
4625 DenseColumn<MT,false,true>::operator*=(
const SparseVector<VT,false>& rhs )
4635 const ResultType right( *
this * (~rhs) );
4637 if( !tryAssign( matrix_, right, 0UL, col_ ) ) {
4641 typename DerestrictTrait<This>::Type left( derestrict( *
this ) );
4664 template<
typename MT >
4665 template<
typename Other >
4666 inline typename EnableIf< IsNumeric<Other>, DenseColumn<MT,false,true> >::Type&
4667 DenseColumn<MT,false,true>::operator*=( Other rhs )
4671 return operator=( (*
this) * rhs );
4690 template<
typename MT >
4691 template<
typename Other >
4692 inline typename EnableIf< IsNumeric<Other>, DenseColumn<MT,false,true> >::Type&
4693 DenseColumn<MT,false,true>::operator/=( Other rhs )
4699 return operator=( (*
this) / rhs );
4719 template<
typename MT >
4722 return matrix_.rows();
4734 template<
typename MT >
4737 return matrix_.capacity( col_ );
4752 template<
typename MT >
4755 return matrix_.nonZeros( col_ );
4767 template<
typename MT >
4770 matrix_.reset( col_ );
4787 template<
typename MT >
4788 template<
typename Other >
4789 inline DenseColumn<MT,false,true>& DenseColumn<MT,false,true>::scale(
const Other& scalar )
4793 const size_t jbegin( ( IsUpper<MT>::value )
4794 ?( ( IsStrictlyUpper<MT>::value )
4798 const size_t jend ( ( IsLower<MT>::value )
4799 ?( ( IsStrictlyLower<MT>::value )
4804 for(
size_t j=jbegin; j<jend; ++j ) {
4805 matrix_(col_,j) *= scalar;
4833 template<
typename MT >
4834 template<
typename Other >
4837 return matrix_.isAliased( alias );
4854 template<
typename MT >
4855 template<
typename MT2
4860 return matrix_.isAliased( alias->matrix_ ) && ( col_ == alias->col_ );
4877 template<
typename MT >
4878 template<
typename Other >
4881 return matrix_.isAliased( alias );
4898 template<
typename MT >
4899 template<
typename MT2
4904 return matrix_.isAliased( &alias->matrix_ ) && ( col_ == alias->col_ );
4920 template<
typename MT >
4923 return matrix_.isAligned();
4940 template<
typename MT >
4943 return (
size() > SMP_DVECASSIGN_THRESHOLD );
4962 template<
typename MT >
4966 return matrix_.load( col_, index );
4985 template<
typename MT >
4989 return matrix_.loada( col_, index );
5008 template<
typename MT >
5012 return matrix_.loadu( col_, index );
5032 template<
typename MT >
5035 matrix_.store( col_, index, value );
5055 template<
typename MT >
5058 matrix_.storea( col_, index, value );
5078 template<
typename MT >
5081 matrix_.storeu( col_, index, value );
5101 template<
typename MT >
5104 matrix_.stream( col_, index, value );
5122 template<
typename MT >
5123 template<
typename VT >
5124 inline typename DisableIf< typename DenseColumn<MT,false,true>::BLAZE_TEMPLATE VectorizedAssign<VT> >::Type
5125 DenseColumn<MT,false,true>::assign(
const DenseVector<VT,false>& rhs )
5129 const size_t jpos( (~rhs).
size() &
size_t(-2) );
5130 for(
size_t j=0UL; j<jpos; j+=2UL ) {
5131 matrix_(col_,j ) = (~rhs)[j ];
5132 matrix_(col_,j+1UL) = (~rhs)[j+1UL];
5134 if( jpos < (~rhs).size() )
5135 matrix_(col_,jpos) = (~rhs)[jpos];
5153 template<
typename MT >
5154 template<
typename VT >
5155 inline typename EnableIf< typename DenseColumn<MT,false,true>::BLAZE_TEMPLATE VectorizedAssign<VT> >::Type
5156 DenseColumn<MT,false,true>::assign(
const DenseVector<VT,false>& rhs )
5162 const bool remainder( !IsPadded<MT>::value || !IsPadded<VT>::value );
5173 matrix_.stream( col_, j, (~rhs).load(j) );
5175 for( ; remainder && j<
columns; ++j ) {
5176 matrix_(col_,j) = (~rhs)[j];
5185 matrix_.store( col_, j , it.load() ); it+=
IT::size;
5191 matrix_.store( col_, j, it.load() );
5193 for( ; remainder && j<
columns; ++j, ++it ) {
5194 matrix_(col_,j) = *it;
5214 template<
typename MT >
5215 template<
typename VT >
5216 inline void DenseColumn<MT,false,true>::assign(
const SparseVector<VT,false>& rhs )
5221 matrix_(col_,element->index()) = element->value();
5239 template<
typename MT >
5240 template<
typename VT >
5241 inline typename DisableIf< typename DenseColumn<MT,false,true>::BLAZE_TEMPLATE VectorizedAddAssign<VT> >::Type
5242 DenseColumn<MT,false,true>::addAssign(
const DenseVector<VT,false>& rhs )
5246 const size_t jpos( (~rhs).
size() &
size_t(-2) );
5247 for(
size_t j=0UL; j<jpos; j+=2UL ) {
5248 matrix_(col_,j ) += (~rhs)[j ];
5249 matrix_(col_,j+1UL) += (~rhs)[j+1UL];
5251 if( jpos < (~rhs).size() )
5252 matrix_(col_,jpos) += (~rhs)[jpos];
5270 template<
typename MT >
5271 template<
typename VT >
5272 inline typename EnableIf< typename DenseColumn<MT,false,true>::BLAZE_TEMPLATE VectorizedAddAssign<VT> >::Type
5273 DenseColumn<MT,false,true>::addAssign(
const DenseVector<VT,false>& rhs )
5279 const bool remainder( !IsPadded<MT>::value || !IsPadded<VT>::value );
5289 matrix_.store( col_, j , matrix_.load(col_,j ) + it.load() ); it +=
IT::size;
5295 matrix_.store( col_, j, matrix_.load(col_,j) + it.load() );
5297 for( ; remainder && j<
columns; ++j, ++it ) {
5298 matrix_(col_,j) += *it;
5317 template<
typename MT >
5318 template<
typename VT >
5319 inline void DenseColumn<MT,false,true>::addAssign(
const SparseVector<VT,false>& rhs )
5324 matrix_(col_,element->index()) += element->value();
5342 template<
typename MT >
5343 template<
typename VT >
5344 inline typename DisableIf< typename DenseColumn<MT,false,true>::BLAZE_TEMPLATE VectorizedSubAssign<VT> >::Type
5345 DenseColumn<MT,false,true>::subAssign(
const DenseVector<VT,false>& rhs )
5349 const size_t jpos( (~rhs).
size() &
size_t(-2) );
5350 for(
size_t j=0UL; j<jpos; j+=2UL ) {
5351 matrix_(col_,j ) -= (~rhs)[j ];
5352 matrix_(col_,j+1UL) -= (~rhs)[j+1UL];
5354 if( jpos < (~rhs).size() )
5355 matrix_(col_,jpos) -= (~rhs)[jpos];
5373 template<
typename MT >
5374 template<
typename VT >
5375 inline typename EnableIf< typename DenseColumn<MT,false,true>::BLAZE_TEMPLATE VectorizedSubAssign<VT> >::Type
5376 DenseColumn<MT,false,true>::subAssign(
const DenseVector<VT,false>& rhs )
5382 const bool remainder( !IsPadded<MT>::value || !IsPadded<VT>::value );
5392 matrix_.store( col_, j , matrix_.load(col_,j ) - it.load() ); it +=
IT::size;
5398 matrix_.store( col_, j, matrix_.load(col_,j) - it.load() );
5400 for( ; remainder && j<
columns; ++j, ++it ) {
5401 matrix_(col_,j) -= *it;
5420 template<
typename MT >
5421 template<
typename VT >
5422 inline void DenseColumn<MT,false,true>::subAssign(
const SparseVector<VT,false>& rhs )
5427 matrix_(col_,element->index()) -= element->value();
5445 template<
typename MT >
5446 template<
typename VT >
5447 inline typename DisableIf< typename DenseColumn<MT,false,true>::BLAZE_TEMPLATE VectorizedMultAssign<VT> >::Type
5448 DenseColumn<MT,false,true>::multAssign(
const DenseVector<VT,false>& rhs )
5452 const size_t jpos( (~rhs).
size() &
size_t(-2) );
5453 for(
size_t j=0UL; j<jpos; j+=2UL ) {
5454 matrix_(col_,j ) *= (~rhs)[j ];
5455 matrix_(col_,j+1UL) *= (~rhs)[j+1UL];
5457 if( jpos < (~rhs).size() )
5458 matrix_(col_,jpos) *= (~rhs)[jpos];
5476 template<
typename MT >
5477 template<
typename VT >
5478 inline typename EnableIf< typename DenseColumn<MT,false,true>::BLAZE_TEMPLATE VectorizedMultAssign<VT> >::Type
5479 DenseColumn<MT,false,true>::multAssign(
const DenseVector<VT,false>& rhs )
5485 const bool remainder( !IsPadded<MT>::value || !IsPadded<VT>::value );
5495 matrix_.store( col_, j , matrix_.load(col_,j ) * it.load() ); it +=
IT::size;
5501 matrix_.store( col_, j, matrix_.load(col_,j) * it.load() );
5503 for( ; remainder && j<
columns; ++j, ++it ) {
5504 matrix_(col_,j) *= *it;
5523 template<
typename MT >
5524 template<
typename VT >
5525 inline void DenseColumn<MT,false,true>::multAssign(
const SparseVector<VT,false>& rhs )
5529 const ResultType tmp(
serial( *
this ) );
5534 matrix_(col_,element->index()) = tmp[element->index()] * element->value();
5555 template<
typename MT,
bool SO,
bool SF >
5556 inline void reset( DenseColumn<MT,SO,SF>&
column );
5558 template<
typename MT,
bool SO,
bool SF >
5559 inline void clear( DenseColumn<MT,SO,SF>&
column );
5561 template<
typename MT,
bool SO,
bool SF >
5564 template<
typename MT,
bool SO,
bool SF >
5567 template<
typename MT,
bool SO,
bool SF >
5568 inline bool isSame(
const DenseColumn<MT,SO,SF>& a,
const DenseColumn<MT,SO,SF>& b );
5580 template<
typename MT
5599 template<
typename MT
5627 template<
typename MT
5632 for(
size_t i=0UL; i<column.size(); ++i )
5633 if( !
isDefault( column[i] ) )
return false;
5657 template<
typename MT
5662 return ( column.col_ <= column.matrix_.columns() &&
5680 template<
typename MT
5685 return (
isSame( a.matrix_, b.matrix_ ) && ( a.col_ == b.col_ ) );
5705 template<
typename MT
5709 inline bool tryAssign(
const DenseColumn<MT,SO,SF>& lhs,
const Vector<VT,false>& rhs,
size_t index )
5714 return tryAssign( lhs.matrix_, ~rhs, index, lhs.col_ );
5735 template<
typename MT
5739 inline bool tryAddAssign(
const DenseColumn<MT,SO,SF>& lhs,
const Vector<VT,false>& rhs,
size_t index )
5744 return tryAddAssign( lhs.matrix_, ~rhs, index, lhs.col_ );
5765 template<
typename MT
5769 inline bool trySubAssign(
const DenseColumn<MT,SO,SF>& lhs,
const Vector<VT,false>& rhs,
size_t index )
5774 return trySubAssign( lhs.matrix_, ~rhs, index, lhs.col_ );
5795 template<
typename MT
5799 inline bool tryMultAssign(
const DenseColumn<MT,SO,SF>& lhs,
const Vector<VT,false>& rhs,
size_t index )
5804 return tryMultAssign( lhs.matrix_, ~rhs, index, lhs.col_ );
5825 template<
typename MT
5828 inline typename DerestrictTrait< DenseColumn<MT,SO,SF> >::Type
5829 derestrict( DenseColumn<MT,SO,SF>&
column )
5831 typedef typename DerestrictTrait< DenseColumn<MT,SO,SF> >::Type
ReturnType;
5832 return ReturnType( derestrict( column.matrix_ ), column.col_ );
5848 template<
typename MT,
bool SO,
bool SF >
5849 struct IsRestricted< DenseColumn<MT,SO,SF> > :
public IsTrue< IsRestricted<MT>::value >
5865 template<
typename MT,
bool SO,
bool SF >
5866 struct DerestrictTrait< DenseColumn<MT,SO,SF> >
5868 typedef DenseColumn< typename RemoveReference< typename DerestrictTrait<MT>::Type >::Type > Type;
5884 template<
typename MT,
bool SO,
bool SF >
5885 struct HasConstDataAccess< DenseColumn<MT,SO,SF> >
5886 :
public IsTrue< HasConstDataAccess<MT>::value >
5902 template<
typename MT,
bool SO,
bool SF >
5903 struct HasMutableDataAccess< DenseColumn<MT,SO,SF> >
5904 :
public IsTrue< HasMutableDataAccess<MT>::value >
5920 template<
typename MT,
bool SO,
bool SF >
5921 struct IsAligned< DenseColumn<MT,SO,SF> >
5922 :
public IsTrue< And< IsAligned<MT>, Or< IsColumnMajorMatrix<MT>, IsSymmetric<MT> > >::value >
5938 template<
typename MT,
bool SO,
bool SF >
5939 struct IsPadded< DenseColumn<MT,SO,SF> >
5940 :
public IsTrue< And< IsPadded<MT>, Or< IsColumnMajorMatrix<MT>, IsSymmetric<MT> > >::value >
5956 template<
typename MT,
bool SO,
bool SF,
typename T >
5957 struct AddTrait< DenseColumn<MT,SO,SF>, T >
5959 typedef typename AddTrait< typename ColumnTrait<MT>::Type, T >::Type Type;
5962 template<
typename T,
typename MT,
bool SO,
bool SF >
5963 struct AddTrait< T, DenseColumn<MT,SO,SF> >
5965 typedef typename AddTrait< T, typename ColumnTrait<MT>::Type >::Type Type;
5981 template<
typename MT,
bool SO,
bool SF,
typename T >
5982 struct SubTrait< DenseColumn<MT,SO,SF>, T >
5984 typedef typename SubTrait< typename ColumnTrait<MT>::Type, T >::Type Type;
5987 template<
typename T,
typename MT,
bool SO,
bool SF >
5988 struct SubTrait< T, DenseColumn<MT,SO,SF> >
5990 typedef typename SubTrait< T, typename ColumnTrait<MT>::Type >::Type Type;
6006 template<
typename MT,
bool SO,
bool SF,
typename T >
6007 struct MultTrait< DenseColumn<MT,SO,SF>, T >
6009 typedef typename MultTrait< typename ColumnTrait<MT>::Type, T >::Type Type;
6012 template<
typename T,
typename MT,
bool SO,
bool SF >
6013 struct MultTrait< T, DenseColumn<MT,SO,SF> >
6015 typedef typename MultTrait< T, typename ColumnTrait<MT>::Type >::Type Type;
6031 template<
typename MT,
bool SO,
bool SF,
typename T >
6032 struct CrossTrait< DenseColumn<MT,SO,SF>, T >
6034 typedef typename CrossTrait< typename ColumnTrait<MT>::Type, T >::Type Type;
6037 template<
typename T,
typename MT,
bool SO,
bool SF >
6038 struct CrossTrait< T, DenseColumn<MT,SO,SF> >
6040 typedef typename CrossTrait< T, typename ColumnTrait<MT>::Type >::Type Type;
6056 template<
typename MT,
bool SO,
bool SF,
typename T >
6057 struct DivTrait< DenseColumn<MT,SO,SF>, T >
6059 typedef typename DivTrait< typename ColumnTrait<MT>::Type, T >::Type Type;
6062 template<
typename T,
typename MT,
bool SO,
bool SF >
6063 struct DivTrait< T, DenseColumn<MT,SO,SF> >
6065 typedef typename DivTrait< T, typename ColumnTrait<MT>::Type >::Type Type;
6081 template<
typename MT,
bool SO,
bool SF >
6082 struct SubvectorTrait< DenseColumn<MT,SO,SF> >
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.
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
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
Base template for the ColumnTrait class.
Definition: ColumnTrait.h:115
#define BLAZE_CONSTRAINT_MUST_BE_COLUMN_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a column dense or sparse vector type...
Definition: ColumnVector.h:79
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:207
Header file for the IsDiagonal type trait.
IntrinsicTrait< typename MT::ElementType > IT
Intrinsic trait for the column element type.
Definition: DenseColumn.h:351
#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
Pointer data()
Low-level data access to the column elements.
Definition: DenseColumn.h:764
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
Header file for the IsSame and IsStrictlySame type traits.
DenseColumn(MT &matrix, size_t index)
The constructor for DenseColumn.
Definition: DenseColumn.h:646
const bool useStreaming
Configuration of the streaming behavior.For large vectors and matrices non-temporal stores can provid...
Definition: Optimizations.h:68
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
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2588
Iterator begin()
Returns an iterator to the first element of the column.
Definition: DenseColumn.h:799
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix)
Returns the current number of rows of the matrix.
Definition: Matrix.h:308
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
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
bool canSMPAssign() const
Returns whether the dense column can be used in SMP assignments.
Definition: DenseColumn.h:1505
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
#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
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.
Reference at(size_t index)
Checked access to the column elements.
Definition: DenseColumn.h:719
BLAZE_ALWAYS_INLINE void store(size_t index, const IntrinsicType &value)
Store of an intrinsic element of the dense column.
Definition: DenseColumn.h:1597
Header file for the IsUniLower type trait.
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:547
Constraint on the data type.
Header file for the column base class.
Constraint on the transpose flag of vector types.
MT::ConstReference ConstReference
Reference to a constant column value.
Definition: DenseColumn.h:365
Constraint on the data type.
Compile time check for upper unitriangular matrices.This type trait tests whether or not the given te...
Definition: IsUniUpper.h:85
const ElementType * ConstPointer
Pointer to a constant column value.
Definition: DenseColumn.h:371
Header file for the DisableIf class template.
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.
IT::Type IntrinsicType
Intrinsic type of the column elements.
Definition: DenseColumn.h:360
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
MT::ConstIterator ConstIterator
Iterator over constant elements.
Definition: DenseColumn.h:378
const DenseColumn & CompositeType
Data type for composite expression templates.
Definition: DenseColumn.h:362
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
If< IsExpression< MT >, MT, MT & >::Type Operand
Composite data type of the dense matrix expression.
Definition: DenseColumn.h:348
Header file for the Or class template.
size_t capacity() const
Returns the maximum capacity of the dense column.
Definition: DenseColumn.h:1299
Reference to a specific column of a dense matrix.The DenseColumn template represents a reference to a...
Definition: DenseColumn.h:342
#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 column is properly aligned in memory.
Definition: DenseColumn.h:1485
Base class for all columns.The Column class serves as a tag for all columns (i.e. dense and sparse co...
Definition: Column.h:64
Header file for the Not class template.
BLAZE_ALWAYS_INLINE void storea(size_t index, const IntrinsicType &value)
Aligned store of an intrinsic element of the dense column.
Definition: DenseColumn.h:1620
Header file for the subvector trait.
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
If< IsConst< MT >, ConstIterator, typename MT::Iterator >::Type Iterator
Iterator over non-constant elements.
Definition: DenseColumn.h:381
BLAZE_ALWAYS_INLINE void stream(size_t index, const IntrinsicType &value)
Aligned, non-temporal store of an intrinsic element of the dense column.
Definition: DenseColumn.h:1666
Header file for the IsLower type trait.
Header file for the IsAligned type trait.
BLAZE_ALWAYS_INLINE IntrinsicType load(size_t index) const
Load of an intrinsic element of the dense column.
Definition: DenseColumn.h:1528
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.
DenseColumn & operator=(const ElementType &rhs)
Homogenous assignment to all column elements.
Definition: DenseColumn.h:912
#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
Reference operator[](size_t index)
Subscript operator for the direct access to the column elements.
Definition: DenseColumn.h:677
Operand matrix_
The dense matrix containing the column.
Definition: DenseColumn.h:581
Constraint on the data type.
DenseColumn< MT, SO, SF > This
Type of this DenseColumn instance.
Definition: DenseColumn.h:356
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.
ConstIterator cbegin() const
Returns an iterator to the first element of the column.
Definition: DenseColumn.h:833
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 canAlias(const Other *alias) const
Returns whether the dense column can alias with the given address alias.
Definition: DenseColumn.h:1399
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.
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
BLAZE_ALWAYS_INLINE void storeu(size_t index, const IntrinsicType &value)
Unaligned store of an intrinsic element of the dense column.
Definition: DenseColumn.h:1643
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
size_t nonZeros() const
Returns the number of non-zero elements in the column.
Definition: DenseColumn.h:1317
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.
Intrinsic characteristics of data types.The IntrinsicTrait class template provides the intrinsic char...
Definition: IntrinsicTrait.h:1232
Header file for run time assertion macros.
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
ResultType::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: DenseColumn.h:358
Header file for the addition trait.
If< IsConst< MT >, ConstReference, typename MT::Reference >::Type Reference
Reference to a non-constant column value.
Definition: DenseColumn.h:368
Header file for the cross product trait.
Header file for the division trait.
Iterator end()
Returns an iterator just past the last element of the column.
Definition: DenseColumn.h:850
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
BLAZE_ALWAYS_INLINE IntrinsicType loadu(size_t index) const
Unaligned load of an intrinsic element of the dense column.
Definition: DenseColumn.h:1574
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
void reset()
Reset to the default initial values.
Definition: DenseColumn.h:1332
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:2591
Header file for the column trait.
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.
If< Or< IsConst< MT >, Not< HasMutableDataAccess< MT > > >, ConstPointer, ElementType * >::Type Pointer
Pointer to a non-constant column value.
Definition: DenseColumn.h:375
#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.
bool isAliased(const Other *alias) const
Returns whether the dense column is aliased with the given address alias.
Definition: DenseColumn.h:1443
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
const size_t col_
The index of the column in the matrix.
Definition: DenseColumn.h:582
Base class for N-dimensional vectors.The Vector class is a base class for all arbitrarily sized (N-di...
Definition: Forward.h:164
CompressedMatrix< Type,!SO > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:258
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
size_t size() const
Returns the current size/dimension of the column.
Definition: DenseColumn.h:1284
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:118
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.
MT::ElementType ElementType
Type of the column elements.
Definition: DenseColumn.h:359
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
MT::ReturnType ReturnType
Return type for expression template evaluations.
Definition: DenseColumn.h:361
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:2589
Header file for the IsUpper type trait.
Header file for exception macros.
BLAZE_ALWAYS_INLINE IntrinsicType loada(size_t index) const
Aligned load of an intrinsic element of the dense column.
Definition: DenseColumn.h:1551
ColumnTrait< MT >::Type ResultType
Result type for expression template evaluations.
Definition: DenseColumn.h:357
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.
ConstIterator cend() const
Returns an iterator just past the last element of the column.
Definition: DenseColumn.h:884
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
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.
Header file for a safe C++ NULL pointer implementation.