Blaze 3.9
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 <blaze/math/Aliases.h>
69#include <blaze/util/Assert.h>
70#include <blaze/util/EnableIf.h>
73#include <blaze/util/mpl/If.h>
74#include <blaze/util/Types.h>
75
76
77namespace blaze {
78
79//=================================================================================================
80//
81// CLASS TDVECSMATMULTEXPR
82//
83//=================================================================================================
84
85//*************************************************************************************************
92template< typename VT // Type of the left-hand side dense vector
93 , typename MT > // Type of the right-hand side sparse matrix
95 : public TVecMatMultExpr< DenseVector< TDVecTSMatMultExpr<VT,MT>, true > >
96 , private Computation
97{
98 private:
99 //**Type definitions****************************************************************************
104 //**********************************************************************************************
105
106 //**********************************************************************************************
108 static constexpr bool evaluateVector = ( IsComputation_v<VT> || RequiresEvaluation_v<VT> );
109 //**********************************************************************************************
110
111 //**********************************************************************************************
113 static constexpr bool evaluateMatrix = RequiresEvaluation_v<MT>;
114 //**********************************************************************************************
115
116 //**********************************************************************************************
118
124 static constexpr bool useAssign = ( evaluateVector || evaluateMatrix );
125 //**********************************************************************************************
126
127 //**********************************************************************************************
129
130 template< typename VT2 >
131 static constexpr bool UseAssign_v = useAssign;
133 //**********************************************************************************************
134
135 //**********************************************************************************************
137
141 template< typename T1 >
142 static constexpr bool UseSMPAssign_v = useAssign;
144 //**********************************************************************************************
145
146 public:
147 //**Type definitions****************************************************************************
150
153
157 using ReturnType = const ElementType;
158
161
163 using LeftOperand = If_t< IsExpression_v<VT>, const VT, const VT& >;
164
166 using RightOperand = If_t< IsExpression_v<MT>, const MT, const MT& >;
167
170
173 //**********************************************************************************************
174
175 //**Compilation flags***************************************************************************
177 static constexpr bool simdEnabled = false;
178
180 static constexpr bool smpAssignable =
181 ( !evaluateVector && VT::smpAssignable && !evaluateMatrix && MT::smpAssignable );
182 //**********************************************************************************************
183
184 //**Constructor*********************************************************************************
187 inline TDVecTSMatMultExpr( const VT& vec, const MT& mat ) noexcept
188 : vec_( vec ) // Left-hand side dense vector of the multiplication expression
189 , mat_( mat ) // Right-hand side sparse matrix of the multiplication expression
190 {
191 BLAZE_INTERNAL_ASSERT( vec_.size() == mat.rows(), "Invalid vector and matrix sizes" );
192 }
193 //**********************************************************************************************
194
195 //**Subscript operator**************************************************************************
201 inline ReturnType operator[]( size_t index ) const {
202 BLAZE_INTERNAL_ASSERT( index < mat_.columns(), "Invalid vector access index" );
203 return vec_ * column( mat_, index, unchecked );
204 }
205 //**********************************************************************************************
206
207 //**At function*********************************************************************************
214 inline ReturnType at( size_t index ) const {
215 if( index >= mat_.columns() ) {
216 BLAZE_THROW_OUT_OF_RANGE( "Invalid vector access index" );
217 }
218 return (*this)[index];
219 }
220 //**********************************************************************************************
221
222 //**Size function*******************************************************************************
227 inline size_t size() const noexcept {
228 return mat_.columns();
229 }
230 //**********************************************************************************************
231
232 //**Left operand access*************************************************************************
237 inline LeftOperand leftOperand() const noexcept {
238 return vec_;
239 }
240 //**********************************************************************************************
241
242 //**Right operand access************************************************************************
247 inline RightOperand rightOperand() const noexcept {
248 return mat_;
249 }
250 //**********************************************************************************************
251
252 //**********************************************************************************************
258 template< typename T >
259 inline bool canAlias( const T* alias ) const noexcept {
260 return ( vec_.isAliased( alias ) || mat_.isAliased( alias ) );
261 }
262 //**********************************************************************************************
263
264 //**********************************************************************************************
270 template< typename T >
271 inline bool isAliased( const T* alias ) const noexcept {
272 return ( vec_.isAliased( alias ) || mat_.isAliased( alias ) );
273 }
274 //**********************************************************************************************
275
276 //**********************************************************************************************
281 inline bool isAligned() const noexcept {
282 return vec_.isAligned();
283 }
284 //**********************************************************************************************
285
286 //**********************************************************************************************
291 inline bool canSMPAssign() const noexcept {
292 return ( size() > SMP_TDVECTSMATMULT_THRESHOLD );
293 }
294 //**********************************************************************************************
295
296 private:
297 //**Member variables****************************************************************************
300 //**********************************************************************************************
301
302 //**Assignment to dense vectors*****************************************************************
317 template< typename VT2 > // Type of the target dense vector
318 friend inline auto assign( DenseVector<VT2,true>& lhs, const TDVecTSMatMultExpr& rhs )
320 {
322
323 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
324
325 if( rhs.mat_.rows() == 0UL ) {
326 reset( *lhs );
327 return;
328 }
329
330 LT x( serial( rhs.vec_ ) ); // Evaluation of the left-hand side dense vector operator
331 RT A( serial( rhs.mat_ ) ); // Evaluation of the right-hand side sparse matrix operator
332
333 BLAZE_INTERNAL_ASSERT( x.size() == rhs.vec_.size() , "Invalid vector size" );
334 BLAZE_INTERNAL_ASSERT( A.rows() == rhs.mat_.rows() , "Invalid number of rows" );
335 BLAZE_INTERNAL_ASSERT( A.columns() == rhs.mat_.columns(), "Invalid number of columns" );
336 BLAZE_INTERNAL_ASSERT( A.columns() == (*lhs).size() , "Invalid vector size" );
337
338 assign( *lhs, x * A );
339 }
340 //**********************************************************************************************
341
342 //**Assignment to sparse vectors****************************************************************
357 template< typename VT2 > // Type of the target sparse vector
358 friend inline auto assign( SparseVector<VT2,true>& lhs, const TDVecTSMatMultExpr& rhs )
360 {
362
366
367 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
368
369 const ResultType tmp( serial( rhs ) );
370 assign( *lhs, tmp );
371 }
372 //**********************************************************************************************
373
374 //**Addition assignment to dense vectors********************************************************
389 template< typename VT2 > // Type of the target dense vector
390 friend inline auto addAssign( DenseVector<VT2,true>& lhs, const TDVecTSMatMultExpr& rhs )
392 {
394
395 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
396
397 if( rhs.mat_.rows() == 0UL ) {
398 return;
399 }
400
401 LT x( serial( rhs.vec_ ) ); // Evaluation of the left-hand side dense vector operator
402 RT A( serial( rhs.mat_ ) ); // Evaluation of the right-hand side sparse matrix operator
403
404 BLAZE_INTERNAL_ASSERT( x.size() == rhs.vec_.size() , "Invalid vector size" );
405 BLAZE_INTERNAL_ASSERT( A.rows() == rhs.mat_.rows() , "Invalid number of rows" );
406 BLAZE_INTERNAL_ASSERT( A.columns() == rhs.mat_.columns(), "Invalid number of columns" );
407 BLAZE_INTERNAL_ASSERT( A.columns() == (*lhs).size() , "Invalid vector size" );
408
409 addAssign( *lhs, x * A );
410 }
411 //**********************************************************************************************
412
413 //**Addition assignment to sparse vectors*******************************************************
414 // No special implementation for the addition assignment to sparse vectors.
415 //**********************************************************************************************
416
417 //**Subtraction assignment to dense vectors*****************************************************
432 template< typename VT2 > // Type of the target dense vector
433 friend inline auto subAssign( DenseVector<VT2,true>& lhs, const TDVecTSMatMultExpr& rhs )
435 {
437
438 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
439
440 if( rhs.mat_.rows() == 0UL ) {
441 return;
442 }
443
444 LT x( serial( rhs.vec_ ) ); // Evaluation of the left-hand side dense vector operator
445 RT A( serial( rhs.mat_ ) ); // Evaluation of the right-hand side sparse matrix operator
446
447 BLAZE_INTERNAL_ASSERT( x.size() == rhs.vec_.size() , "Invalid vector size" );
448 BLAZE_INTERNAL_ASSERT( A.rows() == rhs.mat_.rows() , "Invalid number of rows" );
449 BLAZE_INTERNAL_ASSERT( A.columns() == rhs.mat_.columns(), "Invalid number of columns" );
450 BLAZE_INTERNAL_ASSERT( A.columns() == (*lhs).size() , "Invalid vector size" );
451
452 subAssign( *lhs, x * A );
453 }
454 //**********************************************************************************************
455
456 //**Subtraction assignment to sparse vectors****************************************************
457 // No special implementation for the subtraction assignment to sparse vectors.
458 //**********************************************************************************************
459
460 //**Multiplication assignment to dense vectors**************************************************
475 template< typename VT2 > // Type of the target dense vector
476 friend inline auto multAssign( DenseVector<VT2,true>& lhs, const TDVecTSMatMultExpr& rhs )
478 {
480
484
485 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
486
487 const ResultType tmp( serial( rhs ) );
488 multAssign( *lhs, tmp );
489 }
490 //**********************************************************************************************
491
492 //**Multiplication assignment to sparse vectors*************************************************
493 // No special implementation for the multiplication assignment to sparse vectors.
494 //**********************************************************************************************
495
496 //**Division assignment to dense vectors********************************************************
511 template< typename VT2 > // Type of the target dense vector
512 friend inline auto divAssign( DenseVector<VT2,true>& lhs, const TDVecTSMatMultExpr& rhs )
514 {
516
520
521 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
522
523 const ResultType tmp( serial( rhs ) );
524 divAssign( *lhs, tmp );
525 }
526 //**********************************************************************************************
527
528 //**Division assignment to sparse vectors*******************************************************
529 // No special implementation for the division assignment to sparse vectors.
530 //**********************************************************************************************
531
532 //**SMP assignment to dense vectors*************************************************************
546 template< typename VT2 > // Type of the target dense vector
547 friend inline auto smpAssign( DenseVector<VT2,true>& lhs, const TDVecTSMatMultExpr& rhs )
549 {
551
552 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
553
554 if( rhs.mat_.rows() == 0UL ) {
555 reset( *lhs );
556 return;
557 }
558
559 LT x( rhs.vec_ ); // Evaluation of the left-hand side dense vector operator
560 RT A( rhs.mat_ ); // Evaluation of the right-hand side sparse matrix operator
561
562 BLAZE_INTERNAL_ASSERT( x.size() == rhs.vec_.size() , "Invalid vector size" );
563 BLAZE_INTERNAL_ASSERT( A.rows() == rhs.mat_.rows() , "Invalid number of rows" );
564 BLAZE_INTERNAL_ASSERT( A.columns() == rhs.mat_.columns(), "Invalid number of columns" );
565 BLAZE_INTERNAL_ASSERT( A.columns() == (*lhs).size() , "Invalid vector size" );
566
567 smpAssign( *lhs, x * A );
568 }
569 //**********************************************************************************************
570
571 //**SMP assignment to sparse vectors************************************************************
585 template< typename VT2 > // Type of the target sparse vector
586 friend inline auto smpAssign( SparseVector<VT2,true>& lhs, const TDVecTSMatMultExpr& rhs )
588 {
590
594
595 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
596
597 const ResultType tmp( rhs );
598 smpAssign( *lhs, tmp );
599 }
600 //**********************************************************************************************
601
602 //**SMP addition assignment to dense vectors****************************************************
616 template< typename VT2 > // Type of the target dense vector
617 friend inline auto smpAddAssign( DenseVector<VT2,true>& lhs, const TDVecTSMatMultExpr& rhs )
619 {
621
622 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
623
624 if( rhs.mat_.rows() == 0UL ) {
625 return;
626 }
627
628 LT x( rhs.vec_ ); // Evaluation of the left-hand side dense vector operator
629 RT A( rhs.mat_ ); // Evaluation of the right-hand side sparse matrix operator
630
631 BLAZE_INTERNAL_ASSERT( x.size() == rhs.vec_.size() , "Invalid vector size" );
632 BLAZE_INTERNAL_ASSERT( A.rows() == rhs.mat_.rows() , "Invalid number of rows" );
633 BLAZE_INTERNAL_ASSERT( A.columns() == rhs.mat_.columns(), "Invalid number of columns" );
634 BLAZE_INTERNAL_ASSERT( A.columns() == (*lhs).size() , "Invalid vector size" );
635
636 smpAddAssign( *lhs, x * A );
637 }
638 //**********************************************************************************************
639
640 //**SMP addition assignment to sparse vectors***************************************************
641 // No special implementation for the SMP addition assignment to sparse vectors.
642 //**********************************************************************************************
643
644 //**SMP subtraction assignment to dense vectors*************************************************
658 template< typename VT2 > // Type of the target dense vector
659 friend inline auto smpSubAssign( DenseVector<VT2,true>& lhs, const TDVecTSMatMultExpr& rhs )
661 {
663
664 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
665
666 if( rhs.mat_.rows() == 0UL ) {
667 return;
668 }
669
670 LT x( rhs.vec_ ); // Evaluation of the left-hand side dense vector operator
671 RT A( rhs.mat_ ); // Evaluation of the right-hand side sparse matrix operator
672
673 BLAZE_INTERNAL_ASSERT( x.size() == rhs.vec_.size() , "Invalid vector size" );
674 BLAZE_INTERNAL_ASSERT( A.rows() == rhs.mat_.rows() , "Invalid number of rows" );
675 BLAZE_INTERNAL_ASSERT( A.columns() == rhs.mat_.columns(), "Invalid number of columns" );
676 BLAZE_INTERNAL_ASSERT( A.columns() == (*lhs).size() , "Invalid vector size" );
677
678 smpSubAssign( *lhs, x * A );
679 }
680 //**********************************************************************************************
681
682 //**SMP subtraction assignment to sparse vectors************************************************
683 // No special implementation for the SMP subtraction assignment to sparse vectors.
684 //**********************************************************************************************
685
686 //**SMP multiplication assignment to dense vectors**********************************************
700 template< typename VT2 > // Type of the target dense vector
701 friend inline auto smpMultAssign( DenseVector<VT2,true>& lhs, const TDVecTSMatMultExpr& rhs )
703 {
705
709
710 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
711
712 const ResultType tmp( rhs );
713 smpMultAssign( *lhs, tmp );
714 }
715 //**********************************************************************************************
716
717 //**SMP multiplication assignment to sparse vectors*********************************************
718 // No special implementation for the SMP multiplication assignment to sparse vectors.
719 //**********************************************************************************************
720
721 //**SMP division assignment to dense vectors****************************************************
735 template< typename VT2 > // Type of the target dense vector
736 friend inline auto smpDivAssign( DenseVector<VT2,true>& lhs, const TDVecTSMatMultExpr& rhs )
738 {
740
744
745 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
746
747 const ResultType tmp( rhs );
748 smpDivAssign( *lhs, tmp );
749 }
750 //**********************************************************************************************
751
752 //**SMP division assignment to sparse vectors***************************************************
753 // No special implementation for the SMP division assignment to sparse vectors.
754 //**********************************************************************************************
755
756 //**Compile time checks*************************************************************************
765 //**********************************************************************************************
766};
767//*************************************************************************************************
768
769
770
771
772//=================================================================================================
773//
774// GLOBAL BINARY ARITHMETIC OPERATORS
775//
776//=================================================================================================
777
778//*************************************************************************************************
791template< typename VT // Type of the left-hand side dense vector
792 , typename MT // Type of the right-hand side sparse matrix
793 , DisableIf_t< ( IsIdentity_v<MT> &&
794 IsSame_v< ElementType_t<VT>, ElementType_t<MT> > ) ||
795 IsZero_v<MT> >* = nullptr >
796inline const TDVecTSMatMultExpr<VT,MT>
797 tdvectsmatmult( const DenseVector<VT,true>& vec, const SparseMatrix<MT,true>& mat )
798{
800
801 BLAZE_INTERNAL_ASSERT( (*vec).size() == (*mat).rows(), "Invalid vector and matrix sizes" );
802
803 return TDVecTSMatMultExpr<VT,MT>( *vec, *mat );
804}
806//*************************************************************************************************
807
808
809//*************************************************************************************************
823template< typename VT // Type of the left-hand side dense vector
824 , typename MT // Type of the right-hand side sparse matrix
825 , EnableIf_t< IsIdentity_v<MT> &&
826 IsSame_v< ElementType_t<VT>, ElementType_t<MT> > >* = nullptr >
827inline const VT&
828 tdvectsmatmult( const DenseVector<VT,true>& vec, const SparseMatrix<MT,true>& mat )
829{
831
832 MAYBE_UNUSED( mat );
833
834 BLAZE_INTERNAL_ASSERT( (*vec).size() == (*mat).rows(), "Invalid vector and matrix sizes" );
835
836 return (*vec);
837}
839//*************************************************************************************************
840
841
842//*************************************************************************************************
855template< typename VT // Type of the left-hand side dense vector
856 , typename MT // Type of the right-hand side sparse matrix
857 , EnableIf_t< IsZero_v<MT> >* = nullptr >
858inline decltype(auto)
859 tdvectsmatmult( const DenseVector<VT,true>& vec, const SparseMatrix<MT,true>& mat )
860{
862
863 MAYBE_UNUSED( vec );
864
865 BLAZE_INTERNAL_ASSERT( (*vec).size() == (*mat).rows(), "Invalid vector and matrix sizes" );
866
867 using ReturnType = const MultTrait_t< ResultType_t<VT>, ResultType_t<MT> >;
868
871
872 return ReturnType( (*mat).columns() );
873}
875//*************************************************************************************************
876
877
878//*************************************************************************************************
909template< typename VT // Type of the left-hand side dense vector
910 , typename MT > // Type of the right-hand side sparse matrix
911inline decltype(auto)
912 operator*( const DenseVector<VT,true>& vec, const SparseMatrix<MT,true>& mat )
913{
915
917
918 if( (*vec).size() != (*mat).rows() ) {
919 BLAZE_THROW_INVALID_ARGUMENT( "Vector and matrix sizes do not match" );
920 }
921
922 return tdvectsmatmult( *vec, *mat );
923}
924//*************************************************************************************************
925
926
927
928
929//=================================================================================================
930//
931// ISALIGNED SPECIALIZATIONS
932//
933//=================================================================================================
934
935//*************************************************************************************************
937template< typename VT, typename MT >
938struct IsAligned< TDVecTSMatMultExpr<VT,MT> >
939 : public IsAligned<VT>
940{};
942//*************************************************************************************************
943
944} // namespace blaze
945
946#endif
Header file for auxiliary alias declarations.
typename T::CompositeType CompositeType_t
Alias declaration for nested CompositeType type definitions.
Definition: Aliases.h:110
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.
Definition: Aliases.h:450
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.
Definition: Aliases.h:190
typename T::TransposeType TransposeType_t
Alias declaration for nested TransposeType type definitions.
Definition: Aliases.h:550
Header file for run time assertion macros.
Header file for the blaze::checked and blaze::unchecked instances.
Constraints on the storage order of matrix types.
Header file for the EnableIf class template.
Header file for the function trace functionality.
Header file for the If class template.
Header file for the IsAligned type trait.
Header file for the IsComputation type trait class.
Header file for the IsExpression type trait class.
Header file for the IsIdentity type trait.
Deactivation of problematic macros.
Header file for the MAYBE_UNUSED function template.
Header file for the multiplication trait.
Constraint on the transpose flag of vector types.
Constraint on the data type.
Base class for N-dimensional dense vectors.
Definition: DenseVector.h:77
Base class for sparse matrices.
Definition: SparseMatrix.h:77
Base class for sparse vectors.
Definition: SparseVector.h:72
Expression object for transpose dense vector-transpose sparse matrix multiplications.
Definition: TDVecTSMatMultExpr.h:97
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition: TDVecTSMatMultExpr.h:180
If_t< IsExpression_v< VT >, const VT, const VT & > LeftOperand
Composite type of the left-hand side dense vector expression.
Definition: TDVecTSMatMultExpr.h:163
If_t< evaluateVector, const VRT, VCT > LT
Composite type of the left-hand side dense vector expression.
Definition: TDVecTSMatMultExpr.h:169
CompositeType_t< VT > VCT
Composite type of the left-hand side dense vector expression.
Definition: TDVecTSMatMultExpr.h:102
LeftOperand leftOperand() const noexcept
Returns the left-hand side dense vector operand.
Definition: TDVecTSMatMultExpr.h:237
CompositeType_t< MT > MCT
Composite type of the right-hand side sparse matrix expression.
Definition: TDVecTSMatMultExpr.h:103
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: TDVecTSMatMultExpr.h:281
static constexpr bool evaluateMatrix
Compilation switch for the composite type of the right-hand side sparse matrix expression.
Definition: TDVecTSMatMultExpr.h:113
ReturnType at(size_t index) const
Checked access to the vector elements.
Definition: TDVecTSMatMultExpr.h:214
If_t< evaluateMatrix, const MRT, MCT > RT
Composite type of the right-hand side sparse matrix expression.
Definition: TDVecTSMatMultExpr.h:172
ElementType_t< ResultType > ElementType
Resulting element type.
Definition: TDVecTSMatMultExpr.h:156
const ElementType ReturnType
Return type for expression template evaluations.
Definition: TDVecTSMatMultExpr.h:157
static constexpr bool useAssign
Compilation switch for the evaluation strategy of the multiplication expression.
Definition: TDVecTSMatMultExpr.h:124
static constexpr bool evaluateVector
Compilation switch for the composite type of the left-hand side dense vector expression.
Definition: TDVecTSMatMultExpr.h:108
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: TDVecTSMatMultExpr.h:271
ResultType_t< VT > VRT
Result type of the left-hand side dense vector expression.
Definition: TDVecTSMatMultExpr.h:100
MultTrait_t< VRT, MRT > ResultType
Result type for expression template evaluations.
Definition: TDVecTSMatMultExpr.h:154
If_t< IsExpression_v< MT >, const MT, const MT & > RightOperand
Composite type of the right-hand side sparse matrix expression.
Definition: TDVecTSMatMultExpr.h:166
If_t< useAssign, const ResultType, const TDVecTSMatMultExpr & > CompositeType
Data type for composite expression templates.
Definition: TDVecTSMatMultExpr.h:160
TDVecTSMatMultExpr(const VT &vec, const MT &mat) noexcept
Constructor for the TDVecTSMatMultExpr class.
Definition: TDVecTSMatMultExpr.h:187
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: TDVecTSMatMultExpr.h:201
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: TDVecTSMatMultExpr.h:291
TransposeType_t< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: TDVecTSMatMultExpr.h:155
static constexpr bool simdEnabled
Compilation switch for the expression template evaluation strategy.
Definition: TDVecTSMatMultExpr.h:177
RightOperand rightOperand() const noexcept
Returns the right-hand side transpose sparse matrix operand.
Definition: TDVecTSMatMultExpr.h:247
RightOperand mat_
Right-hand side sparse matrix of the multiplication expression.
Definition: TDVecTSMatMultExpr.h:299
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: TDVecTSMatMultExpr.h:259
LeftOperand vec_
Left-hand side dense vector of the multiplication expression.
Definition: TDVecTSMatMultExpr.h:298
size_t size() const noexcept
Returns the current size/dimension of the vector.
Definition: TDVecTSMatMultExpr.h:227
ResultType_t< MT > MRT
Result type of the right-hand side sparse matrix expression.
Definition: TDVecTSMatMultExpr.h:101
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Header file for the Computation base class.
Header file for the DenseVector base class.
Header file for the TVecMatMultExpr base class.
decltype(auto) column(Matrix< MT, SO > &matrix, RCAs... args)
Creating a view on a specific column of the given matrix.
Definition: Column.h:137
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:812
friend auto addAssign(DenseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs) -> EnableIf_t< UseAssign_v< VT2 > >
Addition assignment of a transpose dense vector-transpose sparse matrix multiplication to a dense vec...
Definition: TDVecTSMatMultExpr.h:390
friend auto smpAddAssign(DenseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs) -> EnableIf_t< UseSMPAssign_v< VT2 > >
SMP addition assignment of a transpose dense vector-transpose sparse matrix multiplication to a dense...
Definition: TDVecTSMatMultExpr.h:617
friend auto assign(SparseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs) -> EnableIf_t< UseAssign_v< VT2 > >
Assignment of a transpose dense vector-transpose sparse matrix multiplication to a sparse vector ( ).
Definition: TDVecTSMatMultExpr.h:358
friend auto divAssign(DenseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs) -> EnableIf_t< UseAssign_v< VT2 > >
Division assignment of a transpose dense vector-transpose sparse matrix multiplication to a dense vec...
Definition: TDVecTSMatMultExpr.h:512
friend auto smpAssign(DenseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs) -> EnableIf_t< UseSMPAssign_v< VT2 > >
SMP assignment of a transpose dense vector-transpose sparse matrix multiplication to a dense vector (...
Definition: TDVecTSMatMultExpr.h:547
friend auto subAssign(DenseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs) -> EnableIf_t< UseAssign_v< VT2 > >
Subtraction assignment of a transpose dense vector-transpose sparse matrix multiplication to a dense ...
Definition: TDVecTSMatMultExpr.h:433
friend auto smpDivAssign(DenseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs) -> EnableIf_t< UseSMPAssign_v< VT2 > >
SMP division assignment of a transpose dense vector-transpose sparse matrix multiplication to a dense...
Definition: TDVecTSMatMultExpr.h:736
friend auto assign(DenseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs) -> EnableIf_t< UseAssign_v< VT2 > >
Assignment of a transpose dense vector-transpose sparse matrix multiplication to a dense vector ( ).
Definition: TDVecTSMatMultExpr.h:318
friend auto multAssign(DenseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs) -> EnableIf_t< UseAssign_v< VT2 > >
Multiplication assignment of a transpose dense vector-transpose sparse matrix multiplication to a den...
Definition: TDVecTSMatMultExpr.h:476
friend auto smpMultAssign(DenseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs) -> EnableIf_t< UseSMPAssign_v< VT2 > >
SMP multiplication assignment of a transpose dense vector-transpose sparse matrix multiplication to a...
Definition: TDVecTSMatMultExpr.h:701
friend auto smpSubAssign(DenseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs) -> EnableIf_t< UseSMPAssign_v< VT2 > >
SMP subtraction assignment of a transpose dense vector-transpose sparse matrix multiplication to a de...
Definition: TDVecTSMatMultExpr.h:659
friend auto smpAssign(SparseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs) -> EnableIf_t< UseSMPAssign_v< VT2 > >
SMP assignment of a transpose dense vector-transpose sparse matrix multiplication to a sparse vector ...
Definition: TDVecTSMatMultExpr.h:586
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.
Definition: RequiresEvaluation.h:81
#define BLAZE_CONSTRAINT_MUST_FORM_VALID_TVECMATMULTEXPR(T1, T2)
Constraint on the data type.
Definition: TVecMatMultExpr.h:104
#define BLAZE_CONSTRAINT_MUST_NOT_BE_MATMATMULTEXPR_TYPE(T)
Constraint on the data type.
Definition: MatMatMultExpr.h:83
#define BLAZE_CONSTRAINT_MUST_NOT_BE_ZERO_TYPE(T)
Constraint on the data type.
Definition: Zero.h:81
#define BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE(T)
Constraint on the data type.
Definition: SparseMatrix.h:61
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_VECTOR_TYPE(T)
Constraint on the data type.
Definition: DenseVector.h:61
#define BLAZE_CONSTRAINT_MUST_BE_ROW_VECTOR_TYPE(T)
Constraint on the data type.
Definition: RowVector.h:61
#define BLAZE_CONSTRAINT_MUST_BE_COLUMN_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.
Definition: ColumnMajorMatrix.h:61
#define BLAZE_CONSTRAINT_MUST_BE_ZERO_TYPE(T)
Constraint on the data type.
Definition: Zero.h:61
typename MultTrait< T1, T2 >::Type MultTrait_t
Auxiliary alias declaration for the MultTrait class template.
Definition: MultTrait.h:165
constexpr void reset(Matrix< MT, SO > &matrix)
Resetting the given matrix.
Definition: Matrix.h:806
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.
Definition: Assert.h:101
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition: EnableIf.h:138
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition: MaybeUnused.h:81
typename If< Condition >::template Type< T1, T2 > If_t
Auxiliary alias template for the If class template.
Definition: If.h:108
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.
Definition: Exception.h:331
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.
Definition: Exception.h:235
typename EnableIf<!Condition, T >::Type DisableIf_t
Auxiliary type for the EnableIf class template.
Definition: EnableIf.h:175
#define BLAZE_FUNCTION_TRACE
Function trace macro.
Definition: FunctionTrace.h:94
constexpr Unchecked unchecked
Global Unchecked instance.
Definition: Check.h:146
Header file for the exception macros of the math module.
Header file for all forward declarations for expression class templates.
Header file for the reset shim.
Header file for the serial shim.
Base class for all compute expression templates.
Definition: Computation.h:68
Base class for all vector/matrix multiplication expression templates.
Definition: TVecMatMultExpr.h:69
Header file for the thresholds for matrix/vector and matrix/matrix multiplications.
Header file for the IsZero type trait.
Header file for the RequiresEvaluation type trait.
Header file for basic type definitions.