DMatSerialExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_DMATSERIALEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_DMATSERIALEXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <cmath>
69 #include <blaze/util/Assert.h>
71 #include <blaze/util/InvalidType.h>
73 #include <blaze/util/SelectType.h>
74 #include <blaze/util/Types.h>
76 
77 
78 namespace blaze {
79 
80 //=================================================================================================
81 //
82 // CLASS DMATSERIALEXPR
83 //
84 //=================================================================================================
85 
86 //*************************************************************************************************
93 template< typename MT // Type of the dense matrix
94  , bool SO > // Storage order
95 class DMatSerialExpr : public DenseMatrix< DMatSerialExpr<MT,SO>, SO >
96  , private MatSerialExpr
97  , private Computation
98 {
99  public:
100  //**Type definitions****************************************************************************
102  typedef typename MT::ResultType ResultType;
103  typedef typename MT::OppositeType OppositeType;
104  typedef typename MT::TransposeType TransposeType;
105  typedef typename MT::ElementType ElementType;
106  typedef typename MT::ReturnType ReturnType;
107 
109  typedef const ResultType CompositeType;
110 
112  typedef typename SelectType< IsExpression<MT>::value, const MT, const MT& >::Type Operand;
113  //**********************************************************************************************
114 
115  //**Compilation flags***************************************************************************
117  enum { vectorizable = 0 };
118 
120  enum { smpAssignable = MT::smpAssignable };
121  //**********************************************************************************************
122 
123  //**Constructor*********************************************************************************
128  explicit inline DMatSerialExpr( const MT& dm )
129  : dm_( dm ) // Dense matrix of the serial evaluation expression
130  {}
131  //**********************************************************************************************
132 
133  //**Access operator*****************************************************************************
140  inline ReturnType operator()( size_t i, size_t j ) const {
141  BLAZE_INTERNAL_ASSERT( i < dm_.rows() , "Invalid row access index" );
142  BLAZE_INTERNAL_ASSERT( j < dm_.columns(), "Invalid column access index" );
143  return dm_(i,j);
144  }
145  //**********************************************************************************************
146 
147  //**Rows function*******************************************************************************
152  inline size_t rows() const {
153  return dm_.rows();
154  }
155  //**********************************************************************************************
156 
157  //**Columns function****************************************************************************
162  inline size_t columns() const {
163  return dm_.columns();
164  }
165  //**********************************************************************************************
166 
167  //**Operand access******************************************************************************
172  inline Operand operand() const {
173  return dm_;
174  }
175  //**********************************************************************************************
176 
177  //**Conversion operator*************************************************************************
182  inline operator Operand() const {
183  return dm_;
184  }
185  //**********************************************************************************************
186 
187  //**********************************************************************************************
193  template< typename T >
194  inline bool canAlias( const T* alias ) const {
195  return dm_.canAlias( alias );
196  }
197  //**********************************************************************************************
198 
199  //**********************************************************************************************
205  template< typename T >
206  inline bool isAliased( const T* alias ) const {
207  return dm_.isAliased( alias );
208  }
209  //**********************************************************************************************
210 
211  //**********************************************************************************************
216  inline bool isAligned() const {
217  return dm_.isAligned();
218  }
219  //**********************************************************************************************
220 
221  //**********************************************************************************************
226  inline bool canSMPAssign() const {
227  return dm_.canSMPAssign();
228  }
229  //**********************************************************************************************
230 
231  private:
232  //**Member variables****************************************************************************
233  Operand dm_;
234  //**********************************************************************************************
235 
236  //**Assignment to dense matrices****************************************************************
248  template< typename MT2 // Type of the target dense matrix
249  , bool SO2 > // Storage order of the target dense matrix
250  friend inline void assign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
251  {
253 
254  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
255  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
256 
257  assign( ~lhs, rhs.dm_ );
258  }
260  //**********************************************************************************************
261 
262  //**Assignment to sparse matrices***************************************************************
274  template< typename MT2 // Type of the target sparse matrix
275  , bool SO2 > // Storage order of the target dense matrix
276  friend inline void assign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
277  {
279 
280  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
281  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
282 
283  assign( ~lhs, rhs.dm_ );
284  }
286  //**********************************************************************************************
287 
288  //**Addition assignment to dense matrices*******************************************************
300  template< typename MT2 // Type of the target dense matrix
301  , bool SO2 > // Storage order of the target dense matrix
302  friend inline void addAssign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
303  {
305 
306  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
307  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
308 
309  addAssign( ~lhs, rhs.dm_ );
310  }
312  //**********************************************************************************************
313 
314  //**Addition assignment to sparse matrices******************************************************
326  template< typename MT2 // Type of the target sparse matrix
327  , bool SO2 > // Storage order of the target dense matrix
328  friend inline void addAssign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
329  {
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  addAssign( ~lhs, rhs.dm_ );
336  }
338  //**********************************************************************************************
339 
340  //**Subtraction assignment to dense matrices****************************************************
353  template< typename MT2 // Type of the target dense matrix
354  , bool SO2 > // Storage order of the target dense matrix
355  friend inline void subAssign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& 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.dm_ );
363  }
365  //**********************************************************************************************
366 
367  //**Subtraction assignment to sparse matrices***************************************************
380  template< typename MT2 // Type of the target sparse matrix
381  , bool SO2 > // Storage order of the target dense matrix
382  friend inline void subAssign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
383  {
385 
386  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
387  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
388 
389  subAssign( ~lhs, rhs.dm_ );
390  }
392  //**********************************************************************************************
393 
394  //**Multiplication assignment to dense matrices*************************************************
407  template< typename MT2 // Type of the target dense matrix
408  , bool SO2 > // Storage order of the target dense matrix
409  friend inline void multAssign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
410  {
412 
413  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
414  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
415 
416  multAssign( ~lhs, rhs.sm_ );
417  }
419  //**********************************************************************************************
420 
421  //**Multiplication assignment to sparse matrices************************************************
434  template< typename MT2 // Type of the target sparse matrix
435  , bool SO2 > // Storage order of the target sparse matrix
436  friend inline void multAssign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
437  {
439 
440  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
441  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
442 
443  multAssign( ~lhs, rhs.sm_ );
444  }
446  //**********************************************************************************************
447 
448  //**SMP assignment to dense matrices************************************************************
460  template< typename MT2 // Type of the target dense matrix
461  , bool SO2 > // Storage order of the target dense matrix
462  friend inline void smpAssign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
463  {
465 
466  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
467  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
468 
469  assign( ~lhs, rhs.dm_ );
470  }
472  //**********************************************************************************************
473 
474  //**SMP assignment to sparse matrices***********************************************************
486  template< typename MT2 // Type of the target sparse matrix
487  , bool SO2 > // Storage order of the target dense matrix
488  friend inline void smpAssign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
489  {
491 
492  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
493  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
494 
495  assign( ~lhs, rhs.dm_ );
496  }
498  //**********************************************************************************************
499 
500  //**SMP addition assignment to dense matrices***************************************************
513  template< typename MT2 // Type of the target dense matrix
514  , bool SO2 > // Storage order of the target dense matrix
515  friend inline void smpAddAssign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
516  {
518 
519  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
520  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
521 
522  addAssign( ~lhs, rhs.dm_ );
523  }
525  //**********************************************************************************************
526 
527  //**SMP addition assignment to sparse matrices**************************************************
540  template< typename MT2 // Type of the target sparse matrix
541  , bool SO2 > // Storage order of the target dense matrix
542  friend inline void smpAddAssign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
543  {
545 
546  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
547  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
548 
549  addAssign( ~lhs, rhs.dm_ );
550  }
552  //**********************************************************************************************
553 
554  //**SMP subtraction assignment to dense matrices************************************************
567  template< typename MT2 // Type of the target dense matrix
568  , bool SO2 > // Storage order of the target dense matrix
569  friend inline void smpSubAssign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
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  subAssign( ~lhs, rhs.dm_ );
577  }
579  //**********************************************************************************************
580 
581  //**SMP subtraction assignment to sparse matrices***********************************************
594  template< typename MT2 // Type of the target sparse matrix
595  , bool SO2 > // Storage order of the target dense matrix
596  friend inline void smpSubAssign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
597  {
599 
600  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
601  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
602 
603  subAssign( ~lhs, rhs.dm_ );
604  }
606  //**********************************************************************************************
607 
608  //**SMP multiplication assignment to dense matrices*********************************************
621  template< typename MT2 // Type of the target dense matrix
622  , bool SO2 > // Storage order of the target dense matrix
623  friend inline void smpMultAssign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
624  {
626 
627  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
628  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
629 
630  multAssign( ~lhs, rhs.sm_ );
631  }
633  //**********************************************************************************************
634 
635  //**SMP multiplication assignment to sparse matrices********************************************
648  template< typename MT2 // Type of the target sparse matrix
649  , bool SO2 > // Storage order of the target sparse matrix
650  friend inline void smpMultAssign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
651  {
653 
654  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
655  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
656 
657  multAssign( ~lhs, rhs.sm_ );
658  }
660  //**********************************************************************************************
661 
662  //**Compile time checks*************************************************************************
667  //**********************************************************************************************
668 };
669 //*************************************************************************************************
670 
671 
672 
673 
674 //=================================================================================================
675 //
676 // GLOBAL FUNCTIONS
677 //
678 //=================================================================================================
679 
680 //*************************************************************************************************
697 template< typename MT // Type of the dense matrix
698  , bool SO > // Storage order
700 {
702 
703  return DMatSerialExpr<MT,SO>( ~dm );
704 }
705 //*************************************************************************************************
706 
707 
708 
709 
710 //=================================================================================================
711 //
712 // GLOBAL RESTRUCTURING FUNCTIONS
713 //
714 //=================================================================================================
715 
716 //*************************************************************************************************
727 template< typename MT // Type of the dense matrix
728  , bool SO > // Storage order
729 inline const DMatSerialExpr<MT,SO> serial( const DMatSerialExpr<MT,SO>& dm )
730 {
731  return dm;
732 }
734 //*************************************************************************************************
735 
736 
737 
738 
739 //=================================================================================================
740 //
741 // ROWS SPECIALIZATIONS
742 //
743 //=================================================================================================
744 
745 //*************************************************************************************************
747 template< typename MT, bool SO >
748 struct Rows< DMatSerialExpr<MT,SO> > : public Rows<MT>
749 {};
751 //*************************************************************************************************
752 
753 
754 
755 
756 //=================================================================================================
757 //
758 // COLUMNS SPECIALIZATIONS
759 //
760 //=================================================================================================
761 
762 //*************************************************************************************************
764 template< typename MT, bool SO >
765 struct Columns< DMatSerialExpr<MT,SO> > : public Columns<MT>
766 {};
768 //*************************************************************************************************
769 
770 
771 
772 
773 //=================================================================================================
774 //
775 // ISSYMMETRIC SPECIALIZATIONS
776 //
777 //=================================================================================================
778 
779 //*************************************************************************************************
781 template< typename MT, bool SO >
782 struct IsSymmetric< DMatSerialExpr<MT,SO> > : public IsTrue< IsSymmetric<MT>::value >
783 {};
785 //*************************************************************************************************
786 
787 
788 
789 
790 //=================================================================================================
791 //
792 // ISLOWER SPECIALIZATIONS
793 //
794 //=================================================================================================
795 
796 //*************************************************************************************************
798 template< typename MT, bool SO >
799 struct IsLower< DMatSerialExpr<MT,SO> > : public IsTrue< IsLower<MT>::value >
800 {};
802 //*************************************************************************************************
803 
804 
805 
806 
807 //=================================================================================================
808 //
809 // ISUNILOWER SPECIALIZATIONS
810 //
811 //=================================================================================================
812 
813 //*************************************************************************************************
815 template< typename MT, bool SO >
816 struct IsUniLower< DMatSerialExpr<MT,SO> > : public IsTrue< IsUniLower<MT>::value >
817 {};
819 //*************************************************************************************************
820 
821 
822 
823 
824 //=================================================================================================
825 //
826 // ISSTRICTLYLOWER SPECIALIZATIONS
827 //
828 //=================================================================================================
829 
830 //*************************************************************************************************
832 template< typename MT, bool SO >
833 struct IsStrictlyLower< DMatSerialExpr<MT,SO> > : public IsTrue< IsStrictlyLower<MT>::value >
834 {};
836 //*************************************************************************************************
837 
838 
839 
840 
841 //=================================================================================================
842 //
843 // ISUPPER SPECIALIZATIONS
844 //
845 //=================================================================================================
846 
847 //*************************************************************************************************
849 template< typename MT, bool SO >
850 struct IsUpper< DMatSerialExpr<MT,SO> > : public IsTrue< IsUpper<MT>::value >
851 {};
853 //*************************************************************************************************
854 
855 
856 
857 
858 //=================================================================================================
859 //
860 // ISUNIUPPER SPECIALIZATIONS
861 //
862 //=================================================================================================
863 
864 //*************************************************************************************************
866 template< typename MT, bool SO >
867 struct IsUniUpper< DMatSerialExpr<MT,SO> > : public IsTrue< IsUniUpper<MT>::value >
868 {};
870 //*************************************************************************************************
871 
872 
873 
874 
875 //=================================================================================================
876 //
877 // ISSTRICTLYUPPER SPECIALIZATIONS
878 //
879 //=================================================================================================
880 
881 //*************************************************************************************************
883 template< typename MT, bool SO >
884 struct IsStrictlyUpper< DMatSerialExpr<MT,SO> > : public IsTrue< IsStrictlyUpper<MT>::value >
885 {};
887 //*************************************************************************************************
888 
889 
890 
891 
892 //=================================================================================================
893 //
894 // EXPRESSION TRAIT SPECIALIZATIONS
895 //
896 //=================================================================================================
897 
898 //*************************************************************************************************
900 template< typename MT >
901 struct DMatSerialExprTrait< DMatSerialExpr<MT,false> >
902 {
903  public:
904  //**********************************************************************************************
905  typedef typename SelectType< IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value
906  , DMatSerialExpr<MT,false>
907  , INVALID_TYPE >::Type Type;
908  //**********************************************************************************************
909 };
911 //*************************************************************************************************
912 
913 
914 //*************************************************************************************************
916 template< typename MT >
917 struct TDMatSerialExprTrait< DMatSerialExpr<MT,true> >
918 {
919  public:
920  //**********************************************************************************************
921  typedef typename SelectType< IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value
922  , DMatSerialExpr<MT,true>
923  , INVALID_TYPE >::Type Type;
924  //**********************************************************************************************
925 };
927 //*************************************************************************************************
928 
929 
930 //*************************************************************************************************
932 template< typename MT, bool SO, bool AF >
933 struct SubmatrixExprTrait< DMatSerialExpr<MT,SO>, AF >
934 {
935  public:
936  //**********************************************************************************************
937  typedef typename SerialExprTrait< typename SubmatrixExprTrait<const MT,AF>::Type >::Type Type;
938  //**********************************************************************************************
939 };
941 //*************************************************************************************************
942 
943 
944 //*************************************************************************************************
946 template< typename MT, bool SO >
947 struct RowExprTrait< DMatSerialExpr<MT,SO> >
948 {
949  public:
950  //**********************************************************************************************
951  typedef typename SerialExprTrait< typename RowExprTrait<const MT>::Type >::Type Type;
952  //**********************************************************************************************
953 };
955 //*************************************************************************************************
956 
957 
958 //*************************************************************************************************
960 template< typename MT, bool SO >
961 struct ColumnExprTrait< DMatSerialExpr<MT,SO> >
962 {
963  public:
964  //**********************************************************************************************
965  typedef typename SerialExprTrait< typename ColumnExprTrait<const MT>::Type >::Type Type;
966  //**********************************************************************************************
967 };
969 //*************************************************************************************************
970 
971 } // namespace blaze
972 
973 #endif
BLAZE_ALWAYS_INLINE void multAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the multiplication assignment of a matrix to a matrix.
Definition: Matrix.h:879
Header file for the Rows type trait.
Header file for the IsUniUpper type trait.
Header file for basic type definitions.
Base class for all matrix serial evaluation expression templates.The MatSerialExpr class serves as a ...
Definition: MatSerialExpr.h:65
MT::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: DMatSerialExpr.h:104
size_t columns() const
Returns the current number of columns of the matrix.
Definition: DMatSerialExpr.h:162
#define BLAZE_CONSTRAINT_MUST_BE_MATRIX_WITH_STORAGE_ORDER(T, SO)
Constraint on the data type.In case the given data type T is not a dense or sparse matrix type and in...
Definition: StorageOrder.h:242
#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:79
Header file for the ColumnExprTrait class template.
Header file for the IsColumnMajorMatrix type trait.
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:699
Header file for the Computation base class.
MT::ResultType ResultType
Result type for expression template evaluations.
Definition: DMatSerialExpr.h:102
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DMatSerialExpr.h:140
bool isAligned() const
Returns whether the operands of the expression are properly aligned in memory.
Definition: DMatSerialExpr.h:216
Header file for the IsUniLower type trait.
CompressedMatrix< Type, false > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: CompressedMatrix.h:2503
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:70
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:107
const ResultType CompositeType
Data type for composite expression templates.
Definition: DMatSerialExpr.h:109
Constraint on the data type.
size_t rows() const
Returns the current number of rows of the matrix.
Definition: DMatSerialExpr.h:152
Constraint on the data type.
Compile time type selection.The SelectType class template selects one of the two given types T1 and T...
Definition: SelectType.h:59
Header file for the IsStrictlyUpper type trait.
DMatSerialExpr< MT, SO > This
Type of this DMatSerialExpr instance.
Definition: DMatSerialExpr.h:101
Header file for the IsSymmetric type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Expression object for the forced serial evaluation of dense matrices.The DMatSerialExpr class represe...
Definition: DMatSerialExpr.h:95
Header file for the DMatSerialExprTrait class template.
MT::ElementType ElementType
Resulting element type.
Definition: DMatSerialExpr.h:105
Header file for the DenseMatrix base class.
BLAZE_ALWAYS_INLINE void assign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the assignment of a matrix to a matrix.
Definition: Matrix.h:635
Header file for the Columns type trait.
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: DMatSerialExpr.h:194
DMatSerialExpr(const MT &dm)
Constructor for the DMatSerialExpr class.
Definition: DMatSerialExpr.h:128
Header file for the IsLower type trait.
Header file for the SerialExprTrait class template.
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2504
Constraints on the storage order of matrix types.
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2505
Header file for the SelectType class template.
Header file for the RowExprTrait class template.
Header file for all forward declarations for expression class templates.
Header file for the IsDenseMatrix type trait.
Header file for the MatSerialExpr base class.
Header file for the IsStrictlyLower type trait.
bool canSMPAssign() const
Returns whether the expression can be used in SMP assignments.
Definition: DMatSerialExpr.h:226
Header file for the TDMatSerialExprTrait class template.
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: DMatSerialExpr.h:206
EnableIf< IsDenseMatrix< MT1 > >::Type smpSubAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:160
Header file for the SubmatrixExprTrait class template.
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2506
Header file for run time assertion macros.
EnableIf< IsDenseMatrix< MT1 > >::Type smpAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:98
Utility type for generic codes.
MT::OppositeType OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatSerialExpr.h:103
BLAZE_ALWAYS_INLINE void addAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the addition assignment of a matrix to a matrix.
Definition: Matrix.h:742
MT::ReturnType ReturnType
Return type for expression template evaluations.
Definition: DMatSerialExpr.h:106
SelectType< IsExpression< MT >::value, const MT, const MT & >::Type Operand
Composite data type of the dense matrix expression.
Definition: DMatSerialExpr.h:112
Header file for the IsRowMajorMatrix type trait.
Base class for all compute expression templates.The Computation class serves as a tag for all computa...
Definition: Computation.h:59
EnableIf< IsDenseMatrix< MT1 > >::Type smpAddAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP addition assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:129
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:157
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2502
Header file for the IsTrue value trait.
Operand operand() const
Returns the dense matrix operand.
Definition: DMatSerialExpr.h:172
Header file for the IsUpper type trait.
Operand dm_
Dense matrix of the serial evaluation expression.
Definition: DMatSerialExpr.h:233
EnableIf< IsDenseVector< VT1 > >::Type smpMultAssign(Vector< VT1, TF1 > &lhs, const Vector< VT2, TF2 > &rhs)
Default implementation of the SMP multiplication assignment of a vector to a dense vector...
Definition: DenseVector.h:189
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.
BLAZE_ALWAYS_INLINE void subAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the subtraction assignment of a matrix to matrix.
Definition: Matrix.h:849