Blaze 3.9
DMatTSMatAddExpr.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_EXPRESSIONS_DMATTSMATADDEXPR_H_
36#define _BLAZE_MATH_EXPRESSIONS_DMATTSMATADDEXPR_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
43#include <utility>
44#include <blaze/math/Aliases.h>
63#include <blaze/util/Assert.h>
64#include <blaze/util/EnableIf.h>
68#include <blaze/util/mpl/If.h>
69#include <blaze/util/Types.h>
71
72
73namespace blaze {
74
75//=================================================================================================
76//
77// CLASS DMATTSMATADDEXPR
78//
79//=================================================================================================
80
81//*************************************************************************************************
88template< typename MT1 // Type of the left-hand side dense matrix
89 , typename MT2 > // Type of the right-hand side sparse matrix
91 : public MatMatAddExpr< DenseMatrix< DMatTSMatAddExpr<MT1,MT2>, false > >
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****************************************************************************
131
134
139
142
145
147 using LeftOperand = If_t< IsExpression_v<MT1>, const MT1, const MT1& >;
148
150 using RightOperand = If_t< IsExpression_v<MT2>, const MT2, const MT2& >;
151 //**********************************************************************************************
152
153 //**Compilation flags***************************************************************************
155 static constexpr bool simdEnabled = false;
156
158 static constexpr bool smpAssignable = false;
159 //**********************************************************************************************
160
161 //**Constructor*********************************************************************************
167 inline DMatTSMatAddExpr( const MT1& lhs, const MT2& rhs ) noexcept
168 : lhs_( lhs ) // Left-hand side dense matrix of the addition expression
169 , rhs_( rhs ) // Right-hand side sparse matrix of the addition expression
170 {
171 BLAZE_INTERNAL_ASSERT( lhs.rows() == rhs.rows() , "Invalid number of rows" );
172 BLAZE_INTERNAL_ASSERT( lhs.columns() == rhs.columns(), "Invalid number of columns" );
173 }
174 //**********************************************************************************************
175
176 //**Access operator*****************************************************************************
183 inline ReturnType operator()( size_t i, size_t j ) const {
184 BLAZE_INTERNAL_ASSERT( i < lhs_.rows() , "Invalid row access index" );
185 BLAZE_INTERNAL_ASSERT( j < lhs_.columns(), "Invalid column access index" );
186 return lhs_(i,j) + rhs_(i,j);
187 }
188 //**********************************************************************************************
189
190 //**At function*********************************************************************************
198 inline ReturnType at( size_t i, size_t j ) const {
199 if( i >= lhs_.rows() ) {
200 BLAZE_THROW_OUT_OF_RANGE( "Invalid row access index" );
201 }
202 if( j >= lhs_.columns() ) {
203 BLAZE_THROW_OUT_OF_RANGE( "Invalid column access index" );
204 }
205 return (*this)(i,j);
206 }
207 //**********************************************************************************************
208
209 //**Rows function*******************************************************************************
214 inline size_t rows() const noexcept {
215 return lhs_.rows();
216 }
217 //**********************************************************************************************
218
219 //**Columns function****************************************************************************
224 inline size_t columns() const noexcept {
225 return lhs_.columns();
226 }
227 //**********************************************************************************************
228
229 //**Left operand access*************************************************************************
234 inline LeftOperand leftOperand() const {
235 return lhs_;
236 }
237 //**********************************************************************************************
238
239 //**Right operand access************************************************************************
244 inline RightOperand rightOperand() const noexcept {
245 return rhs_;
246 }
247 //**********************************************************************************************
248
249 //**********************************************************************************************
255 template< typename T >
256 inline bool canAlias( const T* alias ) const noexcept {
257 return ( IsExpression_v<MT1> && lhs_.canAlias( alias ) ) ||
258 ( rhs_.canAlias( alias ) );
259 }
260 //**********************************************************************************************
261
262 //**********************************************************************************************
268 template< typename T >
269 inline bool isAliased( const T* alias ) const noexcept {
270 return ( lhs_.canAlias( alias ) || rhs_.canAlias( alias ) );
271 }
272 //**********************************************************************************************
273
274 private:
275 //**Member variables****************************************************************************
278 //**********************************************************************************************
279
280 //**Assignment to dense matrices****************************************************************
292 template< typename MT // Type of the target dense matrix
293 , bool SO2 > // Storage order of the target dense matrix
294 friend inline void assign( DenseMatrix<MT,SO2>& lhs, const DMatTSMatAddExpr& rhs )
295 {
297
298 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
299 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
300
301 if( !IsOperation_v<MT1> && isSame( *lhs, rhs.lhs_ ) ) {
302 addAssign( *lhs, rhs.rhs_ );
303 }
304 else {
305 assign ( *lhs, rhs.lhs_ );
306 addAssign( *lhs, rhs.rhs_ );
307 }
308 }
310 //**********************************************************************************************
311
312 //**Assignment to sparse matrices***************************************************************
324 template< typename MT // Type of the target sparse matrix
325 , bool SO2 > // Storage order of the target sparse matrix
326 friend inline void assign( SparseMatrix<MT,SO2>& lhs, const DMatTSMatAddExpr& rhs )
327 {
329
331
338
339 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
340 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
341
342 const TmpType tmp( serial( rhs ) );
343 assign( *lhs, tmp );
344 }
346 //**********************************************************************************************
347
348 //**Addition assignment to dense matrices*******************************************************
361 template< typename MT // Type of the target dense matrix
362 , bool SO2 > // Storage order of the target dense matrix
363 friend inline void addAssign( DenseMatrix<MT,SO2>& lhs, const DMatTSMatAddExpr& rhs )
364 {
366
367 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
368 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
369
370 addAssign( *lhs, rhs.lhs_ );
371 addAssign( *lhs, rhs.rhs_ );
372 }
374 //**********************************************************************************************
375
376 //**Addition assignment to sparse matrices******************************************************
377 // No special implementation for the addition assignment to sparse matrices.
378 //**********************************************************************************************
379
380 //**Subtraction assignment to dense matrices****************************************************
393 template< typename MT // Type of the target dense matrix
394 , bool SO2 > // Storage order of the target dense matrix
395 friend inline void subAssign( DenseMatrix<MT,SO2>& lhs, const DMatTSMatAddExpr& rhs )
396 {
398
399 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
400 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
401
402 subAssign( *lhs, rhs.lhs_ );
403 subAssign( *lhs, rhs.rhs_ );
404 }
406 //**********************************************************************************************
407
408 //**Subtraction assignment to sparse matrices***************************************************
409 // No special implementation for the subtraction assignment to sparse matrices.
410 //**********************************************************************************************
411
412 //**Schur product assignment to dense matrices**************************************************
425 template< typename MT // Type of the target dense matrix
426 , bool SO2 > // Storage order of the target dense matrix
427 friend inline void schurAssign( DenseMatrix<MT,SO2>& lhs, const DMatTSMatAddExpr& rhs )
428 {
430
434
435 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
436 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
437
438 const ResultType tmp( serial( rhs ) );
439 schurAssign( *lhs, tmp );
440 }
442 //**********************************************************************************************
443
444 //**Schur product assignment to sparse matrices*************************************************
445 // No special implementation for the Schur product assignment to sparse matrices.
446 //**********************************************************************************************
447
448 //**Multiplication assignment to dense matrices*************************************************
449 // No special implementation for the multiplication assignment to dense matrices.
450 //**********************************************************************************************
451
452 //**Multiplication assignment to sparse matrices************************************************
453 // No special implementation for the multiplication assignment to sparse matrices.
454 //**********************************************************************************************
455
456 //**SMP assignment to dense matrices************************************************************
470 template< typename MT // Type of the target dense matrix
471 , bool SO2 > // Storage order of the target dense matrix
472 friend inline auto smpAssign( DenseMatrix<MT,SO2>& lhs, const DMatTSMatAddExpr& rhs )
473 -> EnableIf_t< UseSMPAssign_v<MT> >
474 {
476
477 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
478 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
479
480 if( !IsOperation_v<MT1> && isSame( *lhs, rhs.lhs_ ) ) {
481 smpAddAssign( *lhs, rhs.rhs_ );
482 }
483 else {
484 smpAssign ( *lhs, rhs.lhs_ );
485 smpAddAssign( *lhs, rhs.rhs_ );
486 }
487 }
489 //**********************************************************************************************
490
491 //**SMP assignment to sparse matrices***********************************************************
505 template< typename MT // Type of the target sparse matrix
506 , bool SO2 > // Storage order of the target sparse matrix
507 friend inline auto smpAssign( SparseMatrix<MT,SO2>& lhs, const DMatTSMatAddExpr& rhs )
508 -> EnableIf_t< UseSMPAssign_v<MT> >
509 {
511
512 using TmpType = If_t< SO2, OppositeType, ResultType >;
513
520
521 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
522 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
523
524 const TmpType tmp( rhs );
525 smpAssign( *lhs, tmp );
526 }
528 //**********************************************************************************************
529
530 //**SMP addition assignment to dense matrices***************************************************
545 template< typename MT // Type of the target dense matrix
546 , bool SO2 > // Storage order of the target dense matrix
547 friend inline auto smpAddAssign( DenseMatrix<MT,SO2>& lhs, const DMatTSMatAddExpr& rhs )
548 -> EnableIf_t< UseSMPAssign_v<MT> >
549 {
551
552 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
553 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
554
555 smpAddAssign( *lhs, rhs.lhs_ );
556 smpAddAssign( *lhs, rhs.rhs_ );
557 }
559 //**********************************************************************************************
560
561 //**SMP addition assignment to sparse matrices**************************************************
562 // No special implementation for the SMP addition assignment to sparse matrices.
563 //**********************************************************************************************
564
565 //**SMP subtraction assignment to dense matrices************************************************
580 template< typename MT // Type of the target dense matrix
581 , bool SO2 > // Storage order of the target dense matrix
582 friend inline auto smpSubAssign( DenseMatrix<MT,SO2>& lhs, const DMatTSMatAddExpr& rhs )
583 -> EnableIf_t< UseSMPAssign_v<MT> >
584 {
586
587 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
588 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
589
590 smpSubAssign( *lhs, rhs.lhs_ );
591 smpSubAssign( *lhs, rhs.rhs_ );
592 }
594 //**********************************************************************************************
595
596 //**SMP subtraction assignment to sparse matrices***********************************************
597 // No special implementation for the SMP subtraction assignment to sparse matrices.
598 //**********************************************************************************************
599
600 //**SMP Schur product assignment to dense matrices**********************************************
615 template< typename MT // Type of the target dense matrix
616 , bool SO2 > // Storage order of the target dense matrix
617 friend inline auto smpSchurAssign( DenseMatrix<MT,SO2>& lhs, const DMatTSMatAddExpr& rhs )
618 -> EnableIf_t< UseSMPAssign_v<MT> >
619 {
621
625
626 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
627 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
628
629 const ResultType tmp( rhs );
630 smpSchurAssign( *lhs, tmp );
631 }
633 //**********************************************************************************************
634
635 //**SMP Schur product assignment to sparse matrices*********************************************
636 // No special implementation for the SMP Schur product assignment to sparse matrices.
637 //**********************************************************************************************
638
639 //**SMP multiplication assignment to dense matrices*********************************************
640 // No special implementation for the SMP multiplication assignment to dense matrices.
641 //**********************************************************************************************
642
643 //**SMP multiplication assignment to sparse matrices********************************************
644 // No special implementation for the SMP multiplication assignment to sparse matrices.
645 //**********************************************************************************************
646
647 //**Compile time checks*************************************************************************
655 //**********************************************************************************************
656};
657//*************************************************************************************************
658
659
660
661
662//=================================================================================================
663//
664// GLOBAL BINARY ARITHMETIC OPERATORS
665//
666//=================================================================================================
667
668//*************************************************************************************************
681template< typename MT1 // Type of the left-hand side dense matrix
682 , typename MT2 // Type of the right-hand side sparse matrix
683 , DisableIf_t< IsZero_v<MT2> &&
684 IsSame_v< ElementType_t<MT1>, ElementType_t<MT2> > >* = nullptr >
685inline const DMatTSMatAddExpr<MT1,MT2>
686 dmattsmatadd( const DenseMatrix<MT1,false>& lhs, const SparseMatrix<MT2,true>& rhs )
687{
689
690 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == (*rhs).rows() , "Invalid number of rows" );
691 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == (*rhs).columns(), "Invalid number of columns" );
692
693 return DMatTSMatAddExpr<MT1,MT2>( *lhs, *rhs );
694}
696//*************************************************************************************************
697
698
699//*************************************************************************************************
713template< typename MT1 // Type of the left-hand side dense matrix
714 , typename MT2 // Type of the right-hand side sparse matrix
715 , EnableIf_t< IsZero_v<MT2> &&
716 IsSame_v< ElementType_t<MT1>, ElementType_t<MT2> > >* = nullptr >
717inline const MT1&
718 dmattsmatadd( const DenseMatrix<MT1,false>& lhs, const SparseMatrix<MT2,true>& rhs )
719{
721
722 MAYBE_UNUSED( rhs );
723
724 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == (*rhs).rows() , "Invalid number of rows" );
725 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == (*rhs).columns(), "Invalid number of columns" );
726
727 return (*lhs);
728}
730//*************************************************************************************************
731
732
733//*************************************************************************************************
763template< typename MT1 // Type of the left-hand side dense matrix
764 , typename MT2 > // Type of the right-hand side sparse matrix
765inline decltype(auto)
766 operator+( const DenseMatrix<MT1,false>& lhs, const SparseMatrix<MT2,true>& rhs )
767{
769
770 if( (*lhs).rows() != (*rhs).rows() || (*lhs).columns() != (*rhs).columns() ) {
771 BLAZE_THROW_INVALID_ARGUMENT( "Matrix sizes do not match" );
772 }
773
774 return dmattsmatadd( *lhs, *rhs );
775}
776//*************************************************************************************************
777
778
779//*************************************************************************************************
809template< typename MT1 // Type of the left-hand side sparse matrix
810 , typename MT2 > // Type of the right-hand side dense matrix
811inline decltype(auto)
812 operator+( const SparseMatrix<MT1,true>& lhs, const DenseMatrix<MT2,false>& rhs )
813{
815
816 if( (*lhs).rows() != (*rhs).rows() || (*lhs).columns() != (*rhs).columns() ) {
817 BLAZE_THROW_INVALID_ARGUMENT( "Matrix sizes do not match" );
818 }
819
820 return dmattsmatadd( *rhs, *lhs );
821}
822//*************************************************************************************************
823
824
825
826
827//=================================================================================================
828//
829// GLOBAL RESTRUCTURING BINARY ARITHMETIC OPERATORS
830//
831//=================================================================================================
832
833//*************************************************************************************************
846template< typename MT1 // Type of the dense matrix of the left-hand side expression
847 , typename MT2 // Type of the sparse matrix of the left-hand side expression
848 , typename MT3 // Type of the right-hand side dense matrix
849 , bool SO > // Storage order of the right-hand side dense matrix
850inline decltype(auto)
851 operator+( const DMatTSMatAddExpr<MT1,MT2>& lhs, const DenseMatrix<MT3,SO>& rhs )
852{
854
855 return ( lhs.leftOperand() + (*rhs) ) + lhs.rightOperand();
856}
858//*************************************************************************************************
859
860
861//*************************************************************************************************
874template< typename MT1 // Type of the dense matrix of the left-hand side expression
875 , typename MT2 // Type of the sparse matrix of the left-hand side expression
876 , typename MT3 // Type of the right-hand side dense matrix
877 , bool SO > // Storage order of the right-hand side dense matrix
878inline decltype(auto)
879 operator-( const DMatTSMatAddExpr<MT1,MT2>& lhs, const DenseMatrix<MT3,SO>& rhs )
880{
882
883 return ( lhs.leftOperand() - (*rhs) ) + lhs.rightOperand();
884}
886//*************************************************************************************************
887
888} // namespace blaze
889
890#endif
Header file for the addition trait.
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.
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 IntegralConstant class template.
Header file for the IsExpression type trait class.
Header file for the IsOperation 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.
Constraints on the storage order of matrix types.
Expression object for dense matrix-sparse matrix additions.
Definition: DMatTSMatAddExpr.h:93
ResultType_t< MT2 > RT2
Result type of the right-hand side sparse matrix expression.
Definition: DMatTSMatAddExpr.h:97
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DMatTSMatAddExpr.h:183
RightOperand rightOperand() const noexcept
Returns the right-hand side transpose sparse matrix operand.
Definition: DMatTSMatAddExpr.h:244
ReturnType_t< MT1 > RN1
Return type of the left-hand side dense matrix expression.
Definition: DMatTSMatAddExpr.h:98
DMatTSMatAddExpr(const MT1 &lhs, const MT2 &rhs) noexcept
Constructor for the DMatTSMatAddExpr class.
Definition: DMatTSMatAddExpr.h:167
static constexpr bool simdEnabled
Compilation switch for the expression template evaluation strategy.
Definition: DMatTSMatAddExpr.h:155
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: DMatTSMatAddExpr.h:269
TransposeType_t< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: DMatTSMatAddExpr.h:137
ReturnType_t< MT2 > RN2
Return type of the right-hand side sparse matrix expression.
Definition: DMatTSMatAddExpr.h:99
OppositeType_t< ResultType > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatTSMatAddExpr.h:136
If_t< IsExpression_v< MT2 >, const MT2, const MT2 & > RightOperand
Composite type of the right-hand side sparse matrix expression.
Definition: DMatTSMatAddExpr.h:150
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition: DMatTSMatAddExpr.h:158
static constexpr bool returnExpr
Compilation switch for the selection of the subscript operator return type.
Definition: DMatTSMatAddExpr.h:109
ElementType_t< ResultType > ElementType
Resulting element type.
Definition: DMatTSMatAddExpr.h:138
const If_t< returnExpr, ExprReturnType, ElementType > ReturnType
Return type for expression template evaluations.
Definition: DMatTSMatAddExpr.h:141
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: DMatTSMatAddExpr.h:256
decltype(std::declval< RN1 >()+std::declval< RN2 >()) ExprReturnType
Expression return type for the subscript operator.
Definition: DMatTSMatAddExpr.h:112
LeftOperand lhs_
Left-hand side dense matrix of the addition expression.
Definition: DMatTSMatAddExpr.h:276
ResultType_t< MT1 > RT1
Result type of the left-hand side dense matrix expression.
Definition: DMatTSMatAddExpr.h:96
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: DMatTSMatAddExpr.h:224
If_t< IsExpression_v< MT1 >, const MT1, const MT1 & > LeftOperand
Composite type of the left-hand side dense matrix expression.
Definition: DMatTSMatAddExpr.h:147
LeftOperand leftOperand() const
Returns the left-hand side dense matrix operand.
Definition: DMatTSMatAddExpr.h:234
RightOperand rhs_
Right-hand side sparse matrix of the addition expression.
Definition: DMatTSMatAddExpr.h:277
const ResultType CompositeType
Data type for composite expression templates.
Definition: DMatTSMatAddExpr.h:144
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: DMatTSMatAddExpr.h:198
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: DMatTSMatAddExpr.h:214
AddTrait_t< RT1, RT2 > ResultType
Result type for expression template evaluations.
Definition: DMatTSMatAddExpr.h:135
Base class for dense matrices.
Definition: DenseMatrix.h:82
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 MatMatAddExpr 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_MUST_BE_ROW_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.
Definition: RowMajorMatrix.h:61
#define BLAZE_CONSTRAINT_MATRICES_MUST_HAVE_SAME_STORAGE_ORDER(T1, T2)
Constraint on the data type.
Definition: StorageOrder.h:84
#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_FORM_VALID_MATMATADDEXPR(T1, T2)
Constraint on the data type.
Definition: MatMatAddExpr.h:103
#define BLAZE_CONSTRAINT_MUST_BE_COLUMN_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.
Definition: ColumnMajorMatrix.h:61
typename AddTrait< T1, T2 >::Type AddTrait_t
Auxiliary alias declaration for the AddTrait class template.
Definition: AddTrait.h:163
bool isSame(const Matrix< MT1, SO1 > &a, const Matrix< MT2, SO2 > &b) noexcept
Returns whether the two given matrices represent the same observable state.
Definition: Matrix.h:1424
#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 addition expression templates.
Definition: MatMatAddExpr.h:68
Header file for the IsZero type trait.
Header file for basic type definitions.