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 <blaze/math/Aliases.h>
46 #include <blaze/math/Exception.h>
63 #include <blaze/util/Assert.h>
66 #include <blaze/util/InvalidType.h>
67 #include <blaze/util/mpl/If.h>
68 #include <blaze/util/Types.h>
69 
70 
71 namespace blaze {
72 
73 //=================================================================================================
74 //
75 // CLASS DMATSERIALEXPR
76 //
77 //=================================================================================================
78 
79 //*************************************************************************************************
86 template< typename MT // Type of the dense matrix
87  , bool SO > // Storage order
89  : public MatSerialExpr< DenseMatrix< DMatSerialExpr<MT,SO>, SO > >
90  , private Computation
91 {
92  public:
93  //**Type definitions****************************************************************************
100 
102  using CompositeType = const ResultType;
103 
105  using Operand = If_< IsExpression<MT>, const MT, const MT& >;
106  //**********************************************************************************************
107 
108  //**Compilation flags***************************************************************************
110  enum : bool { simdEnabled = false };
111 
113  enum : bool { smpAssignable = MT::smpAssignable };
114  //**********************************************************************************************
115 
116  //**Constructor*********************************************************************************
121  explicit inline DMatSerialExpr( const MT& dm ) noexcept
122  : dm_( dm ) // Dense matrix of the serial evaluation expression
123  {}
124  //**********************************************************************************************
125 
126  //**Access operator*****************************************************************************
133  inline ReturnType operator()( size_t i, size_t j ) const {
134  BLAZE_INTERNAL_ASSERT( i < dm_.rows() , "Invalid row access index" );
135  BLAZE_INTERNAL_ASSERT( j < dm_.columns(), "Invalid column access index" );
136  return dm_(i,j);
137  }
138  //**********************************************************************************************
139 
140  //**At function*********************************************************************************
148  inline ReturnType at( size_t i, size_t j ) const {
149  if( i >= dm_.rows() ) {
150  BLAZE_THROW_OUT_OF_RANGE( "Invalid row access index" );
151  }
152  if( j >= dm_.columns() ) {
153  BLAZE_THROW_OUT_OF_RANGE( "Invalid column access index" );
154  }
155  return (*this)(i,j);
156  }
157  //**********************************************************************************************
158 
159  //**Rows function*******************************************************************************
164  inline size_t rows() const noexcept {
165  return dm_.rows();
166  }
167  //**********************************************************************************************
168 
169  //**Columns function****************************************************************************
174  inline size_t columns() const noexcept {
175  return dm_.columns();
176  }
177  //**********************************************************************************************
178 
179  //**Operand access******************************************************************************
184  inline Operand operand() const noexcept {
185  return dm_;
186  }
187  //**********************************************************************************************
188 
189  //**Conversion operator*************************************************************************
194  inline operator Operand() const noexcept {
195  return dm_;
196  }
197  //**********************************************************************************************
198 
199  //**********************************************************************************************
205  template< typename T >
206  inline bool canAlias( const T* alias ) const noexcept {
207  return dm_.canAlias( alias );
208  }
209  //**********************************************************************************************
210 
211  //**********************************************************************************************
217  template< typename T >
218  inline bool isAliased( const T* alias ) const noexcept {
219  return dm_.isAliased( alias );
220  }
221  //**********************************************************************************************
222 
223  //**********************************************************************************************
228  inline bool isAligned() const noexcept {
229  return dm_.isAligned();
230  }
231  //**********************************************************************************************
232 
233  //**********************************************************************************************
238  inline bool canSMPAssign() const noexcept {
239  return dm_.canSMPAssign();
240  }
241  //**********************************************************************************************
242 
243  private:
244  //**Member variables****************************************************************************
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 DMatSerialExpr& 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 DMatSerialExpr& 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 DMatSerialExpr& 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 DMatSerialExpr& 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****************************************************
365  template< typename MT2 // Type of the target dense matrix
366  , bool SO2 > // Storage order of the target dense matrix
367  friend inline void subAssign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
368  {
370 
371  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
372  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
373 
374  subAssign( ~lhs, rhs.dm_ );
375  }
377  //**********************************************************************************************
378 
379  //**Subtraction assignment to sparse matrices***************************************************
392  template< typename MT2 // Type of the target sparse matrix
393  , bool SO2 > // Storage order of the target dense matrix
394  friend inline void subAssign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
395  {
397 
398  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
399  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
400 
401  subAssign( ~lhs, rhs.dm_ );
402  }
404  //**********************************************************************************************
405 
406  //**Schur product assignment to dense matrices**************************************************
419  template< typename MT2 // Type of the target dense matrix
420  , bool SO2 > // Storage order of the target dense matrix
421  friend inline void schurAssign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
422  {
424 
425  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
426  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
427 
428  schurAssign( ~lhs, rhs.dm_ );
429  }
431  //**********************************************************************************************
432 
433  //**Schur product assignment to sparse matrices*************************************************
446  template< typename MT2 // Type of the target sparse matrix
447  , bool SO2 > // Storage order of the target dense matrix
448  friend inline void schurAssign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
449  {
451 
452  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
453  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
454 
455  schurAssign( ~lhs, rhs.dm_ );
456  }
458  //**********************************************************************************************
459 
460  //**Multiplication assignment to dense matrices*************************************************
473  template< typename MT2 // Type of the target dense matrix
474  , bool SO2 > // Storage order of the target dense matrix
475  friend inline void multAssign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
476  {
478 
479  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
480  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
481 
482  multAssign( ~lhs, rhs.sm_ );
483  }
485  //**********************************************************************************************
486 
487  //**Multiplication assignment to sparse matrices************************************************
500  template< typename MT2 // Type of the target sparse matrix
501  , bool SO2 > // Storage order of the target sparse matrix
502  friend inline void multAssign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
503  {
505 
506  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
507  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
508 
509  multAssign( ~lhs, rhs.sm_ );
510  }
512  //**********************************************************************************************
513 
514  //**SMP assignment to dense matrices************************************************************
526  template< typename MT2 // Type of the target dense matrix
527  , bool SO2 > // Storage order of the target dense matrix
528  friend inline void smpAssign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
529  {
531 
532  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
533  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
534 
535  assign( ~lhs, rhs.dm_ );
536  }
538  //**********************************************************************************************
539 
540  //**SMP assignment to sparse matrices***********************************************************
552  template< typename MT2 // Type of the target sparse matrix
553  , bool SO2 > // Storage order of the target dense matrix
554  friend inline void smpAssign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
555  {
557 
558  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
559  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
560 
561  assign( ~lhs, rhs.dm_ );
562  }
564  //**********************************************************************************************
565 
566  //**SMP addition assignment to dense matrices***************************************************
579  template< typename MT2 // Type of the target dense matrix
580  , bool SO2 > // Storage order of the target dense matrix
581  friend inline void smpAddAssign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
582  {
584 
585  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
586  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
587 
588  addAssign( ~lhs, rhs.dm_ );
589  }
591  //**********************************************************************************************
592 
593  //**SMP addition assignment to sparse matrices**************************************************
606  template< typename MT2 // Type of the target sparse matrix
607  , bool SO2 > // Storage order of the target dense matrix
608  friend inline void smpAddAssign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
609  {
611 
612  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
613  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
614 
615  addAssign( ~lhs, rhs.dm_ );
616  }
618  //**********************************************************************************************
619 
620  //**SMP subtraction assignment to dense matrices************************************************
633  template< typename MT2 // Type of the target dense matrix
634  , bool SO2 > // Storage order of the target dense matrix
635  friend inline void smpSubAssign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
636  {
638 
639  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
640  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
641 
642  subAssign( ~lhs, rhs.dm_ );
643  }
645  //**********************************************************************************************
646 
647  //**SMP subtraction assignment to sparse matrices***********************************************
660  template< typename MT2 // Type of the target sparse matrix
661  , bool SO2 > // Storage order of the target dense matrix
662  friend inline void smpSubAssign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
663  {
665 
666  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
667  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
668 
669  subAssign( ~lhs, rhs.dm_ );
670  }
672  //**********************************************************************************************
673 
674  //**SMP Schur product assignment to dense matrices**********************************************
687  template< typename MT2 // Type of the target dense matrix
688  , bool SO2 > // Storage order of the target dense matrix
689  friend inline void smpSchurAssign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
690  {
692 
693  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
694  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
695 
696  schurAssign( ~lhs, rhs.dm_ );
697  }
699  //**********************************************************************************************
700 
701  //**SMP Schur product assignment to sparse matrices*********************************************
714  template< typename MT2 // Type of the target sparse matrix
715  , bool SO2 > // Storage order of the target dense matrix
716  friend inline void smpSchurAssign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
717  {
719 
720  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
721  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
722 
723  schurAssign( ~lhs, rhs.dm_ );
724  }
726  //**********************************************************************************************
727 
728  //**SMP multiplication assignment to dense matrices*********************************************
741  template< typename MT2 // Type of the target dense matrix
742  , bool SO2 > // Storage order of the target dense matrix
743  friend inline void smpMultAssign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
744  {
746 
747  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
748  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
749 
750  multAssign( ~lhs, rhs.sm_ );
751  }
753  //**********************************************************************************************
754 
755  //**SMP multiplication assignment to sparse matrices********************************************
768  template< typename MT2 // Type of the target sparse matrix
769  , bool SO2 > // Storage order of the target sparse matrix
770  friend inline void smpMultAssign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
771  {
773 
774  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
775  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
776 
777  multAssign( ~lhs, rhs.sm_ );
778  }
780  //**********************************************************************************************
781 
782  //**Compile time checks*************************************************************************
787  //**********************************************************************************************
788 };
789 //*************************************************************************************************
790 
791 
792 
793 
794 //=================================================================================================
795 //
796 // GLOBAL FUNCTIONS
797 //
798 //=================================================================================================
799 
800 //*************************************************************************************************
817 template< typename MT // Type of the dense matrix
818  , bool SO > // Storage order
819 inline decltype(auto) serial( const DenseMatrix<MT,SO>& dm )
820 {
822 
823  using ReturnType = const DMatSerialExpr<MT,SO>;
824  return ReturnType( ~dm );
825 }
826 //*************************************************************************************************
827 
828 
829 
830 
831 //=================================================================================================
832 //
833 // GLOBAL RESTRUCTURING FUNCTIONS
834 //
835 //=================================================================================================
836 
837 //*************************************************************************************************
848 template< typename MT // Type of the dense matrix
849  , bool SO > // Storage order
850 inline decltype(auto) serial( const DMatSerialExpr<MT,SO>& dm )
851 {
852  return dm;
853 }
855 //*************************************************************************************************
856 
857 
858 
859 
860 //=================================================================================================
861 //
862 // ROWS SPECIALIZATIONS
863 //
864 //=================================================================================================
865 
866 //*************************************************************************************************
868 template< typename MT, bool SO >
869 struct Rows< DMatSerialExpr<MT,SO> >
870  : public Rows<MT>
871 {};
873 //*************************************************************************************************
874 
875 
876 
877 
878 //=================================================================================================
879 //
880 // COLUMNS SPECIALIZATIONS
881 //
882 //=================================================================================================
883 
884 //*************************************************************************************************
886 template< typename MT, bool SO >
887 struct Columns< DMatSerialExpr<MT,SO> >
888  : public Columns<MT>
889 {};
891 //*************************************************************************************************
892 
893 
894 
895 
896 //=================================================================================================
897 //
898 // ISALIGNED SPECIALIZATIONS
899 //
900 //=================================================================================================
901 
902 //*************************************************************************************************
904 template< typename MT, bool SO >
905 struct IsAligned< DMatSerialExpr<MT,SO> >
906  : public BoolConstant< IsAligned<MT>::value >
907 {};
909 //*************************************************************************************************
910 
911 
912 
913 
914 //=================================================================================================
915 //
916 // ISSYMMETRIC SPECIALIZATIONS
917 //
918 //=================================================================================================
919 
920 //*************************************************************************************************
922 template< typename MT, bool SO >
923 struct IsSymmetric< DMatSerialExpr<MT,SO> >
924  : public BoolConstant< IsSymmetric<MT>::value >
925 {};
927 //*************************************************************************************************
928 
929 
930 
931 
932 //=================================================================================================
933 //
934 // ISHERMITIAN SPECIALIZATIONS
935 //
936 //=================================================================================================
937 
938 //*************************************************************************************************
940 template< typename MT, bool SO >
941 struct IsHermitian< DMatSerialExpr<MT,SO> >
942  : public BoolConstant< IsHermitian<MT>::value >
943 {};
945 //*************************************************************************************************
946 
947 
948 
949 
950 //=================================================================================================
951 //
952 // ISLOWER SPECIALIZATIONS
953 //
954 //=================================================================================================
955 
956 //*************************************************************************************************
958 template< typename MT, bool SO >
959 struct IsLower< DMatSerialExpr<MT,SO> >
960  : public BoolConstant< IsLower<MT>::value >
961 {};
963 //*************************************************************************************************
964 
965 
966 
967 
968 //=================================================================================================
969 //
970 // ISUNILOWER SPECIALIZATIONS
971 //
972 //=================================================================================================
973 
974 //*************************************************************************************************
976 template< typename MT, bool SO >
977 struct IsUniLower< DMatSerialExpr<MT,SO> >
978  : public BoolConstant< IsUniLower<MT>::value >
979 {};
981 //*************************************************************************************************
982 
983 
984 
985 
986 //=================================================================================================
987 //
988 // ISSTRICTLYLOWER SPECIALIZATIONS
989 //
990 //=================================================================================================
991 
992 //*************************************************************************************************
994 template< typename MT, bool SO >
995 struct IsStrictlyLower< DMatSerialExpr<MT,SO> >
996  : public BoolConstant< IsStrictlyLower<MT>::value >
997 {};
999 //*************************************************************************************************
1000 
1001 
1002 
1003 
1004 //=================================================================================================
1005 //
1006 // ISUPPER SPECIALIZATIONS
1007 //
1008 //=================================================================================================
1009 
1010 //*************************************************************************************************
1012 template< typename MT, bool SO >
1013 struct IsUpper< DMatSerialExpr<MT,SO> >
1014  : public BoolConstant< IsUpper<MT>::value >
1015 {};
1017 //*************************************************************************************************
1018 
1019 
1020 
1021 
1022 //=================================================================================================
1023 //
1024 // ISUNIUPPER SPECIALIZATIONS
1025 //
1026 //=================================================================================================
1027 
1028 //*************************************************************************************************
1030 template< typename MT, bool SO >
1031 struct IsUniUpper< DMatSerialExpr<MT,SO> >
1032  : public BoolConstant< IsUniUpper<MT>::value >
1033 {};
1035 //*************************************************************************************************
1036 
1037 
1038 
1039 
1040 //=================================================================================================
1041 //
1042 // ISSTRICTLYUPPER SPECIALIZATIONS
1043 //
1044 //=================================================================================================
1045 
1046 //*************************************************************************************************
1048 template< typename MT, bool SO >
1049 struct IsStrictlyUpper< DMatSerialExpr<MT,SO> >
1050  : public BoolConstant< IsStrictlyUpper<MT>::value >
1051 {};
1053 //*************************************************************************************************
1054 
1055 } // namespace blaze
1056 
1057 #endif
Header file for auxiliary alias declarations.
DMatSerialExpr(const MT &dm) noexcept
Constructor for the DMatSerialExpr class.
Definition: DMatSerialExpr.h:121
Header file for the Rows type trait.
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
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: DMatSerialExpr.h:218
Header file for basic type definitions.
Base class for all matrix serial evaluation expression templates.The MatSerialExpr class serves as a ...
Definition: MatSerialExpr.h:67
TransposeType_< MT > TransposeType
Transpose type for expression template evaluations.
Definition: DMatSerialExpr.h:97
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
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
#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
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: DMatSerialExpr.h:228
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
Compile time check for lower triangular matrices.This type trait tests whether or not the given templ...
Definition: IsLower.h:88
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: DMatSerialExpr.h:206
Header file for the Computation base class.
OppositeType_< MT > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatSerialExpr.h:96
Compile time check for upper triangular matrices.This type trait tests whether or not the given templ...
Definition: IsUpper.h:88
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:78
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:57
Header file for the If class template.
ResultType_< MT > ResultType
Result type for expression template evaluations.
Definition: DMatSerialExpr.h:95
Expression object for the forced serial evaluation of dense matrices.The DMatSerialExpr class represe...
Definition: DMatSerialExpr.h:88
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DMatSerialExpr.h:133
If_< IsExpression< MT >, const MT, const MT &> Operand
Composite data type of the dense matrix expression.
Definition: DMatSerialExpr.h:105
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.
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.
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: DMatSerialExpr.h:164
Header file for the IsAligned type trait.
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.
Compile time check for strictly upper triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyUpper.h:86
Header file for all forward declarations for expression class templates.
Header file for the MatSerialExpr base class.
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: DMatSerialExpr.h:238
Header file for the IsStrictlyLower type trait.
const ResultType CompositeType
Data type for composite expression templates.
Definition: DMatSerialExpr.h:102
Compile time check for lower unitriangular matrices.This type trait tests whether or not the given te...
Definition: IsUniLower.h:86
Header file for run time assertion macros.
Utility type for generic codes.
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
#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
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: DMatSerialExpr.h:174
ReturnType_< MT > ReturnType
Return type for expression template evaluations.
Definition: DMatSerialExpr.h:99
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:819
typename T::OppositeType OppositeType_
Alias declaration for nested OppositeType type definitions.The OppositeType_ alias declaration provid...
Definition: Aliases.h:263
ElementType_< MT > ElementType
Resulting element type.
Definition: DMatSerialExpr.h:98
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:3082
Base class for all compute expression templates.The Computation class serves as a tag for all computa...
Definition: Computation.h:66
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: DMatSerialExpr.h:148
Header file for the IntegralConstant class template.
Compile time evaluation of the number of columns of a matrix.The Columns type trait evaluates the num...
Definition: Columns.h:75
Compile time evaluation of the number of rows of a matrix.The Rows type trait evaluates the number of...
Definition: Rows.h:75
Operand operand() const noexcept
Returns the dense matrix operand.
Definition: DMatSerialExpr.h:184
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.
Operand dm_
Dense matrix of the serial evaluation expression.
Definition: DMatSerialExpr.h:245
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 function trace functionality.