35 #ifndef _BLAZE_MATH_EXPRESSIONS_TSVECDMATMULTEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_TSVECDMATMULTEXPR_H_
101 template<
typename VT
103 class TSVecDMatMultExpr :
public DenseVector< TSVecDMatMultExpr<VT,MT>, true >
104 ,
private TVecMatMultExpr
105 ,
private Computation
134 template<
typename T1 >
135 struct UseSMPAssign {
136 enum { value = ( evaluateVector || evaluateMatrix ) };
147 template<
typename T1,
typename T2,
typename T3 >
148 struct UseVectorizedKernel {
149 enum { value = !IsDiagonal<T3>::value &&
150 T1::vectorizable && T3::vectorizable &&
151 IsSame<typename T1::ElementType,typename T2::ElementType>::value &&
152 IsSame<typename T1::ElementType,typename T3::ElementType>::value &&
153 IntrinsicTrait<typename T1::ElementType>::addition &&
154 IntrinsicTrait<typename T1::ElementType>::multiplication };
165 template<
typename T1,
typename T2,
typename T3 >
166 struct UseOptimizedKernel {
167 enum { value = !UseVectorizedKernel<T1,T2,T3>::value &&
168 !IsDiagonal<T3>::value &&
169 !IsResizable<typename T1::ElementType>::value &&
170 !IsResizable<VET>::value };
180 template<
typename T1,
typename T2,
typename T3 >
181 struct UseDefaultKernel {
182 enum { value = !UseVectorizedKernel<T1,T2,T3>::value &&
183 !UseOptimizedKernel<T1,T2,T3>::value };
220 enum { smpAssignable = !evaluateVector && VT::smpAssignable &&
221 !evaluateMatrix && MT::smpAssignable };
262 if( element != end ) {
263 res = element->value() *
mat_( element->index(), index );
265 for( ; element!=
end; ++element ) {
266 res += element->value() *
mat_( element->index(), index );
280 return mat_.columns();
310 template<
typename T >
312 return vec_.isAliased( alias ) ||
mat_.isAliased( alias );
322 template<
typename T >
324 return vec_.isAliased( alias ) ||
mat_.isAliased( alias );
334 return mat_.isAligned();
367 template<
typename VT2 >
375 LT x(
serial( rhs.vec_ ) );
376 if( x.nonZeros() == 0UL ) {
382 RT A(
serial( rhs.mat_ ) );
391 TSVecDMatMultExpr::selectAssignKernel( ~lhs, x, A );
410 template<
typename VT1
414 selectAssignKernel( VT1& y,
const VT2& x,
const MT1& A )
420 const size_t N( A.columns() );
422 ConstIterator element( x.begin() );
423 const ConstIterator
end( x.end() );
429 for(
size_t j=0UL; j<jend; ++j )
433 for( ; element!=
end; ++element )
435 const size_t index( element->index() );
437 if( IsDiagonal<MT1>::value )
441 for(
size_t j=last; j<index; ++j )
444 y[index] = element->value() * A(index,index);
449 const size_t jbegin( ( IsUpper<MT1>::value )
450 ?( IsStrictlyUpper<MT1>::value ? index+1UL : index )
452 const size_t jend( ( IsLower<MT1>::value )
453 ?( IsStrictlyLower<MT1>::value ? index : index+1UL )
457 for(
size_t j=jbegin; j<last; ++j ) {
458 y[j] += element->value() * A(index,j);
460 for(
size_t j=last; j<jend; ++j ) {
461 y[j] = element->value() * A(index,j);
468 if( IsLower<MT1>::value ) {
469 for(
size_t j=last; j<N; ++j )
490 template<
typename VT1
493 static inline typename EnableIf< UseOptimizedKernel<VT1,VT2,MT1> >::Type
494 selectAssignKernel( VT1& y,
const VT2& x,
const MT1& A )
500 const size_t N( A.columns() );
502 ConstIterator element( x.begin() );
503 const ConstIterator
end( x.end() );
505 const size_t ipos( x.nonZeros() & size_t(-4) );
506 BLAZE_INTERNAL_ASSERT( ( x.nonZeros() - ( x.nonZeros() % 4UL ) ) == ipos,
"Invalid end calculation" );
510 const size_t i1( element->index() );
511 const VET v1( element->value() );
513 const size_t i2( element->index() );
514 const VET v2( element->value() );
516 const size_t i3( element->index() );
517 const VET v3( element->value() );
519 const size_t i4( element->index() );
520 const VET v4( element->value() );
525 for(
size_t j=0UL; j<N; ++j ) {
526 y[j] = v1 * A(i1,j) + v2 * A(i2,j) + v3 * A(i3,j) + v4 * A(i4,j);
531 const size_t i1( element->index() );
532 const VET v1( element->value() );
535 for(
size_t j=0UL; j<N; ++j ) {
540 for(
size_t i=(ipos>3UL)?(4UL):(1UL); (i+4UL)<=ipos; i+=4UL )
542 const size_t i1( element->index() );
543 const VET v1( element->value() );
545 const size_t i2( element->index() );
546 const VET v2( element->value() );
548 const size_t i3( element->index() );
549 const VET v3( element->value() );
551 const size_t i4( element->index() );
552 const VET v4( element->value() );
557 const size_t jbegin( ( IsUpper<MT1>::value )
558 ?( IsStrictlyUpper<MT1>::value ? i1+1UL : i1 )
560 const size_t jend( ( IsLower<MT1>::value )
561 ?( IsStrictlyLower<MT1>::value ? i4 : i4+1UL )
565 for(
size_t j=jbegin; j<jend; ++j ) {
566 y[j] += v1 * A(i1,j) + v2 * A(i2,j) + v3 * A(i3,j) + v4 * A(i4,j);
569 for( ; element!=
end; ++element )
571 const size_t i1( element->index() );
572 const VET v1( element->value() );
574 const size_t jbegin( ( IsUpper<MT1>::value )
575 ?( IsStrictlyUpper<MT1>::value ? i1+1UL : i1 )
577 const size_t jend( ( IsLower<MT1>::value )
578 ?( IsStrictlyLower<MT1>::value ? i1 : i1+1UL )
582 for(
size_t j=jbegin; j<jend; ++j ) {
583 y[j] += v1 * A(i1,j);
604 template<
typename VT1
607 static inline typename EnableIf< UseVectorizedKernel<VT1,VT2,MT1> >::Type
608 selectAssignKernel( VT1& y,
const VT2& x,
const MT1& A )
610 typedef IntrinsicTrait<ElementType> IT;
615 const size_t N( A.columns() );
617 ConstIterator element( x.begin() );
618 const ConstIterator
end( x.end() );
620 const size_t ipos( x.nonZeros() & size_t(-4) );
621 BLAZE_INTERNAL_ASSERT( ( x.nonZeros() - ( x.nonZeros() % 4UL ) ) == ipos,
"Invalid end calculation" );
625 const size_t i1( element->index() );
626 const IntrinsicType v1(
set( element->value() ) );
628 const size_t i2( element->index() );
629 const IntrinsicType v2(
set( element->value() ) );
631 const size_t i3( element->index() );
632 const IntrinsicType v3(
set( element->value() ) );
634 const size_t i4( element->index() );
635 const IntrinsicType v4(
set( element->value() ) );
640 for(
size_t j=0UL; j<N; j+=
IT::size ) {
641 y.store( j, v1 * A.load(i1,j) + v2 * A.load(i2,j) + v3 * A.load(i3,j) + v4 * A.load(i4,j) );
646 const size_t i1( element->index() );
647 const IntrinsicType v1(
set( element->value() ) );
650 for(
size_t j=0UL; j<N; j+=
IT::size ) {
651 y.store( j, v1 * A.load(i1,j) );
655 for(
size_t i=(ipos>3UL)?(4UL):(1UL); (i+4UL)<=ipos; i+=4UL )
657 const size_t i1( element->index() );
658 const IntrinsicType v1(
set( element->value() ) );
660 const size_t i2( element->index() );
661 const IntrinsicType v2(
set( element->value() ) );
663 const size_t i3( element->index() );
664 const IntrinsicType v3(
set( element->value() ) );
666 const size_t i4( element->index() );
667 const IntrinsicType v4(
set( element->value() ) );
672 const size_t jbegin( ( IsUpper<MT1>::value )
673 ?( ( IsStrictlyUpper<MT1>::value ? i1+1UL : i1 ) &
size_t(-
IT::size) )
675 const size_t jend( ( IsLower<MT1>::value )
676 ?( IsStrictlyLower<MT1>::value ? i4 : i4+1UL )
680 for(
size_t j=jbegin; j<jend; j+=
IT::size ) {
681 y.store( j, y.load(j) + v1 * A.load(i1,j) + v2 * A.load(i2,j) + v3 * A.load(i3,j) + v4 * A.load(i4,j) );
684 for( ; element!=
end; ++element )
686 const size_t i1( element->index() );
687 const IntrinsicType v1(
set( element->value() ) );
689 const size_t jbegin( ( IsUpper<MT1>::value )
690 ?( ( IsStrictlyUpper<MT1>::value ? i1+1UL : i1 ) &
size_t(-
IT::size) )
692 const size_t jend( ( IsLower<MT1>::value )
693 ?( IsStrictlyLower<MT1>::value ? i1 : i1+1UL )
697 for(
size_t j=jbegin; j<jend; j+=
IT::size ) {
698 y.store( j, y.load(j) + v1 * A.load(i1,j) );
718 template<
typename VT2 >
729 const ResultType tmp(
serial( rhs ) );
747 template<
typename VT2 >
755 LT x(
serial( rhs.vec_ ) );
756 if( x.nonZeros() == 0UL )
return;
759 RT A(
serial( rhs.mat_ ) );
768 TSVecDMatMultExpr::selectAddAssignKernel( ~lhs, x, A );
786 template<
typename VT1
790 selectAddAssignKernel( VT1& y,
const VT2& x,
const MT1& A )
796 const size_t N( A.columns() );
798 ConstIterator element( x.begin() );
799 const ConstIterator
end( x.end() );
801 for( ; element!=
end; ++element )
803 const size_t index( element->index() );
807 y[index] += A(index,index) * element->value();
811 const size_t jbegin( ( IsUpper<MT1>::value )
812 ?( IsStrictlyUpper<MT1>::value ? index+1UL : index )
814 const size_t jend( ( IsLower<MT1>::value )
815 ?( IsStrictlyLower<MT1>::value ? index : index+1UL )
819 for(
size_t j=jbegin; j<jend; ++j ) {
820 y[j] += element->value() * A(index,j);
842 template<
typename VT1
845 static inline typename EnableIf< UseOptimizedKernel<VT1,VT2,MT1> >::Type
846 selectAddAssignKernel( VT1& y,
const VT2& x,
const MT1& A )
852 const size_t N( A.columns() );
854 ConstIterator element( x.begin() );
855 const ConstIterator
end( x.end() );
857 const size_t ipos( x.nonZeros() & size_t(-4) );
858 BLAZE_INTERNAL_ASSERT( ( x.nonZeros() - ( x.nonZeros() % 4UL ) ) == ipos,
"Invalid end calculation" );
860 for(
size_t i=0UL; (i+4UL)<=ipos; i+=4UL )
862 const size_t i1( element->index() );
863 const VET v1( element->value() );
865 const size_t i2( element->index() );
866 const VET v2( element->value() );
868 const size_t i3( element->index() );
869 const VET v3( element->value() );
871 const size_t i4( element->index() );
872 const VET v4( element->value() );
877 const size_t jbegin( ( IsUpper<MT1>::value )
878 ?( IsStrictlyUpper<MT1>::value ? i+1UL : i1 )
880 const size_t jend( ( IsLower<MT1>::value )
881 ?( IsStrictlyLower<MT1>::value ? i4 : i4+1UL )
885 for(
size_t j=jbegin; j<jend; ++j ) {
886 y[j] += v1 * A(i1,j) + v2 * A(i2,j) + v3 * A(i3,j) + v4 * A(i4,j);
889 for( ; element!=
end; ++element )
891 const size_t i1( element->index() );
892 const VET v1( element->value() );
894 const size_t jbegin( ( IsUpper<MT1>::value )
895 ?( IsStrictlyUpper<MT1>::value ? i1+1UL : i1 )
897 const size_t jend( ( IsLower<MT1>::value )
898 ?( IsStrictlyLower<MT1>::value ? i1 : i1+1UL )
902 for(
size_t j=jbegin; j<jend; ++j ) {
903 y[j] += v1 * A(i1,j);
924 template<
typename VT1
927 static inline typename EnableIf< UseVectorizedKernel<VT1,VT2,MT1> >::Type
928 selectAddAssignKernel( VT1& y,
const VT2& x,
const MT1& A )
930 typedef IntrinsicTrait<ElementType> IT;
935 const size_t N( A.columns() );
937 ConstIterator element( x.begin() );
938 const ConstIterator
end( x.end() );
940 const size_t ipos( x.nonZeros() & size_t(-4) );
941 BLAZE_INTERNAL_ASSERT( ( x.nonZeros() - ( x.nonZeros() % 4UL ) ) == ipos,
"Invalid end calculation" );
943 for(
size_t i=0UL; (i+4UL)<=ipos; i+=4UL )
945 const size_t i1( element->index() );
946 const IntrinsicType v1(
set( element->value() ) );
948 const size_t i2( element->index() );
949 const IntrinsicType v2(
set( element->value() ) );
951 const size_t i3( element->index() );
952 const IntrinsicType v3(
set( element->value() ) );
954 const size_t i4( element->index() );
955 const IntrinsicType v4(
set( element->value() ) );
960 const size_t jbegin( ( IsUpper<MT1>::value )
961 ?( ( IsStrictlyUpper<MT1>::value ? i1+1UL : i1 ) &
size_t(-
IT::size) )
963 const size_t jend( ( IsLower<MT1>::value )
964 ?( IsStrictlyLower<MT1>::value ? i4 : i4+1UL )
968 for(
size_t j=jbegin; j<jend; j+=
IT::size ) {
969 y.store( j, y.load(j) + v1 * A.load(i1,j) + v2 * A.load(i2,j) + v3 * A.load(i3,j) + v4 * A.load(i4,j) );
972 for( ; element!=
end; ++element )
974 const size_t i1( element->index() );
975 const IntrinsicType v1(
set( element->value() ) );
977 const size_t jbegin( ( IsUpper<MT1>::value )
978 ?( ( IsStrictlyUpper<MT1>::value ? i1+1UL : i1 ) &
size_t(-
IT::size) )
980 const size_t jend( ( IsLower<MT1>::value )
981 ?( IsStrictlyLower<MT1>::value ? i1 : i1+1UL )
985 for(
size_t j=jbegin; j<jend; j+=
IT::size ) {
986 y.store( j, y.load(j) + v1 * A.load(i1,j) );
1009 template<
typename VT2 >
1019 LT x(
serial( rhs.vec_ ) );
1020 if( x.nonZeros() == 0UL )
return;
1023 RT A(
serial( rhs.mat_ ) );
1032 TSVecDMatMultExpr::selectSubAssignKernel( ~lhs, x, A );
1050 template<
typename VT1
1054 selectSubAssignKernel( VT1& y,
const VT2& x,
const MT1& A )
1060 const size_t N( A.columns() );
1062 ConstIterator element( x.begin() );
1063 const ConstIterator
end( x.end() );
1065 for( ; element!=
end; ++element )
1067 const size_t index( element->index() );
1071 y[index] -= A(index,index) * element->value();
1075 const size_t jbegin( ( IsUpper<MT1>::value )
1076 ?( IsStrictlyUpper<MT1>::value ? index+1UL : index )
1078 const size_t jend( ( IsLower<MT1>::value )
1079 ?( IsStrictlyLower<MT1>::value ? index : index+1UL )
1083 for(
size_t j=jbegin; j<jend; ++j ) {
1084 y[j] -= element->value() * A(index,j);
1106 template<
typename VT1
1109 static inline typename EnableIf< UseOptimizedKernel<VT1,VT2,MT1> >::Type
1110 selectSubAssignKernel( VT1& y,
const VT2& x,
const MT1& A )
1116 const size_t N( A.columns() );
1118 ConstIterator element( x.begin() );
1119 const ConstIterator
end( x.end() );
1121 const size_t ipos( x.nonZeros() & size_t(-4) );
1122 BLAZE_INTERNAL_ASSERT( ( x.nonZeros() - ( x.nonZeros() % 4UL ) ) == ipos,
"Invalid end calculation" );
1124 for(
size_t i=0UL; (i+4UL)<=ipos; i+=4UL )
1126 const size_t i1( element->index() );
1127 const VET v1( element->value() );
1129 const size_t i2( element->index() );
1130 const VET v2( element->value() );
1132 const size_t i3( element->index() );
1133 const VET v3( element->value() );
1135 const size_t i4( element->index() );
1136 const VET v4( element->value() );
1141 const size_t jbegin( ( IsUpper<MT1>::value )
1142 ?( IsStrictlyUpper<MT1>::value ? i+1UL : i1 )
1144 const size_t jend( ( IsLower<MT1>::value )
1145 ?( IsStrictlyLower<MT1>::value ? i4 : i4+1UL )
1149 for(
size_t j=jbegin; j<jend; ++j ) {
1150 y[j] -= v1 * A(i1,j) + v2 * A(i2,j) + v3 * A(i3,j) + v4 * A(i4,j);
1153 for( ; element!=
end; ++element )
1155 const size_t i1( element->index() );
1156 const VET v1( element->value() );
1158 const size_t jbegin( ( IsUpper<MT1>::value )
1159 ?( IsStrictlyUpper<MT1>::value ? i1+1UL : i1 )
1161 const size_t jend( ( IsLower<MT1>::value )
1162 ?( IsStrictlyLower<MT1>::value ? i1 : i1+1UL )
1166 for(
size_t j=jbegin; j<jend; ++j ) {
1167 y[j] -= v1 * A(i1,j);
1188 template<
typename VT1
1191 static inline typename EnableIf< UseVectorizedKernel<VT1,VT2,MT1> >::Type
1192 selectSubAssignKernel( VT1& y,
const VT2& x,
const MT1& A )
1194 typedef IntrinsicTrait<ElementType> IT;
1199 const size_t N( A.columns() );
1201 ConstIterator element( x.begin() );
1202 const ConstIterator
end( x.end() );
1204 const size_t ipos( x.nonZeros() & size_t(-4) );
1205 BLAZE_INTERNAL_ASSERT( ( x.nonZeros() - ( x.nonZeros() % 4UL ) ) == ipos,
"Invalid end calculation" );
1207 for(
size_t i=0UL; (i+4UL)<=ipos; i+=4UL )
1209 const size_t i1( element->index() );
1210 const IntrinsicType v1(
set( element->value() ) );
1212 const size_t i2( element->index() );
1213 const IntrinsicType v2(
set( element->value() ) );
1215 const size_t i3( element->index() );
1216 const IntrinsicType v3(
set( element->value() ) );
1218 const size_t i4( element->index() );
1219 const IntrinsicType v4(
set( element->value() ) );
1224 const size_t jbegin( ( IsUpper<MT1>::value )
1225 ?( ( IsStrictlyUpper<MT1>::value ? i1+1UL : i1 ) &
size_t(-
IT::size) )
1227 const size_t jend( ( IsLower<MT1>::value )
1228 ?( IsStrictlyLower<MT1>::value ? i4 : i4+1UL )
1232 for(
size_t j=jbegin; j<jend; j+=
IT::size ) {
1233 y.store( j, y.load(j) - v1 * A.load(i1,j) - v2 * A.load(i2,j) - v3 * A.load(i3,j) - v4 * A.load(i4,j) );
1236 for( ; element!=x.end(); ++element )
1238 const size_t i1( element->index() );
1239 const IntrinsicType v1(
set( element->value() ) );
1241 const size_t jbegin( ( IsUpper<MT1>::value )
1242 ?( ( IsStrictlyUpper<MT1>::value ? i1+1UL : i1 ) &
size_t(-
IT::size) )
1244 const size_t jend( ( IsLower<MT1>::value )
1245 ?( IsStrictlyLower<MT1>::value ? i1 : i1+1UL )
1249 for(
size_t j=jbegin; j<jend; j+=
IT::size ) {
1250 y.store( j, y.load(j) - v1 * A.load(i1,j) );
1273 template<
typename VT2 >
1284 const ResultType tmp(
serial( rhs ) );
1308 template<
typename VT2 >
1318 if( x.nonZeros() == 0UL ) {
1353 template<
typename VT2 >
1354 friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
1365 const ResultType tmp( rhs );
1385 template<
typename VT2 >
1386 friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
1395 if( x.nonZeros() == 0UL )
return;
1429 template<
typename VT2 >
1441 if( x.nonZeros() == 0UL )
return;
1475 template<
typename VT2 >
1487 const ResultType tmp( rhs );
1548 template<
typename T1,
typename T2 >
1549 inline const typename DisableIf< IsMatMatMultExpr<T2>, TSVecDMatMultExpr<T1,T2> >::Type
1554 if( (~vec).
size() != (~mat).
rows() )
1555 throw std::invalid_argument(
"Vector and matrix sizes do not match" );
1583 template<
typename T1
1586 inline const typename EnableIf< IsMatMatMultExpr<T2>,
typename MultExprTrait<T1,T2>::Type >::Type
1608 template<
typename MT,
typename VT >
1610 :
public Columns<MT>
1626 template<
typename VT,
typename MT,
bool AF >
1631 typedef typename MultExprTrait< typename SubvectorExprTrait<const VT,AF>::Type
1632 ,
typename SubmatrixExprTrait<const MT,AF>::Type >::Type Type;
IntrinsicTrait< ElementType >::Type IntrinsicType
Resulting intrinsic element type.
Definition: TSVecDMatMultExpr.h:194
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: TSVecDMatMultExpr.h:323
Compile time check whether the given type is a computational expression template.This type trait clas...
Definition: IsComputation.h:89
friend void multAssign(DenseVector< VT2, true > &lhs, const TSVecDMatMultExpr &rhs)
Multiplication assignment of a transpose sparse vector-dense matrix multiplication to a dense vector ...
Definition: TSVecDMatMultExpr.h:1274
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.
TSVecDMatMultExpr< VT, MT > This
Type of this TSVecDMatMultExpr instance.
Definition: TSVecDMatMultExpr.h:190
Expression object for transpose sparse vector-dense matrix multiplications.The TSVecDMatMultExpr clas...
Definition: Forward.h:147
SelectType< IsExpression< VT >::value, const VT, const VT & >::Type LeftOperand
Composite type of the left-hand side sparse vector expression.
Definition: TSVecDMatMultExpr.h:199
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector)
Returns the current size/dimension of the vector.
Definition: Vector.h:264
SelectType< IsExpression< MT >::value, const MT, const MT & >::Type RightOperand
Composite type of the right-hand side sparse matrix expression.
Definition: TSVecDMatMultExpr.h:202
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
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.
LeftOperand vec_
Left-hand side sparse vector of the multiplication expression.
Definition: TSVecDMatMultExpr.h:350
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:821
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
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix)
Returns the current number of rows of the matrix.
Definition: Matrix.h:316
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
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.
MRT::ElementType MET
Element type of the right-hand side dense matrix expression.
Definition: TSVecDMatMultExpr.h:112
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:70
VRT::ElementType VET
Element type of the left-hand side sparse vector expression.
Definition: TSVecDMatMultExpr.h:111
Constraint on the data type.
bool isAligned() const
Returns whether the operands of the expression are properly aligned in memory.
Definition: TSVecDMatMultExpr.h:333
bool canSMPAssign() const
Returns whether the expression can be used in SMP assignments.
Definition: TSVecDMatMultExpr.h:343
ResultType::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: TSVecDMatMultExpr.h:192
Constraint on the data type.
Header file for the MultExprTrait class template.
RightOperand mat_
Right-hand side dense matrix of the multiplication expression.
Definition: TSVecDMatMultExpr.h:351
Compile time check to query the requirement to evaluate an expression.Via this type trait it is possi...
Definition: RequiresEvaluation.h:90
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:263
VT::CompositeType VCT
Composite type of the left-hand side sparse vector expression.
Definition: TSVecDMatMultExpr.h:113
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.
friend void addAssign(DenseVector< VT2, true > &lhs, const TSVecDMatMultExpr &rhs)
Addition assignment of a transpose sparse vector-dense matrix multiplication to a dense vector ( )...
Definition: TSVecDMatMultExpr.h:748
Header file for the multiplication trait.
Header file for the IsStrictlyUpper type trait.
MT::CompositeType MCT
Composite type of the right-hand side dense matrix expression.
Definition: TSVecDMatMultExpr.h:114
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2511
Header file for the IsMatMatMultExpr type trait class.
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
Header file for the Columns type trait.
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
SelectType< evaluateVector, const VRT, VCT >::Type LT
Type for the assignment of the left-hand side sparse vector operand.
Definition: TSVecDMatMultExpr.h:205
Constraint on the data type.
#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
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: TSVecDMatMultExpr.h:311
Constraints on the storage order of matrix types.
Constraint on the data type.
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.
TSVecDMatMultExpr(const VT &vec, const MT &mat)
Constructor for the TSVecDMatMultExpr class.
Definition: TSVecDMatMultExpr.h:230
Header file for the EnableIf class template.
Header file for the IsStrictlyLower type trait.
Header file for the serial shim.
SelectType< evaluateMatrix, const MRT, MCT >::Type RT
Type for the assignment of the right-hand side dense matrix operand.
Definition: TSVecDMatMultExpr.h:208
friend EnableIf< UseSMPAssign< VT2 > >::Type smpMultAssign(DenseVector< VT2, true > &lhs, const TSVecDMatMultExpr &rhs)
SMP multiplication assignment of a transpose sparse vector-dense matrix multiplication to a dense vec...
Definition: TSVecDMatMultExpr.h:1477
#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:116
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
ResultType::ElementType ElementType
Resulting element type.
Definition: TSVecDMatMultExpr.h:193
Intrinsic characteristics of data types.The IntrinsicTrait class template provides the intrinsic char...
Definition: IntrinsicTrait.h:749
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
const ElementType ReturnType
Return type for expression template evaluations.
Definition: TSVecDMatMultExpr.h:195
Base template for the MultTrait class.
Definition: MultTrait.h:150
friend EnableIf< UseSMPAssign< VT2 > >::Type smpAddAssign(DenseVector< VT2, true > &lhs, const TSVecDMatMultExpr &rhs)
SMP addition assignment of a transpose sparse vector-dense matrix multiplication to a dense vector ( ...
Definition: TSVecDMatMultExpr.h:1387
LeftOperand leftOperand() const
Returns the left-hand side sparse vector operand.
Definition: TSVecDMatMultExpr.h:289
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.
Constraint on the data type.
size_t size() const
Returns the current size/dimension of the vector.
Definition: TSVecDMatMultExpr.h:279
Compile time check for data types.This type trait tests whether or not the given template parameter i...
Definition: IsBlasCompatible.h:99
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: TSVecDMatMultExpr.h:244
Header file for the TVecMatMultExpr base class.
Constraint on the data type.
MultTrait< VRT, MRT >::Type ResultType
Result type for expression template evaluations.
Definition: TSVecDMatMultExpr.h:191
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.
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
#define BLAZE_CONSTRAINT_MUST_FORM_VALID_TVECMATMULTEXPR(T1, T2)
Constraint on the data type.In case the given data types T1 and T2 do not form a valid vector/matrix ...
Definition: TVecMatMultExpr.h:166
const size_t SMP_TSVECDMATMULT_THRESHOLD
SMP sparse vector/row-major dense matrix multiplication threshold.This threshold specifies when a spa...
Definition: Thresholds.h:460
Header file for the IsComputation type trait class.
friend EnableIf< UseSMPAssign< VT2 > >::Type smpSubAssign(DenseVector< VT2, true > &lhs, const TSVecDMatMultExpr &rhs)
SMP subtraction assignment of a transpose sparse vector-dense matrix multiplication to a dense vector...
Definition: TSVecDMatMultExpr.h:1431
RightOperand rightOperand() const
Returns the right-hand side dense matrix operand.
Definition: TSVecDMatMultExpr.h:299
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
#define BLAZE_CONSTRAINT_MUST_BE_ROW_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a row dense or sparse vector type (i...
Definition: TransposeFlag.h:81
Header file for the SubvectorExprTrait class template.
friend void subAssign(DenseVector< VT2, true > &lhs, const TSVecDMatMultExpr &rhs)
Subtraction assignment of a transpose sparse vector-dense matrix multiplication to a dense vector ( )...
Definition: TSVecDMatMultExpr.h:1010
Header file for the IsUpper type trait.
Header file for the IsResizable type trait.
const ResultType CompositeType
Data type for composite expression templates.
Definition: TSVecDMatMultExpr.h:196
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
VT::ResultType VRT
Result type of the left-hand side sparse vector expression.
Definition: TSVecDMatMultExpr.h:109
MT::ResultType MRT
Result type of the right-hand side dense matrix expression.
Definition: TSVecDMatMultExpr.h:110
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.