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>
44 #include <blaze/math/Aliases.h>
47 #include <blaze/math/Exception.h>
73 #include <blaze/util/Assert.h>
76 #include <blaze/util/InvalidType.h>
78 #include <blaze/util/mpl/And.h>
79 #include <blaze/util/mpl/If.h>
80 #include <blaze/util/Types.h>
81 
82 
83 namespace blaze {
84 
85 //=================================================================================================
86 //
87 // CLASS DMATSERIALEXPR
88 //
89 //=================================================================================================
90 
91 //*************************************************************************************************
98 template< typename MT // Type of the dense matrix
99  , bool SO > // Storage order
100 class DMatSerialExpr : public DenseMatrix< DMatSerialExpr<MT,SO>, SO >
101  , private MatSerialExpr
102  , private Computation
103 {
104  public:
105  //**Type definitions****************************************************************************
112 
114  typedef const ResultType CompositeType;
115 
117  typedef If_< IsExpression<MT>, const MT, const MT& > Operand;
118  //**********************************************************************************************
119 
120  //**Compilation flags***************************************************************************
122  enum : bool { simdEnabled = false };
123 
125  enum : bool { smpAssignable = MT::smpAssignable };
126  //**********************************************************************************************
127 
128  //**Constructor*********************************************************************************
133  explicit inline DMatSerialExpr( const MT& dm ) noexcept
134  : dm_( dm ) // Dense matrix of the serial evaluation expression
135  {}
136  //**********************************************************************************************
137 
138  //**Access operator*****************************************************************************
145  inline ReturnType operator()( size_t i, size_t j ) const {
146  BLAZE_INTERNAL_ASSERT( i < dm_.rows() , "Invalid row access index" );
147  BLAZE_INTERNAL_ASSERT( j < dm_.columns(), "Invalid column access index" );
148  return dm_(i,j);
149  }
150  //**********************************************************************************************
151 
152  //**At function*********************************************************************************
160  inline ReturnType at( size_t i, size_t j ) const {
161  if( i >= dm_.rows() ) {
162  BLAZE_THROW_OUT_OF_RANGE( "Invalid row access index" );
163  }
164  if( j >= dm_.columns() ) {
165  BLAZE_THROW_OUT_OF_RANGE( "Invalid column access index" );
166  }
167  return (*this)(i,j);
168  }
169  //**********************************************************************************************
170 
171  //**Rows function*******************************************************************************
176  inline size_t rows() const noexcept {
177  return dm_.rows();
178  }
179  //**********************************************************************************************
180 
181  //**Columns function****************************************************************************
186  inline size_t columns() const noexcept {
187  return dm_.columns();
188  }
189  //**********************************************************************************************
190 
191  //**Operand access******************************************************************************
196  inline Operand operand() const noexcept {
197  return dm_;
198  }
199  //**********************************************************************************************
200 
201  //**Conversion operator*************************************************************************
206  inline operator Operand() const noexcept {
207  return dm_;
208  }
209  //**********************************************************************************************
210 
211  //**********************************************************************************************
217  template< typename T >
218  inline bool canAlias( const T* alias ) const noexcept {
219  return dm_.canAlias( alias );
220  }
221  //**********************************************************************************************
222 
223  //**********************************************************************************************
229  template< typename T >
230  inline bool isAliased( const T* alias ) const noexcept {
231  return dm_.isAliased( alias );
232  }
233  //**********************************************************************************************
234 
235  //**********************************************************************************************
240  inline bool isAligned() const noexcept {
241  return dm_.isAligned();
242  }
243  //**********************************************************************************************
244 
245  //**********************************************************************************************
250  inline bool canSMPAssign() const noexcept {
251  return dm_.canSMPAssign();
252  }
253  //**********************************************************************************************
254 
255  private:
256  //**Member variables****************************************************************************
257  Operand dm_;
258  //**********************************************************************************************
259 
260  //**Assignment to dense matrices****************************************************************
272  template< typename MT2 // Type of the target dense matrix
273  , bool SO2 > // Storage order of the target dense matrix
274  friend inline void assign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
275  {
277 
278  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
279  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
280 
281  assign( ~lhs, rhs.dm_ );
282  }
284  //**********************************************************************************************
285 
286  //**Assignment to sparse matrices***************************************************************
298  template< typename MT2 // Type of the target sparse matrix
299  , bool SO2 > // Storage order of the target dense matrix
300  friend inline void assign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
301  {
303 
304  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
305  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
306 
307  assign( ~lhs, rhs.dm_ );
308  }
310  //**********************************************************************************************
311 
312  //**Addition assignment to dense matrices*******************************************************
324  template< typename MT2 // Type of the target dense matrix
325  , bool SO2 > // Storage order of the target dense matrix
326  friend inline void addAssign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
327  {
329 
330  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
331  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
332 
333  addAssign( ~lhs, rhs.dm_ );
334  }
336  //**********************************************************************************************
337 
338  //**Addition assignment to sparse matrices******************************************************
350  template< typename MT2 // Type of the target sparse matrix
351  , bool SO2 > // Storage order of the target dense matrix
352  friend inline void addAssign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
353  {
355 
356  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
357  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
358 
359  addAssign( ~lhs, rhs.dm_ );
360  }
362  //**********************************************************************************************
363 
364  //**Subtraction assignment to dense matrices****************************************************
377  template< typename MT2 // Type of the target dense matrix
378  , bool SO2 > // Storage order of the target dense matrix
379  friend inline void subAssign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
380  {
382 
383  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
384  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
385 
386  subAssign( ~lhs, rhs.dm_ );
387  }
389  //**********************************************************************************************
390 
391  //**Subtraction assignment to sparse matrices***************************************************
404  template< typename MT2 // Type of the target sparse matrix
405  , bool SO2 > // Storage order of the target dense matrix
406  friend inline void subAssign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
407  {
409 
410  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
411  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
412 
413  subAssign( ~lhs, rhs.dm_ );
414  }
416  //**********************************************************************************************
417 
418  //**Multiplication assignment to dense matrices*************************************************
431  template< typename MT2 // Type of the target dense matrix
432  , bool SO2 > // Storage order of the target dense matrix
433  friend inline void multAssign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
434  {
436 
437  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
438  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
439 
440  multAssign( ~lhs, rhs.sm_ );
441  }
443  //**********************************************************************************************
444 
445  //**Multiplication assignment to sparse matrices************************************************
458  template< typename MT2 // Type of the target sparse matrix
459  , bool SO2 > // Storage order of the target sparse matrix
460  friend inline void multAssign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
461  {
463 
464  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
465  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
466 
467  multAssign( ~lhs, rhs.sm_ );
468  }
470  //**********************************************************************************************
471 
472  //**SMP assignment to dense matrices************************************************************
484  template< typename MT2 // Type of the target dense matrix
485  , bool SO2 > // Storage order of the target dense matrix
486  friend inline void smpAssign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
487  {
489 
490  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
491  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
492 
493  assign( ~lhs, rhs.dm_ );
494  }
496  //**********************************************************************************************
497 
498  //**SMP assignment to sparse matrices***********************************************************
510  template< typename MT2 // Type of the target sparse matrix
511  , bool SO2 > // Storage order of the target dense matrix
512  friend inline void smpAssign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
513  {
515 
516  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
517  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
518 
519  assign( ~lhs, rhs.dm_ );
520  }
522  //**********************************************************************************************
523 
524  //**SMP addition assignment to dense matrices***************************************************
537  template< typename MT2 // Type of the target dense matrix
538  , bool SO2 > // Storage order of the target dense matrix
539  friend inline void smpAddAssign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
540  {
542 
543  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
544  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
545 
546  addAssign( ~lhs, rhs.dm_ );
547  }
549  //**********************************************************************************************
550 
551  //**SMP addition assignment to sparse matrices**************************************************
564  template< typename MT2 // Type of the target sparse matrix
565  , bool SO2 > // Storage order of the target dense matrix
566  friend inline void smpAddAssign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
567  {
569 
570  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
571  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
572 
573  addAssign( ~lhs, rhs.dm_ );
574  }
576  //**********************************************************************************************
577 
578  //**SMP subtraction assignment to dense matrices************************************************
591  template< typename MT2 // Type of the target dense matrix
592  , bool SO2 > // Storage order of the target dense matrix
593  friend inline void smpSubAssign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
594  {
596 
597  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
598  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
599 
600  subAssign( ~lhs, rhs.dm_ );
601  }
603  //**********************************************************************************************
604 
605  //**SMP subtraction assignment to sparse matrices***********************************************
618  template< typename MT2 // Type of the target sparse matrix
619  , bool SO2 > // Storage order of the target dense matrix
620  friend inline void smpSubAssign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
621  {
623 
624  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
625  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
626 
627  subAssign( ~lhs, rhs.dm_ );
628  }
630  //**********************************************************************************************
631 
632  //**SMP multiplication assignment to dense matrices*********************************************
645  template< typename MT2 // Type of the target dense matrix
646  , bool SO2 > // Storage order of the target dense matrix
647  friend inline void smpMultAssign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
648  {
650 
651  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
652  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
653 
654  multAssign( ~lhs, rhs.sm_ );
655  }
657  //**********************************************************************************************
658 
659  //**SMP multiplication assignment to sparse matrices********************************************
672  template< typename MT2 // Type of the target sparse matrix
673  , bool SO2 > // Storage order of the target sparse matrix
674  friend inline void smpMultAssign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
675  {
677 
678  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
679  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
680 
681  multAssign( ~lhs, rhs.sm_ );
682  }
684  //**********************************************************************************************
685 
686  //**Compile time checks*************************************************************************
691  //**********************************************************************************************
692 };
693 //*************************************************************************************************
694 
695 
696 
697 
698 //=================================================================================================
699 //
700 // GLOBAL FUNCTIONS
701 //
702 //=================================================================================================
703 
704 //*************************************************************************************************
721 template< typename MT // Type of the dense matrix
722  , bool SO > // Storage order
724 {
726 
727  return DMatSerialExpr<MT,SO>( ~dm );
728 }
729 //*************************************************************************************************
730 
731 
732 
733 
734 //=================================================================================================
735 //
736 // GLOBAL RESTRUCTURING FUNCTIONS
737 //
738 //=================================================================================================
739 
740 //*************************************************************************************************
751 template< typename MT // Type of the dense matrix
752  , bool SO > // Storage order
753 inline const DMatSerialExpr<MT,SO> serial( const DMatSerialExpr<MT,SO>& dm )
754 {
755  return dm;
756 }
758 //*************************************************************************************************
759 
760 
761 
762 
763 //=================================================================================================
764 //
765 // ROWS SPECIALIZATIONS
766 //
767 //=================================================================================================
768 
769 //*************************************************************************************************
771 template< typename MT, bool SO >
772 struct Rows< DMatSerialExpr<MT,SO> > : public Rows<MT>
773 {};
775 //*************************************************************************************************
776 
777 
778 
779 
780 //=================================================================================================
781 //
782 // COLUMNS SPECIALIZATIONS
783 //
784 //=================================================================================================
785 
786 //*************************************************************************************************
788 template< typename MT, bool SO >
789 struct Columns< DMatSerialExpr<MT,SO> > : public Columns<MT>
790 {};
792 //*************************************************************************************************
793 
794 
795 
796 
797 //=================================================================================================
798 //
799 // ISALIGNED SPECIALIZATIONS
800 //
801 //=================================================================================================
802 
803 //*************************************************************************************************
805 template< typename MT, bool SO >
806 struct IsAligned< DMatSerialExpr<MT,SO> >
807  : public BoolConstant< IsAligned<MT>::value >
808 {};
810 //*************************************************************************************************
811 
812 
813 
814 
815 //=================================================================================================
816 //
817 // ISSYMMETRIC SPECIALIZATIONS
818 //
819 //=================================================================================================
820 
821 //*************************************************************************************************
823 template< typename MT, bool SO >
824 struct IsSymmetric< DMatSerialExpr<MT,SO> >
825  : public BoolConstant< IsSymmetric<MT>::value >
826 {};
828 //*************************************************************************************************
829 
830 
831 
832 
833 //=================================================================================================
834 //
835 // ISHERMITIAN SPECIALIZATIONS
836 //
837 //=================================================================================================
838 
839 //*************************************************************************************************
841 template< typename MT, bool SO >
842 struct IsHermitian< DMatSerialExpr<MT,SO> >
843  : public BoolConstant< IsHermitian<MT>::value >
844 {};
846 //*************************************************************************************************
847 
848 
849 
850 
851 //=================================================================================================
852 //
853 // ISLOWER SPECIALIZATIONS
854 //
855 //=================================================================================================
856 
857 //*************************************************************************************************
859 template< typename MT, bool SO >
860 struct IsLower< DMatSerialExpr<MT,SO> >
861  : public BoolConstant< IsLower<MT>::value >
862 {};
864 //*************************************************************************************************
865 
866 
867 
868 
869 //=================================================================================================
870 //
871 // ISUNILOWER SPECIALIZATIONS
872 //
873 //=================================================================================================
874 
875 //*************************************************************************************************
877 template< typename MT, bool SO >
878 struct IsUniLower< DMatSerialExpr<MT,SO> >
879  : public BoolConstant< IsUniLower<MT>::value >
880 {};
882 //*************************************************************************************************
883 
884 
885 
886 
887 //=================================================================================================
888 //
889 // ISSTRICTLYLOWER SPECIALIZATIONS
890 //
891 //=================================================================================================
892 
893 //*************************************************************************************************
895 template< typename MT, bool SO >
896 struct IsStrictlyLower< DMatSerialExpr<MT,SO> >
897  : public BoolConstant< IsStrictlyLower<MT>::value >
898 {};
900 //*************************************************************************************************
901 
902 
903 
904 
905 //=================================================================================================
906 //
907 // ISUPPER SPECIALIZATIONS
908 //
909 //=================================================================================================
910 
911 //*************************************************************************************************
913 template< typename MT, bool SO >
914 struct IsUpper< DMatSerialExpr<MT,SO> >
915  : public BoolConstant< IsUpper<MT>::value >
916 {};
918 //*************************************************************************************************
919 
920 
921 
922 
923 //=================================================================================================
924 //
925 // ISUNIUPPER SPECIALIZATIONS
926 //
927 //=================================================================================================
928 
929 //*************************************************************************************************
931 template< typename MT, bool SO >
932 struct IsUniUpper< DMatSerialExpr<MT,SO> >
933  : public BoolConstant< IsUniUpper<MT>::value >
934 {};
936 //*************************************************************************************************
937 
938 
939 
940 
941 //=================================================================================================
942 //
943 // ISSTRICTLYUPPER SPECIALIZATIONS
944 //
945 //=================================================================================================
946 
947 //*************************************************************************************************
949 template< typename MT, bool SO >
950 struct IsStrictlyUpper< DMatSerialExpr<MT,SO> >
951  : public BoolConstant< IsStrictlyUpper<MT>::value >
952 {};
954 //*************************************************************************************************
955 
956 
957 
958 
959 //=================================================================================================
960 //
961 // EXPRESSION TRAIT SPECIALIZATIONS
962 //
963 //=================================================================================================
964 
965 //*************************************************************************************************
967 template< typename MT >
968 struct DMatSerialExprTrait< DMatSerialExpr<MT,false> >
969 {
970  public:
971  //**********************************************************************************************
972  using Type = If_< And< IsDenseMatrix<MT>, IsRowMajorMatrix<MT> >
973  , DMatSerialExpr<MT,false>
974  , INVALID_TYPE >;
975  //**********************************************************************************************
976 };
978 //*************************************************************************************************
979 
980 
981 //*************************************************************************************************
983 template< typename MT >
984 struct TDMatSerialExprTrait< DMatSerialExpr<MT,true> >
985 {
986  public:
987  //**********************************************************************************************
988  using Type = If_< And< IsDenseMatrix<MT>, IsColumnMajorMatrix<MT> >
989  , DMatSerialExpr<MT,true>
990  , INVALID_TYPE >;
991  //**********************************************************************************************
992 };
994 //*************************************************************************************************
995 
996 
997 //*************************************************************************************************
999 template< typename MT, bool SO, bool AF >
1000 struct SubmatrixExprTrait< DMatSerialExpr<MT,SO>, AF >
1001 {
1002  public:
1003  //**********************************************************************************************
1004  using Type = SerialExprTrait_< SubmatrixExprTrait_<const MT,AF> >;
1005  //**********************************************************************************************
1006 };
1008 //*************************************************************************************************
1009 
1010 
1011 //*************************************************************************************************
1013 template< typename MT, bool SO >
1014 struct RowExprTrait< DMatSerialExpr<MT,SO> >
1015 {
1016  public:
1017  //**********************************************************************************************
1018  using Type = SerialExprTrait_< RowExprTrait_<const MT> >;
1019  //**********************************************************************************************
1020 };
1022 //*************************************************************************************************
1023 
1024 
1025 //*************************************************************************************************
1027 template< typename MT, bool SO >
1028 struct ColumnExprTrait< DMatSerialExpr<MT,SO> >
1029 {
1030  public:
1031  //**********************************************************************************************
1032  using Type = SerialExprTrait_< ColumnExprTrait_<const MT> >;
1033  //**********************************************************************************************
1034 };
1036 //*************************************************************************************************
1037 
1038 } // namespace blaze
1039 
1040 #endif
Header file for auxiliary alias declarations.
DMatSerialExpr(const MT &dm) noexcept
Constructor for the DMatSerialExpr class.
Definition: DMatSerialExpr.h:133
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
EnableIf_< IsDenseMatrix< MT1 > > 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
#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:63
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a dense, N-dimensional matrix type...
Definition: DenseMatrix.h:61
Header file for the ColumnExprTrait class template.
Header file for the IsColumnMajorMatrix type trait.
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: DMatSerialExpr.h:250
OppositeType_< MT > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatSerialExpr.h:108
EnableIf_< IsDenseVector< VT1 > > 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:193
Header file for the And class template.
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:723
ReturnType_< MT > ReturnType
Return type for expression template evaluations.
Definition: DMatSerialExpr.h:111
Header file for the Computation base class.
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DMatSerialExpr.h:145
Header file for the IsUniLower type trait.
typename T::ResultType ResultType_
Alias declaration for nested ResultType type definitions.The ResultType_ alias declaration provides a...
Definition: Aliases.h:323
EnableIf_< IsDenseMatrix< MT1 > > 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
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:109
const ResultType CompositeType
Data type for composite expression templates.
Definition: DMatSerialExpr.h:114
Constraint on the data type.
typename T::ReturnType ReturnType_
Alias declaration for nested ReturnType type definitions.The ReturnType_ alias declaration provides a...
Definition: Aliases.h:343
Constraint on the data type.
Header file for the IsStrictlyUpper type trait.
DMatSerialExpr< MT, SO > This
Type of this DMatSerialExpr instance.
Definition: DMatSerialExpr.h:106
Header file for the IsSymmetric type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the If class template.
Expression object for the forced serial evaluation of dense matrices.The DMatSerialExpr class represe...
Definition: DMatSerialExpr.h:100
Header file for the DMatSerialExprTrait class template.
EnableIf_< IsDenseMatrix< MT1 > > 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
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.This macro encapsulates the default way of Bl...
Definition: Exception.h:331
Header file for the DenseMatrix base class.
Header file for the Columns type trait.
typename T::ElementType ElementType_
Alias declaration for nested ElementType type definitions.The ElementType_ alias declaration provides...
Definition: Aliases.h:163
Header file for the IsLower type trait.
Header file for the IsAligned type trait.
Header file for the SerialExprTrait class template.
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: DMatSerialExpr.h:240
Constraints on the storage order of matrix types.
Header file for the exception macros of the math module.
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.
Header file for the TDMatSerialExprTrait class template.
ElementType_< MT > ElementType
Resulting element type.
Definition: DMatSerialExpr.h:110
Header file for the SubmatrixExprTrait class template.
If_< IsExpression< MT >, const MT, const MT & > Operand
Composite data type of the dense matrix expression.
Definition: DMatSerialExpr.h:117
Header file for run time assertion macros.
Utility type for generic codes.
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: DMatSerialExpr.h:160
typename If< T1, T2, T3 >::Type If_
Auxiliary alias declaration for the If class template.The If_ alias declaration provides a convenient...
Definition: If.h:160
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: DMatSerialExpr.h:186
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: DMatSerialExpr.h:176
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.The BoolConstant class template represents ...
Definition: IntegralConstant.h:100
typename T::OppositeType OppositeType_
Alias declaration for nested OppositeType type definitions.The OppositeType_ alias declaration provid...
Definition: Aliases.h:243
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: DMatSerialExpr.h:230
Operand operand() const noexcept
Returns the dense matrix operand.
Definition: DMatSerialExpr.h:196
Header file for the IsRowMajorMatrix type trait.
TransposeType_< MT > TransposeType
Transpose type for expression template evaluations.
Definition: DMatSerialExpr.h:109
Base class for all compute expression templates.The Computation class serves as a tag for all computa...
Definition: Computation.h:59
ResultType_< MT > ResultType
Result type for expression template evaluations.
Definition: DMatSerialExpr.h:107
#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
Header file for the IntegralConstant class template.
typename T::TransposeType TransposeType_
Alias declaration for nested TransposeType type definitions.The TransposeType_ alias declaration prov...
Definition: Aliases.h:403
Header file for the IsUpper type trait.
Operand dm_
Dense matrix of the serial evaluation expression.
Definition: DMatSerialExpr.h:257
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: DMatSerialExpr.h:218
Header file for the IsHermitian type trait.
#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.