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];
269 const size_t n (
mat_.columns() -
begin );
288 if( index >=
mat_.rows() ) {
291 return (*
this)[index];
300 inline size_t size() const noexcept {
331 template<
typename T >
332 inline bool canAlias(
const T* alias )
const noexcept {
333 return mat_.isAliased( alias ) ||
vec_.isAliased( alias );
343 template<
typename T >
344 inline bool isAliased(
const T* alias )
const noexcept {
345 return mat_.isAliased( alias ) ||
vec_.isAliased( alias );
355 return mat_.isAligned();
365 return (
size() > SMP_TDMATSVECMULT_THRESHOLD );
388 template<
typename VT1 >
397 if( x.nonZeros() == 0UL ) {
412 TDMatSVecMultExpr::selectAssignKernel( ~lhs, A, x );
431 template<
typename VT1
435 selectAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
441 const size_t M( A.rows() );
450 for(
size_t i=0UL; i<iend; ++i )
454 for( ; element!=
end; ++element )
456 const size_t index( element->index() );
460 for(
size_t i=last; i<index; ++i )
463 y[index] = A(index,index) * element->value();
476 for(
size_t i=ibegin; i<last; ++i ) {
477 y[i] += A(i,index) * element->value();
479 for(
size_t i=last; i<iend; ++i ) {
480 y[i] = A(i,index) * element->value();
488 for(
size_t i=last; i<M; ++i )
509 template<
typename VT1
513 selectAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
519 const size_t M( A.rows() );
524 const size_t jpos( x.nonZeros() &
size_t(-4) );
525 BLAZE_INTERNAL_ASSERT( ( x.nonZeros() - ( x.nonZeros() % 4UL ) ) == jpos,
"Invalid end calculation" );
529 const size_t j1( element->index() );
530 const VET v1( element->value() );
532 const size_t j2( element->index() );
533 const VET v2( element->value() );
535 const size_t j3( element->index() );
536 const VET v3( element->value() );
538 const size_t j4( element->index() );
539 const VET v4( element->value() );
544 for(
size_t i=0UL; i<M; ++i ) {
545 y[i] = A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
550 const size_t j1( element->index() );
551 const VET v1( element->value() );
554 for(
size_t i=0UL; i<M; ++i ) {
559 for(
size_t j=(jpos>3UL)?(4UL):(1UL); (j+4UL)<=jpos; j+=4UL )
561 const size_t j1( element->index() );
562 const VET v1( element->value() );
564 const size_t j2( element->index() );
565 const VET v2( element->value() );
567 const size_t j3( element->index() );
568 const VET v3( element->value() );
570 const size_t j4( element->index() );
571 const VET v4( element->value() );
584 for(
size_t i=ibegin; i<iend; ++i ) {
585 y[i] += A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
588 for( ; element!=
end; ++element )
590 const size_t j1( element->index() );
591 const VET v1( element->value() );
601 for(
size_t i=ibegin; i<iend; ++i ) {
602 y[i] += A(i,j1) * v1;
623 template<
typename VT1
627 selectAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
635 const size_t M( A.rows() );
640 const size_t jpos( x.nonZeros() &
size_t(-4) );
641 BLAZE_INTERNAL_ASSERT( ( x.nonZeros() - ( x.nonZeros() % 4UL ) ) == jpos,
"Invalid end calculation" );
645 const size_t j1( element->index() );
646 const VET v1( element->value() );
648 const size_t j2( element->index() );
649 const VET v2( element->value() );
651 const size_t j3( element->index() );
652 const VET v3( element->value() );
654 const size_t j4( element->index() );
655 const VET v4( element->value() );
665 const size_t ipos( remainder ? ( M &
size_t(-SIMDSIZE) ) : M );
670 for( ; i<ipos; i+=SIMDSIZE ) {
671 y.store( i, A.load(i,j1) * xmm1 + A.load(i,j2) * xmm2 + A.load(i,j3) * xmm3 + A.load(i,j4) * xmm4 );
673 for( ; remainder && i<M; ++i ) {
674 y[i] = A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
679 const size_t j1( element->index() );
680 const VET v1( element->value() );
685 const size_t ipos( remainder ? ( M &
size_t(-SIMDSIZE) ) : M );
690 for( ; i<ipos; i+=SIMDSIZE ) {
691 y.store( i, A.load(i,j1) * xmm1 );
693 for( ; remainder && i<M; ++i ) {
698 for(
size_t j=(jpos>3UL)?(4UL):(1UL); (j+4UL)<=jpos; j+=4UL )
700 const size_t j1( element->index() );
701 const VET v1( element->value() );
703 const size_t j2( element->index() );
704 const VET v2( element->value() );
706 const size_t j3( element->index() );
707 const VET v3( element->value() );
709 const size_t j4( element->index() );
710 const VET v4( element->value() );
728 const size_t ipos( remainder ? ( iend &
size_t(-SIMDSIZE) ) : iend );
729 BLAZE_INTERNAL_ASSERT( !remainder || ( iend - ( iend % SIMDSIZE ) ) == ipos,
"Invalid end calculation" );
733 for( ; i<ipos; i+=SIMDSIZE ) {
734 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 );
736 for( ; remainder && i<iend; ++i ) {
737 y[i] += A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
741 for( ; element!=
end; ++element )
743 const size_t j1( element->index() );
744 const VET v1( element->value() );
756 const size_t ipos( remainder ? ( iend &
size_t(-SIMDSIZE) ) : iend );
757 BLAZE_INTERNAL_ASSERT( !remainder || ( iend - ( iend % SIMDSIZE ) ) == ipos,
"Invalid end calculation" );
761 for( ; i<ipos; i+=SIMDSIZE ) {
762 y.store( i, y.load(i) + A.load(i,j1) * xmm1 );
764 for( ; remainder && i<iend; ++i ) {
765 y[i] += A(i,j1) * v1;
785 template<
typename VT1 >
815 template<
typename VT1 >
824 if( x.nonZeros() == 0UL )
return;
836 TDMatSVecMultExpr::selectAddAssignKernel( ~lhs, A, x );
855 template<
typename VT1
859 selectAddAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
865 const size_t M( A.rows() );
870 for( ; element!=
end; ++element )
872 const size_t index( element->index() );
876 y[index] += A(index,index) * element->value();
888 for(
size_t i=ibegin; i<iend; ++i ) {
889 y[i] += A(i,index) * element->value();
911 template<
typename VT1
915 selectAddAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
921 const size_t M( A.rows() );
926 const size_t jpos( x.nonZeros() &
size_t(-4) );
927 BLAZE_INTERNAL_ASSERT( ( x.nonZeros() - ( x.nonZeros() % 4UL ) ) == jpos,
"Invalid end calculation" );
929 for(
size_t j=0UL; (j+4UL)<=jpos; j+=4UL )
931 const size_t j1( element->index() );
932 const VET v1( element->value() );
934 const size_t j2( element->index() );
935 const VET v2( element->value() );
937 const size_t j3( element->index() );
938 const VET v3( element->value() );
940 const size_t j4( element->index() );
941 const VET v4( element->value() );
954 for(
size_t i=ibegin; i<iend; ++i ) {
955 y[i] += A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
958 for( ; element!=
end; ++element )
960 const size_t j1( element->index() );
961 const VET v1( element->value() );
971 for(
size_t i=ibegin; i<iend; ++i ) {
972 y[i] += A(i,j1) * v1;
993 template<
typename VT1
997 selectAddAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
1005 const size_t M( A.rows() );
1010 const size_t jpos( x.nonZeros() &
size_t(-4) );
1011 BLAZE_INTERNAL_ASSERT( ( x.nonZeros() - ( x.nonZeros() % 4UL ) ) == jpos,
"Invalid end calculation" );
1013 for(
size_t j=0UL; (j+4UL)<=jpos; j+=4UL )
1015 const size_t j1( element->index() );
1016 const VET v1( element->value() );
1018 const size_t j2( element->index() );
1019 const VET v2( element->value() );
1021 const size_t j3( element->index() );
1022 const VET v3( element->value() );
1024 const size_t j4( element->index() );
1025 const VET v4( element->value() );
1043 const size_t ipos( remainder ? ( iend &
size_t(-SIMDSIZE) ) : iend );
1044 BLAZE_INTERNAL_ASSERT( !remainder || ( iend - ( iend % SIMDSIZE ) ) == ipos,
"Invalid end calculation" );
1048 for( ; i<ipos; i+=SIMDSIZE ) {
1049 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 );
1051 for( ; remainder && i<iend; ++i ) {
1052 y[i] += A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
1055 for( ; element!=
end; ++element )
1057 const size_t j1( element->index() );
1058 const VET v1( element->value() );
1070 const size_t ipos( remainder ? ( iend &
size_t(-SIMDSIZE) ) : iend );
1071 BLAZE_INTERNAL_ASSERT( !remainder || ( iend - ( iend % SIMDSIZE ) ) == ipos,
"Invalid end calculation" );
1075 for( ; i<ipos; i+=SIMDSIZE ) {
1076 y.store( i, y.load(i) + A.load(i,j1) * xmm1 );
1078 for( ; remainder && i<iend; ++i ) {
1079 y[i] += A(i,j1) * v1;
1103 template<
typename VT1 >
1112 if( x.nonZeros() == 0UL )
return;
1124 TDMatSVecMultExpr::selectSubAssignKernel( ~lhs, A, x );
1143 template<
typename VT1
1147 selectSubAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
1153 const size_t M( A.rows() );
1158 for( ; element!=
end; ++element )
1160 const size_t index( element->index() );
1164 y[index] -= A(index,index) * element->value();
1176 for(
size_t i=ibegin; i<iend; ++i ) {
1177 y[i] -= A(i,index) * element->value();
1199 template<
typename VT1
1203 selectSubAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
1209 const size_t M( A.rows() );
1214 const size_t jpos( x.nonZeros() &
size_t(-4) );
1215 BLAZE_INTERNAL_ASSERT( ( x.nonZeros() - ( x.nonZeros() % 4UL ) ) == jpos,
"Invalid end calculation" );
1217 for(
size_t j=0UL; (j+4UL)<=jpos; j+=4UL )
1219 const size_t j1( element->index() );
1220 const VET v1( element->value() );
1222 const size_t j2( element->index() );
1223 const VET v2( element->value() );
1225 const size_t j3( element->index() );
1226 const VET v3( element->value() );
1228 const size_t j4( element->index() );
1229 const VET v4( element->value() );
1242 for(
size_t i=ibegin; i<iend; ++i ) {
1243 y[i] -= A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
1246 for( ; element!=
end; ++element )
1248 const size_t j1( element->index() );
1249 const VET v1( element->value() );
1259 for(
size_t i=ibegin; i<iend; ++i ) {
1260 y[i] -= A(i,j1) * v1;
1281 template<
typename VT1
1285 selectSubAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
1293 const size_t M( A.rows() );
1298 const size_t jpos( x.nonZeros() &
size_t(-4) );
1299 BLAZE_INTERNAL_ASSERT( ( x.nonZeros() - ( x.nonZeros() % 4UL ) ) == jpos,
"Invalid end calculation" );
1301 for(
size_t j=0UL; (j+4UL)<=jpos; j+=4UL )
1303 const size_t j1( element->index() );
1304 const VET v1( element->value() );
1306 const size_t j2( element->index() );
1307 const VET v2( element->value() );
1309 const size_t j3( element->index() );
1310 const VET v3( element->value() );
1312 const size_t j4( element->index() );
1313 const VET v4( element->value() );
1331 const size_t ipos( remainder ? ( iend &
size_t(-SIMDSIZE) ) : iend );
1332 BLAZE_INTERNAL_ASSERT( !remainder || ( iend - ( iend % SIMDSIZE ) ) == ipos,
"Invalid end calculation" );
1336 for( ; i<ipos; i+=SIMDSIZE ) {
1337 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 );
1339 for( ; remainder && i<iend; ++i ) {
1340 y[i] -= A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
1343 for( ; element!=
end; ++element )
1345 const size_t j1( element->index() );
1346 const VET v1( element->value() );
1358 const size_t ipos( remainder ? ( iend &
size_t(-SIMDSIZE) ) : iend );
1359 BLAZE_INTERNAL_ASSERT( !remainder || ( iend - ( iend % SIMDSIZE ) ) == ipos,
"Invalid end calculation" );
1363 for( ; i<ipos; i+=SIMDSIZE ) {
1364 y.store( i, y.load(i) - A.load(i,j1) * xmm1 );
1366 for( ; remainder && i<iend; ++i ) {
1367 y[i] -= A(i,j1) * v1;
1391 template<
typename VT1 >
1403 multAssign( ~lhs, tmp );
1425 template<
typename VT1 >
1437 divAssign( ~lhs, tmp );
1461 template<
typename VT1 >
1471 if( x.nonZeros() == 0UL ) {
1506 template<
typename VT1 >
1539 template<
typename VT1 >
1549 if( x.nonZeros() == 0UL )
return;
1585 template<
typename VT1 >
1595 if( x.nonZeros() == 0UL )
return;
1631 template<
typename VT1 >
1668 template<
typename VT1 >
1743 template<
typename MT
1745 inline decltype(
auto)
1772 template<
typename MT,
typename VT >
1773 struct Size< TDMatSVecMultExpr<MT,VT>, 0UL >
1774 :
public Size<MT,0UL>
1790 template<
typename MT,
typename VT >
1791 struct IsAligned< TDMatSVecMultExpr<MT,VT> >
decltype(auto) subvector(Vector< VT, TF > &, RSAs...)
Creating a view on a specific subvector of the given vector.
Definition: Subvector.h:329
#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.
Header file for the blaze::checked and blaze::unchecked instances.
Compile time check whether the given type is a computational expression template.This type trait clas...
Definition: IsComputation.h:71
RightOperand vec_
Right-hand side sparse vector of the multiplication expression.
Definition: TDMatSVecMultExpr.h:372
Header file for basic type definitions.
MultTrait_< MRT, VRT > ResultType
Result type for expression template evaluations.
Definition: TDMatSVecMultExpr.h:196
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:354
#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
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:364
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:588
constexpr Unchecked unchecked
Global Unchecked instance.The blaze::unchecked instance is an optional token for the creation of view...
Definition: Check.h:138
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:87
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:291
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:87
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:80
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:287
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:71
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:58
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:371
#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:3085
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:76
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:89
BLAZE_ALWAYS_INLINE size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:506
#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:87
LeftOperand leftOperand() const noexcept
Returns the left-hand side transpose dense matrix operand.
Definition: TDMatSVecMultExpr.h:310
#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:108
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:430
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.
Header file for the IsPadded type trait.
RightOperand rightOperand() const noexcept
Returns the right-hand side sparse vector operand.
Definition: TDMatSVecMultExpr.h:320
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:300
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
decltype(auto) row(Matrix< MT, SO > &, RRAs...)
Creating a view on a specific row of the given matrix.
Definition: Row.h:131
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: TDMatSVecMultExpr.h:332
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:816
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:3080
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:344
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: TDMatSVecMultExpr.h:364
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 vectors and matrices.The Size type trait evaluates the size of...
Definition: Size.h:80
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:130
ElementType_< ResultType > ElementType
Resulting element type.
Definition: TDMatSVecMultExpr.h:198
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.