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 <cmath>
71 #include <blaze/util/Assert.h>
73 #include <blaze/util/Exception.h>
74 #include <blaze/util/InvalidType.h>
76 #include <blaze/util/SelectType.h>
77 #include <blaze/util/Types.h>
79 
80 
81 namespace blaze {
82 
83 //=================================================================================================
84 //
85 // CLASS DMATEVALEXPR
86 //
87 //=================================================================================================
88 
89 //*************************************************************************************************
96 template< typename MT // Type of the dense matrix
97  , bool SO > // Storage order
98 class DMatEvalExpr : public DenseMatrix< DMatEvalExpr<MT,SO>, SO >
99  , private MatEvalExpr
100  , private Computation
101 {
102  public:
103  //**Type definitions****************************************************************************
105  typedef typename MT::ResultType ResultType;
106  typedef typename MT::OppositeType OppositeType;
107  typedef typename MT::TransposeType TransposeType;
108  typedef typename MT::ElementType ElementType;
109  typedef typename MT::ReturnType ReturnType;
110 
112  typedef const ResultType CompositeType;
113 
115  typedef typename SelectType< IsExpression<MT>::value, const MT, const MT& >::Type Operand;
116  //**********************************************************************************************
117 
118  //**Compilation flags***************************************************************************
120  enum { vectorizable = 0 };
121 
123  enum { smpAssignable = MT::smpAssignable };
124  //**********************************************************************************************
125 
126  //**Constructor*********************************************************************************
131  explicit inline DMatEvalExpr( const MT& dm )
132  : dm_( dm ) // Dense matrix of the evaluation expression
133  {}
134  //**********************************************************************************************
135 
136  //**Access operator*****************************************************************************
143  inline ReturnType operator()( size_t i, size_t j ) const {
144  BLAZE_INTERNAL_ASSERT( i < dm_.rows() , "Invalid row access index" );
145  BLAZE_INTERNAL_ASSERT( j < dm_.columns(), "Invalid column access index" );
146  return dm_(i,j);
147  }
148  //**********************************************************************************************
149 
150  //**At function*********************************************************************************
158  inline ReturnType at( size_t i, size_t j ) const {
159  if( i >= dm_.rows() ) {
160  BLAZE_THROW_OUT_OF_RANGE( "Invalid row access index" );
161  }
162  if( j >= dm_.columns() ) {
163  BLAZE_THROW_OUT_OF_RANGE( "Invalid column access index" );
164  }
165  return (*this)(i,j);
166  }
167  //**********************************************************************************************
168 
169  //**Rows function*******************************************************************************
174  inline size_t rows() const {
175  return dm_.rows();
176  }
177  //**********************************************************************************************
178 
179  //**Columns function****************************************************************************
184  inline size_t columns() const {
185  return dm_.columns();
186  }
187  //**********************************************************************************************
188 
189  //**Operand access******************************************************************************
194  inline Operand operand() const {
195  return dm_;
196  }
197  //**********************************************************************************************
198 
199  //**********************************************************************************************
205  template< typename T >
206  inline bool canAlias( const T* alias ) const {
207  return dm_.canAlias( alias );
208  }
209  //**********************************************************************************************
210 
211  //**********************************************************************************************
217  template< typename T >
218  inline bool isAliased( const T* alias ) const {
219  return dm_.isAliased( alias );
220  }
221  //**********************************************************************************************
222 
223  //**********************************************************************************************
228  inline bool isAligned() const {
229  return dm_.isAligned();
230  }
231  //**********************************************************************************************
232 
233  //**********************************************************************************************
238  inline bool canSMPAssign() const {
239  return dm_.canSMPAssign();
240  }
241  //**********************************************************************************************
242 
243  private:
244  //**Member variables****************************************************************************
245  Operand dm_;
246  //**********************************************************************************************
247 
248  //**Assignment to dense matrices****************************************************************
260  template< typename MT2 // Type of the target dense matrix
261  , bool SO2 > // Storage order of the target dense matrix
262  friend inline void assign( DenseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
263  {
265 
266  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
267  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
268 
269  assign( ~lhs, rhs.dm_ );
270  }
272  //**********************************************************************************************
273 
274  //**Assignment to sparse matrices***************************************************************
286  template< typename MT2 // Type of the target sparse matrix
287  , bool SO2 > // Storage order of the target dense matrix
288  friend inline void assign( SparseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
289  {
291 
292  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
293  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
294 
295  assign( ~lhs, rhs.dm_ );
296  }
298  //**********************************************************************************************
299 
300  //**Addition assignment to dense matrices*******************************************************
312  template< typename MT2 // Type of the target dense matrix
313  , bool SO2 > // Storage order of the target dense matrix
314  friend inline void addAssign( DenseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
315  {
317 
318  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
319  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
320 
321  addAssign( ~lhs, rhs.dm_ );
322  }
324  //**********************************************************************************************
325 
326  //**Addition assignment to sparse matrices******************************************************
338  template< typename MT2 // Type of the target sparse matrix
339  , bool SO2 > // Storage order of the target dense matrix
340  friend inline void addAssign( SparseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
341  {
343 
344  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
345  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
346 
347  addAssign( ~lhs, rhs.dm_ );
348  }
350  //**********************************************************************************************
351 
352  //**Subtraction assignment to dense matrices****************************************************
364  template< typename MT2 // Type of the target dense matrix
365  , bool SO2 > // Storage order of the target dense matrix
366  friend inline void subAssign( DenseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
367  {
369 
370  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
371  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
372 
373  subAssign( ~lhs, rhs.dm_ );
374  }
376  //**********************************************************************************************
377 
378  //**Subtraction assignment to sparse matrices***************************************************
390  template< typename MT2 // Type of the target sparse matrix
391  , bool SO2 > // Storage order of the target dense matrix
392  friend inline void subAssign( SparseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
393  {
395 
396  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
397  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
398 
399  subAssign( ~lhs, rhs.dm_ );
400  }
402  //**********************************************************************************************
403 
404  //**Multiplication assignment to dense matrices*************************************************
416  template< typename MT2 // Type of the target dense matrix
417  , bool SO2 > // Storage order of the target dense matrix
418  friend inline void multAssign( DenseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
419  {
421 
422  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
423  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
424 
425  multAssign( ~lhs, rhs.dm_ );
426  }
428  //**********************************************************************************************
429 
430  //**Multiplication assignment to sparse matrices************************************************
442  template< typename MT2 // Type of the target sparse matrix
443  , bool SO2 > // Storage order of the target dense matrix
444  friend inline void multAssign( SparseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
445  {
447 
448  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
449  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
450 
451  multAssign( ~lhs, rhs.dm_ );
452  }
454  //**********************************************************************************************
455 
456  //**SMP assignment to dense matrices************************************************************
468  template< typename MT2 // Type of the target dense matrix
469  , bool SO2 > // Storage order of the target dense matrix
470  friend inline void smpAssign( DenseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
471  {
473 
474  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
475  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
476 
477  smpAssign( ~lhs, rhs.dm_ );
478  }
480  //**********************************************************************************************
481 
482  //**SMP assignment to sparse matrices***********************************************************
494  template< typename MT2 // Type of the target sparse matrix
495  , bool SO2 > // Storage order of the target dense matrix
496  friend inline void smpAssign( SparseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
497  {
499 
500  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
501  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
502 
503  smpAssign( ~lhs, rhs.dm_ );
504  }
506  //**********************************************************************************************
507 
508  //**SMP addition assignment to dense matrices***************************************************
520  template< typename MT2 // Type of the target dense matrix
521  , bool SO2 > // Storage order of the target dense matrix
522  friend inline void smpAddAssign( DenseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
523  {
525 
526  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
527  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
528 
529  smpAddAssign( ~lhs, rhs.dm_ );
530  }
532  //**********************************************************************************************
533 
534  //**SMP addition assignment to sparse matrices**************************************************
546  template< typename MT2 // Type of the target sparse matrix
547  , bool SO2 > // Storage order of the target dense matrix
548  friend inline void smpAddAssign( SparseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
549  {
551 
552  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
553  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
554 
555  smpAddAssign( ~lhs, rhs.dm_ );
556  }
558  //**********************************************************************************************
559 
560  //**SMP subtraction assignment to dense matrices************************************************
572  template< typename MT2 // Type of the target dense matrix
573  , bool SO2 > // Storage order of the target dense matrix
574  friend inline void smpSubAssign( DenseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
575  {
577 
578  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
579  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
580 
581  smpSubAssign( ~lhs, rhs.dm_ );
582  }
584  //**********************************************************************************************
585 
586  //**SMP subtraction assignment to sparse matrices***********************************************
598  template< typename MT2 // Type of the target sparse matrix
599  , bool SO2 > // Storage order of the target dense matrix
600  friend inline void smpSubAssign( SparseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
601  {
603 
604  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
605  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
606 
607  smpSubAssign( ~lhs, rhs.dm_ );
608  }
610  //**********************************************************************************************
611 
612  //**SMP multiplication assignment to dense matrices*********************************************
625  template< typename MT2 // Type of the target dense matrix
626  , bool SO2 > // Storage order of the target dense matrix
627  friend inline void smpMultAssign( DenseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
628  {
630 
631  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
632  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
633 
634  smpMultAssign( ~lhs, rhs.dm_ );
635  }
637  //**********************************************************************************************
638 
639  //**SMP multiplication assignment to sparse matrices********************************************
652  template< typename MT2 // Type of the target sparse matrix
653  , bool SO2 > // Storage order of the target dense matrix
654  friend inline void smpMultAssign( SparseMatrix<MT2,SO2>& lhs, const DMatEvalExpr& rhs )
655  {
657 
658  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
659  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
660 
661  smpMultAssign( ~lhs, rhs.dm_ );
662  }
664  //**********************************************************************************************
665 
666  //**Compile time checks*************************************************************************
671  //**********************************************************************************************
672 };
673 //*************************************************************************************************
674 
675 
676 
677 
678 //=================================================================================================
679 //
680 // GLOBAL FUNCTIONS
681 //
682 //=================================================================================================
683 
684 //*************************************************************************************************
701 template< typename MT // Type of the dense matrix
702  , bool SO > // Storage order
703 inline const DMatEvalExpr<MT,SO> eval( const DenseMatrix<MT,SO>& dm )
704 {
706 
707  return DMatEvalExpr<MT,SO>( ~dm );
708 }
709 //*************************************************************************************************
710 
711 
712 
713 
714 //=================================================================================================
715 //
716 // GLOBAL RESTRUCTURING FUNCTIONS
717 //
718 //=================================================================================================
719 
720 //*************************************************************************************************
731 template< typename MT // Type of the dense matrix
732  , bool SO > // Storage order
733 inline const DMatEvalExpr<MT,SO> eval( const DMatEvalExpr<MT,SO>& dm )
734 {
735  return dm;
736 }
738 //*************************************************************************************************
739 
740 
741 
742 
743 //=================================================================================================
744 //
745 // ROWS SPECIALIZATIONS
746 //
747 //=================================================================================================
748 
749 //*************************************************************************************************
751 template< typename MT, bool SO >
752 struct Rows< DMatEvalExpr<MT,SO> > : public Rows<MT>
753 {};
755 //*************************************************************************************************
756 
757 
758 
759 
760 //=================================================================================================
761 //
762 // COLUMNS SPECIALIZATIONS
763 //
764 //=================================================================================================
765 
766 //*************************************************************************************************
768 template< typename MT, bool SO >
769 struct Columns< DMatEvalExpr<MT,SO> > : public Columns<MT>
770 {};
772 //*************************************************************************************************
773 
774 
775 
776 
777 //=================================================================================================
778 //
779 // ISALIGNED SPECIALIZATIONS
780 //
781 //=================================================================================================
782 
783 //*************************************************************************************************
785 template< typename MT, bool SO >
786 struct IsAligned< DMatEvalExpr<MT,SO> > : public IsTrue< IsAligned<MT>::value >
787 {};
789 //*************************************************************************************************
790 
791 
792 
793 
794 //=================================================================================================
795 //
796 // ISSYMMETRIC SPECIALIZATIONS
797 //
798 //=================================================================================================
799 
800 //*************************************************************************************************
802 template< typename MT, bool SO >
803 struct IsSymmetric< DMatEvalExpr<MT,SO> > : public IsTrue< IsSymmetric<MT>::value >
804 {};
806 //*************************************************************************************************
807 
808 
809 
810 
811 //=================================================================================================
812 //
813 // ISHERMITIAN SPECIALIZATIONS
814 //
815 //=================================================================================================
816 
817 //*************************************************************************************************
819 template< typename MT, bool SO >
820 struct IsHermitian< DMatEvalExpr<MT,SO> > : public IsTrue< IsHermitian<MT>::value >
821 {};
823 //*************************************************************************************************
824 
825 
826 
827 
828 //=================================================================================================
829 //
830 // ISLOWER SPECIALIZATIONS
831 //
832 //=================================================================================================
833 
834 //*************************************************************************************************
836 template< typename MT, bool SO >
837 struct IsLower< DMatEvalExpr<MT,SO> > : public IsTrue< IsLower<MT>::value >
838 {};
840 //*************************************************************************************************
841 
842 
843 
844 
845 //=================================================================================================
846 //
847 // ISUNILOWER SPECIALIZATIONS
848 //
849 //=================================================================================================
850 
851 //*************************************************************************************************
853 template< typename MT, bool SO >
854 struct IsUniLower< DMatEvalExpr<MT,SO> > : public IsTrue< IsUniLower<MT>::value >
855 {};
857 //*************************************************************************************************
858 
859 
860 
861 
862 //=================================================================================================
863 //
864 // ISSTRICTLYLOWER SPECIALIZATIONS
865 //
866 //=================================================================================================
867 
868 //*************************************************************************************************
870 template< typename MT, bool SO >
871 struct IsStrictlyLower< DMatEvalExpr<MT,SO> > : public IsTrue< IsStrictlyLower<MT>::value >
872 {};
874 //*************************************************************************************************
875 
876 
877 
878 
879 //=================================================================================================
880 //
881 // ISUPPER SPECIALIZATIONS
882 //
883 //=================================================================================================
884 
885 //*************************************************************************************************
887 template< typename MT, bool SO >
888 struct IsUpper< DMatEvalExpr<MT,SO> > : public IsTrue< IsUpper<MT>::value >
889 {};
891 //*************************************************************************************************
892 
893 
894 
895 
896 //=================================================================================================
897 //
898 // ISUNIUPPER SPECIALIZATIONS
899 //
900 //=================================================================================================
901 
902 //*************************************************************************************************
904 template< typename MT, bool SO >
905 struct IsUniUpper< DMatEvalExpr<MT,SO> > : public IsTrue< IsUniUpper<MT>::value >
906 {};
908 //*************************************************************************************************
909 
910 
911 
912 
913 //=================================================================================================
914 //
915 // ISSTRICTLYUPPER SPECIALIZATIONS
916 //
917 //=================================================================================================
918 
919 //*************************************************************************************************
921 template< typename MT, bool SO >
922 struct IsStrictlyUpper< DMatEvalExpr<MT,SO> > : public IsTrue< IsStrictlyUpper<MT>::value >
923 {};
925 //*************************************************************************************************
926 
927 
928 
929 
930 //=================================================================================================
931 //
932 // EXPRESSION TRAIT SPECIALIZATIONS
933 //
934 //=================================================================================================
935 
936 //*************************************************************************************************
938 template< typename MT >
939 struct DMatEvalExprTrait< DMatEvalExpr<MT,false> >
940 {
941  public:
942  //**********************************************************************************************
943  typedef typename SelectType< IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value
944  , DMatEvalExpr<MT,false>
945  , INVALID_TYPE >::Type Type;
946  //**********************************************************************************************
947 };
949 //*************************************************************************************************
950 
951 
952 //*************************************************************************************************
954 template< typename MT >
955 struct TDMatEvalExprTrait< DMatEvalExpr<MT,true> >
956 {
957  public:
958  //**********************************************************************************************
959  typedef typename SelectType< IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value
960  , DMatEvalExpr<MT,true>
961  , INVALID_TYPE >::Type Type;
962  //**********************************************************************************************
963 };
965 //*************************************************************************************************
966 
967 
968 //*************************************************************************************************
970 template< typename MT, bool SO, bool AF >
971 struct SubmatrixExprTrait< DMatEvalExpr<MT,SO>, AF >
972 {
973  public:
974  //**********************************************************************************************
975  typedef typename EvalExprTrait< typename SubmatrixExprTrait<const MT,AF>::Type >::Type Type;
976  //**********************************************************************************************
977 };
979 //*************************************************************************************************
980 
981 
982 //*************************************************************************************************
984 template< typename MT, bool SO >
985 struct RowExprTrait< DMatEvalExpr<MT,SO> >
986 {
987  public:
988  //**********************************************************************************************
989  typedef typename EvalExprTrait< typename RowExprTrait<const MT>::Type >::Type Type;
990  //**********************************************************************************************
991 };
993 //*************************************************************************************************
994 
995 
996 //*************************************************************************************************
998 template< typename MT, bool SO >
999 struct ColumnExprTrait< DMatEvalExpr<MT,SO> >
1000 {
1001  public:
1002  //**********************************************************************************************
1003  typedef typename EvalExprTrait< typename ColumnExprTrait<const MT>::Type >::Type Type;
1004  //**********************************************************************************************
1005 };
1007 //*************************************************************************************************
1008 
1009 } // namespace blaze
1010 
1011 #endif
Header file for the Rows type trait.
Header file for the IsUniUpper type trait.
Header file for basic type definitions.
Header file for the DMatEvalExprTrait class template.
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: DMatEvalExpr.h:158
#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:81
size_t rows() const
Returns the current number of rows of the matrix.
Definition: DMatEvalExpr.h:174
#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.
Header file for the MatEvalExpr base class.
Header file for the Computation base class.
Header file for the IsUniLower type trait.
CompressedMatrix< Type, false > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: CompressedMatrix.h:2584
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:117
Constraint on the data type.
Operand operand() const
Returns the dense matrix operand.
Definition: DMatEvalExpr.h:194
Constraint on the data type.
DMatEvalExpr< MT, SO > This
Type of this DMatEvalExpr instance.
Definition: DMatEvalExpr.h:104
SelectType< IsExpression< MT >::value, const MT, const MT & >::Type Operand
Composite data type of the dense matrix expression.
Definition: DMatEvalExpr.h:115
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.
Header file for the IsSymmetric type trait.
DMatEvalExpr(const MT &dm)
Constructor for the DMatEvalExpr class.
Definition: DMatEvalExpr.h:131
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
bool isAligned() const
Returns whether the operands of the expression are properly aligned in memory.
Definition: DMatEvalExpr.h:228
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exceptionThis macro encapsulates the default way of Bla...
Definition: Exception.h:331
Header file for the DenseMatrix base class.
Header file for the Columns type trait.
MT::OppositeType OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatEvalExpr.h:106
const ResultType CompositeType
Data type for composite expression templates.
Definition: DMatEvalExpr.h:112
Header file for the IsLower type trait.
Header file for the IsAligned type trait.
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2585
Constraints on the storage order of matrix types.
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2586
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: DMatEvalExpr.h:206
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 IsStrictlyLower type trait.
Operand dm_
Dense matrix of the evaluation expression.
Definition: DMatEvalExpr.h:245
MT::ReturnType ReturnType
Return type for expression template evaluations.
Definition: DMatEvalExpr.h:109
MT::ElementType ElementType
Resulting element type.
Definition: DMatEvalExpr.h:108
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:2587
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.
Header file for the EvalExprTrait class template.
Base class for all matrix evaluation expression templates.The MatEvalExpr class serves as a tag for a...
Definition: MatEvalExpr.h:65
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: DMatEvalExpr.h:218
const DMatEvalExpr< MT, SO > eval(const DenseMatrix< MT, SO > &dm)
Forces the evaluation of the given dense matrix expression dm.
Definition: DMatEvalExpr.h:703
Header file for the IsRowMajorMatrix type trait.
MT::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: DMatEvalExpr.h:107
Expression object for the forced evaluation of dense matrices.The DMatEvalExpr class represents the c...
Definition: DMatEvalExpr.h:98
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
bool canSMPAssign() const
Returns whether the expression can be used in SMP assignments.
Definition: DMatEvalExpr.h:238
#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 TDMatEvalExprTrait class template.
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2583
Header file for the IsTrue value trait.
size_t columns() const
Returns the current number of columns of the matrix.
Definition: DMatEvalExpr.h:184
Header file for the IsUpper type trait.
Header file for exception macros.
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DMatEvalExpr.h:143
Header file for the IsHermitian type trait.
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
MT::ResultType ResultType
Result type for expression template evaluations.
Definition: DMatEvalExpr.h:105
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.