Blaze 3.9
SMatDMatSubExpr.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_EXPRESSIONS_SMATDMATSUBEXPR_H_
36#define _BLAZE_MATH_EXPRESSIONS_SMATDMATSUBEXPR_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
43#include <utility>
44#include <blaze/math/Aliases.h>
60#include <blaze/util/Assert.h>
61#include <blaze/util/EnableIf.h>
65#include <blaze/util/mpl/If.h>
66#include <blaze/util/Types.h>
68
69
70namespace blaze {
71
72//=================================================================================================
73//
74// CLASS SMATDMATSUBEXPR
75//
76//=================================================================================================
77
78//*************************************************************************************************
85template< typename MT1 // Type of the left-hand side sparse matrix
86 , typename MT2 // Type of the right-hand side dense matrix
87 , bool SO > // Storage order
89 : public MatMatSubExpr< DenseMatrix< SMatDMatSubExpr<MT1,MT2,SO>, SO > >
90 , private Computation
91{
92 private:
93 //**Type definitions****************************************************************************
98 //**********************************************************************************************
99
100 //**Return type evaluation**********************************************************************
102
107 static constexpr bool returnExpr = !IsTemporary_v<RN1> && !IsTemporary_v<RN2>;
108
110 using ExprReturnType = decltype( std::declval<RN1>() - std::declval<RN2>() );
111 //**********************************************************************************************
112
113 //**Parallel evaluation strategy****************************************************************
115
120 template< typename MT >
121 static constexpr bool UseSMPAssign_v = ( !MT1::smpAssignable || !MT2::smpAssignable );
123 //**********************************************************************************************
124
125 public:
126 //**Type definitions****************************************************************************
129
132
137
140
143
145 using LeftOperand = If_t< IsExpression_v<MT1>, const MT1, const MT1& >;
146
148 using RightOperand = If_t< IsExpression_v<MT2>, const MT2, const MT2& >;
149 //**********************************************************************************************
150
151 //**Compilation flags***************************************************************************
153 static constexpr bool simdEnabled = false;
154
156 static constexpr bool smpAssignable = false;
157 //**********************************************************************************************
158
159 //**Constructor*********************************************************************************
165 inline SMatDMatSubExpr( const MT1& lhs, const MT2& rhs ) noexcept
166 : lhs_( lhs ) // Left-hand side sparse matrix of the subtraction expression
167 , rhs_( rhs ) // Right-hand side dense matrix of the subtraction expression
168 {
169 BLAZE_INTERNAL_ASSERT( lhs.rows() == rhs.rows() , "Invalid number of rows" );
170 BLAZE_INTERNAL_ASSERT( lhs.columns() == rhs.columns(), "Invalid number of columns" );
171 }
172 //**********************************************************************************************
173
174 //**Access operator*****************************************************************************
181 inline ReturnType operator()( size_t i, size_t j ) const {
182 BLAZE_INTERNAL_ASSERT( i < lhs_.rows() , "Invalid row access index" );
183 BLAZE_INTERNAL_ASSERT( j < lhs_.columns(), "Invalid column access index" );
184 return lhs_(i,j) - rhs_(i,j);
185 }
186 //**********************************************************************************************
187
188 //**At function*********************************************************************************
196 inline ReturnType at( size_t i, size_t j ) const {
197 if( i >= lhs_.rows() ) {
198 BLAZE_THROW_OUT_OF_RANGE( "Invalid row access index" );
199 }
200 if( j >= lhs_.columns() ) {
201 BLAZE_THROW_OUT_OF_RANGE( "Invalid column access index" );
202 }
203 return (*this)(i,j);
204 }
205 //**********************************************************************************************
206
207 //**Rows function*******************************************************************************
212 inline size_t rows() const noexcept {
213 return lhs_.rows();
214 }
215 //**********************************************************************************************
216
217 //**Columns function****************************************************************************
222 inline size_t columns() const noexcept {
223 return lhs_.columns();
224 }
225 //**********************************************************************************************
226
227 //**Left operand access*************************************************************************
232 inline LeftOperand leftOperand() const noexcept {
233 return lhs_;
234 }
235 //**********************************************************************************************
236
237 //**Right operand access************************************************************************
242 inline RightOperand rightOperand() const noexcept {
243 return rhs_;
244 }
245 //**********************************************************************************************
246
247 //**********************************************************************************************
253 template< typename T >
254 inline bool canAlias( const T* alias ) const noexcept {
255 return ( lhs_.canAlias( alias ) ) ||
256 ( IsExpression_v<MT2> && rhs_.canAlias( alias ) );
257 }
258 //**********************************************************************************************
259
260 //**********************************************************************************************
266 template< typename T >
267 inline bool isAliased( const T* alias ) const noexcept {
268 return lhs_.isAliased( alias ) || rhs_.isAliased( alias );
269 }
270 //**********************************************************************************************
271
272 private:
273 //**Member variables****************************************************************************
276 //**********************************************************************************************
277
278 //**Assignment to dense matrices****************************************************************
290 template< typename MT // Type of the target dense matrix
291 , bool SO2 > // Storage order of the target dense matrix
292 friend inline void assign( DenseMatrix<MT,SO2>& lhs, const SMatDMatSubExpr& rhs )
293 {
295
296 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
297 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
298
299 assign ( *lhs, -rhs.rhs_ );
300 addAssign( *lhs, rhs.lhs_ );
301 }
303 //**********************************************************************************************
304
305 //**Assignment to sparse matrices***************************************************************
317 template< typename MT // Type of the target sparse matrix
318 , bool SO2 > // Storage order of the target sparse matrix
319 friend inline void assign( SparseMatrix<MT,SO2>& lhs, const SMatDMatSubExpr& rhs )
320 {
322
324
331
332 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
333 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
334
335 const TmpType tmp( serial( rhs ) );
336 assign( *lhs, tmp );
337 }
339 //**********************************************************************************************
340
341 //**Addition assignment to dense matrices*******************************************************
353 template< typename MT // Type of the target dense matrix
354 , bool SO2 > // Storage order of the target dense matrix
355 friend inline void addAssign( DenseMatrix<MT,SO2>& lhs, const SMatDMatSubExpr& rhs )
356 {
358
359 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
360 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
361
362 subAssign( *lhs, rhs.rhs_ );
363 addAssign( *lhs, rhs.lhs_ );
364 }
366 //**********************************************************************************************
367
368 //**Addition assignment to sparse matrices******************************************************
369 // No special implementation for the addition assignment to sparse matrices.
370 //**********************************************************************************************
371
372 //**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 SMatDMatSubExpr& 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 SMatDMatSubExpr& 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 SMatDMatSubExpr& 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 SMatDMatSubExpr& rhs )
494 -> EnableIf_t< UseSMPAssign_v<MT> >
495 {
497
498 using TmpType = If_t< SO == 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***************************************************
530 template< typename MT // Type of the target dense matrix
531 , bool SO2 > // Storage order of the target dense matrix
532 friend inline auto smpAddAssign( DenseMatrix<MT,SO2>& lhs, const SMatDMatSubExpr& rhs )
533 -> EnableIf_t< UseSMPAssign_v<MT> >
534 {
536
537 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
538 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
539
540 smpSubAssign( *lhs, rhs.rhs_ );
541 smpAddAssign( *lhs, rhs.lhs_ );
542 }
544 //**********************************************************************************************
545
546 //**SMP addition assignment to sparse matrices**************************************************
547 // No special implementation for the SMP addition assignment to sparse matrices.
548 //**********************************************************************************************
549
550 //**SMP subtraction assignment to dense matrices************************************************
564 template< typename MT // Type of the target dense matrix
565 , bool SO2 > // Storage order of the target dense matrix
566 friend inline auto smpSubAssign( DenseMatrix<MT,SO2>& lhs, const SMatDMatSubExpr& rhs )
567 -> EnableIf_t< UseSMPAssign_v<MT> >
568 {
570
571 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
572 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
573
574 smpAddAssign( *lhs, rhs.rhs_ );
575 smpSubAssign( *lhs, rhs.lhs_ );
576 }
578 //**********************************************************************************************
579
580 //**SMP subtraction assignment to sparse matrices***********************************************
581 // No special implementation for the SMP subtraction assignment to sparse matrices.
582 //**********************************************************************************************
583
584 //**SMP Schur product assignment to dense matrices**********************************************
599 template< typename MT // Type of the target dense matrix
600 , bool SO2 > // Storage order of the target dense matrix
601 friend inline auto smpSchurAssign( DenseMatrix<MT,SO2>& lhs, const SMatDMatSubExpr& rhs )
602 -> EnableIf_t< UseSMPAssign_v<MT> >
603 {
605
609
610 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
611 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
612
613 const ResultType tmp( rhs );
614 smpSchurAssign( *lhs, tmp );
615 }
617 //**********************************************************************************************
618
619 //**SMP Schur product assignment to sparse matrices*********************************************
620 // No special implementation for the SMP Schur product assignment to sparse matrices.
621 //**********************************************************************************************
622
623 //**SMP multiplication assignment to dense matrices*********************************************
624 // No special implementation for the SMP multiplication assignment to dense matrices.
625 //**********************************************************************************************
626
627 //**SMP multiplication assignment to sparse matrices********************************************
628 // No special implementation for the SMP multiplication assignment to sparse matrices.
629 //**********************************************************************************************
630
631 //**Compile time checks*************************************************************************
638 //**********************************************************************************************
639};
640//*************************************************************************************************
641
642
643
644
645//=================================================================================================
646//
647// GLOBAL BINARY ARITHMETIC OPERATORS
648//
649//=================================================================================================
650
651//*************************************************************************************************
664template< typename MT1 // Type of the left-hand side sparse matrix
665 , typename MT2 // Type of the right-hand side dense matrix
666 , bool SO // Storage order
667 , DisableIf_t< IsZero_v<MT1> &&
668 IsSame_v< ElementType_t<MT1>, ElementType_t<MT2> > >* = nullptr >
669inline const SMatDMatSubExpr<MT1,MT2,SO>
670 smatdmatsub( const SparseMatrix<MT1,SO>& lhs, const DenseMatrix<MT2,SO>& rhs )
671{
673
674 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == (*rhs).rows() , "Invalid number of rows" );
675 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == (*rhs).columns(), "Invalid number of columns" );
676
677 return SMatDMatSubExpr<MT1,MT2,SO>( *lhs, *rhs );
678}
680//*************************************************************************************************
681
682
683//*************************************************************************************************
696template< typename MT1 // Type of the left-hand side sparse matrix
697 , typename MT2 // Type of the right-hand side dense matrix
698 , bool SO // Storage order
699 , EnableIf_t< IsZero_v<MT1> &&
700 IsSame_v< ElementType_t<MT1>, ElementType_t<MT2> > >* = nullptr >
701inline decltype(auto)
702 smatdmatsub( const SparseMatrix<MT1,SO>& lhs, const DenseMatrix<MT2,SO>& rhs )
703{
705
706 MAYBE_UNUSED( lhs );
707
708 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == (*rhs).rows() , "Invalid number of rows" );
709 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == (*rhs).columns(), "Invalid number of columns" );
710
711 return -(*rhs);
712}
714//*************************************************************************************************
715
716
717//*************************************************************************************************
746template< typename MT1 // Type of the left-hand side sparse matrix
747 , typename MT2 // Type of the right-hand side dense matrix
748 , bool SO > // Storage order
749inline decltype(auto)
750 operator-( const SparseMatrix<MT1,SO>& lhs, const DenseMatrix<MT2,SO>& rhs )
751{
753
754 if( (*lhs).rows() != (*rhs).rows() || (*lhs).columns() != (*rhs).columns() ) {
755 BLAZE_THROW_INVALID_ARGUMENT( "Matrix sizes do not match" );
756 }
757
758 return smatdmatsub( *lhs, *rhs );
759}
760//*************************************************************************************************
761
762
763
764
765//=================================================================================================
766//
767// GLOBAL RESTRUCTURING BINARY ARITHMETIC OPERATORS
768//
769//=================================================================================================
770
771//*************************************************************************************************
784template< typename MT1 // Type of the sparse matrix of the left-hand side expression
785 , typename MT2 // Type of the dense matrix of the left-hand side expression
786 , bool SO1 // Storage order of the left-hand side expression
787 , typename MT3 // Type of the right-hand side dense matrix
788 , bool SO2 > // Storage order of the right-hand side dense matrix
789inline decltype(auto)
790 operator+( const SMatDMatSubExpr<MT1,MT2,SO1>& lhs, const DenseMatrix<MT3,SO2>& rhs )
791{
793
794 return ( (*rhs) - lhs.rightOperand() ) + lhs.leftOperand();
795}
797//*************************************************************************************************
798
799
800//*************************************************************************************************
813template< typename MT1 // Type of the sparse matrix of the left-hand side expression
814 , typename MT2 // Type of the dense matrix of the left-hand side expression
815 , bool SO1 // Storage order of the left-hand side expression
816 , typename MT3 // Type of the right-hand side dense matrix
817 , bool SO2 > // Storage order of the right-hand side dense matrix
818inline decltype(auto)
819 operator-( const SMatDMatSubExpr<MT1,MT2,SO1>& lhs, const DenseMatrix<MT3,SO2>& rhs )
820{
822
823 return lhs.leftOperand() - ( lhs.rightOperand() + (*rhs) );
824}
826//*************************************************************************************************
827
828} // namespace blaze
829
830#endif
Header file for auxiliary alias declarations.
typename T::ReturnType ReturnType_t
Alias declaration for nested ReturnType type definitions.
Definition: Aliases.h:470
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::OppositeType OppositeType_t
Alias declaration for nested OppositeType type definitions.
Definition: Aliases.h:310
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 EnableIf class template.
Header file for the function trace functionality.
Header file for the If class template.
Header file for the IntegralConstant class template.
Header file for the IsExpression type trait class.
Header file for the IsSame and IsStrictlySame type traits.
Header file for the IsTemporary type trait class.
Header file for the MAYBE_UNUSED function template.
Header file for the subtraction trait.
Base class for dense matrices.
Definition: DenseMatrix.h:82
Expression object for sparse matrix-dense matrix subtractions.
Definition: SMatDMatSubExpr.h:91
If_t< IsExpression_v< MT1 >, const MT1, const MT1 & > LeftOperand
Composite type of the left-hand side dense matrix expression.
Definition: SMatDMatSubExpr.h:145
LeftOperand leftOperand() const noexcept
Returns the left-hand side sparse matrix operand.
Definition: SMatDMatSubExpr.h:232
ElementType_t< ResultType > ElementType
Resulting element type.
Definition: SMatDMatSubExpr.h:136
ResultType_t< MT1 > RT1
Result type of the left-hand side sparse matrix expression.
Definition: SMatDMatSubExpr.h:94
const ResultType CompositeType
Data type for composite expression templates.
Definition: SMatDMatSubExpr.h:142
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: SMatDMatSubExpr.h:212
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition: SMatDMatSubExpr.h:156
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: SMatDMatSubExpr.h:181
decltype(std::declval< RN1 >() - std::declval< RN2 >()) ExprReturnType
Expression return type for the subscript operator.
Definition: SMatDMatSubExpr.h:110
OppositeType_t< ResultType > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: SMatDMatSubExpr.h:134
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: SMatDMatSubExpr.h:196
If_t< IsExpression_v< MT2 >, const MT2, const MT2 & > RightOperand
Composite type of the right-hand side sparse matrix expression.
Definition: SMatDMatSubExpr.h:148
ReturnType_t< MT1 > RN1
Return type of the left-hand side sparse matrix expression.
Definition: SMatDMatSubExpr.h:96
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: SMatDMatSubExpr.h:267
RightOperand rhs_
Right-hand side dense matrix of the subtraction expression.
Definition: SMatDMatSubExpr.h:275
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: SMatDMatSubExpr.h:222
ReturnType_t< MT2 > RN2
Return type of the right-hand side dense matrix expression.
Definition: SMatDMatSubExpr.h:97
RightOperand rightOperand() const noexcept
Returns the right-hand side dense matrix operand.
Definition: SMatDMatSubExpr.h:242
static constexpr bool returnExpr
Compilation switch for the selection of the subscript operator return type.
Definition: SMatDMatSubExpr.h:107
ResultType_t< MT2 > RT2
Result type of the right-hand side dense matrix expression.
Definition: SMatDMatSubExpr.h:95
SubTrait_t< RT1, RT2 > ResultType
Result type for expression template evaluations.
Definition: SMatDMatSubExpr.h:133
static constexpr bool simdEnabled
Compilation switch for the expression template evaluation strategy.
Definition: SMatDMatSubExpr.h:153
SMatDMatSubExpr(const MT1 &lhs, const MT2 &rhs) noexcept
Constructor for the SMatDMatSubExpr class.
Definition: SMatDMatSubExpr.h:165
LeftOperand lhs_
Left-hand side sparse matrix of the subtraction expression.
Definition: SMatDMatSubExpr.h:274
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: SMatDMatSubExpr.h:254
const If_t< returnExpr, ExprReturnType, ElementType > ReturnType
Return type for expression template evaluations.
Definition: SMatDMatSubExpr.h:139
TransposeType_t< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: SMatDMatSubExpr.h:135
Base class for sparse matrices.
Definition: SparseMatrix.h:77
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 DenseMatrix base class.
Header file for the MatMatSubExpr base class.
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:812
#define BLAZE_CONSTRAINT_MATRICES_MUST_HAVE_SAME_STORAGE_ORDER(T1, T2)
Constraint on the data type.
Definition: StorageOrder.h:84
#define BLAZE_CONSTRAINT_MUST_FORM_VALID_MATMATSUBEXPR(T1, T2)
Constraint on the data type.
Definition: MatMatSubExpr.h:103
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.
Definition: RequiresEvaluation.h:81
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_MATRIX_TYPE(T)
Constraint on the data type.
Definition: DenseMatrix.h:61
#define BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE(T)
Constraint on the data type.
Definition: SparseMatrix.h:61
#define BLAZE_CONSTRAINT_MUST_BE_MATRIX_WITH_STORAGE_ORDER(T, SO)
Constraint on the data type.
Definition: StorageOrder.h:63
typename SubTrait< T1, T2 >::Type SubTrait_t
Auxiliary alias declaration for the SubTrait class template.
Definition: SubTrait.h:163
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.
Definition: Assert.h:101
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
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
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
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
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
#define BLAZE_FUNCTION_TRACE
Function trace macro.
Definition: FunctionTrace.h:94
Header file for the exception macros of the math module.
Constraints on the storage order of matrix types.
Header file for all forward declarations for expression class templates.
Header file for the serial shim.
Base class for all compute expression templates.
Definition: Computation.h:68
Base class for all matrix/matrix subtraction expression templates.
Definition: MatMatSubExpr.h:69
Header file for the IsZero type trait.
Header file for basic type definitions.