35#ifndef _BLAZE_MATH_EXPRESSIONS_DVECDVECOUTEREXPR_H_
36#define _BLAZE_MATH_EXPRESSIONS_DVECDVECOUTEREXPR_H_
108template<
typename VT1
112 :
public VecTVecMapExpr< DenseMatrix< DVecDVecOuterExpr<VT1,VT2,OP>, false > >
129 static constexpr bool evaluateLeft = ( IsComputation_v<VT1> || RequiresEvaluation_v<VT1> );
134 static constexpr bool evaluateRight = ( IsComputation_v<VT2> || RequiresEvaluation_v<VT2> );
153 template<
typename VT >
163 template<
typename T1,
typename T2,
typename T3 >
164 static constexpr bool UseVectorizedKernel_v =
165 ( useOptimizedKernels &&
166 T1::simdEnabled && T2::simdEnabled && T3::simdEnabled &&
167 IsSIMDCombinable_v< ElementType_t<T1>
179 template<
typename T1,
typename T2,
typename T3 >
180 static constexpr bool UseDefaultKernel_v = !UseVectorizedKernel_v<T1,T2,T3>;
198 using ReturnType =
decltype( std::declval<OP>()( std::declval<RN1>(), std::declval<RN2>() ) );
256 ,
op_ ( std::move(op) )
341 inline auto load() const noexcept {
471 ( VT1::simdEnabled && VT2::simdEnabled &&
475 static constexpr bool smpAssignable = ( VT1::smpAssignable && VT2::smpAssignable );
493 ,
op_ ( std::move(op) )
521 if( i >=
lhs_.size() ) {
524 if( j >=
rhs_.size() ) {
575 inline size_t rows() const noexcept {
626 template<
typename T >
627 inline bool canAlias(
const T* alias )
const noexcept {
628 return (
lhs_.canAlias( alias ) ||
rhs_.canAlias( alias ) );
638 template<
typename T >
639 inline bool isAliased(
const T* alias )
const noexcept {
640 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
650 return lhs_.isAligned() &&
rhs_.isAligned();
660 return (
rows() *
columns() >= SMP_DVECDVECOUTER_THRESHOLD );
686 template<
typename MT >
702 DVecDVecOuterExpr::selectAssignKernel( *lhs, x, y, rhs.
op_ );
722 template<
typename MT
725 static inline auto selectAssignKernel( MT& A,
const VT3& x,
const VT4& y, OP op )
728 const size_t M( A.rows() );
729 const size_t N( A.columns() );
734 for(
size_t i=0UL; i<M; ++i ) {
735 for(
size_t j=0UL; j<jpos; j+=2UL ) {
736 A(i,j ) = op( x[i], y[j ] );
737 A(i,j+1UL) = op( x[i], y[j+1] );
740 A(i,jpos) = op( x[i], y[jpos] );
762 template<
typename MT
765 static inline auto selectAssignKernel( MT& A,
const VT3& x,
const VT4& y, OP op )
766 -> EnableIf_t< IsRowMajorMatrix_v<MT> && UseVectorizedKernel_v<MT,VT3,VT4> >
768 constexpr bool remainder( !IsSame_v<OP,Mult> || !IsPadded_v<MT> || !IsPadded_v<VT4> );
770 const size_t M( A.rows() );
771 const size_t N( A.columns() );
776 auto xbegin( x.begin() );
778 for(
size_t i=0UL; i<M; ++i )
780 const auto x1(
set( *xbegin ) );
783 auto abegin( A.begin(i) );
784 auto ybegin( y.begin() );
787 abegin.store( op.load( x1, ybegin.load() ) );
789 for( ; remainder && j<N; ++j, ++abegin, ++ybegin ) {
790 *abegin = op( *xbegin, *ybegin );
812 template<
typename MT >
813 friend inline void assign( DenseMatrix<MT,true>& lhs,
const DVecDVecOuterExpr& rhs )
830 DVecDVecOuterExpr::selectAssignKernel( *lhs, x, y, rhs.op_ );
850 template<
typename MT
853 static inline auto selectAssignKernel( MT& A,
const VT3& x,
const VT4& y, OP op )
854 -> EnableIf_t< IsColumnMajorMatrix_v<MT> && UseDefaultKernel_v<MT,VT3,VT4> >
856 const size_t M( A.rows() );
857 const size_t N( A.columns() );
862 for(
size_t j=0UL; j<N; ++j ) {
863 for(
size_t i=0UL; i<ipos; i+=2UL ) {
864 A(i ,j) = op( x[i ], y[j] );
865 A(i+1UL,j) = op( x[i+1], y[j] );
868 A(ipos,j) = op( x[ipos], y[j] );
890 template<
typename MT
893 static inline auto selectAssignKernel( MT& A,
const VT3& x,
const VT4& y, OP op )
894 -> EnableIf_t< IsColumnMajorMatrix_v<MT> && UseVectorizedKernel_v<MT,VT3,VT4> >
896 constexpr bool remainder( !IsSame_v<OP,Mult> || !IsPadded_v<MT> || !IsPadded_v<VT3> );
898 const size_t M( A.rows() );
899 const size_t N( A.columns() );
904 auto ybegin( y.begin() );
906 for(
size_t j=0UL; j<N; ++j )
908 const auto y1(
set( *ybegin ) );
911 auto abegin( A.begin(j) );
912 auto xbegin( x.begin() );
915 abegin.store( op.load( xbegin.load(), y1 ) );
917 for( ; remainder && i<M; ++i, ++abegin, ++xbegin ) {
918 *abegin = op( *xbegin, *ybegin );
939 template<
typename MT
941 friend inline void assign( SparseMatrix<MT,SO>& lhs,
const DVecDVecOuterExpr& rhs )
945 using TmpType = If_t< SO, OppositeType, ResultType >;
957 const TmpType tmp(
serial( rhs ) );
978 template<
typename MT >
979 friend inline auto addAssign( DenseMatrix<MT,false>& lhs,
const DVecDVecOuterExpr& rhs )
994 DVecDVecOuterExpr::selectAddAssignKernel( *lhs, x, y, rhs.op_ );
1014 template<
typename MT
1017 static inline auto selectAddAssignKernel( MT& A,
const VT3& x,
const VT4& y, OP op )
1018 -> EnableIf_t< IsRowMajorMatrix_v<MT> && UseDefaultKernel_v<MT,VT3,VT4> >
1020 const size_t M( A.rows() );
1021 const size_t N( A.columns() );
1026 for(
size_t i=0UL; i<M; ++i ) {
1027 for(
size_t j=0UL; j<jpos; j+=2UL ) {
1028 A(i,j ) += op( x[i], y[j ] );
1029 A(i,j+1UL) += op( x[i], y[j+1UL] );
1032 A(i,jpos) += op( x[i], y[jpos] );
1054 template<
typename MT
1057 static inline auto selectAddAssignKernel( MT& A,
const VT3& x,
const VT4& y, OP op )
1058 -> EnableIf_t< IsRowMajorMatrix_v<MT> && UseVectorizedKernel_v<MT,VT3,VT4> >
1060 constexpr bool remainder( !IsSame_v<OP,Mult> || !IsPadded_v<MT> || !IsPadded_v<VT4> );
1062 const size_t M( A.rows() );
1063 const size_t N( A.columns() );
1068 auto xbegin( x.begin() );
1070 for(
size_t i=0UL; i<M; ++i )
1072 const auto x1(
set( *xbegin ) );
1075 auto abegin( A.begin(i) );
1076 auto ybegin( y.begin() );
1079 abegin.store( abegin.load() + op.load( x1, ybegin.load() ) );
1081 for( ; remainder && j<N; ++j, ++abegin, ++ybegin ) {
1082 *abegin += op( *xbegin, *ybegin );
1104 template<
typename MT >
1105 friend inline void addAssign( DenseMatrix<MT,true>& lhs,
const DVecDVecOuterExpr& rhs )
1122 DVecDVecOuterExpr::selectAddAssignKernel( *lhs, x, y, rhs.op_ );
1142 template<
typename MT
1145 static inline auto selectAddAssignKernel( MT& A,
const VT3& x,
const VT4& y, OP op )
1146 -> EnableIf_t< IsColumnMajorMatrix_v<MT> && UseDefaultKernel_v<MT,VT3,VT4> >
1148 const size_t M( A.rows() );
1149 const size_t N( A.columns() );
1154 for(
size_t j=0UL; j<N; ++j ) {
1155 for(
size_t i=0UL; i<ipos; i+=2UL ) {
1156 A(i ,j) += op( x[i ], y[j] );
1157 A(i+1UL,j) += op( x[i+1UL], y[j] );
1160 A(ipos,j) += op( x[ipos], y[j] );
1182 template<
typename MT
1185 static inline auto selectAddAssignKernel( MT& A,
const VT3& x,
const VT4& y, OP op )
1186 -> EnableIf_t< IsColumnMajorMatrix_v<MT> && UseVectorizedKernel_v<MT,VT3,VT4> >
1188 constexpr bool remainder( !IsSame_v<OP,Mult> || !IsPadded_v<MT> || !IsPadded_v<VT3> );
1190 const size_t M( A.rows() );
1191 const size_t N( A.columns() );
1196 auto ybegin( y.begin() );
1198 for(
size_t j=0UL; j<N; ++j )
1200 const auto y1(
set( *ybegin ) );
1203 auto abegin( A.begin(j) );
1204 auto xbegin( x.begin() );
1207 abegin.store( abegin.load() + op.load( xbegin.load(), y1 ) );
1209 for( ; remainder && i<M; ++i, ++abegin, ++xbegin ) {
1210 *abegin += op( *xbegin, *ybegin );
1238 template<
typename MT >
1239 friend inline auto subAssign( DenseMatrix<MT,false>& lhs,
const DVecDVecOuterExpr& rhs )
1254 DVecDVecOuterExpr::selectSubAssignKernel( *lhs, x, y, rhs.op_ );
1274 template<
typename MT
1277 static inline auto selectSubAssignKernel( MT& A,
const VT3& x,
const VT4& y, OP op )
1278 -> EnableIf_t< IsRowMajorMatrix_v<MT> && UseDefaultKernel_v<MT,VT3,VT4> >
1280 const size_t M( A.rows() );
1281 const size_t N( A.columns() );
1286 for(
size_t i=0UL; i<M; ++i ) {
1287 for(
size_t j=0UL; j<jpos; j+=2UL ) {
1288 A(i,j ) -= op( x[i], y[j ] );
1289 A(i,j+1UL) -= op( x[i], y[j+1UL] );
1292 A(i,jpos) -= op( x[i], y[jpos] );
1314 template<
typename MT
1317 static inline auto selectSubAssignKernel( MT& A,
const VT3& x,
const VT4& y, OP op )
1318 -> EnableIf_t< IsRowMajorMatrix_v<MT> && UseVectorizedKernel_v<MT,VT3,VT4> >
1320 constexpr bool remainder( !IsSame_v<OP,Mult> || !IsPadded_v<MT> || !IsPadded_v<VT4> );
1322 const size_t M( A.rows() );
1323 const size_t N( A.columns() );
1328 auto xbegin( x.begin() );
1330 for(
size_t i=0UL; i<M; ++i )
1332 const auto x1(
set( *xbegin ) );
1335 auto abegin( A.begin(i) );
1336 auto ybegin( y.begin() );
1339 abegin.store( abegin.load() - op.load( x1, ybegin.load() ) );
1341 for( ; remainder && j<N; ++j, ++abegin, ++ybegin ) {
1342 *abegin -= op( *xbegin, *ybegin );
1364 template<
typename MT >
1365 friend inline void subAssign( DenseMatrix<MT,true>& lhs,
const DVecDVecOuterExpr& rhs )
1382 DVecDVecOuterExpr::selectSubAssignKernel( *lhs, x, y, rhs.op_ );
1402 template<
typename MT
1405 static inline auto selectSubAssignKernel( MT& A,
const VT3& x,
const VT4& y, OP op )
1406 -> EnableIf_t< IsColumnMajorMatrix_v<MT> && UseDefaultKernel_v<MT,VT3,VT4> >
1408 const size_t M( A.rows() );
1409 const size_t N( A.columns() );
1414 for(
size_t j=0UL; j<N; ++j ) {
1415 for(
size_t i=0UL; i<ipos; i+=2UL ) {
1416 A(i ,j) -= op( x[i ], y[j] );
1417 A(i+1UL,j) -= op( x[i+1UL], y[j] );
1420 A(ipos,j) -= op( x[ipos], y[j] );
1442 template<
typename MT
1445 static inline auto selectSubAssignKernel( MT& A,
const VT3& x,
const VT4& y, OP op )
1446 -> EnableIf_t< IsColumnMajorMatrix_v<MT> && UseVectorizedKernel_v<MT,VT3,VT4> >
1448 constexpr bool remainder( !IsSame_v<OP,Mult> || !IsPadded_v<MT> || !IsPadded_v<VT3> );
1450 const size_t M( A.rows() );
1451 const size_t N( A.columns() );
1456 auto ybegin( y.begin() );
1458 for(
size_t j=0UL; j<N; ++j )
1460 const auto y1(
set( *ybegin ) );
1463 auto abegin( A.begin(j) );
1464 auto xbegin( x.begin() );
1467 abegin.store( abegin.load() - op.load( xbegin.load(), y1 ) );
1469 for( ; remainder && i<M; ++i, ++abegin, ++xbegin ) {
1470 *abegin -= op( *xbegin, *ybegin );
1498 template<
typename MT >
1499 friend inline auto schurAssign( DenseMatrix<MT,false>& lhs,
const DVecDVecOuterExpr& rhs )
1514 DVecDVecOuterExpr::selectSchurAssignKernel( *lhs, x, y, rhs.op_ );
1534 template<
typename MT
1537 static inline auto selectSchurAssignKernel( MT& A,
const VT3& x,
const VT4& y, OP op )
1538 -> EnableIf_t< IsRowMajorMatrix_v<MT> && UseDefaultKernel_v<MT,VT3,VT4> >
1540 const size_t M( A.rows() );
1541 const size_t N( A.columns() );
1546 for(
size_t i=0UL; i<M; ++i ) {
1547 for(
size_t j=0UL; j<jpos; j+=2UL ) {
1548 A(i,j ) *= op( x[i], y[j ] );
1549 A(i,j+1UL) *= op( x[i], y[j+1UL] );
1552 A(i,jpos) *= op( x[i], y[jpos] );
1574 template<
typename MT
1577 static inline auto selectSchurAssignKernel( MT& A,
const VT3& x,
const VT4& y, OP op )
1578 -> EnableIf_t< IsRowMajorMatrix_v<MT> && UseVectorizedKernel_v<MT,VT3,VT4> >
1580 constexpr bool remainder( !IsSame_v<OP,Mult> || !IsPadded_v<MT> || !IsPadded_v<VT4> );
1582 const size_t M( A.rows() );
1583 const size_t N( A.columns() );
1588 auto xbegin( x.begin() );
1590 for(
size_t i=0UL; i<M; ++i )
1592 const auto x1(
set( *xbegin ) );
1595 auto abegin( A.begin(i) );
1596 auto ybegin( y.begin() );
1599 abegin.store( abegin.load() * op.load( x1, ybegin.load() ) );
1601 for( ; remainder && j<N; ++j, ++abegin, ++ybegin ) {
1602 *abegin *= op( *xbegin, *ybegin );
1624 template<
typename MT >
1625 friend inline void schurAssign( DenseMatrix<MT,true>& lhs,
const DVecDVecOuterExpr& rhs )
1642 DVecDVecOuterExpr::selectSchurAssignKernel( *lhs, x, y, rhs.op_ );
1662 template<
typename MT
1665 static inline auto selectSchurAssignKernel( MT& A,
const VT3& x,
const VT4& y, OP op )
1666 -> EnableIf_t< IsColumnMajorMatrix_v<MT> && UseDefaultKernel_v<MT,VT3,VT4> >
1668 const size_t M( A.rows() );
1669 const size_t N( A.columns() );
1674 for(
size_t j=0UL; j<N; ++j ) {
1675 for(
size_t i=0UL; i<ipos; i+=2UL ) {
1676 A(i ,j) *= op( x[i ], y[j] );
1677 A(i+1UL,j) *= op( x[i+1UL], y[j] );
1680 A(ipos,j) *= op( x[ipos], y[j] );
1702 template<
typename MT
1705 static inline auto selectSchurAssignKernel( MT& A,
const VT3& x,
const VT4& y, OP op )
1706 -> EnableIf_t< IsColumnMajorMatrix_v<MT> && UseVectorizedKernel_v<MT,VT3,VT4> >
1708 constexpr bool remainder( !IsSame_v<OP,Mult> || !IsPadded_v<MT> || !IsPadded_v<VT3> );
1710 const size_t M( A.rows() );
1711 const size_t N( A.columns() );
1716 auto ybegin( y.begin() );
1718 for(
size_t j=0UL; j<N; ++j )
1720 const auto y1(
set( *ybegin ) );
1723 auto abegin( A.begin(j) );
1724 auto xbegin( x.begin() );
1727 abegin.store( abegin.load() * op.load( xbegin.load(), y1 ) );
1729 for( ; remainder && i<M; ++i, ++abegin, ++xbegin ) {
1730 *abegin *= op( *xbegin, *ybegin );
1765 template<
typename MT
1768 -> EnableIf_t< UseSMPAssign_v<MT> >
1802 template<
typename MT
1805 -> EnableIf_t< UseSMPAssign_v<MT> >
1809 using TmpType = If_t< SO, OppositeType, ResultType >;
1821 const TmpType tmp( rhs );
1842 template<
typename MT >
1844 -> EnableIf_t< UseSMPAssign_v<MT> >
1883 template<
typename MT >
1885 -> EnableIf_t< UseSMPAssign_v<MT> >
1924 template<
typename MT >
1926 -> EnableIf_t< UseSMPAssign_v<MT> >
2003template<
typename VT1
2006inline decltype(
auto)
2012 return ReturnType( *lhs, *rhs, std::move(op) );
2045template<
typename VT1
2047inline decltype(
auto)
2052 return map( *lhs, *rhs,
Add() );
2078template<
typename VT1
2080inline decltype(
auto)
2085 return map( *lhs, *rhs,
Sub() );
2115template<
typename VT1
2117inline decltype(
auto)
2122 return map( *lhs, *rhs,
Mult() );
2152template<
typename VT1
2154inline decltype(
auto)
2159 return map( *lhs, *rhs,
Div() );
2174template<
typename VT1,
typename VT2,
typename OP >
2175struct Size< DVecDVecOuterExpr<VT1,VT2,OP>, 0UL >
2176 :
public Size<VT1,0UL>
2179template<
typename VT1,
typename VT2,
typename OP >
2180struct Size< DVecDVecOuterExpr<VT1,VT2,OP>, 1UL >
2181 :
public Size<VT2,0UL>
2197template<
typename VT1,
typename VT2,
typename OP >
2198struct IsAligned< DVecDVecOuterExpr<VT1,VT2,OP> >
2199 :
public BoolConstant< IsAligned_v<VT1> && IsAligned_v<VT2> >
2215template<
typename VT1,
typename VT2 >
2216struct IsPadded< DVecDVecOuterExpr<VT1,VT2,Mult> >
2217 :
public IsPadded<VT2>
Header file for auxiliary alias declarations.
typename T::CompositeType CompositeType_t
Alias declaration for nested CompositeType type definitions.
Definition: Aliases.h:110
typename T::ReturnType ReturnType_t
Alias declaration for nested ReturnType type definitions.
Definition: Aliases.h:470
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.
Definition: Aliases.h:450
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.
Definition: Aliases.h:190
typename T::OppositeType OppositeType_t
Alias declaration for nested OppositeType type definitions.
Definition: Aliases.h:310
typename T::ConstIterator ConstIterator_t
Alias declaration for nested ConstIterator type definitions.
Definition: Aliases.h:130
typename T::TransposeType TransposeType_t
Alias declaration for nested TransposeType type definitions.
Definition: Aliases.h:550
Header file for run time assertion macros.
Constraints on the storage order of matrix types.
Constraint on the transpose flag of vector types.
Header file for the EnableIf class template.
Header file for the function trace functionality.
Header file for the HasLoad type trait.
Macro for CUDA compatibility.
Header file for the If class template.
Header file for the IntegralConstant class template.
Header file for the IsAligned type trait.
Header file for the IsColumnMajorMatrix type trait.
Header file for the IsComputation type trait class.
Header file for the IsExpression type trait class.
Header file for the IsPadded type trait.
Header file for the IsRowMajorMatrix type trait.
Header file for the IsSIMDCombinable type trait.
Header file for the IsSame and IsStrictlySame type traits.
Deactivation of problematic macros.
Header file for the map trait.
Header file for the prevMultiple shim.
Constraints on the storage order of matrix types.
Constraint on the transpose flag of vector types.
Header file for all SIMD functionality.
Constraint on the data type.
Iterator over the elements of the dense vector outer map expression.
Definition: DVecDVecOuterExpr.h:223
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: DVecDVecOuterExpr.h:352
IteratorCategory iterator_category
The iterator category.
Definition: DVecDVecOuterExpr.h:233
bool operator>(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DVecDVecOuterExpr.h:385
ValueType value_type
Type of the underlying elements.
Definition: DVecDVecOuterExpr.h:234
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: DVecDVecOuterExpr.h:230
BLAZE_DEVICE_CALLABLE const ConstIterator operator++(int)
Post-increment operator.
Definition: DVecDVecOuterExpr.h:300
ElementType ValueType
Type of the underlying elements.
Definition: DVecDVecOuterExpr.h:227
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DVecDVecOuterExpr.h:363
bool operator>=(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DVecDVecOuterExpr.h:407
bool operator<(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DVecDVecOuterExpr.h:374
BLAZE_DEVICE_CALLABLE ConstIterator & operator++()
Pre-increment operator.
Definition: DVecDVecOuterExpr.h:289
ConstIterator(LeftIteratorType left, RightIteratorType right, OP op)
Constructor for the ConstIterator class.
Definition: DVecDVecOuterExpr.h:253
std::random_access_iterator_tag IteratorCategory
The iterator category.
Definition: DVecDVecOuterExpr.h:226
BLAZE_DEVICE_CALLABLE const ConstIterator operator--(int)
Post-decrement operator.
Definition: DVecDVecOuterExpr.h:321
bool operator<=(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DVecDVecOuterExpr.h:396
friend const ConstIterator operator+(const ConstIterator &it, size_t inc)
Addition between a ConstIterator and an integral value.
Definition: DVecDVecOuterExpr.h:430
OP op_
The custom binary operation.
Definition: DVecDVecOuterExpr.h:463
DifferenceType difference_type
Difference between two iterators.
Definition: DVecDVecOuterExpr.h:237
friend const ConstIterator operator-(const ConstIterator &it, size_t dec)
Subtraction between a ConstIterator and an integral value.
Definition: DVecDVecOuterExpr.h:454
RightIteratorType right_
Iterator to the current right-hand side element.
Definition: DVecDVecOuterExpr.h:462
PointerType pointer
Pointer return type.
Definition: DVecDVecOuterExpr.h:235
BLAZE_DEVICE_CALLABLE ConstIterator & operator--()
Pre-decrement operator.
Definition: DVecDVecOuterExpr.h:310
ConstIterator_t< VT2 > RightIteratorType
ConstIterator type of the right-hand side dense vector expression.
Definition: DVecDVecOuterExpr.h:243
friend const ConstIterator operator+(size_t inc, const ConstIterator &it)
Addition between an integral value and a ConstIterator.
Definition: DVecDVecOuterExpr.h:442
ElementType * PointerType
Pointer return type.
Definition: DVecDVecOuterExpr.h:228
ElementType & ReferenceType
Reference return type.
Definition: DVecDVecOuterExpr.h:229
auto load() const noexcept
Access to the SIMD elements of the vector.
Definition: DVecDVecOuterExpr.h:341
LeftIteratorType left_
Iterator to the current left-hand side element.
Definition: DVecDVecOuterExpr.h:461
BLAZE_DEVICE_CALLABLE ConstIterator & operator-=(size_t dec)
Subtraction assignment operator.
Definition: DVecDVecOuterExpr.h:278
ReferenceType reference
Reference return type.
Definition: DVecDVecOuterExpr.h:236
BLAZE_DEVICE_CALLABLE ConstIterator & operator+=(size_t inc)
Addition assignment operator.
Definition: DVecDVecOuterExpr.h:266
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two iterators.
Definition: DVecDVecOuterExpr.h:418
ReturnType operator*() const
Direct access to the element at the current iterator position.
Definition: DVecDVecOuterExpr.h:331
ConstIterator_t< VT1 > LeftIteratorType
ConstIterator type of the left-hand side dense vector expression.
Definition: DVecDVecOuterExpr.h:240
Expression object for the dense vector-dense vector outer map() function.
Definition: DVecDVecOuterExpr.h:114
If_t< RequiresEvaluation_v< VT1 >, const RT1, CT1 > LT
Type for the assignment of the left-hand side dense vector operand.
Definition: DVecDVecOuterExpr.h:213
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: DVecDVecOuterExpr.h:575
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: DVecDVecOuterExpr.h:627
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: DVecDVecOuterExpr.h:639
ConstIterator end(size_t i) const
Returns an iterator just past the last non-zero element of row i.
Definition: DVecDVecOuterExpr.h:564
BLAZE_ALWAYS_INLINE auto load(size_t i, size_t j) const noexcept
Access to the SIMD elements of the matrix.
Definition: DVecDVecOuterExpr.h:538
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: DVecDVecOuterExpr.h:520
static constexpr bool evaluateRight
Compilation switch for the composite type of the right-hand side dense vector expression.
Definition: DVecDVecOuterExpr.h:134
OP Operation
Data type of the custom binary operation.
Definition: DVecDVecOuterExpr.h:210
If_t< IsExpression_v< VT1 >, const VT1, const VT1 & > LeftOperand
Composite type of the left-hand side dense vector expression.
Definition: DVecDVecOuterExpr.h:204
ResultType_t< VT2 > RT2
Result type of the right-hand side dense vector expression.
Definition: DVecDVecOuterExpr.h:118
RightOperand rhs_
Right-hand side dense vector of the map expression.
Definition: DVecDVecOuterExpr.h:667
ElementType_t< VT1 > ET1
Element type of the left-hand side dense vector expression.
Definition: DVecDVecOuterExpr.h:119
static constexpr bool useAssign
Compilation switch for the serial evaluation strategy of the map expression.
Definition: DVecDVecOuterExpr.h:144
Operation op_
The custom binary operation.
Definition: DVecDVecOuterExpr.h:668
If_t< IsExpression_v< VT2 >, const VT2, const VT2 & > RightOperand
Composite type of the right-hand side dense vector expression.
Definition: DVecDVecOuterExpr.h:207
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: DVecDVecOuterExpr.h:659
ReturnType_t< VT1 > RN1
Return type of the left-hand side dense vector expression.
Definition: DVecDVecOuterExpr.h:121
ElementType_t< VT2 > ET2
Element type of the right-hand side dense vector expression.
Definition: DVecDVecOuterExpr.h:120
static constexpr size_t SIMDSIZE
The number of elements packed within a single SIMD element.
Definition: DVecDVecOuterExpr.h:480
Operation operation() const
Returns a copy of the custom operation.
Definition: DVecDVecOuterExpr.h:615
ReturnType_t< VT2 > RN2
Return type of the right-hand side dense vector expression.
Definition: DVecDVecOuterExpr.h:122
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DVecDVecOuterExpr.h:504
MapTrait_t< RT1, RT2, OP > ResultType
Result type for expression template evaluations.
Definition: DVecDVecOuterExpr.h:192
DVecDVecOuterExpr(const VT1 &lhs, const VT2 &rhs, OP op) noexcept
Constructor for the DVecDVecOuterExpr class.
Definition: DVecDVecOuterExpr.h:490
CompositeType_t< VT1 > CT1
Composite type of the left-hand side dense vector expression.
Definition: DVecDVecOuterExpr.h:123
If_t< useAssign, const ResultType, const DVecDVecOuterExpr & > CompositeType
Data type for composite expression templates.
Definition: DVecDVecOuterExpr.h:201
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: DVecDVecOuterExpr.h:585
RightOperand rightOperand() const noexcept
Returns the right-hand side dense vector operand.
Definition: DVecDVecOuterExpr.h:605
ResultType_t< VT1 > RT1
Result type of the left-hand side dense vector expression.
Definition: DVecDVecOuterExpr.h:117
decltype(std::declval< OP >()(std::declval< RN1 >(), std::declval< RN2 >())) ReturnType
Return type for expression template evaluations.
Definition: DVecDVecOuterExpr.h:198
If_t< RequiresEvaluation_v< VT2 >, const RT2, CT2 > RT
Type for the assignment of the right-hand side dense vector operand.
Definition: DVecDVecOuterExpr.h:216
LeftOperand lhs_
Left-hand side dense vector of the map expression.
Definition: DVecDVecOuterExpr.h:666
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of row i.
Definition: DVecDVecOuterExpr.h:552
ElementType_t< ResultType > ElementType
Resulting element type.
Definition: DVecDVecOuterExpr.h:195
TransposeType_t< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: DVecDVecOuterExpr.h:194
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: DVecDVecOuterExpr.h:649
static constexpr bool evaluateLeft
Compilation switch for the composite type of the left-hand side dense vector expression.
Definition: DVecDVecOuterExpr.h:129
static constexpr bool simdEnabled
Compilation switch for the expression template evaluation strategy.
Definition: DVecDVecOuterExpr.h:470
CompositeType_t< VT2 > CT2
Composite type of the right-hand side dense vector expression.
Definition: DVecDVecOuterExpr.h:124
OppositeType_t< ResultType > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DVecDVecOuterExpr.h:193
LeftOperand leftOperand() const noexcept
Returns the left-hand side dense vector operand.
Definition: DVecDVecOuterExpr.h:595
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition: DVecDVecOuterExpr.h:475
Base class for dense matrices.
Definition: DenseMatrix.h:82
Base class for N-dimensional dense vectors.
Definition: DenseVector.h:77
SIMD characteristics of data types.
Definition: SIMDTrait.h:297
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Header file for the Computation base class.
Header file for the DenseMatrix base class.
Header file for the VecTVecMapExpr base class.
Header file for the Add functor.
Header file for the Div functor.
Header file for the Mult functor.
Header file for the Sub functor.
decltype(auto) map(const DenseVector< VT1, false > &lhs, const DenseVector< VT2, true > &rhs, OP op)
Pairwise (outer) evaluation of the given binary operation on the elements of the dense vectors lhs an...
Definition: DVecDVecOuterExpr.h:2007
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:812
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SYMMETRIC_MATRIX_TYPE(T)
Constraint on the data type.
Definition: Symmetric.h:79
#define BLAZE_CONSTRAINT_MUST_BE_ROW_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.
Definition: RowMajorMatrix.h:61
#define BLAZE_CONSTRAINT_MATRICES_MUST_HAVE_SAME_STORAGE_ORDER(T1, T2)
Constraint on the data type.
Definition: StorageOrder.h:84
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.
Definition: RequiresEvaluation.h:81
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_MATRIX_TYPE(T)
Constraint on the data type.
Definition: DenseMatrix.h:61
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_VECTOR_TYPE(T)
Constraint on the data type.
Definition: DenseVector.h:61
#define BLAZE_CONSTRAINT_MUST_BE_COLUMN_VECTOR_TYPE(T)
Constraint on the data type.
Definition: ColumnVector.h:61
#define BLAZE_CONSTRAINT_MUST_BE_ROW_VECTOR_TYPE(T)
Constraint on the data type.
Definition: RowVector.h:61
#define BLAZE_CONSTRAINT_MUST_BE_COLUMN_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.
Definition: ColumnMajorMatrix.h:61
typename MapTrait< Args... >::Type MapTrait_t
Auxiliary alias declaration for the MapTrait class template.
Definition: MapTrait.h:131
BLAZE_ALWAYS_INLINE constexpr auto prevMultiple(T1 value, T2 factor) noexcept
Rounds down an integral value to the previous multiple of a given factor.
Definition: PrevMultiple.h:68
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.
Definition: Assert.h:101
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
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
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
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
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
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
#define BLAZE_DEVICE_CALLABLE
Conditional macro that sets host and device attributes when compiled with CUDA.
Definition: HostDevice.h:94
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition: EnableIf.h:138
typename If< Condition >::template Type< T1, T2 > If_t
Auxiliary alias template for the If class template.
Definition: If.h:108
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.
Definition: IntegralConstant.h:110
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.
Definition: Exception.h:331
#define BLAZE_FUNCTION_TRACE
Function trace macro.
Definition: FunctionTrace.h:94
Header file for the exception macros of the math module.
Constraints on the storage order of matrix types.
Header file for all forward declarations for expression class templates.
Header file for the Size type trait.
Header file for the serial shim.
Generic wrapper for the addition operator.
Definition: Add.h:85
Base class for all compute expression templates.
Definition: Computation.h:68
Generic wrapper for the division operator.
Definition: Div.h:81
Generic wrapper for the multiplication operator.
Definition: Mult.h:82
Generic wrapper for the subtraction operator.
Definition: Sub.h:85
Base class for all outer map expression templates.
Definition: VecTVecMapExpr.h:68
System settings for the inline keywords.
System settings for performance optimizations.
Header file for the thresholds for matrix/vector and matrix/matrix multiplications.
Header file for the RequiresEvaluation type trait.
Header file for basic type definitions.