35 #ifndef _BLAZE_MATH_EXPRESSIONS_TDMATSVECMULTEXPR_H_ 36 #define _BLAZE_MATH_EXPRESSIONS_TDMATSVECMULTEXPR_H_ 105 template<
typename MT
107 class TDMatSVecMultExpr
108 :
public MatVecMultExpr< DenseVector< TDMatSVecMultExpr<MT,VT>, false > >
109 ,
private Computation
137 template<
typename T1 >
138 struct UseSMPAssign {
139 enum :
bool { value = ( evaluateMatrix || evaluateVector ) };
150 template<
typename T1,
typename T2,
typename T3 >
151 struct UseVectorizedKernel {
152 enum :
bool { value = useOptimizedKernels &&
154 T1::simdEnabled && T2::simdEnabled &&
170 template<
typename T1,
typename T2,
typename T3 >
171 struct UseOptimizedKernel {
172 enum :
bool { value = !UseVectorizedKernel<T1,T2,T3>::value &&
185 template<
typename T1,
typename T2,
typename T3 >
186 struct UseDefaultKernel {
187 enum :
bool { value = !UseVectorizedKernel<T1,T2,T3>::value &&
188 !UseOptimizedKernel<T1,T2,T3>::value };
224 enum :
bool { smpAssignable = !evaluateMatrix && MT::smpAssignable &&
225 !evaluateVector && VT::smpAssignable };
258 return mat_(index,index) *
vec_[index];
268 const size_t n (
mat_.columns() -
begin );
286 if( index >=
mat_.rows() ) {
289 return (*
this)[index];
298 inline size_t size() const noexcept {
329 template<
typename T >
330 inline bool canAlias(
const T* alias )
const noexcept {
331 return mat_.isAliased( alias ) ||
vec_.isAliased( alias );
341 template<
typename T >
342 inline bool isAliased(
const T* alias )
const noexcept {
343 return mat_.isAliased( alias ) ||
vec_.isAliased( alias );
353 return mat_.isAligned();
363 return (
size() > SMP_TDMATSVECMULT_THRESHOLD );
386 template<
typename VT1 >
395 if( x.nonZeros() == 0UL ) {
410 TDMatSVecMultExpr::selectAssignKernel( ~lhs, A, x );
429 template<
typename VT1
433 selectAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
439 const size_t M( A.rows() );
448 for(
size_t i=0UL; i<iend; ++i )
452 for( ; element!=
end; ++element )
454 const size_t index( element->index() );
458 for(
size_t i=last; i<index; ++i )
461 y[index] = A(index,index) * element->value();
474 for(
size_t i=ibegin; i<last; ++i ) {
475 y[i] += A(i,index) * element->value();
477 for(
size_t i=last; i<iend; ++i ) {
478 y[i] = A(i,index) * element->value();
486 for(
size_t i=last; i<M; ++i )
507 template<
typename VT1
511 selectAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
517 const size_t M( A.rows() );
522 const size_t jpos( x.nonZeros() &
size_t(-4) );
523 BLAZE_INTERNAL_ASSERT( ( x.nonZeros() - ( x.nonZeros() % 4UL ) ) == jpos,
"Invalid end calculation" );
527 const size_t j1( element->index() );
528 const VET v1( element->value() );
530 const size_t j2( element->index() );
531 const VET v2( element->value() );
533 const size_t j3( element->index() );
534 const VET v3( element->value() );
536 const size_t j4( element->index() );
537 const VET v4( element->value() );
542 for(
size_t i=0UL; i<M; ++i ) {
543 y[i] = A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
548 const size_t j1( element->index() );
549 const VET v1( element->value() );
552 for(
size_t i=0UL; i<M; ++i ) {
557 for(
size_t j=(jpos>3UL)?(4UL):(1UL); (j+4UL)<=jpos; j+=4UL )
559 const size_t j1( element->index() );
560 const VET v1( element->value() );
562 const size_t j2( element->index() );
563 const VET v2( element->value() );
565 const size_t j3( element->index() );
566 const VET v3( element->value() );
568 const size_t j4( element->index() );
569 const VET v4( element->value() );
582 for(
size_t i=ibegin; i<iend; ++i ) {
583 y[i] += A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
586 for( ; element!=
end; ++element )
588 const size_t j1( element->index() );
589 const VET v1( element->value() );
599 for(
size_t i=ibegin; i<iend; ++i ) {
600 y[i] += A(i,j1) * v1;
621 template<
typename VT1
625 selectAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
633 const size_t M( A.rows() );
638 const size_t jpos( x.nonZeros() &
size_t(-4) );
639 BLAZE_INTERNAL_ASSERT( ( x.nonZeros() - ( x.nonZeros() % 4UL ) ) == jpos,
"Invalid end calculation" );
643 const size_t j1( element->index() );
644 const VET v1( element->value() );
646 const size_t j2( element->index() );
647 const VET v2( element->value() );
649 const size_t j3( element->index() );
650 const VET v3( element->value() );
652 const size_t j4( element->index() );
653 const VET v4( element->value() );
663 const size_t ipos( remainder ? ( M &
size_t(-SIMDSIZE) ) : M );
668 for( ; i<ipos; i+=SIMDSIZE ) {
669 y.store( i, A.load(i,j1) * xmm1 + A.load(i,j2) * xmm2 + A.load(i,j3) * xmm3 + A.load(i,j4) * xmm4 );
671 for( ; remainder && i<M; ++i ) {
672 y[i] = A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
677 const size_t j1( element->index() );
678 const VET v1( element->value() );
683 const size_t ipos( remainder ? ( M &
size_t(-SIMDSIZE) ) : M );
688 for( ; i<ipos; i+=SIMDSIZE ) {
689 y.store( i, A.load(i,j1) * xmm1 );
691 for( ; remainder && i<M; ++i ) {
696 for(
size_t j=(jpos>3UL)?(4UL):(1UL); (j+4UL)<=jpos; j+=4UL )
698 const size_t j1( element->index() );
699 const VET v1( element->value() );
701 const size_t j2( element->index() );
702 const VET v2( element->value() );
704 const size_t j3( element->index() );
705 const VET v3( element->value() );
707 const size_t j4( element->index() );
708 const VET v4( element->value() );
726 const size_t ipos( remainder ? ( iend &
size_t(-SIMDSIZE) ) : iend );
727 BLAZE_INTERNAL_ASSERT( !remainder || ( iend - ( iend % SIMDSIZE ) ) == ipos,
"Invalid end calculation" );
731 for( ; i<ipos; i+=SIMDSIZE ) {
732 y.store( i, y.load(i) + A.load(i,j1) * xmm1 + A.load(i,j2) * xmm2 + A.load(i,j3) * xmm3 + A.load(i,j4) * xmm4 );
734 for( ; remainder && i<iend; ++i ) {
735 y[i] += A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
739 for( ; element!=
end; ++element )
741 const size_t j1( element->index() );
742 const VET v1( element->value() );
754 const size_t ipos( remainder ? ( iend &
size_t(-SIMDSIZE) ) : iend );
755 BLAZE_INTERNAL_ASSERT( !remainder || ( iend - ( iend % SIMDSIZE ) ) == ipos,
"Invalid end calculation" );
759 for( ; i<ipos; i+=SIMDSIZE ) {
760 y.store( i, y.load(i) + A.load(i,j1) * xmm1 );
762 for( ; remainder && i<iend; ++i ) {
763 y[i] += A(i,j1) * v1;
783 template<
typename VT1 >
813 template<
typename VT1 >
822 if( x.nonZeros() == 0UL )
return;
834 TDMatSVecMultExpr::selectAddAssignKernel( ~lhs, A, x );
853 template<
typename VT1
857 selectAddAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
863 const size_t M( A.rows() );
868 for( ; element!=
end; ++element )
870 const size_t index( element->index() );
874 y[index] += A(index,index) * element->value();
886 for(
size_t i=ibegin; i<iend; ++i ) {
887 y[i] += A(i,index) * element->value();
909 template<
typename VT1
913 selectAddAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
919 const size_t M( A.rows() );
924 const size_t jpos( x.nonZeros() &
size_t(-4) );
925 BLAZE_INTERNAL_ASSERT( ( x.nonZeros() - ( x.nonZeros() % 4UL ) ) == jpos,
"Invalid end calculation" );
927 for(
size_t j=0UL; (j+4UL)<=jpos; j+=4UL )
929 const size_t j1( element->index() );
930 const VET v1( element->value() );
932 const size_t j2( element->index() );
933 const VET v2( element->value() );
935 const size_t j3( element->index() );
936 const VET v3( element->value() );
938 const size_t j4( element->index() );
939 const VET v4( element->value() );
952 for(
size_t i=ibegin; i<iend; ++i ) {
953 y[i] += A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
956 for( ; element!=
end; ++element )
958 const size_t j1( element->index() );
959 const VET v1( element->value() );
969 for(
size_t i=ibegin; i<iend; ++i ) {
970 y[i] += A(i,j1) * v1;
991 template<
typename VT1
995 selectAddAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
1003 const size_t M( A.rows() );
1008 const size_t jpos( x.nonZeros() &
size_t(-4) );
1009 BLAZE_INTERNAL_ASSERT( ( x.nonZeros() - ( x.nonZeros() % 4UL ) ) == jpos,
"Invalid end calculation" );
1011 for(
size_t j=0UL; (j+4UL)<=jpos; j+=4UL )
1013 const size_t j1( element->index() );
1014 const VET v1( element->value() );
1016 const size_t j2( element->index() );
1017 const VET v2( element->value() );
1019 const size_t j3( element->index() );
1020 const VET v3( element->value() );
1022 const size_t j4( element->index() );
1023 const VET v4( element->value() );
1041 const size_t ipos( remainder ? ( iend &
size_t(-SIMDSIZE) ) : iend );
1042 BLAZE_INTERNAL_ASSERT( !remainder || ( iend - ( iend % SIMDSIZE ) ) == ipos,
"Invalid end calculation" );
1046 for( ; i<ipos; i+=SIMDSIZE ) {
1047 y.store( i, y.load(i) + A.load(i,j1) * xmm1 + A.load(i,j2) * xmm2 + A.load(i,j3) * xmm3 + A.load(i,j4) * xmm4 );
1049 for( ; remainder && i<iend; ++i ) {
1050 y[i] += A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
1053 for( ; element!=
end; ++element )
1055 const size_t j1( element->index() );
1056 const VET v1( element->value() );
1068 const size_t ipos( remainder ? ( iend &
size_t(-SIMDSIZE) ) : iend );
1069 BLAZE_INTERNAL_ASSERT( !remainder || ( iend - ( iend % SIMDSIZE ) ) == ipos,
"Invalid end calculation" );
1073 for( ; i<ipos; i+=SIMDSIZE ) {
1074 y.store( i, y.load(i) + A.load(i,j1) * xmm1 );
1076 for( ; remainder && i<iend; ++i ) {
1077 y[i] += A(i,j1) * v1;
1101 template<
typename VT1 >
1110 if( x.nonZeros() == 0UL )
return;
1122 TDMatSVecMultExpr::selectSubAssignKernel( ~lhs, A, x );
1141 template<
typename VT1
1145 selectSubAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
1151 const size_t M( A.rows() );
1156 for( ; element!=
end; ++element )
1158 const size_t index( element->index() );
1162 y[index] -= A(index,index) * element->value();
1174 for(
size_t i=ibegin; i<iend; ++i ) {
1175 y[i] -= A(i,index) * element->value();
1197 template<
typename VT1
1201 selectSubAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
1207 const size_t M( A.rows() );
1212 const size_t jpos( x.nonZeros() &
size_t(-4) );
1213 BLAZE_INTERNAL_ASSERT( ( x.nonZeros() - ( x.nonZeros() % 4UL ) ) == jpos,
"Invalid end calculation" );
1215 for(
size_t j=0UL; (j+4UL)<=jpos; j+=4UL )
1217 const size_t j1( element->index() );
1218 const VET v1( element->value() );
1220 const size_t j2( element->index() );
1221 const VET v2( element->value() );
1223 const size_t j3( element->index() );
1224 const VET v3( element->value() );
1226 const size_t j4( element->index() );
1227 const VET v4( element->value() );
1240 for(
size_t i=ibegin; i<iend; ++i ) {
1241 y[i] -= A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
1244 for( ; element!=
end; ++element )
1246 const size_t j1( element->index() );
1247 const VET v1( element->value() );
1257 for(
size_t i=ibegin; i<iend; ++i ) {
1258 y[i] -= A(i,j1) * v1;
1279 template<
typename VT1
1283 selectSubAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
1291 const size_t M( A.rows() );
1296 const size_t jpos( x.nonZeros() &
size_t(-4) );
1297 BLAZE_INTERNAL_ASSERT( ( x.nonZeros() - ( x.nonZeros() % 4UL ) ) == jpos,
"Invalid end calculation" );
1299 for(
size_t j=0UL; (j+4UL)<=jpos; j+=4UL )
1301 const size_t j1( element->index() );
1302 const VET v1( element->value() );
1304 const size_t j2( element->index() );
1305 const VET v2( element->value() );
1307 const size_t j3( element->index() );
1308 const VET v3( element->value() );
1310 const size_t j4( element->index() );
1311 const VET v4( element->value() );
1329 const size_t ipos( remainder ? ( iend &
size_t(-SIMDSIZE) ) : iend );
1330 BLAZE_INTERNAL_ASSERT( !remainder || ( iend - ( iend % SIMDSIZE ) ) == ipos,
"Invalid end calculation" );
1334 for( ; i<ipos; i+=SIMDSIZE ) {
1335 y.store( i, y.load(i) - A.load(i,j1) * xmm1 - A.load(i,j2) * xmm2 - A.load(i,j3) * xmm3 - A.load(i,j4) * xmm4 );
1337 for( ; remainder && i<iend; ++i ) {
1338 y[i] -= A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
1341 for( ; element!=
end; ++element )
1343 const size_t j1( element->index() );
1344 const VET v1( element->value() );
1356 const size_t ipos( remainder ? ( iend &
size_t(-SIMDSIZE) ) : iend );
1357 BLAZE_INTERNAL_ASSERT( !remainder || ( iend - ( iend % SIMDSIZE ) ) == ipos,
"Invalid end calculation" );
1361 for( ; i<ipos; i+=SIMDSIZE ) {
1362 y.store( i, y.load(i) - A.load(i,j1) * xmm1 );
1364 for( ; remainder && i<iend; ++i ) {
1365 y[i] -= A(i,j1) * v1;
1389 template<
typename VT1 >
1401 multAssign( ~lhs, tmp );
1423 template<
typename VT1 >
1435 divAssign( ~lhs, tmp );
1459 template<
typename VT1 >
1469 if( x.nonZeros() == 0UL ) {
1504 template<
typename VT1 >
1537 template<
typename VT1 >
1547 if( x.nonZeros() == 0UL )
return;
1583 template<
typename VT1 >
1593 if( x.nonZeros() == 0UL )
return;
1629 template<
typename VT1 >
1666 template<
typename VT1 >
1741 template<
typename MT
1743 inline decltype(
auto)
1770 template<
typename MT,
typename VT >
1771 struct Size< TDMatSVecMultExpr<MT,VT> >
1788 template<
typename MT,
typename VT >
1789 struct IsAligned< TDMatSVecMultExpr<MT,VT> >
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.This macro encapsulates the default way o...
Definition: Exception.h:235
Header file for auxiliary alias declarations.
Compile time check whether the given type is a computational expression template.This type trait clas...
Definition: IsComputation.h:72
RightOperand vec_
Right-hand side sparse vector of the multiplication expression.
Definition: TDMatSVecMultExpr.h:370
Header file for the Rows type trait.
Header file for basic type definitions.
MultTrait_< MRT, VRT > ResultType
Result type for expression template evaluations.
Definition: TDMatSVecMultExpr.h:196
Subvector< VT, AF > subvector(Vector< VT, TF > &vector, size_t index, size_t size)
Creating a view on a specific subvector of the given vector.
Definition: Subvector.h:322
If_< IsExpression< VT >, const VT, const VT &> RightOperand
Composite type of the right-hand side dense vector expression.
Definition: TDMatSVecMultExpr.h:207
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: TDMatSVecMultExpr.h:352
#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: ColumnVector.h:61
EnableIf_< IsDenseMatrix< MT1 > > smpSubAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:164
Header file for the serial shim.
Header file for the IsDiagonal type trait.
const ResultType CompositeType
Data type for composite expression templates.
Definition: TDMatSVecMultExpr.h:201
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
ResultType_< MT > MRT
Result type of the left-hand side dense matrix expression.
Definition: TDMatSVecMultExpr.h:113
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a dense, N-dimensional matrix type...
Definition: DenseMatrix.h:61
Header file for the IsSame and IsStrictlySame type traits.
BLAZE_ALWAYS_INLINE MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:198
Availability of a SIMD multiplication for the given data types.Depending on the available instruction...
Definition: HasSIMDMult.h:172
typename SIMDTrait< T >::Type SIMDTrait_
Auxiliary alias declaration for the SIMDTrait class template.The SIMDTrait_ alias declaration provide...
Definition: SIMDTrait.h:316
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:560
EnableIf_< IsDenseVector< VT1 > > 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:193
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:88
Availability of a SIMD addition for the given data types.Depending on the available instruction set (...
Definition: HasSIMDAdd.h:171
typename MultTrait< T1, T2 >::Type MultTrait_
Auxiliary alias declaration for the MultTrait class template.The MultTrait_ alias declaration provide...
Definition: MultTrait.h:250
Header file for the Computation base class.
Compile time check for upper triangular matrices.This type trait tests whether or not the given templ...
Definition: IsUpper.h:88
Header file for the RequiresEvaluation type trait.
System settings for performance optimizations.
Compile time check for data types.This type trait tests whether or not the given types can be combine...
Definition: IsSIMDCombinable.h:120
typename T::ResultType ResultType_
Alias declaration for nested ResultType type definitions.The ResultType_ alias declaration provides a...
Definition: Aliases.h:343
EnableIf_< IsDenseMatrix< MT1 > > smpAddAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP addition assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:133
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:78
typename IfTrue< Condition, T1, T2 >::Type IfTrue_
Auxiliary alias declaration for the IfTrue class template.The IfTrue_ alias declaration provides a co...
Definition: If.h:109
Constraint on the transpose flag of vector types.
ReturnType at(size_t index) const
Checked access to the vector elements.
Definition: TDMatSVecMultExpr.h:285
Row< MT > row(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific row of the given matrix.
Definition: Row.h:124
Compile time check for the alignment of data types.This type trait tests whether the given data type ...
Definition: IsAligned.h:87
Constraint on the data type.
Compile time check to query the requirement to evaluate an expression.Via this type trait it is possi...
Definition: RequiresEvaluation.h:72
typename T::CompositeType CompositeType_
Alias declaration for nested CompositeType type definitions.The CompositeType_ alias declaration prov...
Definition: Aliases.h:83
Header file for the DisableIf class template.
Header file for the multiplication trait.
Header file for the IsStrictlyUpper type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
TransposeType_< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: TDMatSVecMultExpr.h:197
Header file for the If class template.
#define BLAZE_CONSTRAINT_MUST_BE_COLUMN_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a column-major dense or sparse matri...
Definition: ColumnMajorMatrix.h:61
Compile time check for data types with padding.This type trait tests whether the given data type empl...
Definition: IsPadded.h:76
EnableIf_< IsDenseMatrix< MT1 > > smpAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:102
LeftOperand mat_
Left-hand side dense matrix of the multiplication expression.
Definition: TDMatSVecMultExpr.h:369
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.This macro encapsulates the default way of Bl...
Definition: Exception.h:331
Header file for the HasSIMDAdd type trait.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:3087
typename T::ElementType ElementType_
Alias declaration for nested ElementType type definitions.The ElementType_ alias declaration provides...
Definition: Aliases.h:163
Header file for all SIMD functionality.
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:61
CompositeType_< VT > VCT
Composite type of the right-hand side sparse vector expression.
Definition: TDMatSVecMultExpr.h:118
Header file for the IsAligned type trait.
Compile time check for diagonal matrices.This type trait tests whether or not the given template para...
Definition: IsDiagonal.h:90
BLAZE_ALWAYS_INLINE size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:340
#define BLAZE_CONSTRAINT_MUST_NOT_BE_MATMATMULTEXPR_TYPE(T)
Constraint on the data type.In case the given data type T is a matrix/matrix multiplication expressio...
Definition: MatMatMultExpr.h:88
LeftOperand leftOperand() const noexcept
Returns the left-hand side transpose dense matrix operand.
Definition: TDMatSVecMultExpr.h:308
#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:109
Constraint on the data type.
Header file for the exception macros of the math module.
Compile time check for strictly upper triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyUpper.h:86
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:264
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: TDMatSVecMultExpr.h:253
ResultType_< VT > VRT
Result type of the right-hand side sparse vector expression.
Definition: TDMatSVecMultExpr.h:114
Constraint on the data type.
Header file for all forward declarations for expression class templates.
Constraint on the data type.
Header file for the EnableIf class template.
Header file for the IsStrictlyLower type trait.
RightOperand rightOperand() const noexcept
Returns the right-hand side sparse vector operand.
Definition: TDMatSVecMultExpr.h:318
Expression object for transpose dense matrix-sparse vector multiplications.The TDMatSVecMultExpr clas...
Definition: Forward.h:153
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 IsSIMDCombinable type trait.
Header file for the HasSIMDMult type trait.
Header file for run time assertion macros.
size_t size() const noexcept
Returns the current size/dimension of the vector.
Definition: TDMatSVecMultExpr.h:298
If_< IsExpression< MT >, const MT, const MT &> LeftOperand
Composite type of the left-hand side dense matrix expression.
Definition: TDMatSVecMultExpr.h:204
typename If< T1, T2, T3 >::Type If_
Auxiliary alias declaration for the If class template.The If_ alias declaration provides a convenient...
Definition: If.h:154
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: TDMatSVecMultExpr.h:330
ElementType_< MRT > MET
Element type of the left-hand side dense matrix expression.
Definition: TDMatSVecMultExpr.h:115
EnableIf_< IsDenseVector< VT1 > > smpDivAssign(Vector< VT1, TF1 > &lhs, const Vector< VT2, TF2 > &rhs)
Default implementation of the SMP division assignment of a vector to a dense vector.
Definition: DenseVector.h:222
Header file for the reset shim.
SIMD characteristics of data types.The SIMDTrait class template provides the SIMD characteristics of ...
Definition: SIMDTrait.h:296
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:94
Constraints on the storage order of matrix types.
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:819
TDMatSVecMultExpr(const MT &mat, const VT &vec) noexcept
Constructor for the TDMatSVecMultExpr class.
Definition: TDMatSVecMultExpr.h:239
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.In case the given data type T requires an intermediate evaluation within ...
Definition: RequiresEvaluation.h:81
CompositeType_< MT > MCT
Composite type of the left-hand side dense matrix expression.
Definition: TDMatSVecMultExpr.h:117
Header file for the RemoveReference type trait.
ElementType_< VRT > VET
Element type of the right-hand side sparse vector expression.
Definition: TDMatSVecMultExpr.h:116
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:224
Compile time check for strictly lower triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyLower.h:86
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:3082
typename T::ConstIterator ConstIterator_
Alias declaration for nested ConstIterator type definitions.The ConstIterator_ alias declaration prov...
Definition: Aliases.h:103
#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:61
SIMDTrait_< ElementType > SIMDType
Resulting SIMD element type.
Definition: TDMatSVecMultExpr.h:199
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: TDMatSVecMultExpr.h:342
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: TDMatSVecMultExpr.h:362
Header file for the IsComputation type trait class.
const ElementType ReturnType
Return type for expression template evaluations.
Definition: TDMatSVecMultExpr.h:200
IfTrue_< evaluateVector, const VRT, CompositeType_< VT > > RT
Type for the assignment of the right-hand side dense matrix operand.
Definition: TDMatSVecMultExpr.h:213
Compile time evaluation of the size of a vector.The Size type trait evaluates the size of the given v...
Definition: Size.h:74
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:130
Header file for the IntegralConstant class template.
ElementType_< ResultType > ElementType
Resulting element type.
Definition: TDMatSVecMultExpr.h:198
Compile time evaluation of the number of rows of a matrix.The Rows type trait evaluates the number of...
Definition: Rows.h:75
Constraint on the data type.
typename T::TransposeType TransposeType_
Alias declaration for nested TransposeType type definitions.The TransposeType_ alias declaration prov...
Definition: Aliases.h:423
Header file for the IsUpper type trait.
Header file for the MatVecMultExpr base class.
Constraint on the data type.
Header file for the IsResizable type trait.
Header file for the Size type trait.
Size type of the Blaze library.
Header file for the thresholds for matrix/vector and matrix/matrix multiplications.
IfTrue_< evaluateMatrix, const MRT, MCT > LT
Type for the assignment of the left-hand side dense matrix operand.
Definition: TDMatSVecMultExpr.h:210
#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 function trace functionality.