35 #ifndef _BLAZE_MATH_EXPRESSIONS_SMATDMATMULTEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_SMATDMATMULTEXPR_H_
101 template<
typename MT1
103 class SMatDMatMultExpr :
public DenseMatrix< SMatDMatMultExpr<MT1,MT2>, false >
104 ,
private MatMatMultExpr
105 ,
private Computation
122 template<
typename T1,
typename T2,
typename T3 >
123 struct UseVectorizedKernel {
124 enum { value = T1::vectorizable && T3::vectorizable &&
141 template<
typename T1,
typename T2,
typename T3 >
142 struct UseOptimizedKernel {
143 enum { value = !UseVectorizedKernel<T1,T2,T3>::value &&
155 template<
typename T1,
typename T2,
typename T3 >
156 struct UseDefaultKernel {
157 enum { value = !UseVectorizedKernel<T1,T2,T3>::value &&
158 !UseOptimizedKernel<T1,T2,T3>::value };
189 enum { vectorizable = 0 };
222 if(
lhs_.columns() == 0 )
230 const ConstIterator end( A.end(i) );
231 ConstIterator element( A.begin(i) );
238 tmp = element->value() *
rhs_(element->index(),j);
240 for( ; element!=end; ++element )
241 tmp += element->value() *
rhs_(element->index(),j);
247 for(
size_t k=1; k<
lhs_.columns(); ++k ) {
272 return rhs_.columns();
302 template<
typename T >
304 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
314 template<
typename T >
316 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
338 template<
typename MT
357 SMatDMatMultExpr::selectAssignKernel( ~lhs, A, B );
376 template<
typename MT3
384 for(
size_t i=0UL; i<A.rows(); ++i )
386 const ConstIterator end( A.end(i) );
388 for(
size_t j=0UL; j<B.columns(); ++j )
390 ConstIterator element( A.begin(i) );
392 if( element != end ) {
393 (~C)(i,j) = element->value() * B(element->index(),j);
395 for( ; element!=end; ++element ) {
396 (~C)(i,j) += element->value() * B(element->index(),j);
422 template<
typename MT3
425 static inline typename EnableIf< UseOptimizedKernel<MT3,MT4,MT5> >::Type
426 selectAssignKernel( DenseMatrix<MT3,false>& C,
const MT4& A,
const MT5& B )
430 const size_t jend( B.columns() & size_t(-4) );
435 for(
size_t i=0UL; i<A.rows(); ++i )
437 const ConstIterator end( A.end(i) );
438 ConstIterator element( A.begin(i) );
440 const size_t kend( A.nonZeros(i) & size_t(-4) );
442 for(
size_t k=0UL; k<kend; k+=4UL ) {
443 const size_t i1( element->index() );
444 const ET1 v1( element->value() );
446 const size_t i2( element->index() );
447 const ET1 v2( element->value() );
449 const size_t i3( element->index() );
450 const ET1 v3( element->value() );
452 const size_t i4( element->index() );
453 const ET1 v4( element->value() );
456 for(
size_t j=0UL; j<jend; j+=4UL ) {
457 (~C)(i,j ) += v1 * B(i1,j ) + v2 * B(i2,j ) + v3 * B(i3,j ) + v4 * B(i4,j );
458 (~C)(i,j+1UL) += v1 * B(i1,j+1UL) + v2 * B(i2,j+1UL) + v3 * B(i3,j+1UL) + v4 * B(i4,j+1UL);
459 (~C)(i,j+2UL) += v1 * B(i1,j+2UL) + v2 * B(i2,j+2UL) + v3 * B(i3,j+2UL) + v4 * B(i4,j+2UL);
460 (~C)(i,j+3UL) += v1 * B(i1,j+3UL) + v2 * B(i2,j+3UL) + v3 * B(i3,j+3UL) + v4 * B(i4,j+3UL);
462 for(
size_t j=jend; j<B.columns(); ++j ) {
463 (~C)(i,j) += v1 * B(i1,j) + v2 * B(i2,j) + v3 * B(i3,j) + v4 * B(i4,j);
467 for( ; element!=end; ++element ) {
468 for(
size_t j=0UL; j<jend; j+=4UL ) {
469 (~C)(i,j ) += element->value() * B(element->index(),j );
470 (~C)(i,j+1UL) += element->value() * B(element->index(),j+1UL);
471 (~C)(i,j+2UL) += element->value() * B(element->index(),j+2UL);
472 (~C)(i,j+3UL) += element->value() * B(element->index(),j+3UL);
474 for(
size_t j=jend; j<B.columns(); ++j ) {
475 (~C)(i,j) += element->value() * B(element->index(),j);
497 template<
typename MT3
500 static inline typename EnableIf< UseVectorizedKernel<MT3,MT4,MT5> >::Type
501 selectAssignKernel( DenseMatrix<MT3,false>& C,
const MT4& A,
const MT5& B )
503 typedef IntrinsicTrait<ElementType> IT;
506 const size_t N( B.columns() );
510 for(
size_t i=0UL; i<A.rows(); ++i )
512 const ConstIterator end( A.end(i) );
513 ConstIterator element( A.begin(i) );
515 const size_t kend( A.nonZeros(i) & size_t(-4) );
517 for(
size_t k=0UL; k<kend; k+=4UL ) {
518 const size_t i1( element->index() );
521 const size_t i2( element->index() );
524 const size_t i3( element->index() );
527 const size_t i4( element->index() );
531 for(
size_t j=0UL; j<N; j+=IT::size ) {
532 (~C).
store( i, j, (~C).load(i,j) + v1 * B.load(i1,j) + v2 * B.load(i2,j) + v3 * B.load(i3,j) + v4 * B.load(i4,j) );
536 for( ; element!=end; ++element ) {
537 const size_t i1( element->index() );
540 for(
size_t j=0UL; j<N; j+=IT::size ) {
541 (~C).
store( i, j, (~C).load(i,j) + v1 * B.load(i1,j) );
563 template<
typename MT3
567 selectAssignKernel( DenseMatrix<MT3,true>& C,
const MT4& A,
const MT5& B )
571 const size_t jend( B.columns() & size_t(-4) );
574 for(
size_t j=0UL; j<jend; j+=4UL ) {
575 for(
size_t i=0UL; i<A.rows(); ++i )
577 ConstIterator element( A.begin(i) );
578 const ConstIterator end( A.end(i) );
580 if( element == end ) {
582 reset( (~C)(i,j+1UL) );
583 reset( (~C)(i,j+2UL) );
584 reset( (~C)(i,j+3UL) );
588 (~C)(i,j ) = element->value() * B(element->index(),j );
589 (~C)(i,j+1UL) = element->value() * B(element->index(),j+1UL);
590 (~C)(i,j+2UL) = element->value() * B(element->index(),j+2UL);
591 (~C)(i,j+3UL) = element->value() * B(element->index(),j+3UL);
593 for( ; element!=end; ++element ) {
594 (~C)(i,j ) += element->value() * B(element->index(),j );
595 (~C)(i,j+1UL) += element->value() * B(element->index(),j+1UL);
596 (~C)(i,j+2UL) += element->value() * B(element->index(),j+2UL);
597 (~C)(i,j+3UL) += element->value() * B(element->index(),j+3UL);
602 for(
size_t j=jend; j<B.columns(); ++j ) {
603 for(
size_t i=0UL; i<A.rows(); ++i )
605 ConstIterator element( A.begin(i) );
606 const ConstIterator end( A.end(i) );
608 if( element == end ) {
613 (~C)(i,j) = element->value() * B(element->index(),j);
615 for( ; element!=end; ++element )
616 (~C)(i,j) += element->value() * B(element->index(),j);
635 template<
typename MT
641 typedef typename SelectType< SO, OppositeType, ResultType >::Type TmpType;
653 const TmpType tmp( rhs );
671 template<
typename MT
690 SMatDMatMultExpr::selectAddAssignKernel( ~lhs, A, B );
709 template<
typename MT3
712 static inline typename EnableIf< UseDefaultKernel<MT3,MT4,MT5> >::Type
713 selectAddAssignKernel( DenseMatrix<MT3,false>& C,
const MT4& A,
const MT5& B )
717 for(
size_t i=0UL; i<A.rows(); ++i )
719 const ConstIterator end( A.end(i) );
721 for(
size_t j=0UL; j<B.columns(); ++j )
723 ConstIterator element( A.begin(i) );
725 for( ; element!=end; ++element ) {
726 (~C)(i,j) += element->value() * B(element->index(),j);
748 template<
typename MT3
751 static inline typename EnableIf< UseOptimizedKernel<MT3,MT4,MT5> >::Type
752 selectAddAssignKernel( DenseMatrix<MT3,false>& C,
const MT4& A,
const MT5& B )
756 const size_t jend( B.columns() & size_t(-4) );
759 for(
size_t i=0UL; i<A.rows(); ++i )
761 const ConstIterator end( A.end(i) );
762 ConstIterator element( A.begin(i) );
764 const size_t kend( A.nonZeros(i) & size_t(-4) );
766 for(
size_t k=0UL; k<kend; k+=4UL ) {
767 const size_t i1( element->index() );
768 const ET1 v1( element->value() );
770 const size_t i2( element->index() );
771 const ET1 v2( element->value() );
773 const size_t i3( element->index() );
774 const ET1 v3( element->value() );
776 const size_t i4( element->index() );
777 const ET1 v4( element->value() );
780 for(
size_t j=0UL; j<jend; j+=4UL ) {
781 (~C)(i,j ) += v1 * B(i1,j ) + v2 * B(i2,j ) + v3 * B(i3,j ) + v4 * B(i4,j );
782 (~C)(i,j+1UL) += v1 * B(i1,j+1UL) + v2 * B(i2,j+1UL) + v3 * B(i3,j+1UL) + v4 * B(i4,j+1UL);
783 (~C)(i,j+2UL) += v1 * B(i1,j+2UL) + v2 * B(i2,j+2UL) + v3 * B(i3,j+2UL) + v4 * B(i4,j+2UL);
784 (~C)(i,j+3UL) += v1 * B(i1,j+3UL) + v2 * B(i2,j+3UL) + v3 * B(i3,j+3UL) + v4 * B(i4,j+3UL);
786 for(
size_t j=jend; j<B.columns(); ++j ) {
787 (~C)(i,j) += v1 * B(i1,j) + v2 * B(i2,j) + v3 * B(i3,j) + v4 * B(i4,j);
791 for( ; element!=end; ++element ) {
792 for(
size_t j=0UL; j<jend; j+=4UL ) {
793 (~C)(i,j ) += element->value() * B(element->index(),j );
794 (~C)(i,j+1UL) += element->value() * B(element->index(),j+1UL);
795 (~C)(i,j+2UL) += element->value() * B(element->index(),j+2UL);
796 (~C)(i,j+3UL) += element->value() * B(element->index(),j+3UL);
798 for(
size_t j=jend; j<B.columns(); ++j ) {
799 (~C)(i,j) += element->value() * B(element->index(),j);
821 template<
typename MT3
824 static inline typename EnableIf< UseVectorizedKernel<MT3,MT4,MT5> >::Type
825 selectAddAssignKernel( DenseMatrix<MT3,false>& C,
const MT4& A,
const MT5& B )
827 typedef IntrinsicTrait<ElementType> IT;
830 const size_t N( B.columns() );
832 for(
size_t i=0UL; i<A.rows(); ++i )
834 const ConstIterator end( A.end(i) );
835 ConstIterator element( A.begin(i) );
837 const size_t kend( A.nonZeros(i) & size_t(-4) );
839 for(
size_t k=0UL; k<kend; k+=4UL ) {
840 const size_t i1( element->index() );
843 const size_t i2( element->index() );
846 const size_t i3( element->index() );
849 const size_t i4( element->index() );
853 for(
size_t j=0UL; j<N; j+=IT::size ) {
854 (~C).
store( i, j, (~C).load(i,j) + v1 * B.load(i1,j) + v2 * B.load(i2,j) + v3 * B.load(i3,j) + v4 * B.load(i4,j) );
858 for( ; element!=end; ++element ) {
859 const size_t i1( element->index() );
862 for(
size_t j=0UL; j<N; j+=IT::size ) {
863 (~C).
store( i, j, (~C).load(i,j) + v1 * B.load(i1,j) );
885 template<
typename MT3
889 selectAddAssignKernel( DenseMatrix<MT3,true>& C,
const MT4& A,
const MT5& B )
893 const size_t jend( B.columns() & size_t(-4) );
896 for(
size_t j=0UL; j<jend; j+=4UL ) {
897 for(
size_t i=0UL; i<A.rows(); ++i )
899 ConstIterator element( A.begin(i) );
900 const ConstIterator end( A.end(i) );
902 for( ; element!=end; ++element ) {
903 (~C)(i,j ) += element->value() * B(element->index(),j );
904 (~C)(i,j+1UL) += element->value() * B(element->index(),j+1UL);
905 (~C)(i,j+2UL) += element->value() * B(element->index(),j+2UL);
906 (~C)(i,j+3UL) += element->value() * B(element->index(),j+3UL);
911 for(
size_t j=jend; j<B.columns(); ++j ) {
912 for(
size_t i=0UL; i<A.rows(); ++i )
914 ConstIterator element( A.begin(i) );
915 const ConstIterator end( A.end(i) );
917 for( ; element!=end; ++element )
918 (~C)(i,j) += element->value() * B(element->index(),j);
941 template<
typename MT
960 SMatDMatMultExpr::selectSubAssignKernel( ~lhs, A, B );
979 template<
typename MT3
982 static inline typename EnableIf< UseDefaultKernel<MT3,MT4,MT5> >::Type
983 selectSubAssignKernel( DenseMatrix<MT3,false>& C,
const MT4& A,
const MT5& B )
987 for(
size_t i=0UL; i<A.rows(); ++i )
989 const ConstIterator end( A.end(i) );
991 for(
size_t j=0UL; j<B.columns(); ++j )
993 ConstIterator element( A.begin(i) );
995 for( ; element!=end; ++element ) {
996 (~C)(i,j) -= element->value() * B(element->index(),j);
1018 template<
typename MT3
1021 static inline typename EnableIf< UseOptimizedKernel<MT3,MT4,MT5> >::Type
1022 selectSubAssignKernel( DenseMatrix<MT3,false>& C,
const MT4& A,
const MT5& B )
1026 const size_t jend( B.columns() & size_t(-4) );
1027 BLAZE_INTERNAL_ASSERT( ( B.columns() - ( B.columns() % 4UL ) ) == jend,
"Invalid end calculation" );
1029 for(
size_t i=0UL; i<A.rows(); ++i )
1031 const ConstIterator end( A.end(i) );
1032 ConstIterator element( A.begin(i) );
1034 const size_t kend( A.nonZeros(i) & size_t(-4) );
1036 for(
size_t k=0UL; k<kend; k+=4UL ) {
1037 const size_t i1( element->index() );
1038 const ET1 v1( element->value() );
1040 const size_t i2( element->index() );
1041 const ET1 v2( element->value() );
1043 const size_t i3( element->index() );
1044 const ET1 v3( element->value() );
1046 const size_t i4( element->index() );
1047 const ET1 v4( element->value() );
1050 for(
size_t j=0UL; j<jend; j+=4UL ) {
1051 (~C)(i,j ) -= v1 * B(i1,j ) + v2 * B(i2,j ) + v3 * B(i3,j ) + v4 * B(i4,j );
1052 (~C)(i,j+1UL) -= v1 * B(i1,j+1UL) + v2 * B(i2,j+1UL) + v3 * B(i3,j+1UL) + v4 * B(i4,j+1UL);
1053 (~C)(i,j+2UL) -= v1 * B(i1,j+2UL) + v2 * B(i2,j+2UL) + v3 * B(i3,j+2UL) + v4 * B(i4,j+2UL);
1054 (~C)(i,j+3UL) -= v1 * B(i1,j+3UL) + v2 * B(i2,j+3UL) + v3 * B(i3,j+3UL) + v4 * B(i4,j+3UL);
1056 for(
size_t j=jend; j<B.columns(); ++j ) {
1057 (~C)(i,j) -= v1 * B(i1,j) + v2 * B(i2,j) + v3 * B(i3,j) + v4 * B(i4,j);
1061 for( ; element!=end; ++element ) {
1062 for(
size_t j=0UL; j<jend; j+=4UL ) {
1063 (~C)(i,j ) -= element->value() * B(element->index(),j );
1064 (~C)(i,j+1UL) -= element->value() * B(element->index(),j+1UL);
1065 (~C)(i,j+2UL) -= element->value() * B(element->index(),j+2UL);
1066 (~C)(i,j+3UL) -= element->value() * B(element->index(),j+3UL);
1068 for(
size_t j=jend; j<B.columns(); ++j ) {
1069 (~C)(i,j) -= element->value() * B(element->index(),j);
1091 template<
typename MT3
1094 static inline typename EnableIf< UseVectorizedKernel<MT3,MT4,MT5> >::Type
1095 selectSubAssignKernel( DenseMatrix<MT3,false>& C,
const MT4& A,
const MT5& B )
1097 typedef IntrinsicTrait<ElementType> IT;
1100 const size_t N( B.columns() );
1102 for(
size_t i=0UL; i<A.rows(); ++i )
1104 const ConstIterator end( A.end(i) );
1105 ConstIterator element( A.begin(i) );
1107 const size_t kend( A.nonZeros(i) & size_t(-4) );
1109 for(
size_t k=0UL; k<kend; k+=4UL ) {
1110 const size_t i1( element->index() );
1113 const size_t i2( element->index() );
1116 const size_t i3( element->index() );
1119 const size_t i4( element->index() );
1123 for(
size_t j=0UL; j<N; j+=IT::size ) {
1124 (~C).
store( i, j, (~C).load(i,j) - v1 * B.load(i1,j) - v2 * B.load(i2,j) - v3 * B.load(i3,j) - v4 * B.load(i4,j) );
1128 for( ; element!=end; ++element ) {
1129 const size_t i1( element->index() );
1132 for(
size_t j=0UL; j<N; j+=IT::size ) {
1133 (~C).
store( i, j, (~C).load(i,j) - v1 * B.load(i1,j) );
1155 template<
typename MT3
1159 selectSubAssignKernel( DenseMatrix<MT3,true>& C,
const MT4& A,
const MT5& B )
1163 const size_t jend( B.columns() & size_t(-4) );
1164 BLAZE_INTERNAL_ASSERT( ( B.columns() - ( B.columns() % 4UL ) ) == jend,
"Invalid end calculation" );
1166 for(
size_t j=0UL; j<jend; j+=4UL ) {
1167 for(
size_t i=0UL; i<A.rows(); ++i )
1169 ConstIterator element( A.begin(i) );
1170 const ConstIterator end( A.end(i) );
1172 for( ; element!=end; ++element ) {
1173 (~C)(i,j ) -= element->value() * B(element->index(),j );
1174 (~C)(i,j+1UL) -= element->value() * B(element->index(),j+1UL);
1175 (~C)(i,j+2UL) -= element->value() * B(element->index(),j+2UL);
1176 (~C)(i,j+3UL) -= element->value() * B(element->index(),j+3UL);
1181 for(
size_t j=jend; j<B.columns(); ++j ) {
1182 for(
size_t i=0UL; i<A.rows(); ++i )
1184 ConstIterator element( A.begin(i) );
1185 const ConstIterator end( A.end(i) );
1187 for( ; element!=end; ++element )
1188 (~C)(i,j) -= element->value() * B(element->index(),j);
1256 template<
typename T1
1258 inline const SMatDMatMultExpr<T1,T2>
1264 throw std::invalid_argument(
"Matrix sizes do not match" );
1281 template<
typename MT1,
typename MT2,
typename VT >
1282 struct DMatDVecMultExprTrait< SMatDMatMultExpr<MT1,MT2>, VT >
1286 typedef typename SelectType< IsSparseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
1287 IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
1288 IsDenseVector<VT>::value && IsColumnVector<VT>::value
1289 ,
typename SMatDVecMultExprTrait< MT1, typename DMatDVecMultExprTrait<MT2,VT>::Type >::Type
1290 , INVALID_TYPE >::Type Type;
1299 template<
typename MT1,
typename MT2,
typename VT >
1300 struct DMatSVecMultExprTrait< SMatDMatMultExpr<MT1,MT2>, VT >
1304 typedef typename SelectType< IsSparseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
1305 IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
1306 IsSparseVector<VT>::value && IsColumnVector<VT>::value
1307 ,
typename SMatDVecMultExprTrait< MT1, typename DMatSVecMultExprTrait<MT2,VT>::Type >::Type
1308 , INVALID_TYPE >::Type Type;
1317 template<
typename VT,
typename MT1,
typename MT2 >
1318 struct TDVecDMatMultExprTrait< VT, SMatDMatMultExpr<MT1,MT2> >
1322 typedef typename SelectType< IsDenseVector<VT>::value && IsRowVector<VT>::value &&
1323 IsSparseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
1324 IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value
1325 ,
typename TDVecDMatMultExprTrait< typename TDVecSMatMultExprTrait<VT,MT1>::Type, MT2 >::Type
1326 , INVALID_TYPE >::Type Type;
1335 template<
typename VT,
typename MT1,
typename MT2 >
1336 struct TSVecDMatMultExprTrait< VT, SMatDMatMultExpr<MT1,MT2> >
1340 typedef typename SelectType< IsSparseVector<VT>::value && IsRowVector<VT>::value &&
1341 IsSparseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
1342 IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value
1343 ,
typename TSVecDMatMultExprTrait< typename TSVecSMatMultExprTrait<VT,MT1>::Type, MT2 >::Type
1344 , INVALID_TYPE >::Type Type;
1353 template<
typename MT1,
typename MT2 >
1354 struct SubmatrixExprTrait< SMatDMatMultExpr<MT1,MT2> >
1358 typedef typename MultExprTrait< typename SubmatrixExprTrait<const MT1>::Type
1359 ,
typename SubmatrixExprTrait<const MT2>::Type >::Type Type;
1368 template<
typename MT1,
typename MT2 >
1369 struct RowExprTrait< SMatDMatMultExpr<MT1,MT2> >
1373 typedef typename MultExprTrait< typename RowExprTrait<const MT1>::Type, MT2 >::Type Type;
1382 template<
typename MT1,
typename MT2 >
1383 struct ColumnExprTrait< SMatDMatMultExpr<MT1,MT2> >
1387 typedef typename MultExprTrait< MT1, typename ColumnExprTrait<const MT2>::Type >::Type Type;
SelectType< IsExpression< MT1 >::value, const MT1, const MT1 & >::Type LeftOperand
Composite type of the left-hand side sparse matrix expression.
Definition: SMatDMatMultExpr.h:175
Header file for the SMatDVecMultExprTrait class template.
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
LeftOperand leftOperand() const
Returns the left-hand side sparse matrix operand.
Definition: SMatDMatMultExpr.h:281
Header file for the IsSparseMatrix type trait.
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 IsSame and IsStrictlySame type traits.
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 TDVecSMatMultExprTrait class template.
Header file for the Computation base class.
Header file for the MatMatMultExpr base class.
Expression object for sparse matrix-dense matrix multiplications.The SMatDMatMultExpr class represent...
Definition: Forward.h:87
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< IsComputation< MT2 >::value, const RT2, CT2 >::Type RT
Type for the assignment of the right-hand side dense matrix operand.
Definition: SMatDMatMultExpr.h:184
Header file for the TSVecSMatMultExprTrait class template.
const ElementType ReturnType
Return type for expression template evaluations.
Definition: SMatDMatMultExpr.h:171
SelectType< IsExpression< MT2 >::value, const MT2, const MT2 & >::Type RightOperand
Composite type of the right-hand side dense matrix expression.
Definition: SMatDMatMultExpr.h:178
const ResultType CompositeType
Data type for composite expression templates.
Definition: SMatDMatMultExpr.h:172
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
Constraint on the data type.
Constraint on the data type.
Header file for the MultExprTrait class template.
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: SMatDMatMultExpr.h:315
Compile time check to query the requirement to evaluate an expression.Via this type trait it is possi...
Definition: RequiresEvaluation.h:90
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 multiplication trait.
Compile time check for row-major matrix types.This type trait tests whether or not the given template...
Definition: IsRowMajorMatrix.h:104
#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
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2379
Header file for the DenseMatrix base class.
MT2::ResultType RT2
Result type of the right-hand side dense matrix expression.
Definition: SMatDMatMultExpr.h:110
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
Header file for the DMatDVecMultExprTrait class template.
RightOperand rightOperand() const
Returns the right-hand side dense matrix operand.
Definition: SMatDMatMultExpr.h:291
#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
Constraints on the storage order of matrix types.
MultTrait< RT1, RT2 >::Type ResultType
Result type for expression template evaluations.
Definition: SMatDMatMultExpr.h:166
RightOperand rhs_
Right-hand side dense matrix of the multiplication expression.
Definition: SMatDMatMultExpr.h:323
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2373
MT1::ElementType ET1
Element type of the left-hand side sparse matrix expression.
Definition: SMatDMatMultExpr.h:111
Header file for the SelectType class template.
Header file for the RowExprTrait class template.
Header file for all forward declarations for expression class templates.
IntrinsicTrait< ElementType >::Type IntrinsicType
Resulting intrinsic element type.
Definition: SMatDMatMultExpr.h:170
Header file for the IsDenseMatrix type trait.
Header file for the EnableIf class template.
ResultType::ElementType ElementType
Resulting element type.
Definition: SMatDMatMultExpr.h:169
Compile time check for resizable data types.This type trait tests whether the given data type is a re...
Definition: IsResizable.h:75
ResultType::OppositeType OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: SMatDMatMultExpr.h:167
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
LeftOperand lhs_
Left-hand side sparse matrix of the multiplication expression.
Definition: SMatDMatMultExpr.h:322
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
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: SMatDMatMultExpr.h:303
Header file for run time assertion macros.
Utility type for generic codes.
Base template for the MultTrait class.
Definition: MultTrait.h:141
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
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:184
Header file for the reset shim.
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
size_t rows() const
Returns the current number of rows of the matrix.
Definition: SMatDMatMultExpr.h:261
MT1::ResultType RT1
Result type of the left-hand side sparse matrix expression.
Definition: SMatDMatMultExpr.h:109
Header file for the RemoveReference type trait.
MT2::CompositeType CT2
Composite type of the right-hand side dense matrix expression.
Definition: SMatDMatMultExpr.h:114
SMatDMatMultExpr< MT1, MT2 > This
Type of this SMatDMatMultExpr instance.
Definition: SMatDMatMultExpr.h:165
#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.
SelectType< IsComputation< MT1 >::value, const RT1, CT1 >::Type LT
Type for the assignment of the left-hand side sparse matrix operand.
Definition: SMatDMatMultExpr.h:181
Header file for the IsRowMajorMatrix type trait.
Header file for the IsComputation type trait class.
SMatDMatMultExpr(const MT1 &lhs, const MT2 &rhs)
Constructor for the SMatDMatMultExpr class.
Definition: SMatDMatMultExpr.h:198
Header file for the TDVecDMatMultExprTrait 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
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2370
MT1::CompositeType CT1
Composite type of the left-hand side sparse matrix expression.
Definition: SMatDMatMultExpr.h:113
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.
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: SMatDMatMultExpr.h:213
Header file for the TSVecDMatMultExprTrait class template.
ResultType::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: SMatDMatMultExpr.h:168
MT2::ElementType ET2
Element type of the right-hand side dense matrix expression.
Definition: SMatDMatMultExpr.h:112
Header file for the DMatSVecMultExprTrait class template.
Header file for the IsColumnVector type trait.
size_t columns() const
Returns the current number of columns of the matrix.
Definition: SMatDMatMultExpr.h:271
Header file for the IsResizable type trait.
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
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 FunctionTrace class.