35 #ifndef _BLAZE_MATH_VIEWS_DENSECOLUMN_H_
36 #define _BLAZE_MATH_VIEWS_DENSECOLUMN_H_
305 template<
typename MT
306 ,
bool SO = IsColumnMajorMatrix<MT>::value >
361 enum { vectorizable = MT::vectorizable };
364 enum { smpAssignable = 0 };
370 explicit inline DenseColumn( MT& matrix,
size_t index );
401 template<
typename VT >
inline DenseColumn& operator+=(
const Vector<VT,false>& rhs );
402 template<
typename VT >
inline DenseColumn& operator-=(
const Vector<VT,false>& rhs );
403 template<
typename VT >
inline DenseColumn& operator*=(
const Vector<VT,false>& rhs );
405 template<
typename Other >
406 inline typename EnableIf< IsNumeric<Other>,
DenseColumn >::Type&
407 operator*=( Other rhs );
409 template<
typename Other >
410 inline typename EnableIf< IsNumeric<Other>,
DenseColumn >::Type&
411 operator/=( Other rhs );
418 inline size_t size()
const;
422 template<
typename Other >
inline DenseColumn& scale(
const Other& scalar );
429 template<
typename VT >
431 struct VectorizedAssign {
432 enum { value = vectorizable && VT::vectorizable &&
433 IsSame<ElementType,typename VT::ElementType>::value };
440 template<
typename VT >
442 struct VectorizedAddAssign {
443 enum { value = vectorizable && VT::vectorizable &&
444 IsSame<ElementType,typename VT::ElementType>::value &&
445 IntrinsicTrait<ElementType>::addition };
452 template<
typename VT >
454 struct VectorizedSubAssign {
455 enum { value = vectorizable && VT::vectorizable &&
456 IsSame<ElementType,typename VT::ElementType>::value &&
457 IntrinsicTrait<ElementType>::subtraction };
464 template<
typename VT >
466 struct VectorizedMultAssign {
467 enum { value = vectorizable && VT::vectorizable &&
468 IsSame<ElementType,typename VT::ElementType>::value &&
469 IntrinsicTrait<ElementType>::multiplication };
478 template<
typename Other >
inline bool canAlias (
const Other* alias )
const;
479 template<
typename Other >
inline bool isAliased(
const Other* alias )
const;
487 template<
typename VT >
488 inline typename DisableIf< VectorizedAssign<VT> >::Type
489 assign(
const DenseVector<VT,false>& rhs );
491 template<
typename VT >
492 inline typename EnableIf< VectorizedAssign<VT> >::Type
493 assign(
const DenseVector<VT,false>& rhs );
495 template<
typename VT >
inline void assign(
const SparseVector<VT,false>& rhs );
497 template<
typename VT >
498 inline typename DisableIf< VectorizedAddAssign<VT> >::Type
499 addAssign(
const DenseVector<VT,false>& rhs );
501 template<
typename VT >
502 inline typename EnableIf< VectorizedAddAssign<VT> >::Type
503 addAssign(
const DenseVector<VT,false>& rhs );
505 template<
typename VT >
inline void addAssign(
const SparseVector<VT,false>& rhs );
507 template<
typename VT >
508 inline typename DisableIf< VectorizedSubAssign<VT> >::Type
509 subAssign(
const DenseVector<VT,false>& rhs );
511 template<
typename VT >
512 inline typename EnableIf< VectorizedSubAssign<VT> >::Type
513 subAssign(
const DenseVector<VT,false>& rhs );
515 template<
typename VT >
inline void subAssign(
const SparseVector<VT,false>& rhs );
517 template<
typename VT >
518 inline typename DisableIf< VectorizedMultAssign<VT> >::Type
519 multAssign(
const DenseVector<VT,false>& rhs );
521 template<
typename VT >
522 inline typename EnableIf< VectorizedMultAssign<VT> >::Type
523 multAssign(
const DenseVector<VT,false>& rhs );
525 template<
typename VT >
inline void multAssign(
const SparseVector<VT,false>& rhs );
565 template<
typename MT
571 if(
matrix_.columns() <= index )
572 throw std::invalid_argument(
"Invalid column access index" );
591 template<
typename MT
607 template<
typename MT
624 template<
typename MT
640 template<
typename MT
656 template<
typename MT
672 template<
typename MT
688 template<
typename MT
704 template<
typename MT
720 template<
typename MT
736 template<
typename MT
759 template<
typename MT
763 const size_t rows( size() );
765 for(
size_t i=0UL; i<
rows; ++i )
783 template<
typename MT
787 if( &rhs ==
this )
return *
this;
789 if( size() != rhs.
size() )
790 throw std::invalid_argument(
"Column sizes do not match" );
792 const size_t rows( size() );
794 for(
size_t i=0UL; i<
rows; ++i )
812 template<
typename MT
814 template<
typename VT >
822 if( size() != (~rhs).size() )
823 throw std::invalid_argument(
"Vector sizes do not match" );
825 if( (~rhs).canAlias( &
matrix_ ) ) {
850 template<
typename MT
852 template<
typename VT >
860 if( size() != (~rhs).size() )
861 throw std::invalid_argument(
"Vector sizes do not match" );
863 if( (~rhs).canAlias( &
matrix_ ) ) {
886 template<
typename MT
888 template<
typename VT >
896 if( size() != (~rhs).size() )
897 throw std::invalid_argument(
"Vector sizes do not match" );
899 if( (~rhs).canAlias( &
matrix_ ) ) {
923 template<
typename MT
925 template<
typename VT >
933 if( size() != (~rhs).size() )
934 throw std::invalid_argument(
"Vector sizes do not match" );
956 template<
typename MT
958 template<
typename Other >
962 return operator=( (*
this) * rhs );
976 template<
typename MT
978 template<
typename Other >
984 return operator=( (*
this) / rhs );
1002 template<
typename MT
1016 template<
typename MT
1033 template<
typename MT
1047 template<
typename MT
1062 template<
typename MT
1064 template<
typename Other >
1067 for(
size_t j=0UL; j<size(); ++j ) {
1093 template<
typename MT
1095 template<
typename Other >
1098 return static_cast<const void*
>( &
matrix_ ) == static_cast<const void*>( alias );
1113 template<
typename MT
1115 template<
typename Other >
1118 return static_cast<const void*
>( &
matrix_ ) == static_cast<const void*>( alias );
1135 template<
typename MT
1156 template<
typename MT
1178 template<
typename MT
1200 template<
typename MT
1222 template<
typename MT
1242 template<
typename MT
1244 template<
typename VT >
1250 const size_t iend( (~rhs).size() &
size_t(-2) );
1251 for(
size_t i=0UL; i<iend; i+=2UL ) {
1255 if( iend < (~rhs).size() )
1272 template<
typename MT
1274 template<
typename VT >
1282 const size_t rows( size() );
1286 for(
size_t i=0UL; i<
rows; i+=IT::size ) {
1292 const size_t iend( rows &
size_t(-IT::size*4) );
1296 for(
size_t i=0UL; i<iend; i+=IT::size*4UL ) {
1297 matrix_.store( i ,
col_, it.load() ); it+=IT::size;
1298 matrix_.store( i+IT::size ,
col_, it.load() ); it+=IT::size;
1299 matrix_.store( i+IT::size*2UL,
col_, it.load() ); it+=IT::size;
1300 matrix_.store( i+IT::size*3UL,
col_, it.load() ); it+=IT::size;
1302 for(
size_t i=iend; i<
rows; i+=IT::size, it+=IT::size ) {
1321 template<
typename MT
1323 template<
typename VT >
1328 for(
typename VT::ConstIterator element=(~rhs).begin(); element!=(~rhs).end(); ++element )
1329 matrix_(element->index(),
col_) = element->value();
1345 template<
typename MT
1347 template<
typename VT >
1353 const size_t iend( (~rhs).size() &
size_t(-2) );
1354 for(
size_t i=0UL; i<iend; i+=2UL ) {
1358 if( iend < (~rhs).size() )
1375 template<
typename MT
1377 template<
typename VT >
1385 const size_t rows( size() );
1387 const size_t iend( rows &
size_t(-IT::size*4) );
1391 for(
size_t i=0UL; i<iend; i+=IT::size*4UL ) {
1397 for(
size_t i=iend; i<
rows; i+=IT::size, it+=IT::size ) {
1415 template<
typename MT
1417 template<
typename VT >
1422 for(
typename VT::ConstIterator element=(~rhs).begin(); element!=(~rhs).end(); ++element )
1423 matrix_(element->index(),
col_) += element->value();
1439 template<
typename MT
1441 template<
typename VT >
1447 const size_t iend( (~rhs).size() &
size_t(-2) );
1448 for(
size_t i=0UL; i<iend; i+=2UL ) {
1452 if( iend < (~rhs).size() )
1469 template<
typename MT
1471 template<
typename VT >
1479 const size_t rows( size() );
1481 const size_t iend( rows &
size_t(-IT::size*4) );
1485 for(
size_t i=0UL; i<iend; i+=IT::size*4UL ) {
1491 for(
size_t i=iend; i<
rows; i+=IT::size, it+=IT::size ) {
1509 template<
typename MT
1511 template<
typename VT >
1516 for(
typename VT::ConstIterator element=(~rhs).begin(); element!=(~rhs).end(); ++element )
1517 matrix_(element->index(),
col_) -= element->value();
1533 template<
typename MT
1535 template<
typename VT >
1541 const size_t iend( (~rhs).size() &
size_t(-2) );
1542 for(
size_t i=0UL; i<iend; i+=2UL ) {
1546 if( iend < (~rhs).size() )
1563 template<
typename MT
1565 template<
typename VT >
1573 const size_t rows( size() );
1575 const size_t iend( rows &
size_t(-IT::size*4) );
1579 for(
size_t i=0UL; i<iend; i+=IT::size*4UL ) {
1585 for(
size_t i=iend; i<
rows; i+=IT::size, it+=IT::size ) {
1603 template<
typename MT
1605 template<
typename VT >
1614 for(
typename VT::ConstIterator element=(~rhs).begin(); element!=(~rhs).end(); ++element )
1615 matrix_(element->index(),
col_) = tmp[element->index()] * element->value();
1640 template<
typename MT >
1663 typedef DenseColumn<MT,false>
This;
1664 typedef typename ColumnTrait<MT>::Type
ResultType;
1674 typedef typename SelectType< useConst, ConstReference, typename MT::Reference >::Type
Reference;
1680 template<
typename MatrixType >
1681 class ColumnIterator
1691 enum { returnConst = IsConst<MatrixType>::value };
1697 typedef typename SelectType< returnConst, typename MT::ConstReference, typename MT::Reference >::Type
Reference;
1699 typedef std::random_access_iterator_tag IteratorCategory;
1700 typedef RemoveReference<Reference> ValueType;
1701 typedef ValueType* PointerType;
1703 typedef ptrdiff_t DifferenceType;
1706 typedef IteratorCategory iterator_category;
1707 typedef ValueType value_type;
1708 typedef PointerType pointer;
1709 typedef ReferenceType reference;
1710 typedef DifferenceType difference_type;
1720 inline ColumnIterator( MatrixType& matrix,
size_t row,
size_t column )
1732 template<
typename MatrixType2 >
1733 inline ColumnIterator(
const ColumnIterator<MatrixType2>& it )
1746 inline ColumnIterator& operator+=(
size_t inc ) {
1758 inline ColumnIterator& operator-=(
size_t dec ) {
1769 inline ColumnIterator& operator++() {
1780 inline const ColumnIterator operator++(
int ) {
1781 const ColumnIterator tmp( *
this );
1792 inline ColumnIterator& operator--() {
1803 inline const ColumnIterator operator--(
int ) {
1804 const ColumnIterator tmp( *
this );
1816 inline ReferenceType
operator[](
size_t index )
const {
1826 inline ReferenceType
operator*()
const {
1836 inline PointerType operator->()
const {
1847 template<
typename MatrixType2 >
1848 inline bool operator==(
const ColumnIterator<MatrixType2>& rhs )
const {
1849 return (
matrix_ == rhs.matrix_ ) && (
row_ == rhs.row_ ) && (
column_ == rhs.column_ );
1859 template<
typename MatrixType2 >
1860 inline bool operator!=(
const ColumnIterator<MatrixType2>& rhs )
const {
1861 return !( *
this == rhs );
1871 template<
typename MatrixType2 >
1872 inline bool operator<( const ColumnIterator<MatrixType2>& rhs )
const {
1873 return (
matrix_ == rhs.matrix_ ) && (
row_ < rhs.row_ ) && (
column_ == rhs.column_ );
1883 template<
typename MatrixType2 >
1884 inline bool operator>(
const ColumnIterator<MatrixType2>& rhs )
const {
1885 return (
matrix_ == rhs.matrix_ ) && (
row_ > rhs.row_ ) && (
column_ == rhs.column_ );
1895 template<
typename MatrixType2 >
1896 inline bool operator<=( const ColumnIterator<MatrixType2>& rhs )
const {
1897 return (
matrix_ == rhs.matrix_ ) && (
row_ <= rhs.row_ ) && (
column_ == rhs.column_ );
1907 template<
typename MatrixType2 >
1908 inline bool operator>=(
const ColumnIterator<MatrixType2>& rhs )
const {
1909 return (
matrix_ == rhs.matrix_ ) && (
row_ >= rhs.row_ ) && (
column_ == rhs.column_ );
1919 inline DifferenceType
operator-(
const ColumnIterator& rhs )
const {
1920 return row_ - rhs.row_;
1931 friend inline const ColumnIterator
operator+(
const ColumnIterator& it,
size_t inc ) {
1932 return ColumnIterator( *it.matrix_, it.row_+inc, it.column_ );
1943 friend inline const ColumnIterator
operator+(
size_t inc,
const ColumnIterator& it ) {
1944 return ColumnIterator( *it.matrix_, it.row_+inc, it.column_ );
1955 friend inline const ColumnIterator
operator-(
const ColumnIterator& it,
size_t dec ) {
1956 return ColumnIterator( *it.matrix_, it.row_-dec, it.column_ );
1969 template<
typename MatrixType2 >
friend class ColumnIterator;
1980 typedef typename SelectType< useConst, ConstIterator, ColumnIterator<MT> >::Type
Iterator;
1985 enum { vectorizable = 0 };
1988 enum { smpAssignable = 0 };
1994 explicit inline DenseColumn( MT& matrix,
size_t index );
2023 template<
typename VT >
inline DenseColumn& operator+=(
const Vector<VT,false>& rhs );
2024 template<
typename VT >
inline DenseColumn& operator-=(
const Vector<VT,false>& rhs );
2025 template<
typename VT >
inline DenseColumn& operator*=(
const Vector<VT,false>& rhs );
2027 template<
typename Other >
2028 inline typename EnableIf< IsNumeric<Other>,
DenseColumn >::Type&
2029 operator*=( Other rhs );
2031 template<
typename Other >
2032 inline typename EnableIf< IsNumeric<Other>,
DenseColumn >::Type&
2033 operator/=( Other rhs );
2040 inline size_t size()
const;
2043 inline void reset();
2044 template<
typename Other >
inline DenseColumn& scale(
const Other& scalar );
2052 template<
typename Other >
inline bool canAlias (
const Other* alias )
const;
2053 template<
typename Other >
inline bool isAliased (
const Other* alias )
const;
2054 template<
typename VT >
inline void assign (
const DenseVector <VT,false>& rhs );
2055 template<
typename VT >
inline void assign (
const SparseVector<VT,false>& rhs );
2056 template<
typename VT >
inline void addAssign (
const DenseVector <VT,false>& rhs );
2057 template<
typename VT >
inline void addAssign (
const SparseVector<VT,false>& rhs );
2058 template<
typename VT >
inline void subAssign (
const DenseVector <VT,false>& rhs );
2059 template<
typename VT >
inline void subAssign (
const SparseVector<VT,false>& rhs );
2060 template<
typename VT >
inline void multAssign(
const DenseVector <VT,false>& rhs );
2061 template<
typename VT >
inline void multAssign(
const SparseVector<VT,false>& rhs );
2103 template<
typename MT >
2108 if(
matrix_.columns() <= index )
2109 throw std::invalid_argument(
"Invalid column access index" );
2130 template<
typename MT >
2147 template<
typename MT >
2165 template<
typename MT >
2182 template<
typename MT >
2199 template<
typename MT >
2216 template<
typename MT >
2233 template<
typename MT >
2250 template<
typename MT >
2274 template<
typename MT >
2275 inline DenseColumn<MT,false>& DenseColumn<MT,false>::operator=(
const ElementType& rhs )
2277 const size_t rows( size() );
2279 for(
size_t i=0UL; i<
rows; ++i )
2299 template<
typename MT >
2300 inline DenseColumn<MT,false>& DenseColumn<MT,false>::operator=(
const DenseColumn& rhs )
2302 if( &rhs ==
this )
return *
this;
2304 if( size() != rhs.size() )
2305 throw std::invalid_argument(
"Column sizes do not match" );
2307 const size_t rows( size() );
2309 for(
size_t i=0UL; i<
rows; ++i )
2329 template<
typename MT >
2330 template<
typename VT >
2331 inline DenseColumn<MT,false>& DenseColumn<MT,false>::operator=(
const Vector<VT,false>& rhs )
2339 if( size() != (~rhs).size() )
2340 throw std::invalid_argument(
"Vector sizes do not match" );
2342 if( (~rhs).canAlias( &
matrix_ ) ) {
2347 if( IsSparseVector<VT>::value )
2369 template<
typename MT >
2370 template<
typename VT >
2371 inline DenseColumn<MT,false>& DenseColumn<MT,false>::operator+=(
const Vector<VT,false>& rhs )
2378 if( size() != (~rhs).size() )
2379 throw std::invalid_argument(
"Vector sizes do not match" );
2381 if( (~rhs).canAlias( &
matrix_ ) ) {
2406 template<
typename MT >
2407 template<
typename VT >
2408 inline DenseColumn<MT,false>& DenseColumn<MT,false>::operator-=(
const Vector<VT,false>& rhs )
2415 if( size() != (~rhs).size() )
2416 throw std::invalid_argument(
"Vector sizes do not match" );
2418 if( (~rhs).canAlias( &
matrix_ ) ) {
2444 template<
typename MT >
2445 template<
typename VT >
2446 inline DenseColumn<MT,false>& DenseColumn<MT,false>::operator*=(
const Vector<VT,false>& rhs )
2453 if( size() != (~rhs).size() )
2454 throw std::invalid_argument(
"Vector sizes do not match" );
2456 if( (~rhs).canAlias( &
matrix_ ) || IsSparseVector<VT>::value ) {
2478 template<
typename MT >
2479 template<
typename Other >
2480 inline typename EnableIf< IsNumeric<Other>, DenseColumn<MT,false> >::Type&
2481 DenseColumn<MT,false>::operator*=( Other rhs )
2483 for(
size_t i=0UL; i<size(); ++i )
2501 template<
typename MT >
2502 template<
typename Other >
2503 inline typename EnableIf< IsNumeric<Other>, DenseColumn<MT,false> >::Type&
2504 DenseColumn<MT,false>::operator/=( Other rhs )
2508 typedef typename DivTrait<ElementType,Other>::Type DT;
2509 typedef typename If< IsNumeric<DT>, DT, Other >::Type Tmp;
2513 if( IsNumeric<DT>::value && IsFloatingPoint<DT>::value ) {
2514 const Tmp tmp( Tmp(1)/static_cast<Tmp>( rhs ) );
2515 for(
size_t i=0UL; i<size(); ++i )
2519 for(
size_t i=0UL; i<size(); ++i )
2543 template<
typename MT >
2544 inline size_t DenseColumn<MT,false>::size()
const
2558 template<
typename MT >
2559 inline size_t DenseColumn<MT,false>::capacity()
const
2576 template<
typename MT >
2577 inline size_t DenseColumn<MT,false>::nonZeros()
const
2579 const size_t rows( size() );
2580 size_t nonzeros( 0UL );
2582 for(
size_t i=0UL; i<
rows; ++i )
2598 template<
typename MT >
2602 const size_t rows( size() );
2603 for(
size_t i=0UL; i<
rows; ++i )
2617 template<
typename MT >
2618 template<
typename Other >
2619 inline DenseColumn<MT,false>& DenseColumn<MT,false>::scale(
const Other& scalar )
2621 for(
size_t i=0UL; i<size(); ++i ) {
2649 template<
typename MT >
2650 template<
typename Other >
2651 inline bool DenseColumn<MT,false>::canAlias(
const Other* alias )
const
2653 return static_cast<const void*
>( &
matrix_ ) == static_cast<const void*>( alias );
2670 template<
typename MT >
2671 template<
typename Other >
2672 inline bool DenseColumn<MT,false>::isAliased(
const Other* alias )
const
2674 return static_cast<const void*
>( &
matrix_ ) == static_cast<const void*>( alias );
2692 template<
typename MT >
2693 template<
typename VT >
2698 const size_t iend( (~rhs).size() &
size_t(-2) );
2699 for(
size_t i=0UL; i<iend; i+=2UL ) {
2703 if( iend < (~rhs).size() )
2722 template<
typename MT >
2723 template<
typename VT >
2728 for(
typename VT::ConstIterator element=(~rhs).begin(); element!=(~rhs).end(); ++element )
2729 matrix_(element->index(),
col_) = element->value();
2747 template<
typename MT >
2748 template<
typename VT >
2753 const size_t iend( (~rhs).size() &
size_t(-2) );
2754 for(
size_t i=0UL; i<iend; i+=2UL ) {
2758 if( iend < (~rhs).size() )
2777 template<
typename MT >
2778 template<
typename VT >
2783 for(
typename VT::ConstIterator element=(~rhs).begin(); element!=(~rhs).end(); ++element )
2784 matrix_(element->index(),
col_) += element->value();
2802 template<
typename MT >
2803 template<
typename VT >
2808 const size_t iend( (~rhs).size() &
size_t(-2) );
2809 for(
size_t i=0UL; i<iend; i+=2UL ) {
2813 if( iend < (~rhs).size() )
2832 template<
typename MT >
2833 template<
typename VT >
2838 for(
typename VT::ConstIterator element=(~rhs).begin(); element!=(~rhs).end(); ++element )
2839 matrix_(element->index(),
col_) -= element->value();
2857 template<
typename MT >
2858 template<
typename VT >
2863 const size_t iend( (~rhs).size() &
size_t(-2) );
2864 for(
size_t i=0UL; i<iend; i+=2UL ) {
2868 if( iend < (~rhs).size() )
2887 template<
typename MT >
2888 template<
typename VT >
2897 for(
typename VT::ConstIterator element=(~rhs).begin(); element!=(~rhs).end(); ++element )
2898 matrix_(element->index(),
col_) = tmp[element->index()] * element->value();
2919 template<
typename MT,
bool SO >
2922 template<
typename MT,
bool SO >
2925 template<
typename MT,
bool SO >
2938 template<
typename MT
2956 template<
typename MT
2983 template<
typename MT
2987 for(
size_t i=0UL; i<column.size(); ++i )
2988 if( !
isDefault( column[i] ) )
return false;
3023 template<
typename MT
3025 inline typename DisableIf< Or< IsComputation<MT>, IsTransExpr<MT> >, DenseColumn<MT> >::Type
3026 column( DenseMatrix<MT,SO>& dm,
size_t index )
3030 return DenseColumn<MT>( ~dm, index );
3056 template<
typename MT
3058 inline typename DisableIf< Or< IsComputation<MT>, IsTransExpr<MT> >, DenseColumn<const MT> >::Type
3059 column(
const DenseMatrix<MT,SO>& dm,
size_t index )
3063 return DenseColumn<const MT>( ~dm, index );
3078 template<
typename MT,
bool SO >
3079 struct SubvectorTrait< DenseColumn<MT,SO> >
Constraint on the data type.
Constraint on the data type.
SelectType< useConst, ConstReference, typename MT::Reference >::Type Reference
Reference to a non-constant column value.
Definition: DenseColumn.h:344
DisableIf< Or< IsComputation< MT >, IsTransExpr< MT > >, DenseColumn< MT > >::Type column(DenseMatrix< MT, SO > &dm, size_t index)
Creating a view on a specific column of the given dense matrix.
Definition: DenseColumn.h:3026
const ElementType * ConstPointer
Pointer to a constant row value.
Definition: DenseColumn.h:347
void reset(DynamicMatrix< Type, SO > &m)
Resetting the given dense matrix.
Definition: DynamicMatrix.h:4512
#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
EnableIf< IsIntegral< T >, Load< T, sizeof(T)> >::Type::Type load(const T *address)
Loads a vector of integral values.
Definition: Load.h:222
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:3703
Header file for the View base class.
Base template for the ColumnTrait class.
Definition: ColumnTrait.h:114
size_t size() const
Returns the current size/dimension of the column.
Definition: DenseColumn.h:1004
#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: TransposeFlag.h:159
bool isDefault(const DynamicMatrix< Type, SO > &m)
Returns whether the given dense matrix is in default state.
Definition: DynamicMatrix.h:4555
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:196
#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
Header file for the IsSame and IsStrictlySame type traits.
ResultType::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: DenseColumn.h:334
MT::ElementType ElementType
Type of the column elements.
Definition: DenseColumn.h:335
const size_t col_
The index of the column in the matrix.
Definition: DenseColumn.h:2070
const bool useStreaming
Configuration of the streaming behavior.For large vectors and matrices non-temporal stores can provid...
Definition: Streaming.h:50
Header file for the IsColumnMajorMatrix type trait.
void stream(size_t index, const IntrinsicType &value)
Aligned, non-temporal store of an intrinsic element of the dense column.
Definition: DenseColumn.h:1224
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.
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
MT::ReturnType ReturnType
Return type for expression template evaluations.
Definition: DenseColumn.h:337
const size_t row_
The first row of the submatrix.
Definition: DenseSubmatrix.h:2793
#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
MT::ConstIterator ConstIterator
Iterator over constant elements.
Definition: DenseColumn.h:353
void clear(DynamicMatrix< Type, SO > &m)
Clearing the given dense matrix.
Definition: DynamicMatrix.h:4528
size_t nonZeros() const
Returns the number of non-zero elements in the column.
Definition: DenseColumn.h:1035
SelectType< IsExpression< MT >::value, MT, MT & >::Type Operand
Composite data type of the dense matrix expression.
Definition: DenseColumn.h:313
DenseColumn & operator=(const ElementType &rhs)
Homogenous assignment to all column elements.
Definition: DenseColumn.h:761
Constraint on the data type.
Iterator end()
Returns an iterator just past the last element of the column.
Definition: DenseColumn.h:706
void store(size_t index, const IntrinsicType &value)
Aligned store of an intrinsic element of the dense column.
Definition: DenseColumn.h:1180
SelectType< useConst, ConstPointer, ElementType * >::Type Pointer
Pointer to a constant row value.
Definition: DenseColumn.h:350
Compile time type selection.The SelectType class template selects one of the two given types T1 and T...
Definition: SelectType.h:59
Header file for the DisableIf class template.
ConstIterator cbegin() const
Returns an iterator to the first element of the column.
Definition: DenseColumn.h:690
Reference operator[](size_t index)
Subscript operator for the direct access to the column elements.
Definition: DenseColumn.h:593
Header file for nested template disabiguation.
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: StorageOrder.h:161
DenseColumn(MT &matrix, size_t index)
The constructor for DenseColumn.
Definition: DenseColumn.h:567
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2379
IT::Type IntrinsicType
Intrinsic type of the column elements.
Definition: DenseColumn.h:336
bool canAlias(const Other *alias) const
Returns whether the dense column can alias with the given address alias.
Definition: DenseColumn.h:1096
const size_t col_
The index of the column in the matrix.
Definition: DenseColumn.h:534
Header file for the Or class template.
IntrinsicType load(size_t index) const
Aligned load of an intrinsic element of the dense column.
Definition: DenseColumn.h:1137
MT::ConstReference ConstReference
Reference to a constant column value.
Definition: DenseColumn.h:341
Reference to a specific column of a dense matrix.The DenseColumn template represents a reference to a...
Definition: DenseColumn.h:307
IntrinsicType loadu(size_t index) const
Unaligned load of an intrinsic element of the dense column.
Definition: DenseColumn.h:1158
Header file for the subvector trait.
void assign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the assignment of a matrix to a matrix.
Definition: Matrix.h:179
const DenseIterator< Type > operator+(const DenseIterator< Type > &it, ptrdiff_t inc)
Addition between a DenseIterator and an integral value.
Definition: DenseIterator.h:556
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
void storeu(size_t index, const IntrinsicType &value)
Unaligned store of an intrinsic element of the dense column.
Definition: DenseColumn.h:1202
Constraint on the data type.
Constraint on the data type.
Operand matrix_
The dense matrix containing the column.
Definition: DenseColumn.h:2069
size_t capacity() const
Returns the maximum capacity of the dense column.
Definition: DenseColumn.h:1018
#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
Constraints on the storage order of matrix types.
Constraint on the data type.
ColumnTrait< MT >::Type ResultType
Result type for expression template evaluations.
Definition: DenseColumn.h:333
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2373
void multAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the multiplication assignment of a matrix to a matrix.
Definition: Matrix.h:269
Constraint on the data type.
const size_t column_
The first column of the submatrix.
Definition: DenseSubmatrix.h:2794
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:2377
System settings for streaming (non-temporal stores)
SelectType< useConst, ConstIterator, typename MT::Iterator >::Type Iterator
Iterator over non-constant elements.
Definition: DenseColumn.h:356
Header file for the EnableIf class template.
Operand matrix_
The dense matrix containing the column.
Definition: DenseColumn.h:533
ColumnIterator< const MT > ConstIterator
Iterator over constant elements.
Definition: DenseColumn.h:1972
Header file for the IsNumeric type trait.
Header file for the IsSparseVector type trait.
#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: StorageOrder.h:81
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2374
Header file for the IsConst type trait.
IntrinsicTrait< typename MT::ElementType > IT
Intrinsic trait for the column element type.
Definition: DenseColumn.h:316
Intrinsic characteristics of data types.The IntrinsicTrait class template provides the intrinsic char...
Definition: IntrinsicTrait.h:648
Header file for run time assertion macros.
Header file for the division trait.
void addAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the addition assignment of a matrix to a matrix.
Definition: Matrix.h:209
const DenseIterator< Type > operator-(const DenseIterator< Type > &it, ptrdiff_t inc)
Subtraction between a DenseIterator and an integral value.
Definition: DenseIterator.h:585
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:184
Header file for the reset shim.
DisableIf< Or< IsComputation< MT >, IsTransExpr< MT > >, DenseRow< MT > >::Type row(DenseMatrix< MT, SO > &dm, size_t index)
Creating a view on a specific row of the given dense matrix.
Definition: DenseRow.h:3025
Header file for the cache size of the target architecture.
void subAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the subtraction assignment of a matrix to matrix.
Definition: Matrix.h:239
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:2378
DenseColumn< MT, SO > This
Type of this DenseColumn instance.
Definition: DenseColumn.h:332
Header file for the column trait.
void reset()
Reset to the default initial values.
Definition: DenseColumn.h:1049
Pointer data()
Low-level data access to the column elements.
Definition: DenseColumn.h:626
#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
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.
#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
ConstIterator cend() const
Returns an iterator just past the last element of the column.
Definition: DenseColumn.h:738
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:147
Base class for all views.The View class serves as a tag for all views (subvectors, submatrices, rows, columns, ...). All classes that represent a view and that are used within the expression template environment of the Blaze library have to derive from this class in order to qualify as a view. Only in case a class is derived from the View base class, the IsView type trait recognizes the class as valid view.
Definition: View.h:64
CompressedMatrix< Type,!SO > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:247
Iterator begin()
Returns an iterator to the first element of the column.
Definition: DenseColumn.h:658
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:105
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:157
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:2370
bool operator!=(const NegativeAccuracy< A > &lhs, const T &rhs)
Inequality comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:289
Header file for basic type definitions.
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:2376
SelectType< useConst, ConstIterator, ColumnIterator< MT > >::Type Iterator
Iterator over non-constant elements.
Definition: DenseColumn.h:1980
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
bool isAliased(const Other *alias) const
Returns whether the dense column is aliased with the given address alias.
Definition: DenseColumn.h:1116
size_t rows(const Matrix< MT, SO > &m)
Returns the current number of rows of the matrix.
Definition: Matrix.h:138
#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
Operand matrix_
The dense matrix containing the submatrix.
Definition: DenseSubmatrix.h:2792
Header file for the IsExpression type trait class.
const DenseColumn & CompositeType
Data type for composite expression templates.
Definition: DenseColumn.h:338
Header file for the FunctionTrace class.