35 #ifndef _BLAZE_MATH_EXPRESSIONS_TDMATTSMATMULTEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_TDMATTSMATMULTEXPR_H_
103 template<
typename MT1
105 class TDMatTSMatMultExpr :
public DenseMatrix< TDMatTSMatMultExpr<MT1,MT2>, true >
106 ,
private MatMatMultExpr
107 ,
private Computation
124 template<
typename T1,
typename T2,
typename T3 >
125 struct UseVectorizedKernel {
126 enum { value = T1::vectorizable && T2::vectorizable &&
143 template<
typename T1,
typename T2,
typename T3 >
144 struct UseOptimizedKernel {
145 enum { value = !UseVectorizedKernel<T1,T2,T3>::value &&
157 template<
typename T1,
typename T2,
typename T3 >
158 struct UseDefaultKernel {
159 enum { value = !UseVectorizedKernel<T1,T2,T3>::value &&
160 !UseOptimizedKernel<T1,T2,T3>::value };
191 enum { vectorizable = 0 };
224 if(
lhs_.columns() == 0UL )
232 const ConstIterator end( B.end(j) );
233 ConstIterator element( B.begin(j) );
240 tmp =
lhs_(i,element->index()) * element->value();
242 for( ; element!=end; ++element )
243 tmp +=
lhs_(i,element->index()) * element->value();
249 for(
size_t k=1UL; k<
lhs_.columns(); ++k ) {
274 return rhs_.columns();
304 template<
typename T >
306 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
316 template<
typename T >
318 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
341 template<
typename MT
360 TDMatTSMatMultExpr::selectAssignKernel( ~lhs, A, B );
379 template<
typename MT3
387 const size_t iend( A.rows() &
size_t(-4) );
390 for(
size_t i=0UL; i<iend; i+=4UL ) {
391 for(
size_t j=0UL; j<B.columns(); ++j )
393 ConstIterator element( B.begin(j) );
394 const ConstIterator end( B.end(j) );
396 if( element == end ) {
398 reset( (~C)(i+1UL,j) );
399 reset( (~C)(i+2UL,j) );
400 reset( (~C)(i+3UL,j) );
404 (~C)(i ,j) = A(i ,element->index()) * element->value();
405 (~C)(i+1UL,j) = A(i+1UL,element->index()) * element->value();
406 (~C)(i+2UL,j) = A(i+2UL,element->index()) * element->value();
407 (~C)(i+3UL,j) = A(i+3UL,element->index()) * element->value();
409 for( ; element!=end; ++element ) {
410 (~C)(i ,j) += A(i ,element->index()) * element->value();
411 (~C)(i+1UL,j) += A(i+1UL,element->index()) * element->value();
412 (~C)(i+2UL,j) += A(i+2UL,element->index()) * element->value();
413 (~C)(i+3UL,j) += A(i+3UL,element->index()) * element->value();
418 for(
size_t i=iend; i<A.rows(); ++i ) {
419 for(
size_t j=0UL; j<B.columns(); ++j )
421 ConstIterator element( B.begin(j) );
422 const ConstIterator end( B.end(j) );
424 if( element == end ) {
429 (~C)(i,j) = A(i,element->index()) * element->value();
431 for( ; element!=end; ++element )
432 (~C)(i,j) += A(i,element->index()) * element->value();
453 template<
typename MT3
456 static inline typename EnableIf< UseDefaultKernel<MT3,MT4,MT5> >::Type
457 selectAssignKernel( DenseMatrix<MT3,true>& C,
const MT4& A,
const MT5& B )
461 for(
size_t j=0UL; j<B.columns(); ++j ) {
462 for(
size_t i=0UL; i<(~C).
rows(); ++i ) {
465 ConstIterator element( B.begin(j) );
466 const ConstIterator end( B.end(j) );
467 for( ; element!=end; ++element ) {
468 for(
size_t i=0UL; i<A.rows(); ++i ) {
470 (~C)(i,j) = A(i,element->index()) * element->value();
472 (~C)(i,j) += A(i,element->index()) * element->value();
494 template<
typename MT3
497 static inline typename EnableIf< UseOptimizedKernel<MT3,MT4,MT5> >::Type
498 selectAssignKernel( DenseMatrix<MT3,true>& C,
const MT4& A,
const MT5& B )
502 const size_t iend( A.rows() & size_t(-4) );
507 for(
size_t j=0UL; j<B.columns(); ++j )
509 const ConstIterator end( B.end(j) );
510 ConstIterator element( B.begin(j) );
512 const size_t kend( B.nonZeros(j) & size_t(-4) );
514 for(
size_t k=0UL; k<kend; k+=4UL ) {
515 const size_t j1( element->index() );
516 const ET2 v1( element->value() );
518 const size_t j2( element->index() );
519 const ET2 v2( element->value() );
521 const size_t j3( element->index() );
522 const ET2 v3( element->value() );
524 const size_t j4( element->index() );
525 const ET2 v4( element->value() );
528 for(
size_t i=0UL; i<iend; i+=4UL ) {
529 (~C)(i ,j) += A(i ,j1) * v1 + A(i ,j2) * v2 + A(i ,j3) * v3 + A(i ,j4) * v4;
530 (~C)(i+1UL,j) += A(i+1UL,j1) * v1 + A(i+1UL,j2) * v2 + A(i+1UL,j3) * v3 + A(i+1UL,j4) * v4;
531 (~C)(i+2UL,j) += A(i+2UL,j1) * v1 + A(i+2UL,j2) * v2 + A(i+2UL,j3) * v3 + A(i+2UL,j4) * v4;
532 (~C)(i+3UL,j) += A(i+3UL,j1) * v1 + A(i+3UL,j2) * v2 + A(i+3UL,j3) * v3 + A(i+3UL,j4) * v4;
534 for(
size_t i=iend; i<A.rows(); ++i ) {
535 (~C)(i,j) += A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
539 for( ; element!=end; ++element ) {
540 for(
size_t i=0UL; i<iend; i+=4UL ) {
541 (~C)(i ,j) += A(i ,element->index()) * element->value();
542 (~C)(i+1UL,j) += A(i+1UL,element->index()) * element->value();
543 (~C)(i+2UL,j) += A(i+2UL,element->index()) * element->value();
544 (~C)(i+3UL,j) += A(i+3UL,element->index()) * element->value();
546 for(
size_t i=iend; i<A.rows(); ++i ) {
547 (~C)(i,j) += A(i,element->index()) * element->value();
569 template<
typename MT3
572 static inline typename EnableIf< UseVectorizedKernel<MT3,MT4,MT5> >::Type
573 selectAssignKernel( DenseMatrix<MT3,true>& C,
const MT4& A,
const MT5& B )
575 typedef IntrinsicTrait<ElementType> IT;
578 const size_t M( A.rows() );
582 for(
size_t j=0UL; j<B.columns(); ++j )
584 const ConstIterator end( B.end(j) );
585 ConstIterator element( B.begin(j) );
587 const size_t kend( B.nonZeros(j) & size_t(-4) );
589 for(
size_t k=0UL; k<kend; k+=4UL ) {
590 const size_t j1( element->index() );
593 const size_t j2( element->index() );
596 const size_t j3( element->index() );
599 const size_t j4( element->index() );
603 for(
size_t i=0UL; i<M; i+=IT::size ) {
604 (~C).
store( i, j, (~C).load(i,j) + A.load(i,j1) * v1 + A.load(i,j2) * v2 + A.load(i,j3) * v3 + A.load(i,j4) * v4 );
608 for( ; element!=end; ++element ) {
609 const size_t j1( element->index() );
612 for(
size_t i=0UL; i<M; i+=IT::size ) {
613 (~C).
store( i, j, (~C).load(i,j) + A.load(i,j1) * v1 );
633 template<
typename MT
639 typedef typename SelectType< SO, ResultType, OppositeType >::Type TmpType;
651 const TmpType tmp( rhs );
670 template<
typename MT
689 TDMatTSMatMultExpr::selectAddAssignKernel( ~lhs, A, B );
708 template<
typename MT3
712 selectAddAssignKernel( DenseMatrix<MT3,false>& C,
const MT4& A,
const MT5& B )
716 const size_t iend( A.rows() & size_t(-4) );
719 for(
size_t i=0UL; i<iend; i+=4UL ) {
720 for(
size_t j=0UL; j<B.columns(); ++j )
722 ConstIterator element( B.begin(j) );
723 const ConstIterator end( B.end(j) );
725 for( ; element!=end; ++element ) {
726 (~C)(i ,j) += A(i ,element->index()) * element->value();
727 (~C)(i+1UL,j) += A(i+1UL,element->index()) * element->value();
728 (~C)(i+2UL,j) += A(i+2UL,element->index()) * element->value();
729 (~C)(i+3UL,j) += A(i+3UL,element->index()) * element->value();
734 for(
size_t i=iend; i<A.rows(); ++i ) {
735 for(
size_t j=0UL; j<B.columns(); ++j )
737 ConstIterator element( B.begin(j) );
738 const ConstIterator end( B.end(j) );
740 for( ; element!=end; ++element )
741 (~C)(i,j) += A(i,element->index()) * element->value();
762 template<
typename MT3
765 static inline typename EnableIf< UseDefaultKernel<MT3,MT4,MT5> >::Type
766 selectAddAssignKernel( DenseMatrix<MT3,true>& C,
const MT4& A,
const MT5& B )
770 for(
size_t j=0UL; j<B.columns(); ++j ) {
771 ConstIterator element( B.begin(j) );
772 const ConstIterator end( B.end(j) );
773 for( ; element!=end; ++element ) {
774 for(
size_t i=0UL; i<A.rows(); ++i ) {
776 (~C)(i,j) = A(i,element->index()) * element->value();
778 (~C)(i,j) += A(i,element->index()) * element->value();
800 template<
typename MT3
803 static inline typename EnableIf< UseOptimizedKernel<MT3,MT4,MT5> >::Type
804 selectAddAssignKernel( DenseMatrix<MT3,true>& C,
const MT4& A,
const MT5& B )
808 const size_t iend( A.rows() & size_t(-4) );
811 for(
size_t j=0UL; j<B.columns(); ++j )
813 const ConstIterator end( B.end(j) );
814 ConstIterator element( B.begin(j) );
816 const size_t kend( B.nonZeros(j) & size_t(-4) );
818 for(
size_t k=0UL; k<kend; k+=4UL ) {
819 const size_t j1( element->index() );
820 const ET2 v1( element->value() );
822 const size_t j2( element->index() );
823 const ET2 v2( element->value() );
825 const size_t j3( element->index() );
826 const ET2 v3( element->value() );
828 const size_t j4( element->index() );
829 const ET2 v4( element->value() );
832 for(
size_t i=0UL; i<iend; i+=4UL ) {
833 (~C)(i ,j) += A(i ,j1) * v1 + A(i ,j2) * v2 + A(i ,j3) * v3 + A(i ,j4) * v4;
834 (~C)(i+1UL,j) += A(i+1UL,j1) * v1 + A(i+1UL,j2) * v2 + A(i+1UL,j3) * v3 + A(i+1UL,j4) * v4;
835 (~C)(i+2UL,j) += A(i+2UL,j1) * v1 + A(i+2UL,j2) * v2 + A(i+2UL,j3) * v3 + A(i+2UL,j4) * v4;
836 (~C)(i+3UL,j) += A(i+3UL,j1) * v1 + A(i+3UL,j2) * v2 + A(i+3UL,j3) * v3 + A(i+3UL,j4) * v4;
838 for(
size_t i=iend; i<A.rows(); ++i ) {
839 (~C)(i,j) += A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
843 for( ; element!=end; ++element ) {
844 for(
size_t i=0UL; i<iend; i+=4UL ) {
845 (~C)(i ,j) += A(i ,element->index()) * element->value();
846 (~C)(i+1UL,j) += A(i+1UL,element->index()) * element->value();
847 (~C)(i+2UL,j) += A(i+2UL,element->index()) * element->value();
848 (~C)(i+3UL,j) += A(i+3UL,element->index()) * element->value();
850 for(
size_t i=iend; i<A.rows(); ++i ) {
851 (~C)(i,j) += A(i,element->index()) * element->value();
873 template<
typename MT3
876 static inline typename EnableIf< UseVectorizedKernel<MT3,MT4,MT5> >::Type
877 selectAddAssignKernel( DenseMatrix<MT3,true>& C,
const MT4& A,
const MT5& B )
879 typedef IntrinsicTrait<ElementType> IT;
882 const size_t M( A.rows() );
884 for(
size_t j=0UL; j<B.columns(); ++j )
886 const ConstIterator end( B.end(j) );
887 ConstIterator element( B.begin(j) );
889 const size_t kend( B.nonZeros(j) & size_t(-4) );
891 for(
size_t k=0UL; k<kend; k+=4UL ) {
892 const size_t j1( element->index() );
895 const size_t j2( element->index() );
898 const size_t j3( element->index() );
901 const size_t j4( element->index() );
905 for(
size_t i=0UL; i<M; i+=IT::size ) {
906 (~C).
store( i, j, (~C).load(i,j) + A.load(i,j1) * v1 + A.load(i,j2) * v2 + A.load(i,j3) * v3 + A.load(i,j4) * v4 );
910 for( ; element!=end; ++element ) {
911 const size_t j1( element->index() );
914 for(
size_t i=0UL; i<M; i+=IT::size ) {
915 (~C).
store( i, j, (~C).load(i,j) + A.load(i,j1) * v1 );
940 template<
typename MT
959 TDMatTSMatMultExpr::selectSubAssignKernel( ~lhs, A, B );
978 template<
typename MT3
982 selectSubAssignKernel( DenseMatrix<MT3,false>& C,
const MT4& A,
const MT5& B )
986 const size_t iend( A.rows() & size_t(-4) );
989 for(
size_t i=0UL; i<iend; i+=4UL ) {
990 for(
size_t j=0UL; j<B.columns(); ++j )
992 ConstIterator element( B.begin(j) );
993 const ConstIterator end( B.end(j) );
995 for( ; element!=end; ++element ) {
996 (~C)(i ,j) -= A(i ,element->index()) * element->value();
997 (~C)(i+1UL,j) -= A(i+1UL,element->index()) * element->value();
998 (~C)(i+2UL,j) -= A(i+2UL,element->index()) * element->value();
999 (~C)(i+3UL,j) -= A(i+3UL,element->index()) * element->value();
1004 for(
size_t i=iend; i<A.rows(); ++i ) {
1005 for(
size_t j=0UL; j<B.columns(); ++j )
1007 ConstIterator element( B.begin(j) );
1008 const ConstIterator end( B.end(j) );
1010 for( ; element!=end; ++element )
1011 (~C)(i,j) -= A(i,element->index()) * element->value();
1032 template<
typename MT3
1035 static inline typename EnableIf< UseDefaultKernel<MT3,MT4,MT5> >::Type
1036 selectSubAssignKernel( DenseMatrix<MT3,true>& C,
const MT4& A,
const MT5& B )
1040 for(
size_t j=0UL; j<B.columns(); ++j ) {
1041 ConstIterator element( B.begin(j) );
1042 const ConstIterator end( B.end(j) );
1043 for( ; element!=end; ++element ) {
1044 for(
size_t i=0UL; i<A.rows(); ++i ) {
1046 (~C)(i,j) = -A(i,element->index()) * element->value();
1048 (~C)(i,j) -= A(i,element->index()) * element->value();
1070 template<
typename MT3
1073 static inline typename EnableIf< UseOptimizedKernel<MT3,MT4,MT5> >::Type
1074 selectSubAssignKernel( DenseMatrix<MT3,true>& C,
const MT4& A,
const MT5& B )
1078 const size_t iend( A.rows() & size_t(-4) );
1081 for(
size_t j=0UL; j<B.columns(); ++j )
1083 const ConstIterator end( B.end(j) );
1084 ConstIterator element( B.begin(j) );
1086 const size_t kend( B.nonZeros(j) & size_t(-4) );
1088 for(
size_t k=0UL; k<kend; k+=4UL ) {
1089 const size_t j1( element->index() );
1090 const ET2 v1( element->value() );
1092 const size_t j2( element->index() );
1093 const ET2 v2( element->value() );
1095 const size_t j3( element->index() );
1096 const ET2 v3( element->value() );
1098 const size_t j4( element->index() );
1099 const ET2 v4( element->value() );
1102 for(
size_t i=0UL; i<iend; i+=4UL ) {
1103 (~C)(i ,j) -= A(i ,j1) * v1 + A(i ,j2) * v2 + A(i ,j3) * v3 + A(i ,j4) * v4;
1104 (~C)(i+1UL,j) -= A(i+1UL,j1) * v1 + A(i+1UL,j2) * v2 + A(i+1UL,j3) * v3 + A(i+1UL,j4) * v4;
1105 (~C)(i+2UL,j) -= A(i+2UL,j1) * v1 + A(i+2UL,j2) * v2 + A(i+2UL,j3) * v3 + A(i+2UL,j4) * v4;
1106 (~C)(i+3UL,j) -= A(i+3UL,j1) * v1 + A(i+3UL,j2) * v2 + A(i+3UL,j3) * v3 + A(i+3UL,j4) * v4;
1108 for(
size_t i=iend; i<A.rows(); ++i ) {
1109 (~C)(i,j) -= A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
1113 for( ; element!=end; ++element ) {
1114 for(
size_t i=0UL; i<iend; i+=4UL ) {
1115 (~C)(i ,j) -= A(i ,element->index()) * element->value();
1116 (~C)(i+1UL,j) -= A(i+1UL,element->index()) * element->value();
1117 (~C)(i+2UL,j) -= A(i+2UL,element->index()) * element->value();
1118 (~C)(i+3UL,j) -= A(i+3UL,element->index()) * element->value();
1120 for(
size_t i=iend; i<A.rows(); ++i ) {
1121 (~C)(i,j) -= A(i,element->index()) * element->value();
1143 template<
typename MT3
1146 static inline typename EnableIf< UseVectorizedKernel<MT3,MT4,MT5> >::Type
1147 selectSubAssignKernel( DenseMatrix<MT3,true>& C,
const MT4& A,
const MT5& B )
1149 typedef IntrinsicTrait<ElementType> IT;
1152 const size_t M( A.rows() );
1154 for(
size_t j=0UL; j<B.columns(); ++j )
1156 const ConstIterator end( B.end(j) );
1157 ConstIterator element( B.begin(j) );
1159 const size_t kend( B.nonZeros(j) & size_t(-4) );
1161 for(
size_t k=0UL; k<kend; k+=4UL ) {
1162 const size_t j1( element->index() );
1165 const size_t j2( element->index() );
1168 const size_t j3( element->index() );
1171 const size_t j4( element->index() );
1175 for(
size_t i=0UL; i<M; i+=IT::size ) {
1176 (~C).
store( i, j, (~C).load(i,j) - A.load(i,j1) * v1 - A.load(i,j2) * v2 - A.load(i,j3) * v3 - A.load(i,j4) * v4 );
1180 for( ; element!=end; ++element ) {
1181 const size_t j1( element->index() );
1184 for(
size_t i=0UL; i<M; i+=IT::size ) {
1185 (~C).
store( i, j, (~C).load(i,j) - A.load(i,j1) * v1 );
1254 template<
typename T1
1256 inline const TDMatTSMatMultExpr<T1,T2>
1262 throw std::invalid_argument(
"Matrix sizes do not match" );
1279 template<
typename MT1,
typename MT2,
typename VT >
1280 struct TDMatDVecMultExprTrait< TDMatTSMatMultExpr<MT1,MT2>, VT >
1284 typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
1285 IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
1286 IsDenseVector<VT>::value && IsColumnVector<VT>::value
1287 ,
typename TDMatDVecMultExprTrait< MT1, typename TSMatDVecMultExprTrait<MT2,VT>::Type >::Type
1288 , INVALID_TYPE >::Type Type;
1297 template<
typename MT1,
typename MT2,
typename VT >
1298 struct TDMatSVecMultExprTrait< TDMatTSMatMultExpr<MT1,MT2>, VT >
1302 typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
1303 IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
1304 IsSparseVector<VT>::value && IsColumnVector<VT>::value
1305 ,
typename TDMatDVecMultExprTrait< MT1, typename TSMatDVecMultExprTrait<MT2,VT>::Type >::Type
1306 , INVALID_TYPE >::Type Type;
1315 template<
typename VT,
typename MT1,
typename MT2 >
1316 struct TDVecTDMatMultExprTrait< VT, TDMatTSMatMultExpr<MT1,MT2> >
1320 typedef typename SelectType< IsDenseVector<VT>::value && IsRowVector<VT>::value &&
1321 IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
1322 IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value
1323 ,
typename TDVecTSMatMultExprTrait< typename TDVecTDMatMultExprTrait<VT,MT1>::Type, MT2 >::Type
1324 , INVALID_TYPE >::Type Type;
1333 template<
typename VT,
typename MT1,
typename MT2 >
1334 struct TSVecTDMatMultExprTrait< VT, TDMatTSMatMultExpr<MT1,MT2> >
1338 typedef typename SelectType< IsSparseVector<VT>::value && IsRowVector<VT>::value &&
1339 IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
1340 IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value
1341 ,
typename TDVecTSMatMultExprTrait< typename TSVecTDMatMultExprTrait<VT,MT1>::Type, MT2 >::Type
1342 , INVALID_TYPE >::Type Type;
1351 template<
typename MT1,
typename MT2 >
1352 struct SubmatrixExprTrait< TDMatTSMatMultExpr<MT1,MT2> >
1356 typedef typename MultExprTrait< typename SubmatrixExprTrait<const MT1>::Type
1357 ,
typename SubmatrixExprTrait<const MT2>::Type >::Type Type;
1366 template<
typename MT1,
typename MT2 >
1367 struct RowExprTrait< TDMatTSMatMultExpr<MT1,MT2> >
1371 typedef typename MultExprTrait< typename RowExprTrait<const MT1>::Type, MT2 >::Type Type;
1380 template<
typename MT1,
typename MT2 >
1381 struct ColumnExprTrait< TDMatTSMatMultExpr<MT1,MT2> >
1385 typedef typename MultExprTrait< MT1, typename ColumnExprTrait<const MT2>::Type >::Type Type;
MT1::ElementType ET1
Element type of the left-hand side dense matrix expression.
Definition: TDMatTSMatMultExpr.h:113
void reset(DynamicMatrix< Type, SO > &m)
Resetting the given dense matrix.
Definition: DynamicMatrix.h:4512
const DMatDMatMultExpr< T1, T2 > operator*(const DenseMatrix< T1, false > &lhs, const DenseMatrix< T2, false > &rhs)
Multiplication operator for the multiplication of two row-major dense matrices ( ).
Definition: DMatDMatMultExpr.h:3703
Expression object for transpose dense matrix-transpose sparse matrix multiplications.The TDMatTSMatMultExpr class represents the compile time expression for multiplications between a column-major dense matrix and a column-major sparse matrix.
Definition: Forward.h:128
Header file for the IsSparseMatrix type trait.
bool isDefault(const DynamicMatrix< Type, SO > &m)
Returns whether the given dense matrix is in default state.
Definition: DynamicMatrix.h:4555
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:196
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a dense, N-dimensional matrix type...
Definition: DenseMatrix.h:79
Header file for the ColumnExprTrait class template.
Header file for the IsColumnMajorMatrix type trait.
const ResultType CompositeType
Data type for composite expression templates.
Definition: TDMatTSMatMultExpr.h:174
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2375
Header file for the IsRowVector type trait.
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:248
Header file for the Computation base class.
Header file for the MatMatMultExpr base class.
Type relationship analysis.This class tests if the two data types A and B are equal. For this type comparison, the cv-qualifiers of both data types are ignored. If A and B are the same data type (ignoring the cv-qualifiers), then the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType.
Definition: IsSame.h:158
Header file for the RequiresEvaluation type trait.
SelectType< IsExpression< MT1 >::value, const MT1, const MT1 & >::Type LeftOperand
Composite type of the left-hand side dense matrix expression.
Definition: TDMatTSMatMultExpr.h:177
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:70
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:104
size_t rows() const
Returns the current number of rows of the matrix.
Definition: TDMatTSMatMultExpr.h:263
Constraint on the data type.
TDMatTSMatMultExpr(const MT1 &lhs, const MT2 &rhs)
Constructor for the TDMatTSMatMultExpr class.
Definition: TDMatTSMatMultExpr.h:200
Constraint on the data type.
Constraint on the data type.
Header file for the MultExprTrait class template.
Compile time check to query the requirement to evaluate an expression.Via this type trait it is possi...
Definition: RequiresEvaluation.h:90
IntrinsicTrait< ElementType >::Type IntrinsicType
Resulting intrinsic element type.
Definition: TDMatTSMatMultExpr.h:172
MT2::CompositeType CT2
Composite type of the right-hand side sparse matrix expression.
Definition: TDMatTSMatMultExpr.h:116
Compile time type selection.The SelectType class template selects one of the two given types T1 and T...
Definition: SelectType.h:59
Header file for the DisableIf class template.
MT1::CompositeType CT1
Composite type of the left-hand side dense matrix expression.
Definition: TDMatTSMatMultExpr.h:115
Header file for the multiplication trait.
#define BLAZE_CONSTRAINT_MUST_BE_COLUMN_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a column-major dense or sparse matri...
Definition: StorageOrder.h:161
Header file for the TSVecTDMatMultExprTrait class template.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2379
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: TDMatTSMatMultExpr.h:215
Header file for the TDMatSVecMultExprTrait class template.
Header file for the TDVecTSMatMultExprTrait class template.
Header file for the DenseMatrix base class.
Header file for the TSMatDVecMultExprTrait class template.
void assign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the assignment of a matrix to a matrix.
Definition: Matrix.h:179
LeftOperand leftOperand() const
Returns the left-hand side transpose dense matrix operand.
Definition: TDMatTSMatMultExpr.h:283
#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:78
RightOperand rightOperand() const
Returns the right-hand side transpose sparse matrix operand.
Definition: TDMatTSMatMultExpr.h:293
Constraints on the storage order of matrix types.
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2373
Header file for the SelectType class template.
Header file for the RowExprTrait class template.
Header file for all forward declarations for expression class templates.
Header file for the IsDenseMatrix type trait.
SelectType< IsComputation< MT2 >::value, const RT2, CT2 >::Type RT
Type for the assignment of the right-hand side sparse matrix operand.
Definition: TDMatTSMatMultExpr.h:186
ResultType::ElementType ElementType
Resulting element type.
Definition: TDMatTSMatMultExpr.h:171
Header file for the EnableIf class template.
LeftOperand lhs_
Left-hand side dense matrix of the multiplication expression.
Definition: TDMatTSMatMultExpr.h:324
Compile time check for resizable data types.This type trait tests whether the given data type is a re...
Definition: IsResizable.h:75
Header file for the IsSparseVector type trait.
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: StorageOrder.h:81
Removal of reference modifiers.The RemoveCV type trait removes any reference modifiers from the given...
Definition: RemoveReference.h:69
Intrinsic characteristics of data types.The IntrinsicTrait class template provides the intrinsic char...
Definition: IntrinsicTrait.h:648
SelectType< IsComputation< MT1 >::value, const RT1, CT1 >::Type LT
Type for the assignment of the left-hand side dense matrix operand.
Definition: TDMatTSMatMultExpr.h:183
Header file for run time assertion macros.
Compile time check for column-major matrix types.This type trait tests whether or not the given templ...
Definition: IsColumnMajorMatrix.h:104
Utility type for generic codes.
Base template for the MultTrait class.
Definition: MultTrait.h:141
const ElementType ReturnType
Return type for expression template evaluations.
Definition: TDMatTSMatMultExpr.h:173
void addAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the addition assignment of a matrix to a matrix.
Definition: Matrix.h:209
ResultType::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: TDMatTSMatMultExpr.h:170
Header file for the reset shim.
void subAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the subtraction assignment of a matrix to matrix.
Definition: Matrix.h:239
Header file for the isDefault shim.
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: TDMatTSMatMultExpr.h:305
MT1::ResultType RT1
Result type of the left-hand side dense matrix expression.
Definition: TDMatTSMatMultExpr.h:111
ResultType::OppositeType OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: TDMatTSMatMultExpr.h:169
Header file for the RemoveReference type trait.
#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:283
Header file for the IsDenseVector type trait.
Header file for all intrinsic functionality.
TDMatTSMatMultExpr< MT1, MT2 > This
Type of this TDMatTSMatMultExpr instance.
Definition: TDMatTSMatMultExpr.h:167
MT2::ResultType RT2
Result type of the right-hand side sparse matrix expression.
Definition: TDMatTSMatMultExpr.h:112
Header file for the IsComputation type trait class.
Header file for the TDMatDVecMultExprTrait class template.
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:157
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: TDMatTSMatMultExpr.h:317
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2370
size_t columns(const Matrix< MT, SO > &m)
Returns the current number of columns of the matrix.
Definition: Matrix.h:154
Header file for basic type definitions.
MT2::ElementType ET2
Element type of the right-hand side sparse matrix expression.
Definition: TDMatTSMatMultExpr.h:114
SelectType< IsExpression< MT2 >::value, const MT2, const MT2 & >::Type RightOperand
Composite type of the right-hand side sparse matrix expression.
Definition: TDMatTSMatMultExpr.h:180
RightOperand rhs_
Right-hand side sparse matrix of the multiplication expression.
Definition: TDMatTSMatMultExpr.h:325
Header file for the IsColumnVector type trait.
Header file for the IsResizable type trait.
Size type of the Blaze library.
size_t rows(const Matrix< MT, SO > &m)
Returns the current number of rows of the matrix.
Definition: Matrix.h:138
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101
Header file for the TDVecTDMatMultExprTrait class template.
EnableIf< IsIntegral< T >, Set< T, sizeof(T)> >::Type::Type set(T value)
Sets all values in the vector to the given integral value.
Definition: Set.h:209
#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:79
void store(float *address, const sse_float_t &value)
Aligned store of a vector of 'float' values.
Definition: Store.h:242
Header file for the IsExpression type trait class.
Header file for the TSMatSVecMultExprTrait class template.
Header file for the FunctionTrace class.
MultTrait< RT1, RT2 >::Type ResultType
Result type for expression template evaluations.
Definition: TDMatTSMatMultExpr.h:168
size_t columns() const
Returns the current number of columns of the matrix.
Definition: TDMatTSMatMultExpr.h:273