35 #ifndef _BLAZE_MATH_EXPRESSIONS_TDMATSVECMULTEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_TDMATSVECMULTEXPR_H_
100 template<
typename MT
102 class TDMatSVecMultExpr :
public DenseVector< TDMatSVecMultExpr<MT,VT>, false >
103 ,
private MatVecMultExpr
104 ,
private Computation
133 template<
typename T1 >
134 struct UseSMPAssign {
135 enum { value = ( evaluateMatrix || evaluateVector ) };
146 template<
typename T1,
typename T2,
typename T3 >
147 struct UseVectorizedKernel {
149 T1::vectorizable && T2::vectorizable &&
164 template<
typename T1,
typename T2,
typename T3 >
165 struct UseOptimizedKernel {
166 enum { value = !UseVectorizedKernel<T1,T2,T3>::value &&
179 template<
typename T1,
typename T2,
typename T3 >
180 struct UseDefaultKernel {
181 enum { value = !UseVectorizedKernel<T1,T2,T3>::value &&
182 !UseOptimizedKernel<T1,T2,T3>::value };
219 enum { smpAssignable = !evaluateMatrix && MT::smpAssignable &&
220 !evaluateVector && VT::smpAssignable };
261 if( element != end ) {
262 res =
mat_( index, element->index() ) * element->value();
264 for( ; element!=x.end(); ++element ) {
265 res +=
mat_( index, element->index() ) * element->value();
309 template<
typename T >
311 return mat_.isAliased( alias ) ||
vec_.isAliased( alias );
321 template<
typename T >
323 return mat_.isAliased( alias ) ||
vec_.isAliased( alias );
333 return mat_.isAligned();
366 template<
typename VT1 >
374 RT x(
serial( rhs.vec_ ) );
375 if( x.nonZeros() == 0UL ) {
381 LT A(
serial( rhs.mat_ ) );
390 TDMatSVecMultExpr::selectAssignKernel( ~lhs, A, x );
409 template<
typename VT1
413 selectAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
419 const size_t M( A.rows() );
421 ConstIterator element( x.begin() );
422 const ConstIterator
end( x.end() );
428 for(
size_t i=0UL; i<iend; ++i )
432 for( ; element!=
end; ++element )
434 const size_t index( element->index() );
436 if( IsDiagonal<MT1>::value )
438 for(
size_t i=last; i<index; ++i )
441 y[index] = A(index,index) * element->value();
446 const size_t ibegin( ( IsLower<MT1>::value )
447 ?( IsStrictlyLower<MT1>::value ? index+1UL : index )
449 const size_t iend( ( IsUpper<MT1>::value )
450 ?( IsStrictlyUpper<MT1>::value ? index : index+1UL )
454 for(
size_t i=ibegin; i<last; ++i ) {
455 y[i] += A(i,index) * element->value();
457 for(
size_t i=last; i<iend; ++i ) {
458 y[i] = A(i,index) * element->value();
465 if( IsUpper<MT1>::value ) {
466 for(
size_t i=last; i<M; ++i )
487 template<
typename VT1
490 static inline typename EnableIf< UseOptimizedKernel<VT1,MT1,VT2> >::Type
491 selectAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
497 const size_t M( A.rows() );
499 ConstIterator element( x.begin() );
500 const ConstIterator
end( x.end() );
502 const size_t jpos( x.nonZeros() & size_t(-4) );
503 BLAZE_INTERNAL_ASSERT( ( x.nonZeros() - ( x.nonZeros() % 4UL ) ) == jpos,
"Invalid end calculation" );
507 const size_t j1( element->index() );
508 const VET v1( element->value() );
510 const size_t j2( element->index() );
511 const VET v2( element->value() );
513 const size_t j3( element->index() );
514 const VET v3( element->value() );
516 const size_t j4( element->index() );
517 const VET v4( element->value() );
522 for(
size_t i=0UL; i<M; ++i ) {
523 y[i] = A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
528 const size_t j1( element->index() );
529 const VET v1( element->value() );
532 for(
size_t i=0UL; i<M; ++i ) {
537 for(
size_t j=(jpos>3UL)?(4UL):(1UL); (j+4UL)<=jpos; j+=4UL )
539 const size_t j1( element->index() );
540 const VET v1( element->value() );
542 const size_t j2( element->index() );
543 const VET v2( element->value() );
545 const size_t j3( element->index() );
546 const VET v3( element->value() );
548 const size_t j4( element->index() );
549 const VET v4( element->value() );
554 const size_t ibegin( ( IsLower<MT1>::value )
555 ?( IsStrictlyLower<MT1>::value ? j1+1UL : j1 )
557 const size_t iend( ( IsUpper<MT1>::value )
558 ?( IsStrictlyUpper<MT1>::value ? j4 : j4+1UL )
562 for(
size_t i=ibegin; i<iend; ++i ) {
563 y[i] += A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
566 for( ; element!=
end; ++element )
568 const size_t j1( element->index() );
569 const VET v1( element->value() );
571 const size_t ibegin( ( IsLower<MT1>::value )
572 ?( IsStrictlyLower<MT1>::value ? j1+1UL : j1 )
574 const size_t iend( ( IsUpper<MT1>::value )
575 ?( IsStrictlyUpper<MT1>::value ? j1 : j1+1UL )
579 for(
size_t i=ibegin; i<iend; ++i ) {
580 y[i] += A(i,j1) * v1;
601 template<
typename VT1
604 static inline typename EnableIf< UseVectorizedKernel<VT1,MT1,VT2> >::Type
605 selectAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
607 typedef IntrinsicTrait<ElementType> IT;
612 const size_t M( A.rows() );
614 ConstIterator element( x.begin() );
615 const ConstIterator
end( x.end() );
617 const size_t jpos( x.nonZeros() & size_t(-4) );
618 BLAZE_INTERNAL_ASSERT( ( x.nonZeros() - ( x.nonZeros() % 4UL ) ) == jpos,
"Invalid end calculation" );
622 const size_t j1( element->index() );
623 const IntrinsicType v1(
set( element->value() ) );
625 const size_t j2( element->index() );
626 const IntrinsicType v2(
set( element->value() ) );
628 const size_t j3( element->index() );
629 const IntrinsicType v3(
set( element->value() ) );
631 const size_t j4( element->index() );
632 const IntrinsicType v4(
set( element->value() ) );
637 for(
size_t i=0UL; i<M; i+=
IT::size ) {
638 y.store( i, A.load(i,j1) * v1 + A.load(i,j2) * v2 + A.load(i,j3) * v3 + A.load(i,j4) * v4 );
643 const size_t j1( element->index() );
644 const IntrinsicType v1(
set( element->value() ) );
647 for(
size_t i=0UL; i<M; i+=
IT::size ) {
648 y.store( i, A.load(i,j1) * v1 );
652 for(
size_t j=(jpos>3UL)?(4UL):(1UL); (j+4UL)<=jpos; j+=4UL )
654 const size_t j1( element->index() );
655 const IntrinsicType v1(
set( element->value() ) );
657 const size_t j2( element->index() );
658 const IntrinsicType v2(
set( element->value() ) );
660 const size_t j3( element->index() );
661 const IntrinsicType v3(
set( element->value() ) );
663 const size_t j4( element->index() );
664 const IntrinsicType v4(
set( element->value() ) );
669 const size_t ibegin( ( IsLower<MT1>::value )
670 ?( ( IsStrictlyLower<MT1>::value ? j1+1UL : j1 ) &
size_t(-
IT::size) )
672 const size_t iend( ( IsUpper<MT1>::value )
673 ?( IsStrictlyUpper<MT1>::value ? j4 : j4+1UL )
677 for(
size_t i=ibegin; i<iend; i+=
IT::size ) {
678 y.store( i, y.load(i) + A.load(i,j1) * v1 + A.load(i,j2) * v2 + A.load(i,j3) * v3 + A.load(i,j4) * v4 );
681 for( ; element!=
end; ++element )
683 const size_t j1( element->index() );
684 const IntrinsicType v1(
set( element->value() ) );
686 const size_t ibegin( ( IsLower<MT1>::value )
687 ?( ( IsStrictlyLower<MT1>::value ? j1+1UL : j1 ) &
size_t(-
IT::size) )
689 const size_t iend( ( IsUpper<MT1>::value )
690 ?( IsStrictlyUpper<MT1>::value ? j1 : j1+1UL )
694 for(
size_t i=ibegin; i<iend; i+=
IT::size ) {
695 y.store( i, y.load(i) + A.load(i,j1) * v1 );
715 template<
typename VT1 >
726 const ResultType tmp(
serial( rhs ) );
745 template<
typename VT1 >
755 RT x(
serial( rhs.vec_ ) );
756 if( x.nonZeros() == 0UL )
return;
759 LT A(
serial( rhs.mat_ ) );
768 TDMatSVecMultExpr::selectAddAssignKernel( ~lhs, A, x );
787 template<
typename VT1
790 static inline typename EnableIf< UseDefaultKernel<VT1,MT1,VT2> >::Type
791 selectAddAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
797 const size_t M( A.rows() );
799 ConstIterator element( x.begin() );
800 const ConstIterator
end( x.end() );
802 for( ; element!=
end; ++element )
804 const size_t index( element->index() );
806 if( IsDiagonal<MT1>::value )
808 y[index] += A(index,index) * element->value();
812 const size_t ibegin( ( IsLower<MT1>::value )
813 ?( IsStrictlyLower<MT1>::value ? index+1UL : index )
815 const size_t iend( ( IsUpper<MT1>::value )
816 ?( IsStrictlyUpper<MT1>::value ? index : index+1UL )
820 for(
size_t i=ibegin; i<iend; ++i ) {
821 y[i] += A(i,index) * element->value();
843 template<
typename VT1
846 static inline typename EnableIf< UseOptimizedKernel<VT1,MT1,VT2> >::Type
847 selectAddAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
853 const size_t M( A.rows() );
855 ConstIterator element( x.begin() );
856 const ConstIterator
end( x.end() );
858 const size_t jpos( x.nonZeros() & size_t(-4) );
859 BLAZE_INTERNAL_ASSERT( ( x.nonZeros() - ( x.nonZeros() % 4UL ) ) == jpos,
"Invalid end calculation" );
861 for(
size_t j=0UL; (j+4UL)<=jpos; j+=4UL )
863 const size_t j1( element->index() );
864 const VET v1( element->value() );
866 const size_t j2( element->index() );
867 const VET v2( element->value() );
869 const size_t j3( element->index() );
870 const VET v3( element->value() );
872 const size_t j4( element->index() );
873 const VET v4( element->value() );
878 const size_t ibegin( ( IsLower<MT1>::value )
879 ?( IsStrictlyLower<MT1>::value ? j1+1UL : j1 )
881 const size_t iend( ( IsUpper<MT1>::value )
882 ?( IsStrictlyUpper<MT1>::value ? j4 : j4+1UL )
886 for(
size_t i=ibegin; i<iend; ++i ) {
887 y[i] += A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
890 for( ; element!=
end; ++element )
892 const size_t j1( element->index() );
893 const VET v1( element->value() );
895 const size_t ibegin( ( IsLower<MT1>::value )
896 ?( IsStrictlyLower<MT1>::value ? j1+1UL : j1 )
898 const size_t iend( ( IsUpper<MT1>::value )
899 ?( IsStrictlyUpper<MT1>::value ? j1 : j1+1UL )
903 for(
size_t i=ibegin; i<iend; ++i ) {
904 y[i] += A(i,j1) * v1;
925 template<
typename VT1
928 static inline typename EnableIf< UseVectorizedKernel<VT1,MT1,VT2> >::Type
929 selectAddAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
931 typedef IntrinsicTrait<ElementType> IT;
936 const size_t M( A.rows() );
938 ConstIterator element( x.begin() );
939 const ConstIterator
end( x.end() );
941 const size_t jpos( x.nonZeros() & size_t(-4) );
942 BLAZE_INTERNAL_ASSERT( ( x.nonZeros() - ( x.nonZeros() % 4UL ) ) == jpos,
"Invalid end calculation" );
944 for(
size_t j=0UL; (j+4UL)<=jpos; j+=4UL )
946 const size_t j1( element->index() );
947 const IntrinsicType v1(
set( element->value() ) );
949 const size_t j2( element->index() );
950 const IntrinsicType v2(
set( element->value() ) );
952 const size_t j3( element->index() );
953 const IntrinsicType v3(
set( element->value() ) );
955 const size_t j4( element->index() );
956 const IntrinsicType v4(
set( element->value() ) );
961 const size_t ibegin( ( IsLower<MT1>::value )
962 ?( ( IsStrictlyLower<MT1>::value ? j1+1UL : j1 ) &
size_t(-
IT::size) )
964 const size_t iend( ( IsUpper<MT1>::value )
965 ?( IsStrictlyUpper<MT1>::value ? j4 : j4+1UL )
969 for(
size_t i=ibegin; i<iend; i+=
IT::size ) {
970 y.store( i, y.load(i) + A.load(i,j1) * v1 + A.load(i,j2) * v2 + A.load(i,j3) * v3 + A.load(i,j4) * v4 );
973 for( ; element!=
end; ++element )
975 const size_t j1( element->index() );
976 const IntrinsicType v1(
set( element->value() ) );
978 const size_t ibegin( ( IsLower<MT1>::value )
979 ?( ( IsStrictlyLower<MT1>::value ? j1+1UL : j1 ) &
size_t(-
IT::size) )
981 const size_t iend( ( IsUpper<MT1>::value )
982 ?( IsStrictlyUpper<MT1>::value ? j1 : j1+1UL )
986 for(
size_t i=ibegin; i<iend; i+=
IT::size ) {
987 y.store( i, y.load(i) + A.load(i,j1) * v1 );
1011 template<
typename VT1 >
1021 RT x(
serial( rhs.vec_ ) );
1022 if( x.nonZeros() == 0UL )
return;
1025 LT A(
serial( rhs.mat_ ) );
1034 TDMatSVecMultExpr::selectSubAssignKernel( ~lhs, A, x );
1053 template<
typename VT1
1056 static inline typename EnableIf< UseDefaultKernel<VT1,MT1,VT2> >::Type
1057 selectSubAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
1063 const size_t M( A.rows() );
1065 ConstIterator element( x.begin() );
1066 const ConstIterator
end( x.end() );
1068 for( ; element!=
end; ++element )
1070 const size_t index( element->index() );
1072 if( IsDiagonal<MT1>::value )
1074 y[index] -= A(index,index) * element->value();
1078 const size_t ibegin( ( IsLower<MT1>::value )
1079 ?( IsStrictlyLower<MT1>::value ? index+1UL : index )
1081 const size_t iend( ( IsUpper<MT1>::value )
1082 ?( IsStrictlyUpper<MT1>::value ? index : index+1UL )
1086 for(
size_t i=ibegin; i<iend; ++i ) {
1087 y[i] -= A(i,index) * element->value();
1109 template<
typename VT1
1112 static inline typename EnableIf< UseOptimizedKernel<VT1,MT1,VT2> >::Type
1113 selectSubAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
1119 const size_t M( A.rows() );
1121 ConstIterator element( x.begin() );
1122 const ConstIterator
end( x.end() );
1124 const size_t jpos( x.nonZeros() & size_t(-4) );
1125 BLAZE_INTERNAL_ASSERT( ( x.nonZeros() - ( x.nonZeros() % 4UL ) ) == jpos,
"Invalid end calculation" );
1127 for(
size_t j=0UL; (j+4UL)<=jpos; j+=4UL )
1129 const size_t j1( element->index() );
1130 const VET v1( element->value() );
1132 const size_t j2( element->index() );
1133 const VET v2( element->value() );
1135 const size_t j3( element->index() );
1136 const VET v3( element->value() );
1138 const size_t j4( element->index() );
1139 const VET v4( element->value() );
1144 const size_t ibegin( ( IsLower<MT1>::value )
1145 ?( IsStrictlyLower<MT1>::value ? j1+1UL : j1 )
1147 const size_t iend( ( IsUpper<MT1>::value )
1148 ?( IsStrictlyUpper<MT1>::value ? j4 : j4+1UL )
1152 for(
size_t i=ibegin; i<iend; ++i ) {
1153 y[i] -= A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
1156 for( ; element!=
end; ++element )
1158 const size_t j1( element->index() );
1159 const VET v1( element->value() );
1161 const size_t ibegin( ( IsLower<MT1>::value )
1162 ?( IsStrictlyLower<MT1>::value ? j1+1UL : j1 )
1164 const size_t iend( ( IsUpper<MT1>::value )
1165 ?( IsStrictlyUpper<MT1>::value ? j1 : j1+1UL )
1169 for(
size_t i=ibegin; i<iend; ++i ) {
1170 y[i] -= A(i,j1) * v1;
1191 template<
typename VT1
1194 static inline typename EnableIf< UseVectorizedKernel<VT1,MT1,VT2> >::Type
1195 selectSubAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
1197 typedef IntrinsicTrait<ElementType> IT;
1202 const size_t M( A.rows() );
1204 ConstIterator element( x.begin() );
1205 const ConstIterator
end( x.end() );
1207 const size_t jpos( x.nonZeros() & size_t(-4) );
1208 BLAZE_INTERNAL_ASSERT( ( x.nonZeros() - ( x.nonZeros() % 4UL ) ) == jpos,
"Invalid end calculation" );
1210 for(
size_t j=0UL; (j+4UL)<=jpos; j+=4UL )
1212 const size_t j1( element->index() );
1213 const IntrinsicType v1(
set( element->value() ) );
1215 const size_t j2( element->index() );
1216 const IntrinsicType v2(
set( element->value() ) );
1218 const size_t j3( element->index() );
1219 const IntrinsicType v3(
set( element->value() ) );
1221 const size_t j4( element->index() );
1222 const IntrinsicType v4(
set( element->value() ) );
1227 const size_t ibegin( ( IsLower<MT1>::value )
1228 ?( ( IsStrictlyLower<MT1>::value ? j1+1UL : j1 ) &
size_t(-
IT::size) )
1230 const size_t iend( ( IsUpper<MT1>::value )
1231 ?( IsStrictlyUpper<MT1>::value ? j4 : j4+1UL )
1235 for(
size_t i=ibegin; i<iend; i+=
IT::size ) {
1236 y.store( i, y.load(i) - A.load(i,j1) * v1 - A.load(i,j2) * v2 - A.load(i,j3) * v3 - A.load(i,j4) * v4 );
1239 for( ; element!=
end; ++element )
1241 const size_t j1( element->index() );
1242 const IntrinsicType v1(
set( element->value() ) );
1244 const size_t ibegin( ( IsLower<MT1>::value )
1245 ?( ( IsStrictlyLower<MT1>::value ? j1+1UL : j1 ) &
size_t(-
IT::size) )
1247 const size_t iend( ( IsUpper<MT1>::value )
1248 ?( IsStrictlyUpper<MT1>::value ? j1 : j1+1UL )
1252 for(
size_t i=ibegin; i<iend; i+=
IT::size ) {
1253 y.store( i, y.load(i) - A.load(i,j1) * v1 );
1277 template<
typename VT1 >
1288 const ResultType tmp(
serial( rhs ) );
1313 template<
typename VT1 >
1314 friend inline typename EnableIf< UseSMPAssign<VT1> >::Type
1323 if( x.nonZeros() == 0UL ) {
1358 template<
typename VT1 >
1359 friend inline typename EnableIf< UseSMPAssign<VT1> >::Type
1370 const ResultType tmp( rhs );
1391 template<
typename VT1 >
1392 friend inline typename EnableIf< UseSMPAssign<VT1> >::Type
1403 if( x.nonZeros() == 0UL )
return;
1439 template<
typename VT1 >
1440 friend inline typename EnableIf< UseSMPAssign<VT1> >::Type
1451 if( x.nonZeros() == 0UL )
return;
1487 template<
typename VT1 >
1488 friend inline typename EnableIf< UseSMPAssign<VT1> >::Type
1499 const ResultType tmp( rhs );
1562 template<
typename T1
1564 inline const typename DisableIf< IsMatMatMultExpr<T1>, TDMatSVecMultExpr<T1,T2> >::Type
1570 throw std::invalid_argument(
"Matrix and vector sizes do not match" );
1587 template<
typename MT,
typename VT >
1605 template<
typename MT,
typename VT,
bool AF >
1610 typedef typename MultExprTrait< typename SubmatrixExprTrait<const MT,AF>::Type
1611 ,
typename SubvectorExprTrait<const VT,AF>::Type >::Type Type;
Compile time check whether the given type is a computational expression template.This type trait clas...
Definition: IsComputation.h:89
RightOperand vec_
Right-hand side sparse vector of the multiplication expression.
Definition: TDMatSVecMultExpr.h:350
BLAZE_ALWAYS_INLINE void multAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the multiplication assignment of a matrix to a matrix.
Definition: Matrix.h:879
Header file for the Rows type trait.
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:8247
Header file for basic type definitions.
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector)
Returns the current size/dimension of the vector.
Definition: Vector.h:264
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:258
#define BLAZE_CONSTRAINT_MUST_BE_COLUMN_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a column dense or sparse vector type...
Definition: TransposeFlag.h:159
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:209
Header file for the IsDiagonal type trait.
#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 IsSame and IsStrictlySame type traits.
IntrinsicTrait< ElementType >::Type IntrinsicType
Resulting intrinsic element type.
Definition: TDMatSVecMultExpr.h:193
VT::CompositeType VCT
Composite type of the right-hand side sparse vector expression.
Definition: TDMatSVecMultExpr.h:113
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:821
const size_t SMP_TDMATSVECMULT_THRESHOLD
SMP column-major dense matrix/sparse vector multiplication threshold.This threshold specifies when a ...
Definition: Thresholds.h:437
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2507
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:261
Header file for the DenseVector base class.
Compile time check for lower triangular matrices.This type trait tests whether or not the given templ...
Definition: IsLower.h:90
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:699
Header file for the Computation 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
const ElementType ReturnType
Return type for expression template evaluations.
Definition: TDMatSVecMultExpr.h:194
Compile time check for upper triangular matrices.This type trait tests whether or not the given templ...
Definition: IsUpper.h:90
Header file for the RequiresEvaluation type trait.
SelectType< IsExpression< MT >::value, const MT, const MT & >::Type LeftOperand
Composite type of the left-hand side dense matrix expression.
Definition: TDMatSVecMultExpr.h:198
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:70
Constraint on the data type.
ResultType::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: TDMatSVecMultExpr.h:191
MT::ResultType MRT
Result type of the left-hand side dense matrix expression.
Definition: TDMatSVecMultExpr.h:108
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
SelectType< evaluateVector, const VRT, typename VT::CompositeType >::Type RT
Type for the assignment of the right-hand side dense matrix operand.
Definition: TDMatSVecMultExpr.h:207
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:263
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.
Header file for the multiplication trait.
Header file for the IsStrictlyUpper type trait.
VRT::ElementType VET
Element type of the right-hand side sparse vector expression.
Definition: TDMatSVecMultExpr.h:111
MultTrait< MRT, VRT >::Type ResultType
Result type for expression template evaluations.
Definition: TDMatSVecMultExpr.h:190
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
MT::CompositeType MCT
Composite type of the left-hand side dense matrix expression.
Definition: TDMatSVecMultExpr.h:112
#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
LeftOperand leftOperand() const
Returns the left-hand side transpose dense matrix operand.
Definition: TDMatSVecMultExpr.h:288
bool canSMPAssign() const
Returns whether the expression can be used in SMP assignments.
Definition: TDMatSVecMultExpr.h:342
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2511
ResultType::ElementType ElementType
Resulting element type.
Definition: TDMatSVecMultExpr.h:192
Header file for the IsMatMatMultExpr type trait class.
LeftOperand mat_
Left-hand side dense matrix of the multiplication expression.
Definition: TDMatSVecMultExpr.h:349
BLAZE_ALWAYS_INLINE 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:635
MRT::ElementType MET
Element type of the left-hand side dense matrix expression.
Definition: TDMatSVecMultExpr.h:110
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:70
Header file for the IsLower type trait.
#define BLAZE_CONSTRAINT_MUST_BE_SPARSE_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a sparse, N-dimensional vector type...
Definition: SparseVector.h:79
Compile time check for diagonal matrices.This type trait tests whether or not the given template para...
Definition: IsDiagonal.h:92
Constraint on the data type.
SelectType< evaluateMatrix, const MRT, MCT >::Type LT
Type for the assignment of the left-hand side dense matrix operand.
Definition: TDMatSVecMultExpr.h:204
#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
#define BLAZE_CONSTRAINT_MUST_FORM_VALID_MATVECMULTEXPR(T1, T2)
Constraint on the data type.In case the given data types T1 and T2 do not form a valid matrix/vector ...
Definition: MatVecMultExpr.h:166
Constraints on the storage order of matrix types.
Constraint on the data type.
SelectType< IsExpression< VT >::value, const VT, const VT & >::Type RightOperand
Composite type of the right-hand side dense vector expression.
Definition: TDMatSVecMultExpr.h:201
Compile time check for strictly upper triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyUpper.h:86
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2505
Header file for the SelectType class template.
Header file for all forward declarations for expression class templates.
Constraint on the data type.
VT::ResultType VRT
Result type of the right-hand side sparse vector expression.
Definition: TDMatSVecMultExpr.h:109
Header file for the EnableIf class template.
Header file for the IsStrictlyLower type trait.
Header file for the serial shim.
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: TDMatSVecMultExpr.h:310
Expression object for transpose dense matrix-sparse vector multiplications.The TDMatSVecMultExpr clas...
Definition: Forward.h:130
Compile time check for resizable data types.This type trait tests whether the given data type is a re...
Definition: IsResizable.h:75
EnableIf< IsDenseMatrix< MT1 > >::Type 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 SubmatrixExprTrait class template.
RightOperand rightOperand() const
Returns the right-hand side sparse vector operand.
Definition: TDMatSVecMultExpr.h:298
Removal of reference modifiers.The RemoveCV type trait removes any reference modifiers from the given...
Definition: RemoveReference.h:69
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: TDMatSVecMultExpr.h:322
Intrinsic characteristics of data types.The IntrinsicTrait class template provides the intrinsic char...
Definition: IntrinsicTrait.h:749
size_t size() const
Returns the current size/dimension of the vector.
Definition: TDMatSVecMultExpr.h:278
Header file for run time assertion macros.
EnableIf< IsDenseMatrix< MT1 > >::Type 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
Base template for the MultTrait class.
Definition: MultTrait.h:150
BLAZE_ALWAYS_INLINE 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:742
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:184
const ResultType CompositeType
Data type for composite expression templates.
Definition: TDMatSVecMultExpr.h:195
Header file for the reset shim.
Compile time check for data types.This type trait tests whether or not the given template parameter i...
Definition: IsBlasCompatible.h:99
Header file for the RemoveReference type trait.
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > >, sse_int16_t >::Type set(T value)
Sets all values in the vector to the given 2-byte integral value.
Definition: Set.h:73
Header file for all intrinsic functionality.
TDMatSVecMultExpr(const MT &mat, const VT &vec)
Constructor for the TDMatSVecMultExpr class.
Definition: TDMatSVecMultExpr.h:229
Compile time check for strictly lower triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyLower.h:86
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a dense, N-dimensional vector type...
Definition: DenseVector.h:79
Header file for the IsComputation type trait class.
TDMatSVecMultExpr< MT, VT > This
Type of this TDMatSVecMultExpr instance.
Definition: TDMatSVecMultExpr.h:189
EnableIf< IsDenseMatrix< MT1 > >::Type 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 sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:108
#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:2502
BLAZE_ALWAYS_INLINE size_t columns(const Matrix< MT, SO > &matrix)
Returns the current number of columns of the matrix.
Definition: Matrix.h:332
Header file for the SubvectorExprTrait class template.
Constraint on the data type.
Header file for the IsUpper type trait.
Header file for the MatVecMultExpr base class.
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: TDMatSVecMultExpr.h:243
Header file for the IsResizable type trait.
EnableIf< IsDenseVector< VT1 > >::Type smpMultAssign(Vector< VT1, TF1 > &lhs, const Vector< VT2, TF2 > &rhs)
Default implementation of the SMP multiplication assignment of a vector to a dense vector...
Definition: DenseVector.h:189
Header file for the Size type trait.
Header file for the thresholds for matrix/vector and matrix/matrix multiplications.
#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 IsExpression type trait class.
Header file for the FunctionTrace class.
BLAZE_ALWAYS_INLINE 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:849
bool isAligned() const
Returns whether the operands of the expression are properly aligned in memory.
Definition: TDMatSVecMultExpr.h:332