35 #ifndef _BLAZE_MATH_EXPRESSIONS_DMATSMATMULTEXPR_H_ 36 #define _BLAZE_MATH_EXPRESSIONS_DMATSMATMULTEXPR_H_ 139 template<
typename MT1
172 SYM = ( SF && !( HF || LF || UF ) ),
173 HERM = ( HF && !( LF || UF ) ),
174 LOW = ( LF || ( ( SF || HF ) && UF ) ),
175 UPP = ( UF || ( ( SF || HF ) && LF ) )
186 template<
typename T1,
typename T2,
typename T3 >
187 struct CanExploitSymmetry {
199 template<
typename T1,
typename T2,
typename T3 >
200 struct IsEvaluationRequired {
201 enum :
bool { value = ( evaluateLeft || evaluateRight ) &&
202 !CanExploitSymmetry<T1,T2,T3>::value };
212 template<
typename T1,
typename T2,
typename T3 >
213 struct UseOptimizedKernel {
226 template<
typename T1,
typename T2,
typename T3 >
227 struct UseDefaultKernel {
228 enum :
bool { value = !UseOptimizedKernel<T1,T2,T3>::value };
248 ,
Noop > > > > ForwardFunctor;
279 enum :
bool { simdEnabled =
false };
282 enum :
bool { smpAssignable = !evaluateLeft && MT1::smpAssignable &&
283 !evaluateRight && MT2::smpAssignable };
333 :(
lhs_.columns() ) ) );
337 const size_t n(
end - begin );
355 inline ReturnType
at(
size_t i,
size_t j )
const {
356 if( i >=
lhs_.rows() ) {
359 if( j >=
rhs_.columns() ) {
371 inline size_t rows() const noexcept {
382 return rhs_.columns();
412 template<
typename T >
413 inline bool canAlias(
const T* alias )
const noexcept {
414 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
424 template<
typename T >
425 inline bool isAliased(
const T* alias )
const noexcept {
426 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
436 return lhs_.isAligned();
469 template<
typename MT
489 DMatSMatMultExpr::selectAssignKernel( ~lhs, A, B );
505 template<
typename MT3
508 static inline void selectAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
510 if( C.rows() * C.columns() < DMATSMATMULT_THRESHOLD )
511 selectSmallAssignKernel( C, A, B );
513 selectLargeAssignKernel( C, A, B );
532 template<
typename MT3
535 static inline void selectDefaultAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
541 for(
size_t k=0UL; k<B.rows(); ++k )
545 ConstIterator element( B.begin(k) );
546 const ConstIterator
end( B.end(k) );
548 for( ; element!=
end; ++element ) {
549 C(k,element->index()) = A(k,k) * element->value();
562 for(
size_t ii=iibegin; ii<iiend; ii+=8UL )
564 ConstIterator element( B.begin(k) );
565 const ConstIterator
end( B.end(k) );
566 const size_t itmp( ( ii+8UL > iiend )?( iiend ):( ii+8UL ) );
568 for( ; element!=
end; ++element )
570 const size_t j1( element->index() );
571 const size_t ibegin( SYM || HERM || LOW ?
max(j1,ii) : ii );
572 const size_t iend( UPP ?
min(j1+1UL,itmp) : itmp );
574 for(
size_t i=ibegin; i<iend; ++i ) {
576 C(i,j1) = A(i,k) * element->value();
578 C(i,j1) += A(i,k) * element->value();
586 for(
size_t i=0UL; i<A.rows(); ++i ) {
587 for(
size_t j=i+1UL; j<B.columns(); ++j ) {
588 C(i,j) = HERM ?
conj( C(j,i) ) : C(j,i);
609 template<
typename MT3
613 selectSmallAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
615 selectDefaultAssignKernel( C, A, B );
635 template<
typename MT3
639 selectSmallAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
645 for(
size_t j=0UL; j<B.rows(); ++j )
655 for(
size_t ii=iibegin; ii<iiend; ii+=8UL )
657 ConstIterator element( B.begin(j) );
658 const ConstIterator
end( B.end(j) );
659 const size_t itmp( ( ii+8UL > iiend )?( iiend ):( ii+8UL ) );
661 for( ; element!=
end; ++element )
663 const size_t j1( element->index() );
664 const size_t ibegin( SYM || HERM || LOW ?
max(j1,ii) : ii );
665 const size_t iend( UPP ?
min(j1+1UL,itmp) : itmp );
667 for(
size_t i=ibegin; i<iend; ++i ) {
668 C(i,j1) += A(i,j) * element->value();
675 for(
size_t i=0UL; i<A.rows(); ++i ) {
676 for(
size_t j=i+1UL; j<B.columns(); ++j ) {
677 C(i,j) = HERM ?
conj( C(j,i) ) : C(j,i);
698 template<
typename MT3
702 selectLargeAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
704 selectDefaultAssignKernel( C, A, B );
724 template<
typename MT3
728 selectLargeAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
732 const ForwardFunctor fwd;
735 assign( C, fwd( A * tmp ) );
753 template<
typename MT
772 const ForwardFunctor fwd;
774 const TmpType tmp(
serial( rhs ) );
775 assign( ~lhs, fwd( tmp ) );
795 template<
typename MT
807 const ForwardFunctor fwd;
832 template<
typename MT
852 DMatSMatMultExpr::selectAddAssignKernel( ~lhs, A, B );
868 template<
typename MT3
871 static inline void selectAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
873 if( C.rows() * C.columns() < DMATSMATMULT_THRESHOLD )
874 selectSmallAddAssignKernel( C, A, B );
876 selectLargeAddAssignKernel( C, A, B );
895 template<
typename MT3
898 static inline void selectSmallAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
902 for(
size_t j=0UL; j<B.rows(); ++j )
906 ConstIterator element( B.begin(j) );
907 const ConstIterator
end( B.end(j) );
909 for( ; element!=
end; ++element ) {
910 C(j,element->index()) += A(j,j) * element->value();
923 for(
size_t ii=iibegin; ii<iiend; ii+=8UL )
925 ConstIterator element( B.begin(j) );
926 const ConstIterator
end( B.end(j) );
927 const size_t itmp( ( ii+8UL > iiend )?( iiend ):( ii+8UL ) );
929 for( ; element!=
end; ++element )
931 const size_t j1( element->index() );
932 const size_t ibegin( LOW ?
max(j1,ii) : ii );
933 const size_t iend( UPP ?
min(j1+1UL,itmp) : itmp );
935 for(
size_t i=ibegin; i<iend; ++i ) {
936 C(i,j1) += A(i,j) * element->value();
960 template<
typename MT3
963 static inline void selectLargeAddAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
967 const ForwardFunctor fwd;
970 addAssign( C, fwd( A * tmp ) );
990 template<
typename MT
1002 const ForwardFunctor fwd;
1031 template<
typename MT
1051 DMatSMatMultExpr::selectSubAssignKernel( ~lhs, A, B );
1067 template<
typename MT3
1070 static inline void selectSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1072 if( C.rows() * C.columns() < DMATSMATMULT_THRESHOLD )
1073 selectSmallSubAssignKernel( C, A, B );
1075 selectLargeSubAssignKernel( C, A, B );
1094 template<
typename MT3
1097 static inline void selectSmallSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1101 for(
size_t j=0UL; j<B.rows(); ++j )
1105 ConstIterator element( B.begin(j) );
1106 const ConstIterator
end( B.end(j) );
1108 for( ; element!=
end; ++element ) {
1109 C(j,element->index()) -= A(j,j) * element->value();
1122 for(
size_t ii=iibegin; ii<iiend; ii+=8UL )
1124 ConstIterator element( B.begin(j) );
1125 const ConstIterator
end( B.end(j) );
1126 const size_t itmp( ( ii+8UL > iiend )?( iiend ):( ii+8UL ) );
1128 for( ; element!=
end; ++element )
1130 const size_t j1( element->index() );
1131 const size_t ibegin( LOW ?
max(j1,ii) : ii );
1132 const size_t iend( UPP ?
min(j1+1UL,itmp) : itmp );
1134 for(
size_t i=ibegin; i<iend; ++i ) {
1135 C(i,j1) -= A(i,j) * element->value();
1159 template<
typename MT3
1162 static inline void selectLargeSubAssignKernel( MT3& C,
const MT4& A,
const MT5& B )
1166 const ForwardFunctor fwd;
1169 subAssign( C, fwd( A * tmp ) );
1189 template<
typename MT
1201 const ForwardFunctor fwd;
1240 template<
typename MT
1280 template<
typename MT
1299 const ForwardFunctor fwd;
1301 const TmpType tmp( rhs );
1322 template<
typename MT
1334 const ForwardFunctor fwd;
1361 template<
typename MT
1401 template<
typename MT
1413 const ForwardFunctor fwd;
1445 template<
typename MT
1485 template<
typename MT
1497 const ForwardFunctor fwd;
1571 template<
typename T1
1619 template<
typename MT1
1664 template<
typename MT1
1709 template<
typename MT1
1754 template<
typename MT1
1799 template<
typename MT1
1830 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
1831 struct Rows< DMatSMatMultExpr<MT1,MT2,SF,HF,LF,UF> > :
public Rows<MT1>
1847 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
1848 struct Columns< DMatSMatMultExpr<MT1,MT2,SF,HF,LF,UF> > :
public Columns<MT2>
1864 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
1865 struct IsAligned< DMatSMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
1882 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
1883 struct IsSymmetric< DMatSMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
1886 , IsBuiltin< ElementType_< DMatSMatMultExpr<MT1,MT2,false,true,false,false> > > >
1887 , And< Bool<LF>, Bool<UF> > >::value >
1903 template<
typename MT1,
typename MT2,
bool SF,
bool LF,
bool UF >
1904 struct IsHermitian< DMatSMatMultExpr<MT1,MT2,SF,true,LF,UF> >
1921 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
1922 struct IsLower< DMatSMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
1924 , And< IsLower<MT1>, IsLower<MT2> >
1925 , And< Or< Bool<SF>, Bool<HF> >
1926 , IsUpper<MT1>, IsUpper<MT2> > >::value >
1942 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
1943 struct IsUniLower< DMatSMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
1944 :
public BoolConstant< Or< And< IsUniLower<MT1>, IsUniLower<MT2> >
1945 , And< Or< Bool<SF>, Bool<HF> >
1946 , IsUniUpper<MT1>, IsUniUpper<MT2> > >::value >
1962 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
1964 :
public BoolConstant< Or< And< IsStrictlyLower<MT1>, IsLower<MT2> >
1965 , And< IsStrictlyLower<MT2>, IsLower<MT1> >
1966 , And< Or< Bool<SF>, Bool<HF> >
1967 , Or< And< IsStrictlyUpper<MT1>, IsUpper<MT2> >
1968 , And< IsStrictlyUpper<MT2>, IsUpper<MT1> > > > >::value >
1984 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
1985 struct IsUpper< DMatSMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
1987 , And< IsUpper<MT1>, IsUpper<MT2> >
1988 , And< Or< Bool<SF>, Bool<HF> >
1989 , IsLower<MT1>, IsLower<MT2> > >::value >
2005 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2006 struct IsUniUpper< DMatSMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2007 :
public BoolConstant< Or< And< IsUniUpper<MT1>, IsUniUpper<MT2> >
2008 , And< Or< Bool<SF>, Bool<HF> >
2009 , IsUniLower<MT1>, IsUniLower<MT2> > >::value >
2025 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2027 :
public BoolConstant< Or< And< IsStrictlyUpper<MT1>, IsUpper<MT2> >
2028 , And< IsStrictlyUpper<MT2>, IsUpper<MT1> >
2029 , And< Or< Bool<SF>, Bool<HF> >
2030 , Or< And< IsStrictlyLower<MT1>, IsLower<MT2> >
2031 , And< IsStrictlyLower<MT2>, IsLower<MT1> > > > >::value >
2047 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF,
typename VT >
2065 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF,
typename VT >
2083 template<
typename VT,
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2101 template<
typename VT,
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2119 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2136 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2153 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2170 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2187 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2204 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF,
bool AF >
2219 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
2220 struct RowExprTrait< DMatSMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2233 template<
typename MT1,
typename MT2,
bool SF,
bool HF,
bool LF,
bool UF >
typename SubmatrixExprTrait< MT, AF >::Type SubmatrixExprTrait_
Auxiliary alias declaration for the SubmatrixExprTrait type trait.The SubmatrixExprTrait_ alias decla...
Definition: SubmatrixExprTrait.h:134
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.This macro encapsulates the default way o...
Definition: Exception.h:235
Evaluation of the expression type of a dense matrix declupp operation.Via this type trait it is possi...
Definition: DMatDeclUppExprTrait.h:75
Compile time check for row vector types.This type trait tests whether or not the given template argum...
Definition: IsRowVector.h:80
const DMatForEachExpr< MT, Conj, SO > conj(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the complex conjugate of each single element of dm.
Definition: DMatForEachExpr.h:1214
Header file for auxiliary alias declarations.
Compile time check whether the given type is a computational expression template.This type trait clas...
Definition: IsComputation.h:72
Header file for mathematical functions.
constexpr bool useOptimizedKernels
Configuration switch for optimized kernels.This configuration switch enables/disables all optimized c...
Definition: Optimizations.h:84
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: DMatSMatMultExpr.h:413
Header file for the SMatDVecMultExprTrait class template.
Header file for the Rows type trait.
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: DMatSMatMultExpr.h:371
DMatSMatMultExpr< MT1, MT2, SF, HF, LF, UF > This
Type of this DMatSMatMultExpr instance.
Definition: DMatSMatMultExpr.h:255
Header file for the IsUniUpper type trait.
Compile time check for triangular matrix types.This type trait tests whether or not the given templat...
Definition: IsTriangular.h:87
Header file for basic type definitions.
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: DMatSMatMultExpr.h:435
typename TDVecSMatMultExprTrait< VT, MT >::Type TDVecSMatMultExprTrait_
Auxiliary alias declaration for the TDVecSMatMultExprTrait class template.The TDVecSMatMultExprTrait_...
Definition: TDVecSMatMultExprTrait.h:123
Header file for the DMatDeclDiagExprTrait class template.
EnableIf_< IsDenseMatrix< MT1 > > smpSubAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:160
Header file for the IsSparseMatrix type trait.
Header file for the serial shim.
Header file for the IsDiagonal type trait.
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
#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
Header file for the ColumnExprTrait class template.
Header file for the DeclUpp functor.
BLAZE_ALWAYS_INLINE MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:194
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:533
IfTrue_< evaluateRight, const RT2, CT2 > RT
Type for the assignment of the right-hand side sparse matrix operand.
Definition: DMatSMatMultExpr.h:274
Header file for the IsRowVector type trait.
typename DisableIf< Condition, T >::Type DisableIf_
Auxiliary type for the DisableIf class template.The DisableIf_ alias declaration provides a convenien...
Definition: DisableIf.h:223
Header file for the And class template.
const ElementType_< MT > min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1755
TransposeType_< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: DMatSMatMultExpr.h:259
Compile time check for lower triangular matrices.This type trait tests whether or not the given templ...
Definition: IsLower.h:88
Header file for the TDVecSMatMultExprTrait class template.
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:721
typename MultTrait< T1, T2 >::Type MultTrait_
Auxiliary alias declaration for the MultTrait class template.The MultTrait_ alias declaration provide...
Definition: MultTrait.h:245
Header file for the Computation base class.
Header file for the MatMatMultExpr base class.
DisableIf_< IsSymmetric< MT >, const DMatDeclSymExpr< MT, SO > > declsym(const DenseMatrix< MT, SO > &dm)
Declares the given non-symmetric dense matrix expression dm as symmetric.
Definition: DMatDeclSymExpr.h:841
Evaluation of the expression type of a dense matrix/dense vector multiplication.Via this type trait i...
Definition: DMatDVecMultExprTrait.h:78
Compile time check for upper triangular matrices.This type trait tests whether or not the given templ...
Definition: IsUpper.h:88
Constraints on the storage order of matrix types.
DMatSMatMultExpr(const MT1 &lhs, const MT2 &rhs) noexcept
Constructor for the DMatSMatMultExpr class.
Definition: DMatSMatMultExpr.h:292
Header file for the RequiresEvaluation type trait.
System settings for performance optimizations.
RightOperand rightOperand() const noexcept
Returns the right-hand side sparse matrix operand.
Definition: DMatSMatMultExpr.h:401
Header file for the IsUniLower type trait.
typename T::ResultType ResultType_
Alias declaration for nested ResultType type definitions.The ResultType_ alias declaration provides a...
Definition: Aliases.h:323
const ElementType_< MT > max(const DenseMatrix< MT, SO > &dm)
Returns the largest element of the dense matrix.
Definition: DenseMatrix.h:1802
EnableIf_< IsDenseMatrix< MT1 > > smpAddAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP addition assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:129
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:71
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:119
CompositeType_< MT1 > CT1
Composite type of the left-hand side dense matrix expression.
Definition: DMatSMatMultExpr.h:155
Constraint on the data type.
typename IfTrue< Condition, T1, T2 >::Type IfTrue_
Auxiliary alias declaration for the IfTrue class template.The IfTrue_ alias declaration provides a co...
Definition: If.h:109
Flag for Hermitian matrices.
Definition: DMatSMatMultExpr.h:173
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DMatSMatMultExpr.h:307
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: DMatSMatMultExpr.h:445
Compile time check for the alignment of data types.This type trait tests whether the given data type ...
Definition: IsAligned.h:87
Evaluation of the expression type of a dense matrix declsym operation.Via this type trait it is possi...
Definition: DMatDeclSymExprTrait.h:75
Constraint on the data type.
Constraint on the data type.
typename MultExprTrait< T1, T2 >::Type MultExprTrait_
Auxiliary alias declaration for the MultExprTrait class template.The MultExprTrait_ alias declaration...
Definition: MultExprTrait.h:344
Header file for the MultExprTrait class template.
DisableIf_< IsHermitian< MT >, const DMatDeclHermExpr< MT, SO > > declherm(const DenseMatrix< MT, SO > &dm)
Declares the given non-Hermitian dense matrix expression dm as Hermitian.
Definition: DMatDeclHermExpr.h:841
Compile time check to query the requirement to evaluate an expression.Via this type trait it is possi...
Definition: RequiresEvaluation.h:72
SubvectorExprTrait_< VT, unaligned > subvector(Vector< VT, TF > &vector, size_t index, size_t size)
Creating a view on a specific subvector of the given vector.
Definition: Subvector.h:152
typename T::CompositeType CompositeType_
Alias declaration for nested CompositeType type definitions.The CompositeType_ alias declaration prov...
Definition: Aliases.h:83
Compile time check for upper unitriangular matrices.This type trait tests whether or not the given te...
Definition: IsUniUpper.h:86
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: DMatSMatMultExpr.h:381
Header file for the DisableIf class template.
Compile time check for dense vector types.This type trait tests whether or not the given template par...
Definition: IsDenseVector.h:78
Header file for the multiplication trait.
Header file for the IsStrictlyUpper type trait.
Header file for the IsSymmetric type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the DeclLow functor.
Header file for the If class template.
Compile time check for row-major matrix types.This type trait tests whether or not the given template...
Definition: IsRowMajorMatrix.h:83
#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
Flag for upper matrices.
Definition: DMatSMatMultExpr.h:175
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2939
Generic wrapper for the decllow() function.
Definition: DeclLow.h:58
EnableIf_< IsDenseMatrix< MT1 > > smpAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:98
Header file for the Or class template.
LeftOperand leftOperand() const noexcept
Returns the left-hand side dense matrix operand.
Definition: DMatSMatMultExpr.h:391
If_< IsExpression< MT2 >, const MT2, const MT2 &> RightOperand
Composite type of the right-hand side sparse matrix expression.
Definition: DMatSMatMultExpr.h:268
#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 the DMatDeclLowExprTrait class template.
Header file for the Columns type trait.
typename T::ElementType ElementType_
Alias declaration for nested ElementType type definitions.The ElementType_ alias declaration provides...
Definition: Aliases.h:163
Evaluation of the expression type of a dense matrix/sparse vector multiplication.Via this type trait ...
Definition: DMatSVecMultExprTrait.h:80
Compile time check for sparse vector types.This type trait tests whether or not the given template pa...
Definition: IsSparseVector.h:78
Evaluation of the expression type type of a submatrix operation.Via this type trait it is possible to...
Definition: SubmatrixExprTrait.h:80
Header file for the DMatDVecMultExprTrait class template.
Header file for the IsLower type trait.
ElementType_< RT1 > ET1
Element type of the left-hand side dense matrix expression.
Definition: DMatSMatMultExpr.h:153
Header file for the IsAligned type trait.
Compile time check for diagonal matrices.This type trait tests whether or not the given template para...
Definition: IsDiagonal.h:90
Header file for the SMatSVecMultExprTrait class template.
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT >, IsDeclExpr< MT > >, RowExprTrait_< MT > > row(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific row of the given matrix.
Definition: Row.h:128
ResultType_< MT2 > RT2
Result type of the right-hand side sparse matrix expression.
Definition: DMatSMatMultExpr.h:152
#define BLAZE_CONSTRAINT_MUST_BE_REFERENCE_TYPE(T)
Constraint on the data type.In case the given data type T is not a reference type, a compilation error is created.
Definition: Reference.h:60
Generic wrapper for the null function.
Definition: Noop.h:58
Header file for the IsTriangular type trait.
Header file for the DMatDeclUppExprTrait class template.
Header file for the DMatDeclSymExprTrait class template.
Compile time check for column vector types.This type trait tests whether or not the given template ar...
Definition: IsColumnVector.h:80
Constraints on the storage order of matrix types.
Compile time check for symmetric matrices.This type trait tests whether or not the given template par...
Definition: IsSymmetric.h:85
Header file for the exception macros of the math module.
DisableIf_< IsLower< MT >, const DMatDeclLowExpr< MT, SO > > decllow(const DenseMatrix< MT, SO > &dm)
Declares the given non-lower dense matrix expression dm as lower.
Definition: DMatDeclLowExpr.h:842
Compile time check for strictly upper triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyUpper.h:86
Evaluation of the expression type type of a row operation.Via this type trait it is possible to evalu...
Definition: RowExprTrait.h:79
BLAZE_ALWAYS_INLINE MT::Iterator end(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:260
Header file for the DeclDiag functor.
Evaluation of the expression type of a dense matrix declherm operation.Via this type trait it is poss...
Definition: DMatDeclHermExprTrait.h:75
Compile time check for dense matrix types.This type trait tests whether or not the given template par...
Definition: IsDenseMatrix.h:78
CompositeType_< MT2 > CT2
Composite type of the right-hand side sparse matrix expression.
Definition: DMatSMatMultExpr.h:156
Header file for the RowExprTrait class template.
Header file for all forward declarations for expression class templates.
Header file for the IsDenseMatrix type trait.
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT >, IsDeclExpr< MT > >, ColumnExprTrait_< MT > > column(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific column of the given matrix.
Definition: Column.h:128
Header file for the EnableIf class template.
Header file for the IsStrictlyLower type trait.
Flag for symmetric matrices.
Definition: DMatSMatMultExpr.h:172
#define BLAZE_CONSTRAINT_MUST_FORM_VALID_MATMATMULTEXPR(T1, T2)
Constraint on the data type.In case the given data types T1 and T2 do not form a valid matrix/matrix ...
Definition: MatMatMultExpr.h:109
Compile time check for lower unitriangular matrices.This type trait tests whether or not the given te...
Definition: IsUniLower.h:86
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: DMatSMatMultExpr.h:355
Header file for the conjugate shim.
Compile time check for resizable data types.This type trait tests whether the given data type is a re...
Definition: IsResizable.h:75
Base class for all matrix/matrix multiplication expression templates.The MatMatMultExpr class serves ...
Definition: MatMatMultExpr.h:65
Header file for the IsSparseVector type trait.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SYMMETRIC_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a symmetric matrix type, a compilation error is created.
Definition: Symmetric.h:79
Header file for the SubmatrixExprTrait class template.
#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 run time assertion macros.
Utility type for generic codes.
Expression object for dense matrix-sparse matrix multiplications.The DMatSMatMultExpr class represent...
Definition: DMatSMatMultExpr.h:145
typename If< T1, T2, T3 >::Type If_
Auxiliary alias declaration for the If class template.The If_ alias declaration provides a convenient...
Definition: If.h:160
Header file for the reset shim.
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:93
Header file for the DMatDeclHermExprTrait class template.
Header file for the isDefault shim.
Compile time check for Hermitian matrices.This type trait tests whether or not the given template par...
Definition: IsHermitian.h:85
Base class for matrices.The Matrix class is a base class for all dense and sparse matrix classes with...
Definition: Forward.h:94
Constraint on the data type.
ResultType_< MT1 > RT1
Result type of the left-hand side dense matrix expression.
Definition: DMatSMatMultExpr.h:151
Constraints on the storage order of matrix types.
Generic wrapper for the declherm() function.
Definition: DeclHerm.h:58
typename DMatSVecMultExprTrait< MT, VT >::Type DMatSVecMultExprTrait_
Auxiliary alias declaration for the DMatSVecMultExprTrait class template.The DMatSVecMultExprTrait_ a...
Definition: DMatSVecMultExprTrait.h:123
Header file for the Noop functor.
MultTrait_< RT1, RT2 > ResultType
Result type for expression template evaluations.
Definition: DMatSMatMultExpr.h:257
typename DMatDVecMultExprTrait< MT, VT >::Type DMatDVecMultExprTrait_
Auxiliary alias declaration for the DMatDVecMultExprTrait class template.The DMatDVecMultExprTrait_ a...
Definition: DMatDVecMultExprTrait.h:119
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:223
typename T::OppositeType OppositeType_
Alias declaration for nested OppositeType type definitions.The OppositeType_ alias declaration provid...
Definition: Aliases.h:243
#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
Header file for the IsDenseVector type trait.
Generic wrapper for the declupp() function.
Definition: DeclUpp.h:58
Compile time check for strictly lower triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyLower.h:86
const ResultType CompositeType
Data type for composite expression templates.
Definition: DMatSMatMultExpr.h:262
Evaluation of the expression type of a dense vector/dense matrix multiplication.Via this type trait i...
Definition: TDVecDMatMultExprTrait.h:78
typename T::ConstIterator ConstIterator_
Alias declaration for nested ConstIterator type definitions.The ConstIterator_ alias declaration prov...
Definition: Aliases.h:103
Evaluation of the expression type of a sparse vector/dense matrix multiplication.Via this type trait ...
Definition: TSVecDMatMultExprTrait.h:78
Header file for the IsRowMajorMatrix type trait.
OppositeType_< ResultType > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatSMatMultExpr.h:258
const DMatTransExpr< MT,!SO > trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:733
Header file for the IsComputation type trait class.
Header file for the IsBuiltin type trait.
Base class for all compute expression templates.The Computation class serves as a tag for all computa...
Definition: Computation.h:59
Header file for the TDVecDMatMultExprTrait class template.
ElementType_< RT2 > ET2
Element type of the right-hand side sparse matrix expression.
Definition: DMatSMatMultExpr.h:154
Header file for the IntegralConstant class template.
Compile time evaluation of the number of columns of a matrix.The Columns type trait evaluates the num...
Definition: Columns.h:76
Evaluation of the expression type of a dense matrix decllow operation.Via this type trait it is possi...
Definition: DMatDeclLowExprTrait.h:75
Flag for lower matrices.
Definition: DMatSMatMultExpr.h:174
Generic wrapper for the decldiag() function.
Definition: DeclDiag.h:58
If_< IsExpression< MT1 >, const MT1, const MT1 &> LeftOperand
Composite type of the left-hand side dense matrix expression.
Definition: DMatSMatMultExpr.h:265
Evaluation of the expression type of a dense matrix decldiag operation.Via this type trait it is poss...
Definition: DMatDeclDiagExprTrait.h:75
Compile time evaluation of the number of rows of a matrix.The Rows type trait evaluates the number of...
Definition: Rows.h:76
ElementType_< ResultType > ElementType
Resulting element type.
Definition: DMatSMatMultExpr.h:260
Header file for the TSVecDMatMultExprTrait class template.
Compile time check for sparse matrix types.This type trait tests whether or not the given template pa...
Definition: IsSparseMatrix.h:78
RightOperand rhs_
Right-hand side sparse matrix of the multiplication expression.
Definition: DMatSMatMultExpr.h:453
Header file for the DeclHerm functor.
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:573
typename T::TransposeType TransposeType_
Alias declaration for nested TransposeType type definitions.The TransposeType_ alias declaration prov...
Definition: Aliases.h:403
Header file for the IsUpper type trait.
Header file for the DMatSVecMultExprTrait class template.
Header file for the IsColumnVector type trait.
Constraint on the data type.
IfTrue_< evaluateLeft, const RT1, CT1 > LT
Type for the assignment of the left-hand side dense matrix operand.
Definition: DMatSMatMultExpr.h:271
Generic wrapper for the declsym() function.
Definition: DeclSym.h:58
BLAZE_ALWAYS_INLINE bool isSquare(const Matrix< MT, SO > &matrix) noexcept
Checks if the given matrix is a square matrix.
Definition: Matrix.h:677
Header file for the IsResizable type trait.
const ElementType ReturnType
Return type for expression template evaluations.
Definition: DMatSMatMultExpr.h:261
const DMatDMatMultExpr< T1, T2, false, false, false, false > 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:7505
Header file for the thresholds for matrix/vector and matrix/matrix multiplications.
DisableIf_< IsDiagonal< MT >, const DMatDeclDiagExpr< MT, SO > > decldiag(const DenseMatrix< MT, SO > &dm)
Declares the given non-diagonal dense matrix expression dm as diagonal.
Definition: DMatDeclDiagExpr.h:841
DisableIf_< IsUpper< MT >, const DMatDeclUppExpr< MT, SO > > declupp(const DenseMatrix< MT, SO > &dm)
Declares the given non-upper dense matrix expression dm as upper.
Definition: DMatDeclUppExpr.h:842
Evaluation of the expression type type of a column operation.Via this type trait it is possible to ev...
Definition: ColumnExprTrait.h:78
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101
Header file for the Bool class template.
Header file for the DeclSym functor.
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: DMatSMatMultExpr.h:425
#define BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a sparse, N-dimensional matrix type...
Definition: SparseMatrix.h:61
Header file for the IsExpression type trait class.
Header file for the function trace functionality.
LeftOperand lhs_
Left-hand side dense matrix of the multiplication expression.
Definition: DMatSMatMultExpr.h:452