35 #ifndef _BLAZE_MATH_EXPRESSIONS_DVECDVECOUTEREXPR_H_ 36 #define _BLAZE_MATH_EXPRESSIONS_DVECDVECOUTEREXPR_H_ 103 template<
typename VT1
106 :
public VecTVecMultExpr< DenseMatrix< DVecDVecOuterExpr<VT1,VT2>, false > >
123 static constexpr
bool evaluateLeft = ( IsComputation_v<VT1> || RequiresEvaluation_v<VT1> );
128 static constexpr
bool evaluateRight = ( IsComputation_v<VT2> || RequiresEvaluation_v<VT2> );
138 static constexpr
bool returnExpr = ( !IsTemporary_v<RN1> && !IsTemporary_v<RN2> );
155 template<
typename VT >
157 static constexpr
bool UseAssign_v =
useAssign;
167 template<
typename VT >
177 template<
typename T1,
typename T2,
typename T3 >
178 static constexpr
bool UseVectorizedKernel_v =
179 ( useOptimizedKernels &&
180 T1::simdEnabled && T2::simdEnabled && T3::simdEnabled &&
181 IsSIMDCombinable_v< ElementType_t<T1>
193 template<
typename T1,
typename T2,
typename T3 >
194 static constexpr
bool UseDefaultKernel_v = !UseVectorizedKernel_v<T1,T2,T3>;
338 return (*
left_) * (*right_);
347 inline auto load() const noexcept {
476 ( VT1::simdEnabled && VT2::simdEnabled && HasSIMDMult_v<ET1,ET2> );
523 if( i >=
lhs_.size() ) {
526 if( j >=
rhs_.size() ) {
577 inline size_t rows() const noexcept {
618 template<
typename T >
619 inline bool canAlias(
const T* alias )
const noexcept {
620 return (
lhs_.canAlias( alias ) ||
rhs_.canAlias( alias ) );
630 template<
typename T >
631 inline bool isAliased(
const T* alias )
const noexcept {
632 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
642 return lhs_.isAligned() &&
rhs_.isAligned();
652 return (
rows() *
columns() >= SMP_DVECDVECOUTER_THRESHOLD );
676 template<
typename MT >
693 DVecDVecOuterExpr::selectAssignKernel( ~lhs, x, y );
712 template<
typename MT
715 static inline auto selectAssignKernel( MT& A,
const VT3& x,
const VT4& y )
718 const size_t M( A.rows() );
719 const size_t N( A.columns() );
721 const size_t jpos( N &
size_t(-2) );
724 for(
size_t i=0UL; i<M; ++i ) {
725 for(
size_t j=0UL; j<jpos; j+=2UL ) {
726 A(i,j ) = x[i] * y[j ];
727 A(i,j+1UL) = x[i] * y[j+1];
730 A(i,jpos) = x[i] * y[jpos];
751 template<
typename MT
754 static inline auto selectAssignKernel( MT& A,
const VT3& x,
const VT4& y )
755 -> EnableIf_t< IsRowMajorMatrix_v<MT> && UseVectorizedKernel_v<MT,VT3,VT4> >
757 constexpr
bool remainder( !IsPadded_v<MT> || !IsPadded_v<VT4> );
759 const size_t M( A.rows() );
760 const size_t N( A.columns() );
762 const size_t jpos( remainder ? ( N &
size_t(-
SIMDSIZE) ) : N );
765 for(
size_t i=0UL; i<M; ++i )
772 A.store( i, j, x1 * y.load(j) );
774 for( ; remainder && j<N; ++j ) {
775 A(i,j) = x[i] * y[j];
794 template<
typename MT >
795 friend inline void assign( DenseMatrix<MT,true>& lhs,
const DVecDVecOuterExpr& rhs )
812 DVecDVecOuterExpr::selectAssignKernel( ~lhs, x, y );
831 template<
typename MT
834 static inline auto selectAssignKernel( MT& A,
const VT3& x,
const VT4& y )
835 -> EnableIf_t< IsColumnMajorMatrix_v<MT> && UseDefaultKernel_v<MT,VT3,VT4> >
837 const size_t M( A.rows() );
838 const size_t N( A.columns() );
840 const size_t ipos( M &
size_t(-2) );
843 for(
size_t j=0UL; j<N; ++j ) {
844 for(
size_t i=0UL; i<ipos; i+=2UL ) {
845 A(i ,j) = x[i ] * y[j];
846 A(i+1UL,j) = x[i+1] * y[j];
849 A(ipos,j) = x[ipos] * y[j];
870 template<
typename MT
873 static inline auto selectAssignKernel( MT& A,
const VT3& x,
const VT4& y )
874 -> EnableIf_t< IsColumnMajorMatrix_v<MT> && UseVectorizedKernel_v<MT,VT3,VT4> >
876 constexpr
bool remainder( !IsPadded_v<MT> || !IsPadded_v<VT3> );
878 const size_t M( A.rows() );
879 const size_t N( A.columns() );
881 const size_t ipos( remainder ? ( M &
size_t(-
SIMDSIZE) ) : M );
884 for(
size_t j=0UL; j<N; ++j )
891 A.store( i, j, x.load(i) * y1 );
893 for( ; remainder && i<M; ++i ) {
894 A(i,j) = x[i] * y[j];
913 template<
typename MT
915 friend inline void assign( SparseMatrix<MT,SO>& lhs,
const DVecDVecOuterExpr& rhs )
919 using TmpType = If_t< SO, OppositeType, ResultType >;
931 const TmpType tmp(
serial( rhs ) );
952 template<
typename MT >
953 friend inline auto addAssign( DenseMatrix<MT,false>& lhs,
const DVecDVecOuterExpr& rhs )
954 -> EnableIf_t< UseAssign_v<MT> >
969 DVecDVecOuterExpr::selectAddAssignKernel( ~lhs, x, y );
988 template<
typename MT
991 static inline auto selectAddAssignKernel( MT& A,
const VT3& x,
const VT4& y )
992 -> EnableIf_t< IsRowMajorMatrix_v<MT> && UseDefaultKernel_v<MT,VT3,VT4> >
994 const size_t M( A.rows() );
995 const size_t N( A.columns() );
997 const size_t jpos( N &
size_t(-2) );
1000 for(
size_t i=0UL; i<M; ++i ) {
1001 for(
size_t j=0UL; j<jpos; j+=2UL ) {
1002 A(i,j ) += x[i] * y[j ];
1003 A(i,j+1UL) += x[i] * y[j+1UL];
1006 A(i,jpos) += x[i] * y[jpos];
1027 template<
typename MT
1030 static inline auto selectAddAssignKernel( MT& A,
const VT3& x,
const VT4& y )
1031 -> EnableIf_t< IsRowMajorMatrix_v<MT> && UseVectorizedKernel_v<MT,VT3,VT4> >
1033 constexpr
bool remainder( !IsPadded_v<MT> || !IsPadded_v<VT4> );
1035 const size_t M( A.rows() );
1036 const size_t N( A.columns() );
1038 const size_t jpos( remainder ? ( N &
size_t(-
SIMDSIZE) ) : N );
1041 for(
size_t i=0UL; i<M; ++i )
1048 A.store( i, j, A.load(i,j) + x1 * y.load(j) );
1050 for( ; remainder && j<N; ++j ) {
1051 A(i,j) += x[i] * y[j];
1071 template<
typename MT >
1072 friend inline void addAssign( DenseMatrix<MT,true>& lhs,
const DVecDVecOuterExpr& rhs )
1089 DVecDVecOuterExpr::selectAddAssignKernel( ~lhs, x, y );
1108 template<
typename MT
1111 static inline auto selectAddAssignKernel( MT& A,
const VT3& x,
const VT4& y )
1112 -> EnableIf_t< IsColumnMajorMatrix_v<MT> && UseDefaultKernel_v<MT,VT3,VT4> >
1114 const size_t M( A.rows() );
1115 const size_t N( A.columns() );
1117 const size_t ipos( M &
size_t(-2) );
1120 for(
size_t j=0UL; j<N; ++j ) {
1121 for(
size_t i=0UL; i<ipos; i+=2UL ) {
1122 A(i ,j) += x[i ] * y[j];
1123 A(i+1UL,j) += x[i+1UL] * y[j];
1126 A(ipos,j) += x[ipos] * y[j];
1147 template<
typename MT
1150 static inline auto selectAddAssignKernel( MT& A,
const VT3& x,
const VT4& y )
1151 -> EnableIf_t< IsColumnMajorMatrix_v<MT> && UseVectorizedKernel_v<MT,VT3,VT4> >
1153 constexpr
bool remainder( !IsPadded_v<MT> || !IsPadded_v<VT3> );
1155 const size_t M( A.rows() );
1156 const size_t N( A.columns() );
1158 const size_t ipos( remainder ? ( M &
size_t(-
SIMDSIZE) ) : M );
1161 for(
size_t j=0UL; j<N; ++j )
1168 A.store( i, j, A.load(i,j) + x.load(i) * y1 );
1170 for( ; remainder && i<M; ++i ) {
1171 A(i,j) += x[i] * y[j];
1197 template<
typename MT >
1198 friend inline auto subAssign( DenseMatrix<MT,false>& lhs,
const DVecDVecOuterExpr& rhs )
1199 -> EnableIf_t< UseAssign_v<MT> >
1214 DVecDVecOuterExpr::selectSubAssignKernel( ~lhs, x, y );
1233 template<
typename MT
1236 static inline auto selectSubAssignKernel( MT& A,
const VT3& x,
const VT4& y )
1237 -> EnableIf_t< IsRowMajorMatrix_v<MT> && UseDefaultKernel_v<MT,VT3,VT4> >
1239 const size_t M( A.rows() );
1240 const size_t N( A.columns() );
1242 const size_t jpos( N &
size_t(-2) );
1245 for(
size_t i=0UL; i<M; ++i ) {
1246 for(
size_t j=0UL; j<jpos; j+=2UL ) {
1247 A(i,j ) -= x[i] * y[j ];
1248 A(i,j+1UL) -= x[i] * y[j+1UL];
1251 A(i,jpos) -= x[i] * y[jpos];
1272 template<
typename MT
1275 static inline auto selectSubAssignKernel( MT& A,
const VT3& x,
const VT4& y )
1276 -> EnableIf_t< IsRowMajorMatrix_v<MT> && UseVectorizedKernel_v<MT,VT3,VT4> >
1278 constexpr
bool remainder( !IsPadded_v<MT> || !IsPadded_v<VT4> );
1280 const size_t M( A.rows() );
1281 const size_t N( A.columns() );
1283 const size_t jpos( remainder ? ( N &
size_t(-
SIMDSIZE) ) : N );
1286 for(
size_t i=0UL; i<M; ++i )
1293 A.store( i, j, A.load(i,j) - x1 * y.load(j) );
1295 for( ; remainder && j<N; ++j ) {
1296 A(i,j) -= x[i] * y[j];
1316 template<
typename MT >
1317 friend inline void subAssign( DenseMatrix<MT,true>& lhs,
const DVecDVecOuterExpr& rhs )
1334 DVecDVecOuterExpr::selectSubAssignKernel( ~lhs, x, y );
1353 template<
typename MT
1356 static inline auto selectSubAssignKernel( MT& A,
const VT3& x,
const VT4& y )
1357 -> EnableIf_t< IsColumnMajorMatrix_v<MT> && UseDefaultKernel_v<MT,VT3,VT4> >
1359 const size_t M( A.rows() );
1360 const size_t N( A.columns() );
1362 const size_t ipos( M &
size_t(-2) );
1365 for(
size_t j=0UL; j<N; ++j ) {
1366 for(
size_t i=0UL; i<ipos; i+=2UL ) {
1367 A(i ,j) -= x[i ] * y[j];
1368 A(i+1UL,j) -= x[i+1UL] * y[j];
1371 A(ipos,j) -= x[ipos] * y[j];
1392 template<
typename MT
1395 static inline auto selectSubAssignKernel( MT& A,
const VT3& x,
const VT4& y )
1396 -> EnableIf_t< IsColumnMajorMatrix_v<MT> && UseVectorizedKernel_v<MT,VT3,VT4> >
1398 constexpr
bool remainder( !IsPadded_v<MT> || !IsPadded_v<VT3> );
1400 const size_t M( A.rows() );
1401 const size_t N( A.columns() );
1403 const size_t ipos( remainder ? ( M &
size_t(-
SIMDSIZE) ) : M );
1406 for(
size_t j=0UL; j<N; ++j )
1413 A.store( i, j, A.load(i,j) - x.load(i) * y1 );
1415 for( ; remainder && i<M; ++i ) {
1416 A(i,j) -= x[i] * y[j];
1442 template<
typename MT >
1443 friend inline auto schurAssign( DenseMatrix<MT,false>& lhs,
const DVecDVecOuterExpr& rhs )
1444 -> EnableIf_t< UseAssign_v<MT> >
1459 DVecDVecOuterExpr::selectSchurAssignKernel( ~lhs, x, y );
1478 template<
typename MT
1481 static inline auto selectSchurAssignKernel( MT& A,
const VT3& x,
const VT4& y )
1482 -> EnableIf_t< IsRowMajorMatrix_v<MT> && UseDefaultKernel_v<MT,VT3,VT4> >
1484 const size_t M( A.rows() );
1485 const size_t N( A.columns() );
1487 const size_t jpos( N &
size_t(-2) );
1490 for(
size_t i=0UL; i<M; ++i ) {
1491 for(
size_t j=0UL; j<jpos; j+=2UL ) {
1492 A(i,j ) *= x[i] * y[j ];
1493 A(i,j+1UL) *= x[i] * y[j+1UL];
1496 A(i,jpos) *= x[i] * y[jpos];
1517 template<
typename MT
1520 static inline auto selectSchurAssignKernel( MT& A,
const VT3& x,
const VT4& y )
1521 -> EnableIf_t< IsRowMajorMatrix_v<MT> && UseVectorizedKernel_v<MT,VT3,VT4> >
1523 constexpr
bool remainder( !IsPadded_v<MT> || !IsPadded_v<VT4> );
1525 const size_t M( A.rows() );
1526 const size_t N( A.columns() );
1528 const size_t jpos( remainder ? ( N &
size_t(-
SIMDSIZE) ) : N );
1531 for(
size_t i=0UL; i<M; ++i )
1538 A.store( i, j, A.load(i,j) * ( x1 * y.load(j) ) );
1540 for( ; remainder && j<N; ++j ) {
1541 A(i,j) *= x[i] * y[j];
1561 template<
typename MT >
1562 friend inline void schurAssign( DenseMatrix<MT,true>& lhs,
const DVecDVecOuterExpr& rhs )
1579 DVecDVecOuterExpr::selectSchurAssignKernel( ~lhs, x, y );
1598 template<
typename MT
1601 static inline auto selectSchurAssignKernel( MT& A,
const VT3& x,
const VT4& y )
1602 -> EnableIf_t< IsColumnMajorMatrix_v<MT> && UseDefaultKernel_v<MT,VT3,VT4> >
1604 const size_t M( A.rows() );
1605 const size_t N( A.columns() );
1607 const size_t ipos( M &
size_t(-2) );
1610 for(
size_t j=0UL; j<N; ++j ) {
1611 for(
size_t i=0UL; i<ipos; i+=2UL ) {
1612 A(i ,j) *= x[i ] * y[j];
1613 A(i+1UL,j) *= x[i+1UL] * y[j];
1616 A(ipos,j) *= x[ipos] * y[j];
1637 template<
typename MT
1640 static inline auto selectSchurAssignKernel( MT& A,
const VT3& x,
const VT4& y )
1641 -> EnableIf_t< IsColumnMajorMatrix_v<MT> && UseVectorizedKernel_v<MT,VT3,VT4> >
1643 constexpr
bool remainder( !IsPadded_v<MT> || !IsPadded_v<VT3> );
1645 const size_t M( A.rows() );
1646 const size_t N( A.columns() );
1648 const size_t ipos( remainder ? ( M &
size_t(-
SIMDSIZE) ) : M );
1651 for(
size_t j=0UL; j<N; ++j )
1658 A.store( i, j, A.load(i,j) * ( x.load(i) * y1 ) );
1660 for( ; remainder && i<M; ++i ) {
1661 A(i,j) *= x[i] * y[j];
1694 template<
typename MT
1697 -> EnableIf_t< UseSMPAssign_v<MT> >
1731 template<
typename MT
1734 -> EnableIf_t< UseSMPAssign_v<MT> >
1738 using TmpType = If_t< SO, OppositeType, ResultType >;
1750 const TmpType tmp( rhs );
1770 template<
typename MT >
1772 -> EnableIf_t< UseSMPAssign_v<MT> >
1811 template<
typename MT >
1813 -> EnableIf_t< UseSMPAssign_v<MT> >
1852 template<
typename MT >
1854 -> EnableIf_t< UseSMPAssign_v<MT> >
1934 template<
typename VT1
1936 inline decltype(
auto)
1942 return ReturnType( ~lhs, ~rhs );
1957 template<
typename VT1,
typename VT2 >
1958 struct Size< DVecDVecOuterExpr<VT1,VT2>, 0UL >
1959 :
public Size<VT1,0UL>
1962 template<
typename VT1,
typename VT2 >
1963 struct Size< DVecDVecOuterExpr<VT1,VT2>, 1UL >
1964 :
public Size<VT2,0UL>
1980 template<
typename VT1,
typename VT2 >
1981 struct IsAligned< DVecDVecOuterExpr<VT1,VT2> >
1982 :
public BoolConstant< IsAligned_v<VT1> && IsAligned_v<VT2> >
1998 template<
typename VT1,
typename VT2 >
1999 struct IsPadded< DVecDVecOuterExpr<VT1,VT2> >
2000 :
public IsPadded<VT2>
Pointer difference type of the Blaze library.
Header file for auxiliary alias declarations.
static constexpr bool evaluateLeft
Compilation switch for the composite type of the left-hand side dense vector expression.
Definition: DVecDVecOuterExpr.h:123
Header file for basic type definitions.
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DVecDVecOuterExpr.h:369
typename If< Condition, T1, T2 >::Type If_t
Auxiliary alias template for the If class template.The If_t alias template provides a convenient shor...
Definition: If.h:109
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: DVecDVecOuterExpr.h:577
ConstIterator_t< VT1 > LeftIteratorType
ConstIterator type of the left-hand side dense matrix expression.
Definition: DVecDVecOuterExpr.h:248
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.The ResultType_t alias declaration provides ...
Definition: Aliases.h:390
#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:61
Header file for the serial shim.
#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:61
ElementType * PointerType
Pointer return type.
Definition: DVecDVecOuterExpr.h:236
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DVecDVecOuterExpr.h:506
Header file for the IsColumnMajorMatrix type trait.
static constexpr bool returnExpr
Compilation switch for the selection of the subscript operator return type.
Definition: DVecDVecOuterExpr.h:138
friend const ConstIterator operator+(size_t inc, const ConstIterator &it)
Addition between an integral value and a ConstIterator.
Definition: DVecDVecOuterExpr.h:448
typename SIMDTrait< T >::Type SIMDTrait_t
Auxiliary alias declaration for the SIMDTrait class template.The SIMDTrait_t alias declaration provid...
Definition: SIMDTrait.h:315
LeftOperand leftOperand() const noexcept
Returns the left-hand side dense vector operand.
Definition: DVecDVecOuterExpr.h:597
MultTrait_t< RT1, RT2 > ResultType
Result type for expression template evaluations.
Definition: DVecDVecOuterExpr.h:202
Header file for the Computation base class.
Constraints on the storage order of matrix types.
BLAZE_ALWAYS_INLINE auto load(size_t i, size_t j) const noexcept
Access to the SIMD elements of the matrix.
Definition: DVecDVecOuterExpr.h:540
If_t< IsExpression_v< VT2 >, const VT2, const VT2 & > RightOperand
Composite type of the right-hand side dense vector expression.
Definition: DVecDVecOuterExpr.h:218
Header file for the RequiresEvaluation type trait.
BLAZE_DEVICE_CALLABLE ConstIterator & operator++()
Pre-increment operator.
Definition: DVecDVecOuterExpr.h:295
System settings for performance optimizations.
typename T::ReturnType ReturnType_t
Alias declaration for nested ReturnType type definitions.The ReturnType_t alias declaration provides ...
Definition: Aliases.h:410
ElementType_t< RT1 > ET1
Element type of the left-hand side dense vector expression.
Definition: DVecDVecOuterExpr.h:113
ValueType value_type
Type of the underlying elements.
Definition: DVecDVecOuterExpr.h:242
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition: DVecDVecOuterExpr.h:479
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes....
Definition: DenseMatrix.h:81
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.The ElementType_t alias declaration provide...
Definition: Aliases.h:170
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: DVecDVecOuterExpr.h:587
Constraint on the transpose flag of vector types.
RightOperand rightOperand() const noexcept
Returns the right-hand side dense vector operand.
Definition: DVecDVecOuterExpr.h:607
Constraint on the data type.
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.The EnableIf_t alias declaration provides a convenient...
Definition: EnableIf.h:138
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: DVecDVecOuterExpr.h:619
ResultType_t< VT1 > RT1
Result type of the left-hand side dense vector expression.
Definition: DVecDVecOuterExpr.h:111
Header file for the IsTemporary type trait class.
ConstIterator(LeftIteratorType left, RightIteratorType right)
Constructor for the ConstIterator class.
Definition: DVecDVecOuterExpr.h:260
static constexpr bool simdEnabled
Compilation switch for the expression template evaluation strategy.
Definition: DVecDVecOuterExpr.h:475
Header file for the multiplication trait.
ResultType_t< VT2 > RT2
Result type of the right-hand side dense vector expression.
Definition: DVecDVecOuterExpr.h:112
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
auto load() const noexcept
Access to the SIMD elements of the matrix.
Definition: DVecDVecOuterExpr.h:347
If_t< useAssign, const ResultType, const DVecDVecOuterExpr & > CompositeType
Data type for composite expression templates.
Definition: DVecDVecOuterExpr.h:212
Header file for the If class template.
BLAZE_DEVICE_CALLABLE ConstIterator & operator-=(size_t dec)
Subtraction assignment operator.
Definition: DVecDVecOuterExpr.h:284
#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:61
BLAZE_DEVICE_CALLABLE const ConstIterator operator--(int)
Post-decrement operator.
Definition: DVecDVecOuterExpr.h:327
ElementType_t< ResultType > ElementType
Resulting element type.
Definition: DVecDVecOuterExpr.h:205
#define BLAZE_CONSTRAINT_MUST_FORM_VALID_VECTVECMULTEXPR(T1, T2)
Constraint on the data type.In case the given data types T1 and T2 do not form a valid vector/vector ...
Definition: VecTVecMultExpr.h:103
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: DVecDVecOuterExpr.h:631
LeftIteratorType left_
Iterator to the current left-hand side element.
Definition: DVecDVecOuterExpr.h:467
const If_t< returnExpr, ExprReturnType, ElementType > ReturnType
Return type for expression template evaluations.
Definition: DVecDVecOuterExpr.h:209
ConstIterator_t< VT2 > RightIteratorType
ConstIterator type of the right-hand side dense matrix expression.
Definition: DVecDVecOuterExpr.h:251
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.This macro encapsulates the default way of Bl...
Definition: Exception.h:331
Header file for the DenseMatrix base class.
Header file for all SIMD functionality.
RightOperand rhs_
Right-hand side dense vector of the multiplication expression.
Definition: DVecDVecOuterExpr.h:659
OppositeType_t< ResultType > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DVecDVecOuterExpr.h:203
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:76
BLAZE_DEVICE_CALLABLE ConstIterator & operator+=(size_t inc)
Addition assignment operator.
Definition: DVecDVecOuterExpr.h:272
Header file for the IsAligned type trait.
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: DVecDVecOuterExpr.h:358
CompositeType_t< VT2 > CT2
Composite type of the right-hand side dense vector expression.
Definition: DVecDVecOuterExpr.h:118
ReturnType operator *() const
Direct access to the element at the current iterator position.
Definition: DVecDVecOuterExpr.h:337
BLAZE_DEVICE_CALLABLE ConstIterator & operator--()
Pre-decrement operator.
Definition: DVecDVecOuterExpr.h:316
bool operator<(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DVecDVecOuterExpr.h:380
static constexpr bool useAssign
Compilation switch for the serial evaluation strategy of the outer product expression.
Definition: DVecDVecOuterExpr.h:152
Constraints on the storage order of matrix types.
Constraint on the data type.
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: DVecDVecOuterExpr.h:651
Header file for the exception macros of the math module.
ConstIterator end(size_t i) const
Returns an iterator just past the last non-zero element of row i.
Definition: DVecDVecOuterExpr.h:566
Constraint on the data type.
ReturnType_t< VT1 > RN1
Return type of the left-hand side dense vector expression.
Definition: DVecDVecOuterExpr.h:115
Header file for the VecTVecMultExpr base class.
Header file for the EnableIf class template.
DVecDVecOuterExpr(const VT1 &lhs, const VT2 &rhs) noexcept
Constructor for the DVecDVecOuterExpr class.
Definition: DVecDVecOuterExpr.h:493
Header file for the IsPadded type trait.
decltype(std::declval< RN1 >() *std::declval< RN2 >()) ExprReturnType
Expression return type for the subscript operator.
Definition: DVecDVecOuterExpr.h:141
typename MultTrait< T1, T2 >::Type MultTrait_t
Auxiliary alias declaration for the MultTrait class template.The MultTrait_t alias declaration provid...
Definition: MultTrait.h:240
typename T::OppositeType OppositeType_t
Alias declaration for nested OppositeType type definitions.The OppositeType_t alias declaration provi...
Definition: Aliases.h:270
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: DVecDVecOuterExpr.h:522
bool operator<=(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DVecDVecOuterExpr.h:402
Header file for the IsSIMDCombinable 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,...
Definition: Symmetric.h:79
#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:61
Header file for the HasSIMDMult type trait.
bool operator>=(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DVecDVecOuterExpr.h:413
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two iterators.
Definition: DVecDVecOuterExpr.h:424
typename T::TransposeType TransposeType_t
Alias declaration for nested TransposeType type definitions.The TransposeType_t alias declaration pro...
Definition: Aliases.h:470
Header file for run time assertion macros.
typename T::CompositeType CompositeType_t
Alias declaration for nested CompositeType type definitions.The CompositeType_t alias declaration pro...
Definition: Aliases.h:90
auto smpAddAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP addition assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:131
static constexpr size_t SIMDSIZE
The number of elements packed within a single SIMD element.
Definition: DVecDVecOuterExpr.h:484
If_t< IsExpression_v< VT1 >, const VT1, const VT1 & > LeftOperand
Composite type of the left-hand side dense vector expression.
Definition: DVecDVecOuterExpr.h:215
Expression object for outer products between two dense vectors.The DVecDVecOuterExpr class represents...
Definition: DVecDVecOuterExpr.h:105
RightIteratorType right_
Iterator to the current right-hand side element.
Definition: DVecDVecOuterExpr.h:468
SIMD characteristics of data types.The SIMDTrait class template provides the SIMD characteristics of ...
Definition: SIMDTrait.h:295
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:94
Header file for all forward declarations for expression class templates.
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: DVecDVecOuterExpr.h:238
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of row i.
Definition: DVecDVecOuterExpr.h:554
BLAZE_ALWAYS_INLINE const EnableIf_t< IsIntegral_v< T > &&HasSize_v< T, 1UL >, If_t< IsSigned_v< T >, SIMDint8, SIMDuint8 > > set(T value) noexcept
Sets all values in the vector to the given 1-byte integral value.
Definition: Set.h:75
CompositeType_t< VT1 > CT1
Composite type of the left-hand side dense vector expression.
Definition: DVecDVecOuterExpr.h:117
auto smpAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:100
Constraint on the data type.
Constraints on the storage order of matrix types.
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:808
#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:81
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.The BoolConstant alias template represents ...
Definition: IntegralConstant.h:110
Constraint on the data type.
Header file for the IsReference type trait.
auto smpSchurAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP Schur product assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:194
BLAZE_DEVICE_CALLABLE const ConstIterator operator++(int)
Post-increment operator.
Definition: DVecDVecOuterExpr.h:306
Base class for all outer product expression templates.The VecTVecMultExpr class serves as a tag for a...
Definition: VecTVecMultExpr.h:67
#define BLAZE_CONSTRAINT_MATRICES_MUST_HAVE_SAME_STORAGE_ORDER(T1, T2)
Constraint on the data type.In case either of the two given data types T1 or T2 is not a matrix type ...
Definition: StorageOrder.h:84
ReturnType_t< VT2 > RN2
Return type of the right-hand side dense vector expression.
Definition: DVecDVecOuterExpr.h:116
typename T::ConstIterator ConstIterator_t
Alias declaration for nested ConstIterator type definitions.The ConstIterator_t alias declaration pro...
Definition: Aliases.h:110
#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:61
If_t< evaluateRight, const RT2, CT2 > RT
Type for the assignment of the right-hand side dense vector operand.
Definition: DVecDVecOuterExpr.h:224
Macro for CUDA compatibility.
Header file for the IsRowMajorMatrix type trait.
Header file for the IsComputation type trait class.
auto smpSubAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:162
TransposeType_t< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: DVecDVecOuterExpr.h:204
bool operator>(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DVecDVecOuterExpr.h:391
Base class for all compute expression templates.The Computation class serves as a tag for all computa...
Definition: Computation.h:66
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: DVecDVecOuterExpr.h:641
ElementType & ReferenceType
Reference return type.
Definition: DVecDVecOuterExpr.h:237
Header file for the IntegralConstant class template.
friend const ConstIterator operator-(const ConstIterator &it, size_t dec)
Subtraction between a ConstIterator and an integral value.
Definition: DVecDVecOuterExpr.h:460
If_t< evaluateLeft, const RT1, CT1 > LT
Type for the assignment of the left-hand side dense vector operand.
Definition: DVecDVecOuterExpr.h:221
PointerType pointer
Pointer return type.
Definition: DVecDVecOuterExpr.h:243
#define BLAZE_CONSTRAINT_MUST_BE_ROW_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a row dense or sparse vector type (i...
Definition: RowVector.h:61
static constexpr bool evaluateRight
Compilation switch for the composite type of the right-hand side dense vector expression.
Definition: DVecDVecOuterExpr.h:128
#define BLAZE_DEVICE_CALLABLE
Conditional macro that sets host and device attributes when compiled with CUDA.
Definition: HostDevice.h:94
std::random_access_iterator_tag IteratorCategory
The iterator category.
Definition: DVecDVecOuterExpr.h:234
LeftOperand lhs_
Left-hand side dense vector of the multiplication expression.
Definition: DVecDVecOuterExpr.h:658
friend const ConstIterator operator+(const ConstIterator &it, size_t inc)
Addition between a ConstIterator and an integral value.
Definition: DVecDVecOuterExpr.h:436
IteratorCategory iterator_category
The iterator category.
Definition: DVecDVecOuterExpr.h:241
Iterator over the elements of the dense matrix.
Definition: DVecDVecOuterExpr.h:230
ReferenceType reference
Reference return type.
Definition: DVecDVecOuterExpr.h:244
System settings for the inline keywords.
Header file for the Size type trait.
Header file for the thresholds for matrix/vector and matrix/matrix multiplications.
ElementType_t< RT2 > ET2
Element type of the right-hand side dense vector expression.
Definition: DVecDVecOuterExpr.h:114
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression,...
Definition: Assert.h:101
SIMDTrait_t< ElementType > SIMDType
Resulting SIMD element type.
Definition: DVecDVecOuterExpr.h:206
ElementType ValueType
Type of the underlying elements.
Definition: DVecDVecOuterExpr.h:235
Constraint on the transpose flag of vector types.
Header file for the IsExpression type trait class.
Header file for the function trace functionality.