Blaze  3.6
SMatTDMatSubExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_SMATTDMATSUBEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_SMATTDMATSUBEXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <utility>
44 #include <blaze/math/Aliases.h>
52 #include <blaze/math/Exception.h>
62 #include <blaze/util/Assert.h>
63 #include <blaze/util/DisableIf.h>
64 #include <blaze/util/EnableIf.h>
67 #include <blaze/util/MaybeUnused.h>
68 #include <blaze/util/mpl/If.h>
69 #include <blaze/util/Types.h>
71 
72 
73 namespace blaze {
74 
75 //=================================================================================================
76 //
77 // CLASS SMATTDMATSUBEXPR
78 //
79 //=================================================================================================
80 
81 //*************************************************************************************************
88 template< typename MT1 // Type of the left-hand side sparse matrix
89  , typename MT2 > // Type of the right-hand side dense matrix
90 class SMatTDMatSubExpr
91  : public MatMatSubExpr< DenseMatrix< SMatTDMatSubExpr<MT1,MT2>, true > >
92  , private Computation
93 {
94  private:
95  //**Type definitions****************************************************************************
100  //**********************************************************************************************
101 
102  //**Return type evaluation**********************************************************************
104 
109  static constexpr bool returnExpr = !IsTemporary_v<RN1> && !IsTemporary_v<RN2>;
110 
112  using ExprReturnType = decltype( std::declval<RN1>() - std::declval<RN2>() );
113  //**********************************************************************************************
114 
115  //**Parallel evaluation strategy****************************************************************
117 
122  template< typename MT >
123  static constexpr bool UseSMPAssign_v = ( !MT1::smpAssignable || !MT2::smpAssignable );
125  //**********************************************************************************************
126 
127  public:
128  //**Type definitions****************************************************************************
135 
138 
140  using CompositeType = const ResultType;
141 
143  using LeftOperand = If_t< IsExpression_v<MT1>, const MT1, const MT1& >;
144 
146  using RightOperand = If_t< IsExpression_v<MT2>, const MT2, const MT2& >;
147  //**********************************************************************************************
148 
149  //**Compilation flags***************************************************************************
151  static constexpr bool simdEnabled = false;
152 
154  static constexpr bool smpAssignable = false;
155  //**********************************************************************************************
156 
157  //**Constructor*********************************************************************************
163  explicit inline SMatTDMatSubExpr( const MT1& lhs, const MT2& rhs ) noexcept
164  : lhs_( lhs ) // Left-hand side sparse matrix of the subtraction expression
165  , rhs_( rhs ) // Right-hand side dense matrix of the subtraction expression
166  {
167  BLAZE_INTERNAL_ASSERT( lhs.rows() == rhs.rows() , "Invalid number of rows" );
168  BLAZE_INTERNAL_ASSERT( lhs.columns() == rhs.columns(), "Invalid number of columns" );
169  }
170  //**********************************************************************************************
171 
172  //**Access operator*****************************************************************************
179  inline ReturnType operator()( size_t i, size_t j ) const {
180  BLAZE_INTERNAL_ASSERT( i < lhs_.rows() , "Invalid row access index" );
181  BLAZE_INTERNAL_ASSERT( j < lhs_.columns(), "Invalid column access index" );
182  return lhs_(i,j) - rhs_(i,j);
183  }
184  //**********************************************************************************************
185 
186  //**At function*********************************************************************************
194  inline ReturnType at( size_t i, size_t j ) const {
195  if( i >= lhs_.rows() ) {
196  BLAZE_THROW_OUT_OF_RANGE( "Invalid row access index" );
197  }
198  if( j >= lhs_.columns() ) {
199  BLAZE_THROW_OUT_OF_RANGE( "Invalid column access index" );
200  }
201  return (*this)(i,j);
202  }
203  //**********************************************************************************************
204 
205  //**Rows function*******************************************************************************
210  inline size_t rows() const noexcept {
211  return lhs_.rows();
212  }
213  //**********************************************************************************************
214 
215  //**Columns function****************************************************************************
220  inline size_t columns() const noexcept {
221  return lhs_.columns();
222  }
223  //**********************************************************************************************
224 
225  //**Left operand access*************************************************************************
230  inline LeftOperand leftOperand() const noexcept {
231  return lhs_;
232  }
233  //**********************************************************************************************
234 
235  //**Right operand access************************************************************************
240  inline RightOperand rightOperand() const noexcept {
241  return rhs_;
242  }
243  //**********************************************************************************************
244 
245  //**********************************************************************************************
251  template< typename T >
252  inline bool canAlias( const T* alias ) const noexcept {
253  return ( lhs_.canAlias( alias ) ) ||
254  ( IsExpression_v<MT2> && rhs_.canAlias( alias ) );
255  }
256  //**********************************************************************************************
257 
258  //**********************************************************************************************
264  template< typename T >
265  inline bool isAliased( const T* alias ) const noexcept {
266  return lhs_.isAliased( alias ) && rhs_.isAliased( alias );
267  }
268  //**********************************************************************************************
269 
270  private:
271  //**Member variables****************************************************************************
274  //**********************************************************************************************
275 
276  //**Assignment to dense matrices****************************************************************
288  template< typename MT // Type of the target dense matrix
289  , bool SO2 > // Storage order of the target dense matrix
290  friend inline void assign( DenseMatrix<MT,SO2>& lhs, const SMatTDMatSubExpr& rhs )
291  {
293 
294  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
295  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
296 
297  assign ( ~lhs, -rhs.rhs_ );
298  addAssign( ~lhs, rhs.lhs_ );
299  }
301  //**********************************************************************************************
302 
303  //**Assignment to sparse matrices***************************************************************
315  template< typename MT // Type of the target sparse matrix
316  , bool SO2 > // Storage order of the target sparse matrix
317  friend inline void assign( SparseMatrix<MT,SO2>& lhs, const SMatTDMatSubExpr& rhs )
318  {
320 
322 
329 
330  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
331  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
332 
333  const TmpType tmp( serial( rhs ) );
334  assign( ~lhs, tmp );
335  }
337  //**********************************************************************************************
338 
339  //**Addition assignment to dense matrices*******************************************************
352  template< typename MT // Type of the target dense matrix
353  , bool SO2 > // Storage order of the target dense matrix
354  friend inline void addAssign( DenseMatrix<MT,SO2>& lhs, const SMatTDMatSubExpr& rhs )
355  {
357 
358  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
359  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
360 
361  subAssign( ~lhs, rhs.rhs_ );
362  addAssign( ~lhs, rhs.lhs_ );
363  }
365  //**********************************************************************************************
366 
367  //**Addition assignment to sparse matrices******************************************************
368  // No special implementation for the addition assignment to sparse matrices.
369  //**********************************************************************************************
370 
371  //**Subtraction assignment to dense matrices****************************************************
384  template< typename MT // Type of the target dense matrix
385  , bool SO2 > // Storage order of the target dense matrix
386  friend inline void subAssign( DenseMatrix<MT,SO2>& lhs, const SMatTDMatSubExpr& rhs )
387  {
389 
390  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
391  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
392 
393  addAssign( ~lhs, rhs.rhs_ );
394  subAssign( ~lhs, rhs.lhs_ );
395  }
397  //**********************************************************************************************
398 
399  //**Subtraction assignment to sparse matrices***************************************************
400  // No special implementation for the subtraction assignment to sparse matrices.
401  //**********************************************************************************************
402 
403  //**Schur product assignment to dense matrices**************************************************
416  template< typename MT // Type of the target dense matrix
417  , bool SO2 > // Storage order of the target dense matrix
418  friend inline void schurAssign( DenseMatrix<MT,SO2>& lhs, const SMatTDMatSubExpr& rhs )
419  {
421 
425 
426  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
427  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
428 
429  const ResultType tmp( serial( rhs ) );
430  schurAssign( ~lhs, tmp );
431  }
433  //**********************************************************************************************
434 
435  //**Schur product assignment to sparse matrices*************************************************
436  // No special implementation for the Schur product assignment to sparse matrices.
437  //**********************************************************************************************
438 
439  //**Multiplication assignment to dense matrices*************************************************
440  // No special implementation for the multiplication assignment to dense matrices.
441  //**********************************************************************************************
442 
443  //**Multiplication assignment to sparse matrices************************************************
444  // No special implementation for the multiplication assignment to sparse matrices.
445  //**********************************************************************************************
446 
447  //**SMP assignment to dense matrices************************************************************
461  template< typename MT // Type of the target dense matrix
462  , bool SO2 > // Storage order of the target dense matrix
463  friend inline auto smpAssign( DenseMatrix<MT,SO2>& lhs, const SMatTDMatSubExpr& rhs )
464  -> EnableIf_t< UseSMPAssign_v<MT> >
465  {
467 
468  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
469  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
470 
471  smpAssign ( ~lhs, -rhs.rhs_ );
472  smpAddAssign( ~lhs, rhs.lhs_ );
473  }
475  //**********************************************************************************************
476 
477  //**SMP assignment to sparse matrices***********************************************************
491  template< typename MT // Type of the target sparse matrix
492  , bool SO2 > // Storage order of the target sparse matrix
493  friend inline auto smpAssign( SparseMatrix<MT,SO2>& lhs, const SMatTDMatSubExpr& rhs )
494  -> EnableIf_t< UseSMPAssign_v<MT> >
495  {
497 
498  using TmpType = If_t< SO2, ResultType, OppositeType >;
499 
506 
507  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
508  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
509 
510  const TmpType tmp( rhs );
511  smpAssign( ~lhs, tmp );
512  }
514  //**********************************************************************************************
515 
516  //**SMP addition assignment to dense matrices***************************************************
531  template< typename MT // Type of the target dense matrix
532  , bool SO2 > // Storage order of the target dense matrix
533  friend inline auto smpAddAssign( DenseMatrix<MT,SO2>& lhs, const SMatTDMatSubExpr& rhs )
534  -> EnableIf_t< UseSMPAssign_v<MT> >
535  {
537 
538  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
539  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
540 
541  smpSubAssign( ~lhs, rhs.rhs_ );
542  smpAddAssign( ~lhs, rhs.lhs_ );
543  }
545  //**********************************************************************************************
546 
547  //**SMP addition assignment to sparse matrices**************************************************
548  // No special implementation for the SMP addition assignment to sparse matrices.
549  //**********************************************************************************************
550 
551  //**SMP subtraction assignment to dense matrices************************************************
566  template< typename MT // Type of the target dense matrix
567  , bool SO2 > // Storage order of the target dense matrix
568  friend inline auto smpSubAssign( DenseMatrix<MT,SO2>& lhs, const SMatTDMatSubExpr& rhs )
569  -> EnableIf_t< UseSMPAssign_v<MT> >
570  {
572 
573  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
574  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
575 
576  smpAddAssign( ~lhs, rhs.rhs_ );
577  smpSubAssign( ~lhs, rhs.lhs_ );
578  }
580  //**********************************************************************************************
581 
582  //**SMP subtraction assignment to sparse matrices***********************************************
583  // No special implementation for the SMP subtraction assignment to sparse matrices.
584  //**********************************************************************************************
585 
586  //**SMP Schur product assignment to dense matrices**********************************************
601  template< typename MT // Type of the target dense matrix
602  , bool SO2 > // Storage order of the target dense matrix
603  friend inline auto smpSchurAssign( DenseMatrix<MT,SO2>& lhs, const SMatTDMatSubExpr& rhs )
604  -> EnableIf_t< UseSMPAssign_v<MT> >
605  {
607 
611 
612  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
613  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
614 
615  const ResultType tmp( rhs );
616  smpSchurAssign( ~lhs, tmp );
617  }
619  //**********************************************************************************************
620 
621  //**SMP Schur product assignment to sparse matrices*********************************************
622  // No special implementation for the SMP Schur product assignment to sparse matrices.
623  //**********************************************************************************************
624 
625  //**SMP multiplication assignment to dense matrices*********************************************
626  // No special implementation for the SMP multiplication assignment to dense matrices.
627  //**********************************************************************************************
628 
629  //**SMP multiplication assignment to sparse matrices********************************************
630  // No special implementation for the SMP multiplication assignment to sparse matrices.
631  //**********************************************************************************************
632 
633  //**Compile time checks*************************************************************************
641  //**********************************************************************************************
642 };
643 //*************************************************************************************************
644 
645 
646 
647 
648 //=================================================================================================
649 //
650 // GLOBAL BINARY ARITHMETIC OPERATORS
651 //
652 //=================================================================================================
653 
654 //*************************************************************************************************
667 template< typename MT1 // Type of the left-hand side sparse matrix
668  , typename MT2 // Type of the right-hand side dense matrix
669  , DisableIf_t< IsZero_v<MT1> &&
670  IsSame_v< ElementType_t<MT1>, ElementType_t<MT2> > >* = nullptr >
671 inline const SMatTDMatSubExpr<MT1,MT2>
672  smattdmatsub( const SparseMatrix<MT1,false>& lhs, const DenseMatrix<MT2,true>& rhs )
673 {
675 
676  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == (~rhs).rows() , "Invalid number of rows" );
677  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == (~rhs).columns(), "Invalid number of columns" );
678 
679  return SMatTDMatSubExpr<MT1,MT2>( ~lhs, ~rhs );
680 }
682 //*************************************************************************************************
683 
684 
685 //*************************************************************************************************
699 template< typename MT1 // Type of the left-hand side sparse matrix
700  , typename MT2 // Type of the right-hand side dense matrix
701  , EnableIf_t< IsZero_v<MT1> &&
702  IsSame_v< ElementType_t<MT1>, ElementType_t<MT2> > >* = nullptr >
703 inline decltype(auto)
704  smattdmatsub( const SparseMatrix<MT1,false>& lhs, const DenseMatrix<MT2,true>& rhs )
705 {
707 
708  MAYBE_UNUSED( lhs );
709 
710  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == (~rhs).rows() , "Invalid number of rows" );
711  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == (~rhs).columns(), "Invalid number of columns" );
712 
713  return -(~rhs);
714 }
716 //*************************************************************************************************
717 
718 
719 //*************************************************************************************************
750 template< typename MT1 // Type of the left-hand side sparse matrix
751  , typename MT2 > // Type of the right-hand side dense matrix
752 inline decltype(auto)
753  operator-( const SparseMatrix<MT1,false>& lhs, const DenseMatrix<MT2,true>& rhs )
754 {
756 
757  if( (~lhs).rows() != (~rhs).rows() || (~lhs).columns() != (~rhs).columns() ) {
758  BLAZE_THROW_INVALID_ARGUMENT( "Matrix sizes do not match" );
759  }
760 
761  return smattdmatsub( ~lhs, ~rhs );
762 }
763 //*************************************************************************************************
764 
765 
766 
767 
768 //=================================================================================================
769 //
770 // GLOBAL RESTRUCTURING BINARY ARITHMETIC OPERATORS
771 //
772 //=================================================================================================
773 
774 //*************************************************************************************************
787 template< typename MT1 // Type of the sparse matrix of the left-hand side expression
788  , typename MT2 // Type of the dense matrix of the left-hand side expression
789  , typename MT3 // Type of the right-hand side dense matrix
790  , bool SO > // Storage order of the right-hand side dense matrix
791 inline decltype(auto)
792  operator+( const SMatTDMatSubExpr<MT1,MT2>& lhs, const DenseMatrix<MT3,SO>& rhs )
793 {
795 
796  return ( (~rhs) - lhs.rightOperand() ) + lhs.leftOperand();
797 }
799 //*************************************************************************************************
800 
801 
802 //*************************************************************************************************
815 template< typename MT1 // Type of the sparse matrix of the left-hand side expression
816  , typename MT2 // Type of the dense matrix of the left-hand side expression
817  , typename MT3 // Type of the right-hand side dense matrix
818  , bool SO > // Storage order of the right-hand side dense matrix
819 inline decltype(auto)
820  operator-( const SMatTDMatSubExpr<MT1,MT2>& lhs, const DenseMatrix<MT3,SO>& rhs )
821 {
823 
824  return lhs.leftOperand() - ( lhs.rightOperand() + (~rhs) );
825 }
827 //*************************************************************************************************
828 
829 } // namespace blaze
830 
831 #endif
const If_t< returnExpr, ExprReturnType, ElementType > ReturnType
Return type for expression template evaluations.
Definition: SMatTDMatSubExpr.h:137
Constraint on the data type.
#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.
typename SubTrait< T1, T2 >::Type SubTrait_t
Auxiliary alias declaration for the SubTrait class template.The SubTrait_t alias declaration provides...
Definition: SubTrait.h:238
Header file for the subtraction trait.
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: SMatTDMatSubExpr.h:194
Header file for basic type definitions.
typename If< Condition, T1, T2 >::Type If_t
Auxiliary alias template for the If class template.The If_t alias template provides a convenient shor...
Definition: If.h:109
LeftOperand leftOperand() const noexcept
Returns the left-hand side sparse matrix operand.
Definition: SMatTDMatSubExpr.h:230
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.The ResultType_t alias declaration provides ...
Definition: Aliases.h:390
Header file for the serial shim.
#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.
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: SMatTDMatSubExpr.h:179
Header file for the MAYBE_UNUSED function template.
const ResultType CompositeType
Data type for composite expression templates.
Definition: SMatTDMatSubExpr.h:140
Header file for the Computation base class.
ElementType_t< ResultType > ElementType
Resulting element type.
Definition: SMatTDMatSubExpr.h:134
Constraints on the storage order of matrix types.
typename T::ReturnType ReturnType_t
Alias declaration for nested ReturnType type definitions.The ReturnType_t alias declaration provides ...
Definition: Aliases.h:410
ResultType_t< MT1 > RT1
Result type of the left-hand side sparse matrix expression.
Definition: SMatTDMatSubExpr.h:96
constexpr size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:514
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes....
Definition: DenseMatrix.h:81
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes....
Definition: Forward.h:145
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.The ElementType_t alias declaration provide...
Definition: Aliases.h:170
ResultType_t< MT2 > RT2
Result type of the right-hand side dense matrix expression.
Definition: SMatTDMatSubExpr.h:97
LeftOperand lhs_
Left-hand side sparse matrix of the subtraction expression.
Definition: SMatTDMatSubExpr.h:272
Constraint on the data type.
Constraint on the data type.
TransposeType_t< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: SMatTDMatSubExpr.h:133
If_t< IsExpression_v< MT2 >, const MT2, const MT2 & > RightOperand
Composite type of the right-hand side sparse matrix expression.
Definition: SMatTDMatSubExpr.h:146
Header file for the DisableIf class template.
Header file for the IsTemporary type trait class.
Expression object for sparse matrix-transpose dense matrix subtractions.The SMatTDMatSubExpr class re...
Definition: Forward.h:137
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the If class template.
ReturnType_t< MT1 > RN1
Return type of the left-hand side sparse matrix expression.
Definition: SMatTDMatSubExpr.h:98
#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
#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
SMatTDMatSubExpr(const MT1 &lhs, const MT2 &rhs) noexcept
Constructor for the SMatTDMatSubExpr class.
Definition: SMatTDMatSubExpr.h:163
Header file for the DenseMatrix base class.
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: SMatTDMatSubExpr.h:210
Header file for the MatMatSubExpr base class.
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition: MaybeUnused.h:81
static constexpr bool simdEnabled
Compilation switch for the expression template evaluation strategy.
Definition: SMatTDMatSubExpr.h:151
Constraints on the storage order of matrix types.
Header file for the exception macros of the math module.
Constraint on the data type.
Header file for the EnableIf class template.
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: SMatTDMatSubExpr.h:252
typename T::OppositeType OppositeType_t
Alias declaration for nested OppositeType type definitions.The OppositeType_t alias declaration provi...
Definition: Aliases.h:270
RightOperand rhs_
Right-hand side dense matrix of the subtraction expression.
Definition: SMatTDMatSubExpr.h:273
#define BLAZE_CONSTRAINT_MUST_BE_ROW_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a row-major dense or sparse matrix t...
Definition: RowMajorMatrix.h:61
typename T::TransposeType TransposeType_t
Alias declaration for nested TransposeType type definitions.The TransposeType_t alias declaration pro...
Definition: Aliases.h:470
Header file for run time assertion macros.
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition: SMatTDMatSubExpr.h:154
auto smpAddAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP addition assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:131
Header file for the IsZero type trait.
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:94
Header file for all forward declarations for expression class templates.
auto smpAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:100
Constraints on the storage order of matrix types.
RightOperand rightOperand() const noexcept
Returns the right-hand side transpose dense matrix operand.
Definition: SMatTDMatSubExpr.h:240
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:808
SubTrait_t< RT1, RT2 > ResultType
Result type for expression template evaluations.
Definition: SMatTDMatSubExpr.h:131
If_t< IsExpression_v< MT1 >, const MT1, const MT1 & > LeftOperand
Composite type of the left-hand side dense matrix expression.
Definition: SMatTDMatSubExpr.h:143
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.In case the given data type T requires an intermediate evaluation within ...
Definition: RequiresEvaluation.h:81
ReturnType_t< MT2 > RN2
Return type of the right-hand side dense matrix expression.
Definition: SMatTDMatSubExpr.h:99
auto smpSchurAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP Schur product assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:194
constexpr size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:498
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: SMatTDMatSubExpr.h:265
#define BLAZE_CONSTRAINT_MATRICES_MUST_HAVE_SAME_STORAGE_ORDER(T1, T2)
Constraint on the data type.In case either of the two given data types T1 or T2 is not a matrix type ...
Definition: StorageOrder.h:84
decltype(std::declval< RN1 >() - std::declval< RN2 >()) ExprReturnType
Expression return type for the subscript operator.
Definition: SMatTDMatSubExpr.h:112
auto smpSubAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:162
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: SMatTDMatSubExpr.h:220
OppositeType_t< ResultType > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: SMatTDMatSubExpr.h:132
Header file for the IntegralConstant class template.
#define BLAZE_CONSTRAINT_MUST_FORM_VALID_MATMATSUBEXPR(T1, T2)
Constraint on the data type.In case the given data types T1 and T2 do not form a valid matrix/matrix ...
Definition: MatMatSubExpr.h:103
static constexpr bool returnExpr
Compilation switch for the selection of the subscript operator return type.
Definition: SMatTDMatSubExpr.h:109
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression,...
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:61
Header file for the IsExpression type trait class.
Header file for the function trace functionality.