35 #ifndef _BLAZE_MATH_EXPRESSIONS_TDMATSVECMULTEXPR_H_ 36 #define _BLAZE_MATH_EXPRESSIONS_TDMATSVECMULTEXPR_H_ 108 template<
typename MT
110 class TDMatSVecMultExpr :
public DenseVector< TDMatSVecMultExpr<MT,VT>, false >
111 ,
private MatVecMultExpr
112 ,
private Computation
140 template<
typename T1 >
141 struct UseSMPAssign {
142 enum :
bool { value = ( evaluateMatrix || evaluateVector ) };
153 template<
typename T1,
typename T2,
typename T3 >
154 struct UseVectorizedKernel {
157 T1::simdEnabled && T2::simdEnabled &&
173 template<
typename T1,
typename T2,
typename T3 >
174 struct UseOptimizedKernel {
175 enum :
bool { value = !UseVectorizedKernel<T1,T2,T3>::value &&
188 template<
typename T1,
typename T2,
typename T3 >
189 struct UseDefaultKernel {
190 enum :
bool { value = !UseVectorizedKernel<T1,T2,T3>::value &&
191 !UseOptimizedKernel<T1,T2,T3>::value };
227 enum :
bool { smpAssignable = !evaluateMatrix && MT::smpAssignable &&
228 !evaluateVector && VT::smpAssignable };
261 return mat_(index,index) *
vec_[index];
271 const size_t n (
mat_.columns() -
begin );
288 inline ReturnType
at(
size_t index )
const {
289 if( index >=
mat_.rows() ) {
292 return (*
this)[index];
301 inline size_t size() const noexcept {
332 template<
typename T >
333 inline bool canAlias(
const T* alias )
const noexcept {
334 return mat_.isAliased( alias ) ||
vec_.isAliased( alias );
344 template<
typename T >
345 inline bool isAliased(
const T* alias )
const noexcept {
346 return mat_.isAliased( alias ) ||
vec_.isAliased( alias );
356 return mat_.isAligned();
366 return (
size() > SMP_TDMATSVECMULT_THRESHOLD );
389 template<
typename VT1 >
397 RT x(
serial( rhs.vec_ ) );
398 if( x.nonZeros() == 0UL ) {
404 LT A(
serial( rhs.mat_ ) );
413 TDMatSVecMultExpr::selectAssignKernel( ~lhs, A, x );
432 template<
typename VT1
436 selectAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
442 const size_t M( A.rows() );
444 ConstIterator element( x.begin() );
445 const ConstIterator
end( x.end() );
451 for(
size_t i=0UL; i<iend; ++i )
455 for( ; element!=
end; ++element )
457 const size_t index( element->index() );
461 for(
size_t i=last; i<index; ++i )
464 y[index] = A(index,index) * element->value();
477 for(
size_t i=ibegin; i<last; ++i ) {
478 y[i] += A(i,index) * element->value();
480 for(
size_t i=last; i<iend; ++i ) {
481 y[i] = A(i,index) * element->value();
489 for(
size_t i=last; i<M; ++i )
510 template<
typename VT1
514 selectAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
520 const size_t M( A.rows() );
522 ConstIterator element( x.begin() );
523 const ConstIterator
end( x.end() );
525 const size_t jpos( x.nonZeros() &
size_t(-4) );
526 BLAZE_INTERNAL_ASSERT( ( x.nonZeros() - ( x.nonZeros() % 4UL ) ) == jpos,
"Invalid end calculation" );
530 const size_t j1( element->index() );
531 const VET v1( element->value() );
533 const size_t j2( element->index() );
534 const VET v2( element->value() );
536 const size_t j3( element->index() );
537 const VET v3( element->value() );
539 const size_t j4( element->index() );
540 const VET v4( element->value() );
545 for(
size_t i=0UL; i<M; ++i ) {
546 y[i] = A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
551 const size_t j1( element->index() );
552 const VET v1( element->value() );
555 for(
size_t i=0UL; i<M; ++i ) {
560 for(
size_t j=(jpos>3UL)?(4UL):(1UL); (j+4UL)<=jpos; j+=4UL )
562 const size_t j1( element->index() );
563 const VET v1( element->value() );
565 const size_t j2( element->index() );
566 const VET v2( element->value() );
568 const size_t j3( element->index() );
569 const VET v3( element->value() );
571 const size_t j4( element->index() );
572 const VET v4( element->value() );
585 for(
size_t i=ibegin; i<iend; ++i ) {
586 y[i] += A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
589 for( ; element!=
end; ++element )
591 const size_t j1( element->index() );
592 const VET v1( element->value() );
602 for(
size_t i=ibegin; i<iend; ++i ) {
603 y[i] += A(i,j1) * v1;
624 template<
typename VT1
628 selectAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
636 const size_t M( A.rows() );
638 ConstIterator element( x.begin() );
639 const ConstIterator
end( x.end() );
641 const size_t jpos( x.nonZeros() &
size_t(-4) );
642 BLAZE_INTERNAL_ASSERT( ( x.nonZeros() - ( x.nonZeros() % 4UL ) ) == jpos,
"Invalid end calculation" );
646 const size_t j1( element->index() );
647 const VET v1( element->value() );
649 const size_t j2( element->index() );
650 const VET v2( element->value() );
652 const size_t j3( element->index() );
653 const VET v3( element->value() );
655 const size_t j4( element->index() );
656 const VET v4( element->value() );
661 const SIMDType xmm1(
set( v1 ) );
662 const SIMDType xmm2(
set( v2 ) );
663 const SIMDType xmm3(
set( v3 ) );
664 const SIMDType xmm4(
set( v4 ) );
666 const size_t ipos( remainder ? ( M &
size_t(-SIMDSIZE) ) : M );
671 for( ; i<ipos; i+=SIMDSIZE ) {
672 y.store( i, A.load(i,j1) * xmm1 + A.load(i,j2) * xmm2 + A.load(i,j3) * xmm3 + A.load(i,j4) * xmm4 );
674 for( ; remainder && i<M; ++i ) {
675 y[i] = A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
680 const size_t j1( element->index() );
681 const VET v1( element->value() );
684 const SIMDType xmm1(
set( v1 ) );
686 const size_t ipos( remainder ? ( M &
size_t(-SIMDSIZE) ) : M );
691 for( ; i<ipos; i+=SIMDSIZE ) {
692 y.store( i, A.load(i,j1) * xmm1 );
694 for( ; remainder && i<M; ++i ) {
699 for(
size_t j=(jpos>3UL)?(4UL):(1UL); (j+4UL)<=jpos; j+=4UL )
701 const size_t j1( element->index() );
702 const VET v1( element->value() );
704 const size_t j2( element->index() );
705 const VET v2( element->value() );
707 const size_t j3( element->index() );
708 const VET v3( element->value() );
710 const size_t j4( element->index() );
711 const VET v4( element->value() );
716 const SIMDType xmm1(
set( v1 ) );
717 const SIMDType xmm2(
set( v2 ) );
718 const SIMDType xmm3(
set( v3 ) );
719 const SIMDType xmm4(
set( v4 ) );
729 const size_t ipos( remainder ? ( iend &
size_t(-SIMDSIZE) ) : iend );
730 BLAZE_INTERNAL_ASSERT( !remainder || ( iend - ( iend % SIMDSIZE ) ) == ipos,
"Invalid end calculation" );
734 for( ; i<ipos; i+=SIMDSIZE ) {
735 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 );
737 for( ; remainder && i<iend; ++i ) {
738 y[i] += A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
742 for( ; element!=
end; ++element )
744 const size_t j1( element->index() );
745 const VET v1( element->value() );
747 const SIMDType xmm1(
set( v1 ) );
757 const size_t ipos( remainder ? ( iend &
size_t(-SIMDSIZE) ) : iend );
758 BLAZE_INTERNAL_ASSERT( !remainder || ( iend - ( iend % SIMDSIZE ) ) == ipos,
"Invalid end calculation" );
762 for( ; i<ipos; i+=SIMDSIZE ) {
763 y.store( i, y.load(i) + A.load(i,j1) * xmm1 );
765 for( ; remainder && i<iend; ++i ) {
766 y[i] += A(i,j1) * v1;
786 template<
typename VT1 >
797 const ResultType tmp(
serial( rhs ) );
816 template<
typename VT1 >
824 RT x(
serial( rhs.vec_ ) );
825 if( x.nonZeros() == 0UL )
return;
828 LT A(
serial( rhs.mat_ ) );
837 TDMatSVecMultExpr::selectAddAssignKernel( ~lhs, A, x );
856 template<
typename VT1
860 selectAddAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
866 const size_t M( A.rows() );
868 ConstIterator element( x.begin() );
869 const ConstIterator
end( x.end() );
871 for( ; element!=
end; ++element )
873 const size_t index( element->index() );
877 y[index] += A(index,index) * element->value();
889 for(
size_t i=ibegin; i<iend; ++i ) {
890 y[i] += A(i,index) * element->value();
912 template<
typename VT1
916 selectAddAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
922 const size_t M( A.rows() );
924 ConstIterator element( x.begin() );
925 const ConstIterator
end( x.end() );
927 const size_t jpos( x.nonZeros() &
size_t(-4) );
928 BLAZE_INTERNAL_ASSERT( ( x.nonZeros() - ( x.nonZeros() % 4UL ) ) == jpos,
"Invalid end calculation" );
930 for(
size_t j=0UL; (j+4UL)<=jpos; j+=4UL )
932 const size_t j1( element->index() );
933 const VET v1( element->value() );
935 const size_t j2( element->index() );
936 const VET v2( element->value() );
938 const size_t j3( element->index() );
939 const VET v3( element->value() );
941 const size_t j4( element->index() );
942 const VET v4( element->value() );
955 for(
size_t i=ibegin; i<iend; ++i ) {
956 y[i] += A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
959 for( ; element!=
end; ++element )
961 const size_t j1( element->index() );
962 const VET v1( element->value() );
972 for(
size_t i=ibegin; i<iend; ++i ) {
973 y[i] += A(i,j1) * v1;
994 template<
typename VT1
998 selectAddAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
1006 const size_t M( A.rows() );
1008 ConstIterator element( x.begin() );
1009 const ConstIterator
end( x.end() );
1011 const size_t jpos( x.nonZeros() &
size_t(-4) );
1012 BLAZE_INTERNAL_ASSERT( ( x.nonZeros() - ( x.nonZeros() % 4UL ) ) == jpos,
"Invalid end calculation" );
1014 for(
size_t j=0UL; (j+4UL)<=jpos; j+=4UL )
1016 const size_t j1( element->index() );
1017 const VET v1( element->value() );
1019 const size_t j2( element->index() );
1020 const VET v2( element->value() );
1022 const size_t j3( element->index() );
1023 const VET v3( element->value() );
1025 const size_t j4( element->index() );
1026 const VET v4( element->value() );
1031 const SIMDType xmm1(
set( v1 ) );
1032 const SIMDType xmm2(
set( v2 ) );
1033 const SIMDType xmm3(
set( v3 ) );
1034 const SIMDType xmm4(
set( v4 ) );
1044 const size_t ipos( remainder ? ( iend &
size_t(-SIMDSIZE) ) : iend );
1045 BLAZE_INTERNAL_ASSERT( !remainder || ( iend - ( iend % SIMDSIZE ) ) == ipos,
"Invalid end calculation" );
1049 for( ; i<ipos; i+=SIMDSIZE ) {
1050 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 );
1052 for( ; remainder && i<iend; ++i ) {
1053 y[i] += A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
1056 for( ; element!=
end; ++element )
1058 const size_t j1( element->index() );
1059 const VET v1( element->value() );
1061 const SIMDType xmm1(
set( v1 ) );
1071 const size_t ipos( remainder ? ( iend &
size_t(-SIMDSIZE) ) : iend );
1072 BLAZE_INTERNAL_ASSERT( !remainder || ( iend - ( iend % SIMDSIZE ) ) == ipos,
"Invalid end calculation" );
1076 for( ; i<ipos; i+=SIMDSIZE ) {
1077 y.store( i, y.load(i) + A.load(i,j1) * xmm1 );
1079 for( ; remainder && i<iend; ++i ) {
1080 y[i] += A(i,j1) * v1;
1104 template<
typename VT1 >
1112 RT x(
serial( rhs.vec_ ) );
1113 if( x.nonZeros() == 0UL )
return;
1116 LT A(
serial( rhs.mat_ ) );
1125 TDMatSVecMultExpr::selectSubAssignKernel( ~lhs, A, x );
1144 template<
typename VT1
1148 selectSubAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
1154 const size_t M( A.rows() );
1156 ConstIterator element( x.begin() );
1157 const ConstIterator
end( x.end() );
1159 for( ; element!=
end; ++element )
1161 const size_t index( element->index() );
1165 y[index] -= A(index,index) * element->value();
1177 for(
size_t i=ibegin; i<iend; ++i ) {
1178 y[i] -= A(i,index) * element->value();
1200 template<
typename VT1
1204 selectSubAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
1210 const size_t M( A.rows() );
1212 ConstIterator element( x.begin() );
1213 const ConstIterator
end( x.end() );
1215 const size_t jpos( x.nonZeros() &
size_t(-4) );
1216 BLAZE_INTERNAL_ASSERT( ( x.nonZeros() - ( x.nonZeros() % 4UL ) ) == jpos,
"Invalid end calculation" );
1218 for(
size_t j=0UL; (j+4UL)<=jpos; j+=4UL )
1220 const size_t j1( element->index() );
1221 const VET v1( element->value() );
1223 const size_t j2( element->index() );
1224 const VET v2( element->value() );
1226 const size_t j3( element->index() );
1227 const VET v3( element->value() );
1229 const size_t j4( element->index() );
1230 const VET v4( element->value() );
1243 for(
size_t i=ibegin; i<iend; ++i ) {
1244 y[i] -= A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
1247 for( ; element!=
end; ++element )
1249 const size_t j1( element->index() );
1250 const VET v1( element->value() );
1260 for(
size_t i=ibegin; i<iend; ++i ) {
1261 y[i] -= A(i,j1) * v1;
1282 template<
typename VT1
1286 selectSubAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
1294 const size_t M( A.rows() );
1296 ConstIterator element( x.begin() );
1297 const ConstIterator
end( x.end() );
1299 const size_t jpos( x.nonZeros() &
size_t(-4) );
1300 BLAZE_INTERNAL_ASSERT( ( x.nonZeros() - ( x.nonZeros() % 4UL ) ) == jpos,
"Invalid end calculation" );
1302 for(
size_t j=0UL; (j+4UL)<=jpos; j+=4UL )
1304 const size_t j1( element->index() );
1305 const VET v1( element->value() );
1307 const size_t j2( element->index() );
1308 const VET v2( element->value() );
1310 const size_t j3( element->index() );
1311 const VET v3( element->value() );
1313 const size_t j4( element->index() );
1314 const VET v4( element->value() );
1319 const SIMDType xmm1(
set( v1 ) );
1320 const SIMDType xmm2(
set( v2 ) );
1321 const SIMDType xmm3(
set( v3 ) );
1322 const SIMDType xmm4(
set( v4 ) );
1332 const size_t ipos( remainder ? ( iend &
size_t(-SIMDSIZE) ) : iend );
1333 BLAZE_INTERNAL_ASSERT( !remainder || ( iend - ( iend % SIMDSIZE ) ) == ipos,
"Invalid end calculation" );
1337 for( ; i<ipos; i+=SIMDSIZE ) {
1338 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 );
1340 for( ; remainder && i<iend; ++i ) {
1341 y[i] -= A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
1344 for( ; element!=
end; ++element )
1346 const size_t j1( element->index() );
1347 const VET v1( element->value() );
1349 const SIMDType xmm1(
set( v1 ) );
1359 const size_t ipos( remainder ? ( iend &
size_t(-SIMDSIZE) ) : iend );
1360 BLAZE_INTERNAL_ASSERT( !remainder || ( iend - ( iend % SIMDSIZE ) ) == ipos,
"Invalid end calculation" );
1364 for( ; i<ipos; i+=SIMDSIZE ) {
1365 y.store( i, y.load(i) - A.load(i,j1) * xmm1 );
1367 for( ; remainder && i<iend; ++i ) {
1368 y[i] -= A(i,j1) * v1;
1392 template<
typename VT1 >
1403 const ResultType tmp(
serial( rhs ) );
1404 multAssign( ~lhs, tmp );
1426 template<
typename VT1 >
1437 const ResultType tmp(
serial( rhs ) );
1438 divAssign( ~lhs, tmp );
1462 template<
typename VT1 >
1472 if( x.nonZeros() == 0UL ) {
1507 template<
typename VT1 >
1519 const ResultType tmp( rhs );
1540 template<
typename VT1 >
1550 if( x.nonZeros() == 0UL )
return;
1586 template<
typename VT1 >
1596 if( x.nonZeros() == 0UL )
return;
1632 template<
typename VT1 >
1644 const ResultType tmp( rhs );
1669 template<
typename VT1 >
1681 const ResultType tmp( rhs );
1744 template<
typename T1
1770 template<
typename MT,
typename VT >
1771 struct Size< TDMatSVecMultExpr<MT,VT> > :
public Rows<MT>
1787 template<
typename MT,
typename VT >
1788 struct IsAligned< TDMatSVecMultExpr<MT,VT> >
1805 template<
typename MT,
typename VT,
bool AF >
#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:373
constexpr bool useOptimizedKernels
Configuration switch for optimized kernels.This configuration switch enables/disables all optimized c...
Definition: Optimizations.h:84
CompositeType_< VT > VCT
Composite type of the right-hand side sparse vector expression.
Definition: TDMatSVecMultExpr.h:121
Evaluation of the expression type type of a subvector operation.Via this type trait it is possible to...
Definition: SubvectorExprTrait.h:79
Header file for the Rows type trait.
Header file for basic type definitions.
CompositeType_< MT > MCT
Composite type of the left-hand side dense matrix expression.
Definition: TDMatSVecMultExpr.h:120
ElementType_< ResultType > ElementType
Resulting element type.
Definition: TDMatSVecMultExpr.h:201
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: TDMatSVecMultExpr.h:355
#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:160
IfTrue_< evaluateVector, const VRT, CompositeType_< VT > > RT
Type for the assignment of the right-hand side dense matrix operand.
Definition: TDMatSVecMultExpr.h:216
Header file for the serial shim.
Header file for the IsDiagonal type trait.
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
#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:194
Availability of a SIMD multiplication for the given data types.Depending on the available instruction...
Definition: HasSIMDMult.h:162
MultTrait_< MRT, VRT > ResultType
Result type for expression template evaluations.
Definition: TDMatSVecMultExpr.h:199
typename SIMDTrait< T >::Type SIMDTrait_
Auxiliary alias declaration for the SIMDTrait class template.The SIMDTrait_ alias declaration provide...
Definition: SIMDTrait.h:315
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:533
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
typename DisableIf< Condition, T >::Type DisableIf_
Auxiliary type for the DisableIf class template.The DisableIf_ alias declaration provides a convenien...
Definition: DisableIf.h:223
ElementType_< VRT > VET
Element type of the right-hand side sparse vector expression.
Definition: TDMatSVecMultExpr.h:119
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:163
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:721
typename MultTrait< T1, T2 >::Type MultTrait_
Auxiliary alias declaration for the MultTrait class template.The MultTrait_ alias declaration provide...
Definition: MultTrait.h:245
Header file for the Computation base class.
const ElementType ReturnType
Return type for expression template evaluations.
Definition: TDMatSVecMultExpr.h:203
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:323
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:129
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:71
Constraint on the data type.
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
IfTrue_< evaluateMatrix, const MRT, MCT > LT
Type for the assignment of the left-hand side dense matrix operand.
Definition: TDMatSVecMultExpr.h:213
Constraint on the transpose flag of vector types.
ReturnType at(size_t index) const
Checked access to the vector elements.
Definition: TDMatSVecMultExpr.h:288
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.
typename MultExprTrait< T1, T2 >::Type MultExprTrait_
Auxiliary alias declaration for the MultExprTrait class template.The MultExprTrait_ alias declaration...
Definition: MultExprTrait.h:344
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:72
SubvectorExprTrait_< VT, unaligned > 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:152
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.
ResultType_< MT > MRT
Result type of the left-hand side dense matrix expression.
Definition: TDMatSVecMultExpr.h:116
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
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
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2939
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:98
Header file for the IsMatMatMultExpr type trait class.
LeftOperand mat_
Left-hand side dense matrix of the multiplication expression.
Definition: TDMatSVecMultExpr.h:372
TransposeType_< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: TDMatSVecMultExpr.h:200
#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.
If_< IsExpression< MT >, const MT, const MT &> LeftOperand
Composite type of the left-hand side dense matrix expression.
Definition: TDMatSVecMultExpr.h:207
typename SubvectorExprTrait< VT, AF >::Type SubvectorExprTrait_
Auxiliary alias declaration for the SubvectorExprTrait type trait.The SubvectorExprTrait_ alias decla...
Definition: SubvectorExprTrait.h:133
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
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:336
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT >, IsDeclExpr< MT > >, RowExprTrait_< MT > > row(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific row of the given matrix.
Definition: Row.h:128
#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:60
LeftOperand leftOperand() const noexcept
Returns the left-hand side transpose dense matrix operand.
Definition: TDMatSVecMultExpr.h:311
#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:110
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:260
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: TDMatSVecMultExpr.h:256
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.
If_< IsExpression< VT >, const VT, const VT &> RightOperand
Composite type of the right-hand side dense vector expression.
Definition: TDMatSVecMultExpr.h:210
RightOperand rightOperand() const noexcept
Returns the right-hand side sparse vector operand.
Definition: TDMatSVecMultExpr.h:321
Expression object for transpose dense matrix-sparse vector multiplications.The TDMatSVecMultExpr clas...
Definition: Forward.h:143
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.
SIMDTrait_< ElementType > SIMDType
Resulting SIMD element type.
Definition: TDMatSVecMultExpr.h:202
Header file for the SubmatrixExprTrait class template.
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:301
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:160
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: TDMatSVecMultExpr.h:333
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
const ResultType CompositeType
Data type for composite expression templates.
Definition: TDMatSVecMultExpr.h:204
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:93
Constraints on the storage order of matrix types.
ResultType_< VT > VRT
Result type of the right-hand side sparse vector expression.
Definition: TDMatSVecMultExpr.h:117
TDMatSVecMultExpr(const MT &mat, const VT &vec) noexcept
Constructor for the TDMatSVecMultExpr class.
Definition: TDMatSVecMultExpr.h:242
Header file for the RemoveReference type trait.
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:223
ElementType_< MRT > MET
Element type of the left-hand side dense matrix expression.
Definition: TDMatSVecMultExpr.h:118
Compile time check for strictly lower triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyLower.h:86
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
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: TDMatSVecMultExpr.h:345
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: TDMatSVecMultExpr.h:365
Header file for the IsComputation type trait class.
TDMatSVecMultExpr< MT, VT > This
Type of this TDMatSVecMultExpr instance.
Definition: TDMatSVecMultExpr.h:198
Compile time evaluation of the size of a vector.The Size type trait evaluates the size of the given v...
Definition: Size.h:75
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:120
Header file for the IntegralConstant class template.
Compile time evaluation of the number of rows of a matrix.The Rows type trait evaluates the number of...
Definition: Rows.h:76
Header file for the SubvectorExprTrait class template.
Constraint on the data type.
typename T::TransposeType TransposeType_
Alias declaration for nested TransposeType type definitions.The TransposeType_ alias declaration prov...
Definition: Aliases.h:403
Header file for the IsUpper type trait.
Header file for the MatVecMultExpr base class.
Header file for the IsResizable type trait.
const DMatDMatMultExpr< T1, T2, false, false, false, false > 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:7505
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.
#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.