All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TDVecTSMatMultExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_TDVECTSMATMULTEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_TDVECTSMATMULTEXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <stdexcept>
52 #include <blaze/math/shims/Reset.h>
63 #include <blaze/util/Assert.h>
65 #include <blaze/util/DisableIf.h>
66 #include <blaze/util/EnableIf.h>
68 #include <blaze/util/SelectType.h>
69 #include <blaze/util/Types.h>
71 
72 
73 namespace blaze {
74 
75 //=================================================================================================
76 //
77 // CLASS TDVECSMATMULTEXPR
78 //
79 //=================================================================================================
80 
81 //*************************************************************************************************
88 template< typename VT // Type of the left-hand side dense vector
89  , typename MT > // Type of the right-hand side sparse matrix
90 class TDVecTSMatMultExpr : public DenseVector< TDVecTSMatMultExpr<VT,MT>, true >
91  , private TVecMatMultExpr
92  , private Computation
93 {
94  private:
95  //**Type definitions****************************************************************************
96  typedef typename VT::ResultType VRT;
97  typedef typename MT::ResultType MRT;
98  typedef typename VT::CompositeType VCT;
99  typedef typename MT::CompositeType MCT;
100  //**********************************************************************************************
101 
102  //**********************************************************************************************
104  enum { evaluateVector = IsComputation<VT>::value || RequiresEvaluation<VT>::value };
105  //**********************************************************************************************
106 
107  //**********************************************************************************************
109  enum { evaluateMatrix = RequiresEvaluation<MT>::value };
110  //**********************************************************************************************
111 
112  //**********************************************************************************************
114 
120  enum { useAssign = ( evaluateVector || evaluateMatrix ) };
121  //**********************************************************************************************
122 
123  //**********************************************************************************************
125  template< typename VT2 >
127  struct UseAssign {
128  enum { value = useAssign };
129  };
131  //**********************************************************************************************
132 
133  //**********************************************************************************************
135 
139  template< typename T1 >
140  struct UseSMPAssign {
141  enum { value = useAssign };
142  };
144  //**********************************************************************************************
145 
146  public:
147  //**Type definitions****************************************************************************
152  typedef const ElementType ReturnType;
153 
156 
158  typedef typename SelectType< IsExpression<VT>::value, const VT, const VT& >::Type LeftOperand;
159 
161  typedef typename SelectType< IsExpression<MT>::value, const MT, const MT& >::Type RightOperand;
162 
165 
168  //**********************************************************************************************
169 
170  //**Compilation flags***************************************************************************
172  enum { vectorizable = 0 };
173 
175  enum { smpAssignable = !evaluateVector && VT::smpAssignable &&
176  !evaluateMatrix && MT::smpAssignable };
177  //**********************************************************************************************
178 
179  //**Constructor*********************************************************************************
182  explicit inline TDVecTSMatMultExpr( const VT& vec, const MT& mat )
183  : vec_( vec ) // Left-hand side dense vector of the multiplication expression
184  , mat_( mat ) // Right-hand side sparse matrix of the multiplication expression
185  {
186  BLAZE_INTERNAL_ASSERT( vec_.size() == mat.rows(), "Invalid vector and matrix sizes" );
187  }
188  //**********************************************************************************************
189 
190  //**Subscript operator**************************************************************************
196  inline ReturnType operator[]( size_t index ) const {
197  BLAZE_INTERNAL_ASSERT( index < mat_.columns(), "Invalid vector access index" );
198 
200 
201  VCT x( vec_ ); // Evaluation of the left-hand side dense vector operand
202  MCT A( mat_ ); // Evaluation of the right-hand side sparse matrix operand
203 
204  BLAZE_INTERNAL_ASSERT( x.size() == vec_.size() , "Invalid vector size" );
205  BLAZE_INTERNAL_ASSERT( A.rows() == mat_.rows() , "Invalid number of rows" );
206  BLAZE_INTERNAL_ASSERT( A.columns() == mat_.columns(), "Invalid number of columns" );
207 
208  const ConstIterator end( A.end(index) );
209  ConstIterator element( A.begin(index) );
210  ElementType res;
211 
212  if( element != end ) {
213  res = x[element->index()] * element->value();
214  ++element;
215  for( ; element!=end; ++element )
216  res += x[element->index()] * element->value();
217  }
218  else {
219  reset( res );
220  }
221 
222  return res;
223  }
224  //**********************************************************************************************
225 
226  //**Size function*******************************************************************************
231  inline size_t size() const {
232  return mat_.columns();
233  }
234  //**********************************************************************************************
235 
236  //**Left operand access*************************************************************************
241  inline LeftOperand leftOperand() const {
242  return vec_;
243  }
244  //**********************************************************************************************
245 
246  //**Right operand access************************************************************************
251  inline RightOperand rightOperand() const {
252  return mat_;
253  }
254  //**********************************************************************************************
255 
256  //**********************************************************************************************
262  template< typename T >
263  inline bool canAlias( const T* alias ) const {
264  return ( vec_.isAliased( alias ) || mat_.isAliased( alias ) );
265  }
266  //**********************************************************************************************
267 
268  //**********************************************************************************************
274  template< typename T >
275  inline bool isAliased( const T* alias ) const {
276  return ( vec_.isAliased( alias ) || mat_.isAliased( alias ) );
277  }
278  //**********************************************************************************************
279 
280  //**********************************************************************************************
285  inline bool isAligned() const {
286  return vec_.isAligned();
287  }
288  //**********************************************************************************************
289 
290  //**********************************************************************************************
295  inline bool canSMPAssign() const {
296  return ( size() > SMP_TDVECTSMATMULT_THRESHOLD );
297  }
298  //**********************************************************************************************
299 
300  private:
301  //**Member variables****************************************************************************
302  LeftOperand vec_;
303  RightOperand mat_;
304  //**********************************************************************************************
305 
306  //**Assignment to dense vectors*****************************************************************
321  template< typename VT2 > // Type of the target dense vector
322  friend inline typename EnableIf< UseAssign<VT2> >::Type
324  {
326 
327  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
328 
330 
331  if( rhs.mat_.rows() == 0UL ) {
332  reset( ~lhs );
333  return;
334  }
335 
336  LT x( serial( rhs.vec_ ) ); // Evaluation of the left-hand side dense vector operator
337  RT A( serial( rhs.mat_ ) ); // Evaluation of the right-hand side sparse matrix operator
338 
339  BLAZE_INTERNAL_ASSERT( x.size() == rhs.vec_.size() , "Invalid vector size" );
340  BLAZE_INTERNAL_ASSERT( A.rows() == rhs.mat_.rows() , "Invalid number of rows" );
341  BLAZE_INTERNAL_ASSERT( A.columns() == rhs.mat_.columns(), "Invalid number of columns" );
342  BLAZE_INTERNAL_ASSERT( A.columns() == (~lhs).size() , "Invalid vector size" );
343 
344  assign( ~lhs, x * A );
345  }
346  //**********************************************************************************************
347 
348  //**Assignment to sparse vectors****************************************************************
363  template< typename VT2 > // Type of the target sparse vector
364  friend inline typename EnableIf< UseAssign<VT2> >::Type
366  {
368 
372 
373  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
374 
375  const ResultType tmp( serial( rhs ) );
376  assign( ~lhs, tmp );
377  }
378  //**********************************************************************************************
379 
380  //**Addition assignment to dense vectors********************************************************
395  template< typename VT2 > // Type of the target dense vector
396  friend inline typename EnableIf< UseAssign<VT2> >::Type
398  {
400 
401  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
402 
404 
405  if( rhs.mat_.rows() == 0UL ) {
406  return;
407  }
408 
409  LT x( serial( rhs.vec_ ) ); // Evaluation of the left-hand side dense vector operator
410  RT A( serial( rhs.mat_ ) ); // Evaluation of the right-hand side sparse matrix operator
411 
412  BLAZE_INTERNAL_ASSERT( x.size() == rhs.vec_.size() , "Invalid vector size" );
413  BLAZE_INTERNAL_ASSERT( A.rows() == rhs.mat_.rows() , "Invalid number of rows" );
414  BLAZE_INTERNAL_ASSERT( A.columns() == rhs.mat_.columns(), "Invalid number of columns" );
415  BLAZE_INTERNAL_ASSERT( A.columns() == (~lhs).size() , "Invalid vector size" );
416 
417  addAssign( ~lhs, x * A );
418  }
419  //**********************************************************************************************
420 
421  //**Addition assignment to sparse vectors*******************************************************
422  // No special implementation for the addition assignment to sparse vectors.
423  //**********************************************************************************************
424 
425  //**Subtraction assignment to dense vectors*****************************************************
440  template< typename VT2 > // Type of the target dense vector
441  friend inline typename EnableIf< UseAssign<VT2> >::Type
443  {
445 
446  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
447 
449 
450  if( rhs.mat_.rows() == 0UL ) {
451  return;
452  }
453 
454  LT x( serial( rhs.vec_ ) ); // Evaluation of the left-hand side dense vector operator
455  RT A( serial( rhs.mat_ ) ); // Evaluation of the right-hand side sparse matrix operator
456 
457  BLAZE_INTERNAL_ASSERT( x.size() == rhs.vec_.size() , "Invalid vector size" );
458  BLAZE_INTERNAL_ASSERT( A.rows() == rhs.mat_.rows() , "Invalid number of rows" );
459  BLAZE_INTERNAL_ASSERT( A.columns() == rhs.mat_.columns(), "Invalid number of columns" );
460  BLAZE_INTERNAL_ASSERT( A.columns() == (~lhs).size() , "Invalid vector size" );
461 
462  subAssign( ~lhs, x * A );
463  }
464  //**********************************************************************************************
465 
466  //**Subtraction assignment to sparse vectors****************************************************
467  // No special implementation for the subtraction assignment to sparse vectors.
468  //**********************************************************************************************
469 
470  //**Multiplication assignment to dense vectors**************************************************
485  template< typename VT2 > // Type of the target dense vector
486  friend inline typename EnableIf< UseAssign<VT2> >::Type
488  {
490 
494 
495  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
496 
497  const ResultType tmp( serial( rhs ) );
498  multAssign( ~lhs, tmp );
499  }
500  //**********************************************************************************************
501 
502  //**Multiplication assignment to sparse vectors*************************************************
503  // No special implementation for the multiplication assignment to sparse vectors.
504  //**********************************************************************************************
505 
506  //**SMP assignment to dense vectors*************************************************************
520  template< typename VT2 > // Type of the target dense vector
521  friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
523  {
525 
526  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
527 
529 
530  if( rhs.mat_.rows() == 0UL ) {
531  reset( ~lhs );
532  return;
533  }
534 
535  LT x( rhs.vec_ ); // Evaluation of the left-hand side dense vector operator
536  RT A( rhs.mat_ ); // Evaluation of the right-hand side sparse matrix operator
537 
538  BLAZE_INTERNAL_ASSERT( x.size() == rhs.vec_.size() , "Invalid vector size" );
539  BLAZE_INTERNAL_ASSERT( A.rows() == rhs.mat_.rows() , "Invalid number of rows" );
540  BLAZE_INTERNAL_ASSERT( A.columns() == rhs.mat_.columns(), "Invalid number of columns" );
541  BLAZE_INTERNAL_ASSERT( A.columns() == (~lhs).size() , "Invalid vector size" );
542 
543  smpAssign( ~lhs, x * A );
544  }
545  //**********************************************************************************************
546 
547  //**SMP assignment to sparse vectors************************************************************
561  template< typename VT2 > // Type of the target sparse vector
562  friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
564  {
566 
570 
571  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
572 
573  const ResultType tmp( rhs );
574  smpAssign( ~lhs, tmp );
575  }
576  //**********************************************************************************************
577 
578  //**SMP addition assignment to dense vectors****************************************************
592  template< typename VT2 > // Type of the target dense vector
593  friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
595  {
597 
598  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
599 
601 
602  if( rhs.mat_.rows() == 0UL ) {
603  return;
604  }
605 
606  LT x( rhs.vec_ ); // Evaluation of the left-hand side dense vector operator
607  RT A( rhs.mat_ ); // Evaluation of the right-hand side sparse matrix operator
608 
609  BLAZE_INTERNAL_ASSERT( x.size() == rhs.vec_.size() , "Invalid vector size" );
610  BLAZE_INTERNAL_ASSERT( A.rows() == rhs.mat_.rows() , "Invalid number of rows" );
611  BLAZE_INTERNAL_ASSERT( A.columns() == rhs.mat_.columns(), "Invalid number of columns" );
612  BLAZE_INTERNAL_ASSERT( A.columns() == (~lhs).size() , "Invalid vector size" );
613 
614  smpAddAssign( ~lhs, x * A );
615  }
616  //**********************************************************************************************
617 
618  //**SMP addition assignment to sparse vectors***************************************************
619  // No special implementation for the SMP addition assignment to sparse vectors.
620  //**********************************************************************************************
621 
622  //**SMP subtraction assignment to dense vectors*************************************************
636  template< typename VT2 > // Type of the target dense vector
637  friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
639  {
641 
642  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
643 
645 
646  if( rhs.mat_.rows() == 0UL ) {
647  return;
648  }
649 
650  LT x( rhs.vec_ ); // Evaluation of the left-hand side dense vector operator
651  RT A( rhs.mat_ ); // Evaluation of the right-hand side sparse matrix operator
652 
653  BLAZE_INTERNAL_ASSERT( x.size() == rhs.vec_.size() , "Invalid vector size" );
654  BLAZE_INTERNAL_ASSERT( A.rows() == rhs.mat_.rows() , "Invalid number of rows" );
655  BLAZE_INTERNAL_ASSERT( A.columns() == rhs.mat_.columns(), "Invalid number of columns" );
656  BLAZE_INTERNAL_ASSERT( A.columns() == (~lhs).size() , "Invalid vector size" );
657 
658  smpSubAssign( ~lhs, x * A );
659  }
660  //**********************************************************************************************
661 
662  //**SMP subtraction assignment to sparse vectors************************************************
663  // No special implementation for the SMP subtraction assignment to sparse vectors.
664  //**********************************************************************************************
665 
666  //**SMP multiplication assignment to dense vectors**********************************************
680  template< typename VT2 > // Type of the target dense vector
681  friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
683  {
685 
689 
690  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
691 
692  const ResultType tmp( rhs );
693  smpMultAssign( ~lhs, tmp );
694  }
695  //**********************************************************************************************
696 
697  //**SMP multiplication assignment to sparse vectors*********************************************
698  // No special implementation for the SMP multiplication assignment to sparse vectors.
699  //**********************************************************************************************
700 
701  //**Compile time checks*************************************************************************
708  //**********************************************************************************************
709 };
710 //*************************************************************************************************
711 
712 
713 
714 
715 //=================================================================================================
716 //
717 // GLOBAL BINARY ARITHMETIC OPERATORS
718 //
719 //=================================================================================================
720 
721 //*************************************************************************************************
752 template< typename T1 // Type of the left-hand side dense vector
753  , typename T2 > // Type of the right-hand side sparse matrix
754 inline const typename DisableIf< IsMatMatMultExpr<T2>, TDVecTSMatMultExpr<T1,T2> >::Type
756 {
758 
759  if( (~vec).size() != (~mat).rows() )
760  throw std::invalid_argument( "Vector and matrix sizes do not match" );
761 
762  return TDVecTSMatMultExpr<T1,T2>( ~vec, ~mat );
763 }
764 //*************************************************************************************************
765 
766 
767 
768 
769 //=================================================================================================
770 //
771 // EXPRESSION TRAIT SPECIALIZATIONS
772 //
773 //=================================================================================================
774 
775 //*************************************************************************************************
777 template< typename VT, typename MT, bool AF >
778 struct SubvectorExprTrait< TDVecTSMatMultExpr<VT,MT>, AF >
779 {
780  public:
781  //**********************************************************************************************
782  typedef typename MultExprTrait< VT, typename SubmatrixExprTrait<const MT,AF>::Type >::Type Type;
783  //**********************************************************************************************
784 };
786 //*************************************************************************************************
787 
788 } // namespace blaze
789 
790 #endif
LeftOperand vec_
Left-hand side dense vector of the multiplication expression.
Definition: TDVecTSMatMultExpr.h:302
LeftOperand leftOperand() const
Returns the left-hand side dense vector operand.
Definition: TDVecTSMatMultExpr.h:241
Compile time check whether the given type is a computational expression template.This type trait clas...
Definition: IsComputation.h:89
void reset(DynamicMatrix< Type, SO > &m)
Resetting the given dense matrix.
Definition: DynamicMatrix.h:4599
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: TDVecTSMatMultExpr.h:275
VT::ResultType VRT
Result type of the left-hand side dense vector expression.
Definition: TDVecTSMatMultExpr.h:96
SelectType< evaluateMatrix, const MRT, MCT >::Type RT
Composite type of the right-hand side sparse matrix expression.
Definition: TDVecTSMatMultExpr.h:167
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:4329
TDVecTSMatMultExpr(const VT &vec, const MT &mat)
Constructor for the TDVecTSMatMultExpr class.
Definition: TDVecTSMatMultExpr.h:182
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:199
ResultType::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: TDVecTSMatMultExpr.h:150
Expression object for transpose dense vector-transpose sparse matrix multiplications.The TDVecTSMatMultExpr class represents the compile time expression for multiplications between transpose dense vectors and column-major sparse matrices.
Definition: Forward.h:136
SelectType< useAssign, const ResultType, const TDVecTSMatMultExpr & >::Type CompositeType
Data type for composite expression templates.
Definition: TDVecTSMatMultExpr.h:155
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2408
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:251
Header file for the DenseVector base class.
friend EnableIf< UseSMPAssign< VT2 > >::Type smpAssign(SparseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs)
SMP assignment of a transpose dense vector-transpose sparse matrix multiplication to a sparse vector ...
Definition: TDVecTSMatMultExpr.h:563
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:690
Header file for the Computation base class.
Header file for the RequiresEvaluation type trait.
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: TDVecTSMatMultExpr.h:263
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:107
Constraint on the data type.
SelectType< IsExpression< VT >::value, const VT, const VT & >::Type LeftOperand
Composite type of the left-hand side dense vector expression.
Definition: TDVecTSMatMultExpr.h:158
friend EnableIf< UseAssign< VT2 > >::Type addAssign(DenseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs)
Addition assignment of a transpose dense vector-transpose sparse matrix multiplication to a dense vec...
Definition: TDVecTSMatMultExpr.h:397
Constraint on the data type.
Header file for the MultExprTrait class template.
Compile time check to query the requirement to evaluate an expression.Via this type trait it is possi...
Definition: RequiresEvaluation.h:90
friend EnableIf< UseSMPAssign< VT2 > >::Type smpMultAssign(DenseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs)
SMP multiplication assignment of a transpose dense vector-transpose sparse matrix multiplication to a...
Definition: TDVecTSMatMultExpr.h:682
SelectType< IsExpression< MT >::value, const MT, const MT & >::Type RightOperand
Composite type of the right-hand side sparse matrix expression.
Definition: TDVecTSMatMultExpr.h:161
Compile time type selection.The SelectType class template selects one of the two given types T1 and T...
Definition: SelectType.h:59
Header file for the DisableIf class template.
Header file for the multiplication trait.
friend EnableIf< UseSMPAssign< VT2 > >::Type smpAssign(DenseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs)
SMP assignment of a transpose dense vector-transpose sparse matrix multiplication to a dense vector (...
Definition: TDVecTSMatMultExpr.h:522
#define BLAZE_CONSTRAINT_MUST_BE_COLUMN_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a column-major dense or sparse matri...
Definition: StorageOrder.h:161
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2412
Header file for the IsMatMatMultExpr type trait class.
size_t size() const
Returns the current size/dimension of the vector.
Definition: TDVecTSMatMultExpr.h:231
friend EnableIf< UseAssign< VT2 > >::Type assign(DenseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs)
Assignment of a transpose dense vector-transpose sparse matrix multiplication to a dense vector ( )...
Definition: TDVecTSMatMultExpr.h:323
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:70
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
Constraints on the storage order of matrix types.
friend EnableIf< UseSMPAssign< VT2 > >::Type smpSubAssign(DenseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs)
SMP subtraction assignment of a transpose dense vector-transpose sparse matrix multiplication to a de...
Definition: TDVecTSMatMultExpr.h:638
Constraint on the data type.
Header file for the SelectType class template.
Header file for all forward declarations for expression class templates.
RightOperand mat_
Right-hand side sparse matrix of the multiplication expression.
Definition: TDVecTSMatMultExpr.h:303
Header file for the EnableIf class template.
Header file for the serial shim.
MT::CompositeType MCT
Composite type of the right-hand side sparse matrix expression.
Definition: TDVecTSMatMultExpr.h:99
friend EnableIf< UseAssign< VT2 > >::Type assign(SparseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs)
Assignment of a transpose dense vector-transpose sparse matrix multiplication to a sparse vector ( )...
Definition: TDVecTSMatMultExpr.h:365
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: TDVecTSMatMultExpr.h:196
Header file for the SubmatrixExprTrait class template.
Removal of reference modifiers.The RemoveCV type trait removes any reference modifiers from the given...
Definition: RemoveReference.h:69
bool canSMPAssign() const
Returns whether the expression can be used in SMP assignments.
Definition: TDVecTSMatMultExpr.h:295
Header file for run time assertion macros.
Base template for the MultTrait class.
Definition: MultTrait.h:141
SelectType< evaluateVector, const VRT, VCT >::Type LT
Composite type of the left-hand side dense vector expression.
Definition: TDVecTSMatMultExpr.h:164
const size_t SMP_TDVECTSMATMULT_THRESHOLD
SMP dense vector/column-major sparse matrix multiplication threshold.This threshold specifies when a ...
Definition: Thresholds.h:575
friend EnableIf< UseAssign< VT2 > >::Type multAssign(DenseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs)
Multiplication assignment of a transpose dense vector-transpose sparse matrix multiplication to a den...
Definition: TDVecTSMatMultExpr.h:487
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.
VT::CompositeType VCT
Composite type of the left-hand side dense vector expression.
Definition: TDVecTSMatMultExpr.h:98
friend EnableIf< UseSMPAssign< VT2 > >::Type smpAddAssign(DenseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs)
SMP addition assignment of a transpose dense vector-transpose sparse matrix multiplication to a dense...
Definition: TDVecTSMatMultExpr.h:594
Header file for the TVecMatMultExpr base class.
MultTrait< VRT, MRT >::Type ResultType
Result type for expression template evaluations.
Definition: TDVecTSMatMultExpr.h:149
RightOperand rightOperand() const
Returns the right-hand side transpose sparse matrix operand.
Definition: TDVecTSMatMultExpr.h:251
Header file for the RemoveReference type trait.
ResultType::ElementType ElementType
Resulting element type.
Definition: TDVecTSMatMultExpr.h:151
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a dense, N-dimensional vector type...
Definition: DenseVector.h:79
Header file for the IsComputation type trait class.
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:2403
MT::ResultType MRT
Result type of the right-hand side sparse matrix expression.
Definition: TDVecTSMatMultExpr.h:97
Header file for basic type definitions.
#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.
TDVecTSMatMultExpr< VT, MT > This
Type of this TDVecTSMatMultExpr instance.
Definition: TDVecTSMatMultExpr.h:148
Header file for the thresholds for matrix/vector and matrix/matrix multiplications.
size_t rows(const Matrix< MT, SO > &m)
Returns the current number of rows of the matrix.
Definition: Matrix.h:154
#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
#define BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a sparse, N-dimensional matrix type...
Definition: SparseMatrix.h:79
bool isAligned() const
Returns whether the operands of the expression are properly aligned in memory.
Definition: TDVecTSMatMultExpr.h:285
Header file for the IsExpression type trait class.
friend EnableIf< UseAssign< VT2 > >::Type subAssign(DenseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs)
Subtraction assignment of a transpose dense vector-transpose sparse matrix multiplication to a dense ...
Definition: TDVecTSMatMultExpr.h:442
const ElementType ReturnType
Return type for expression template evaluations.
Definition: TDVecTSMatMultExpr.h:152
Header file for the FunctionTrace class.