DMatEvalExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_DMATEVALEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_DMATEVALEXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/math/Aliases.h>
46 #include <blaze/math/Exception.h>
62 #include <blaze/util/Assert.h>
64 #include <blaze/util/mpl/If.h>
65 #include <blaze/util/Types.h>
66 
67 
68 namespace blaze {
69 
70 //=================================================================================================
71 //
72 // CLASS DMATEVALEXPR
73 //
74 //=================================================================================================
75 
76 //*************************************************************************************************
83 template< typename MT // Type of the dense matrix
84  , bool SO > // Storage order
86  : public MatEvalExpr< DenseMatrix< DMatEvalExpr<MT,SO>, SO > >
87  , private Computation
88 {
89  public:
90  //**Type definitions****************************************************************************
97 
99  using CompositeType = const ResultType;
100 
102  using Operand = If_< IsExpression<MT>, const MT, const MT& >;
103  //**********************************************************************************************
104 
105  //**Compilation flags***************************************************************************
107  enum : bool { simdEnabled = false };
108 
110  enum : bool { smpAssignable = MT::smpAssignable };
111  //**********************************************************************************************
112 
113  //**Constructor*********************************************************************************
118  explicit inline DMatEvalExpr( const MT& dm ) noexcept
119  : dm_( dm ) // Dense matrix of the evaluation expression
120  {}
121  //**********************************************************************************************
122 
123  //**Access operator*****************************************************************************
130  inline ReturnType operator()( size_t i, size_t j ) const {
131  BLAZE_INTERNAL_ASSERT( i < dm_.rows() , "Invalid row access index" );
132  BLAZE_INTERNAL_ASSERT( j < dm_.columns(), "Invalid column access index" );
133  return dm_(i,j);
134  }
135  //**********************************************************************************************
136 
137  //**At function*********************************************************************************
145  inline ReturnType at( size_t i, size_t j ) const {
146  if( i >= dm_.rows() ) {
147  BLAZE_THROW_OUT_OF_RANGE( "Invalid row access index" );
148  }
149  if( j >= dm_.columns() ) {
150  BLAZE_THROW_OUT_OF_RANGE( "Invalid column access index" );
151  }
152  return (*this)(i,j);
153  }
154  //**********************************************************************************************
155 
156  //**Rows function*******************************************************************************
161  inline size_t rows() const noexcept {
162  return dm_.rows();
163  }
164  //**********************************************************************************************
165 
166  //**Columns function****************************************************************************
171  inline size_t columns() const noexcept {
172  return dm_.columns();
173  }
174  //**********************************************************************************************
175 
176  //**Operand access******************************************************************************
181  inline Operand operand() const noexcept {
182  return dm_;
183  }
184  //**********************************************************************************************
185 
186  //**********************************************************************************************
192  template< typename T >
193  inline bool canAlias( const T* alias ) const noexcept {
194  return dm_.canAlias( alias );
195  }
196  //**********************************************************************************************
197 
198  //**********************************************************************************************
204  template< typename T >
205  inline bool isAliased( const T* alias ) const noexcept {
206  return dm_.isAliased( alias );
207  }
208  //**********************************************************************************************
209 
210  //**********************************************************************************************
215  inline bool isAligned() const noexcept {
216  return dm_.isAligned();
217  }
218  //**********************************************************************************************
219 
220  //**********************************************************************************************
225  inline bool canSMPAssign() const noexcept {
226  return dm_.canSMPAssign();
227  }
228  //**********************************************************************************************
229 
230  private:
231  //**Member variables****************************************************************************
233  //**********************************************************************************************
234 
235  //**Assignment to dense matrices****************************************************************
247  template< typename MT2 // Type of the target dense matrix
248  , bool SO2 > // Storage order of the target dense matrix
249  friend inline void assign( DenseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
250  {
252 
253  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
254  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
255 
256  assign( ~lhs, rhs.dm_ );
257  }
259  //**********************************************************************************************
260 
261  //**Assignment to sparse matrices***************************************************************
273  template< typename MT2 // Type of the target sparse matrix
274  , bool SO2 > // Storage order of the target dense matrix
275  friend inline void assign( SparseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
276  {
278 
279  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
280  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
281 
282  assign( ~lhs, rhs.dm_ );
283  }
285  //**********************************************************************************************
286 
287  //**Addition assignment to dense matrices*******************************************************
299  template< typename MT2 // Type of the target dense matrix
300  , bool SO2 > // Storage order of the target dense matrix
301  friend inline void addAssign( DenseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
302  {
304 
305  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
306  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
307 
308  addAssign( ~lhs, rhs.dm_ );
309  }
311  //**********************************************************************************************
312 
313  //**Addition assignment to sparse matrices******************************************************
325  template< typename MT2 // Type of the target sparse matrix
326  , bool SO2 > // Storage order of the target dense matrix
327  friend inline void addAssign( SparseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
328  {
330 
331  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
332  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
333 
334  addAssign( ~lhs, rhs.dm_ );
335  }
337  //**********************************************************************************************
338 
339  //**Subtraction assignment to dense matrices****************************************************
351  template< typename MT2 // Type of the target dense matrix
352  , bool SO2 > // Storage order of the target dense matrix
353  friend inline void subAssign( DenseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
354  {
356 
357  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
358  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
359 
360  subAssign( ~lhs, rhs.dm_ );
361  }
363  //**********************************************************************************************
364 
365  //**Subtraction assignment to sparse matrices***************************************************
377  template< typename MT2 // Type of the target sparse matrix
378  , bool SO2 > // Storage order of the target dense matrix
379  friend inline void subAssign( SparseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& 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  //**Schur product assignment to dense matrices**************************************************
403  template< typename MT2 // Type of the target dense matrix
404  , bool SO2 > // Storage order of the target dense matrix
405  friend inline void schurAssign( DenseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
406  {
408 
409  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
410  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
411 
412  schurAssign( ~lhs, rhs.dm_ );
413  }
415  //**********************************************************************************************
416 
417  //**Schur product assignment to sparse matrices*************************************************
429  template< typename MT2 // Type of the target sparse matrix
430  , bool SO2 > // Storage order of the target dense matrix
431  friend inline void schurAssign( SparseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
432  {
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  schurAssign( ~lhs, rhs.dm_ );
439  }
441  //**********************************************************************************************
442 
443  //**Multiplication assignment to dense matrices*************************************************
455  template< typename MT2 // Type of the target dense matrix
456  , bool SO2 > // Storage order of the target dense matrix
457  friend inline void multAssign( DenseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
458  {
460 
461  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
462  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
463 
464  multAssign( ~lhs, rhs.dm_ );
465  }
467  //**********************************************************************************************
468 
469  //**Multiplication assignment to sparse matrices************************************************
481  template< typename MT2 // Type of the target sparse matrix
482  , bool SO2 > // Storage order of the target dense matrix
483  friend inline void multAssign( SparseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
484  {
486 
487  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
488  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
489 
490  multAssign( ~lhs, rhs.dm_ );
491  }
493  //**********************************************************************************************
494 
495  //**SMP assignment to dense matrices************************************************************
507  template< typename MT2 // Type of the target dense matrix
508  , bool SO2 > // Storage order of the target dense matrix
509  friend inline void smpAssign( DenseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
510  {
512 
513  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
514  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
515 
516  smpAssign( ~lhs, rhs.dm_ );
517  }
519  //**********************************************************************************************
520 
521  //**SMP assignment to sparse matrices***********************************************************
533  template< typename MT2 // Type of the target sparse matrix
534  , bool SO2 > // Storage order of the target dense matrix
535  friend inline void smpAssign( SparseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
536  {
538 
539  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
540  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
541 
542  smpAssign( ~lhs, rhs.dm_ );
543  }
545  //**********************************************************************************************
546 
547  //**SMP addition assignment to dense matrices***************************************************
559  template< typename MT2 // Type of the target dense matrix
560  , bool SO2 > // Storage order of the target dense matrix
561  friend inline void smpAddAssign( DenseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
562  {
564 
565  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
566  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
567 
568  smpAddAssign( ~lhs, rhs.dm_ );
569  }
571  //**********************************************************************************************
572 
573  //**SMP addition assignment to sparse matrices**************************************************
585  template< typename MT2 // Type of the target sparse matrix
586  , bool SO2 > // Storage order of the target dense matrix
587  friend inline void smpAddAssign( SparseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
588  {
590 
591  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
592  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
593 
594  smpAddAssign( ~lhs, rhs.dm_ );
595  }
597  //**********************************************************************************************
598 
599  //**SMP subtraction assignment to dense matrices************************************************
611  template< typename MT2 // Type of the target dense matrix
612  , bool SO2 > // Storage order of the target dense matrix
613  friend inline void smpSubAssign( DenseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
614  {
616 
617  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
618  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
619 
620  smpSubAssign( ~lhs, rhs.dm_ );
621  }
623  //**********************************************************************************************
624 
625  //**SMP subtraction assignment to sparse matrices***********************************************
637  template< typename MT2 // Type of the target sparse matrix
638  , bool SO2 > // Storage order of the target dense matrix
639  friend inline void smpSubAssign( SparseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
640  {
642 
643  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
644  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
645 
646  smpSubAssign( ~lhs, rhs.dm_ );
647  }
649  //**********************************************************************************************
650 
651  //**SMP Schur product assignment to dense matrices**********************************************
663  template< typename MT2 // Type of the target dense matrix
664  , bool SO2 > // Storage order of the target dense matrix
665  friend inline void smpSchurAssign( DenseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
666  {
668 
669  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
670  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
671 
672  smpSchurAssign( ~lhs, rhs.dm_ );
673  }
675  //**********************************************************************************************
676 
677  //**SMP Schur product assignment to sparse matrices*********************************************
689  template< typename MT2 // Type of the target sparse matrix
690  , bool SO2 > // Storage order of the target dense matrix
691  friend inline void smpSchurAssign( SparseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
692  {
694 
695  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
696  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
697 
698  smpSchurAssign( ~lhs, rhs.dm_ );
699  }
701  //**********************************************************************************************
702 
703  //**SMP multiplication assignment to dense matrices*********************************************
716  template< typename MT2 // Type of the target dense matrix
717  , bool SO2 > // Storage order of the target dense matrix
718  friend inline void smpMultAssign( DenseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
719  {
721 
722  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
723  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
724 
725  smpMultAssign( ~lhs, rhs.dm_ );
726  }
728  //**********************************************************************************************
729 
730  //**SMP multiplication assignment to sparse matrices********************************************
743  template< typename MT2 // Type of the target sparse matrix
744  , bool SO2 > // Storage order of the target dense matrix
745  friend inline void smpMultAssign( SparseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
746  {
748 
749  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
750  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
751 
752  smpMultAssign( ~lhs, rhs.dm_ );
753  }
755  //**********************************************************************************************
756 
757  //**Compile time checks*************************************************************************
762  //**********************************************************************************************
763 };
764 //*************************************************************************************************
765 
766 
767 
768 
769 //=================================================================================================
770 //
771 // GLOBAL FUNCTIONS
772 //
773 //=================================================================================================
774 
775 //*************************************************************************************************
792 template< typename MT // Type of the dense matrix
793  , bool SO > // Storage order
794 inline decltype(auto) eval( const DenseMatrix<MT,SO>& dm )
795 {
797 
798  using ReturnType = const DMatEvalExpr<MT,SO>;
799  return ReturnType( ~dm );
800 }
801 //*************************************************************************************************
802 
803 
804 
805 
806 //=================================================================================================
807 //
808 // GLOBAL RESTRUCTURING FUNCTIONS
809 //
810 //=================================================================================================
811 
812 //*************************************************************************************************
823 template< typename MT // Type of the dense matrix
824  , bool SO > // Storage order
825 inline decltype(auto) eval( const DMatEvalExpr<MT,SO>& dm )
826 {
827  return dm;
828 }
830 //*************************************************************************************************
831 
832 
833 
834 
835 //=================================================================================================
836 //
837 // SIZE SPECIALIZATIONS
838 //
839 //=================================================================================================
840 
841 //*************************************************************************************************
843 template< typename MT, bool SO >
844 struct Size< DMatEvalExpr<MT,SO>, 0UL >
845  : public Size<MT,0UL>
846 {};
847 
848 template< typename MT, bool SO >
849 struct Size< DMatEvalExpr<MT,SO>, 1UL >
850  : public Size<MT,1UL>
851 {};
853 //*************************************************************************************************
854 
855 
856 
857 
858 //=================================================================================================
859 //
860 // ISALIGNED SPECIALIZATIONS
861 //
862 //=================================================================================================
863 
864 //*************************************************************************************************
866 template< typename MT, bool SO >
867 struct IsAligned< DMatEvalExpr<MT,SO> >
868  : public IsAligned<MT>
869 {};
871 //*************************************************************************************************
872 
873 
874 
875 
876 //=================================================================================================
877 //
878 // ISSYMMETRIC SPECIALIZATIONS
879 //
880 //=================================================================================================
881 
882 //*************************************************************************************************
884 template< typename MT, bool SO >
885 struct IsSymmetric< DMatEvalExpr<MT,SO> >
886  : public IsSymmetric<MT>
887 {};
889 //*************************************************************************************************
890 
891 
892 
893 
894 //=================================================================================================
895 //
896 // ISHERMITIAN SPECIALIZATIONS
897 //
898 //=================================================================================================
899 
900 //*************************************************************************************************
902 template< typename MT, bool SO >
903 struct IsHermitian< DMatEvalExpr<MT,SO> >
904  : public IsHermitian<MT>
905 {};
907 //*************************************************************************************************
908 
909 
910 
911 
912 //=================================================================================================
913 //
914 // ISLOWER SPECIALIZATIONS
915 //
916 //=================================================================================================
917 
918 //*************************************************************************************************
920 template< typename MT, bool SO >
921 struct IsLower< DMatEvalExpr<MT,SO> >
922  : public IsLower<MT>
923 {};
925 //*************************************************************************************************
926 
927 
928 
929 
930 //=================================================================================================
931 //
932 // ISUNILOWER SPECIALIZATIONS
933 //
934 //=================================================================================================
935 
936 //*************************************************************************************************
938 template< typename MT, bool SO >
939 struct IsUniLower< DMatEvalExpr<MT,SO> >
940  : public IsUniLower<MT>
941 {};
943 //*************************************************************************************************
944 
945 
946 
947 
948 //=================================================================================================
949 //
950 // ISSTRICTLYLOWER SPECIALIZATIONS
951 //
952 //=================================================================================================
953 
954 //*************************************************************************************************
956 template< typename MT, bool SO >
957 struct IsStrictlyLower< DMatEvalExpr<MT,SO> >
958  : public IsStrictlyLower<MT>
959 {};
961 //*************************************************************************************************
962 
963 
964 
965 
966 //=================================================================================================
967 //
968 // ISUPPER SPECIALIZATIONS
969 //
970 //=================================================================================================
971 
972 //*************************************************************************************************
974 template< typename MT, bool SO >
975 struct IsUpper< DMatEvalExpr<MT,SO> >
976  : public IsUpper<MT>
977 {};
979 //*************************************************************************************************
980 
981 
982 
983 
984 //=================================================================================================
985 //
986 // ISUNIUPPER SPECIALIZATIONS
987 //
988 //=================================================================================================
989 
990 //*************************************************************************************************
992 template< typename MT, bool SO >
993 struct IsUniUpper< DMatEvalExpr<MT,SO> >
994  : public IsUniUpper<MT>
995 {};
997 //*************************************************************************************************
998 
999 
1000 
1001 
1002 //=================================================================================================
1003 //
1004 // ISSTRICTLYUPPER SPECIALIZATIONS
1005 //
1006 //=================================================================================================
1007 
1008 //*************************************************************************************************
1010 template< typename MT, bool SO >
1011 struct IsStrictlyUpper< DMatEvalExpr<MT,SO> >
1012  : public IsStrictlyUpper<MT>
1013 {};
1015 //*************************************************************************************************
1016 
1017 } // namespace blaze
1018 
1019 #endif
DMatEvalExpr(const MT &dm) noexcept
Constructor for the DMatEvalExpr class.
Definition: DMatEvalExpr.h:118
Header file for auxiliary alias declarations.
Header file for the IsUniUpper type trait.
EnableIf_< IsDenseMatrix< MT1 > > smpSchurAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP Schur product assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:196
Header file for basic type definitions.
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:164
#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
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: DMatEvalExpr.h:145
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
If_< IsExpression< MT >, const MT, const MT &> Operand
Composite data type of the dense matrix expression.
Definition: DMatEvalExpr.h:102
Compile time check for lower triangular matrices.This type trait tests whether or not the given templ...
Definition: IsLower.h:87
Header file for the MatEvalExpr base class.
Header file for the Computation base class.
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: DMatEvalExpr.h:225
Operand operand() const noexcept
Returns the dense matrix operand.
Definition: DMatEvalExpr.h:181
Compile time check for upper triangular matrices.This type trait tests whether or not the given templ...
Definition: IsUpper.h:87
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:343
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:133
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:80
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:129
typename T::ReturnType ReturnType_
Alias declaration for nested ReturnType type definitions.The ReturnType_ alias declaration provides a...
Definition: Aliases.h:363
Compile time check for the alignment of data types.This type trait tests whether the given data type ...
Definition: IsAligned.h:87
Constraint on the data type.
Compile time check for upper unitriangular matrices.This type trait tests whether or not the given te...
Definition: IsUniUpper.h:86
Header file for the IsStrictlyUpper type trait.
Header file for the IsSymmetric type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: DMatEvalExpr.h:215
Header file for the If class template.
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DMatEvalExpr.h:130
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:102
#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.
typename T::ElementType ElementType_
Alias declaration for nested ElementType type definitions.The ElementType_ alias declaration provides...
Definition: Aliases.h:163
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: DMatEvalExpr.h:193
Header file for the IsLower type trait.
Header file for the IsAligned type trait.
decltype(auto) eval(const DenseMatrix< MT, SO > &dm)
Forces the evaluation of the given dense matrix expression dm.
Definition: DMatEvalExpr.h:794
Constraints on the storage order of matrix types.
Compile time check for symmetric matrices.This type trait tests whether or not the given template par...
Definition: IsSymmetric.h:85
Header file for the exception macros of the math module.
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: DMatEvalExpr.h:161
Compile time check for strictly upper triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyUpper.h:86
OppositeType_< MT > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatEvalExpr.h:93
Header file for all forward declarations for expression class templates.
Header file for the IsStrictlyLower type trait.
Operand dm_
Dense matrix of the evaluation expression.
Definition: DMatEvalExpr.h:232
Compile time check for lower unitriangular matrices.This type trait tests whether or not the given te...
Definition: IsUniLower.h:86
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: DMatEvalExpr.h:171
Header file for run time assertion macros.
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:154
Base class for all matrix evaluation expression templates.The MatEvalExpr class serves as a tag for a...
Definition: MatEvalExpr.h:66
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:94
Compile time check for Hermitian matrices.This type trait tests whether or not the given template par...
Definition: IsHermitian.h:85
ElementType_< MT > ElementType
Resulting element type.
Definition: DMatEvalExpr.h:95
ResultType_< MT > ResultType
Result type for expression template evaluations.
Definition: DMatEvalExpr.h:92
typename T::OppositeType OppositeType_
Alias declaration for nested OppositeType type definitions.The OppositeType_ alias declaration provid...
Definition: Aliases.h:263
Compile time check for strictly lower triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyLower.h:86
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:3080
ReturnType_< MT > ReturnType
Return type for expression template evaluations.
Definition: DMatEvalExpr.h:96
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: DMatEvalExpr.h:205
Expression object for the forced evaluation of dense matrices.The DMatEvalExpr class represents the c...
Definition: DMatEvalExpr.h:85
Base class for all compute expression templates.The Computation class serves as a tag for all computa...
Definition: Computation.h:66
Compile time evaluation of the size of vectors and matrices.The Size type trait evaluates the size of...
Definition: Size.h:80
typename T::TransposeType TransposeType_
Alias declaration for nested TransposeType type definitions.The TransposeType_ alias declaration prov...
Definition: Aliases.h:423
Header file for the IsUpper type trait.
TransposeType_< MT > TransposeType
Transpose type for expression template evaluations.
Definition: DMatEvalExpr.h:94
const ResultType CompositeType
Data type for composite expression templates.
Definition: DMatEvalExpr.h:99
Header file for the IsHermitian type trait.
Header file for the Size 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 function trace functionality.