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>
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 DMATSERIALEXPR
73 //
74 //=================================================================================================
75 
76 //*************************************************************************************************
83 template< typename MT // Type of the dense matrix
84  , bool SO > // Storage order
86  : public MatSerialExpr< DenseMatrix< DMatSerialExpr<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 DMatSerialExpr( const MT& dm ) noexcept
119  : dm_( dm ) // Dense matrix of the serial 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  //**Conversion operator*************************************************************************
191  inline operator Operand() const noexcept {
192  return dm_;
193  }
194  //**********************************************************************************************
195 
196  //**********************************************************************************************
202  template< typename T >
203  inline bool canAlias( const T* alias ) const noexcept {
204  return dm_.canAlias( alias );
205  }
206  //**********************************************************************************************
207 
208  //**********************************************************************************************
214  template< typename T >
215  inline bool isAliased( const T* alias ) const noexcept {
216  return dm_.isAliased( alias );
217  }
218  //**********************************************************************************************
219 
220  //**********************************************************************************************
225  inline bool isAligned() const noexcept {
226  return dm_.isAligned();
227  }
228  //**********************************************************************************************
229 
230  //**********************************************************************************************
235  inline bool canSMPAssign() const noexcept {
236  return dm_.canSMPAssign();
237  }
238  //**********************************************************************************************
239 
240  private:
241  //**Member variables****************************************************************************
243  //**********************************************************************************************
244 
245  //**Assignment to dense matrices****************************************************************
257  template< typename MT2 // Type of the target dense matrix
258  , bool SO2 > // Storage order of the target dense matrix
259  friend inline void assign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
260  {
262 
263  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
264  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
265 
266  assign( ~lhs, rhs.dm_ );
267  }
269  //**********************************************************************************************
270 
271  //**Assignment to sparse matrices***************************************************************
283  template< typename MT2 // Type of the target sparse matrix
284  , bool SO2 > // Storage order of the target dense matrix
285  friend inline void assign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
286  {
288 
289  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
290  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
291 
292  assign( ~lhs, rhs.dm_ );
293  }
295  //**********************************************************************************************
296 
297  //**Addition assignment to dense matrices*******************************************************
309  template< typename MT2 // Type of the target dense matrix
310  , bool SO2 > // Storage order of the target dense matrix
311  friend inline void addAssign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
312  {
314 
315  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
316  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
317 
318  addAssign( ~lhs, rhs.dm_ );
319  }
321  //**********************************************************************************************
322 
323  //**Addition assignment to sparse matrices******************************************************
335  template< typename MT2 // Type of the target sparse matrix
336  , bool SO2 > // Storage order of the target dense matrix
337  friend inline void addAssign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
338  {
340 
341  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
342  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
343 
344  addAssign( ~lhs, rhs.dm_ );
345  }
347  //**********************************************************************************************
348 
349  //**Subtraction assignment to dense matrices****************************************************
362  template< typename MT2 // Type of the target dense matrix
363  , bool SO2 > // Storage order of the target dense matrix
364  friend inline void subAssign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
365  {
367 
368  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
369  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
370 
371  subAssign( ~lhs, rhs.dm_ );
372  }
374  //**********************************************************************************************
375 
376  //**Subtraction assignment to sparse matrices***************************************************
389  template< typename MT2 // Type of the target sparse matrix
390  , bool SO2 > // Storage order of the target dense matrix
391  friend inline void subAssign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
392  {
394 
395  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
396  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
397 
398  subAssign( ~lhs, rhs.dm_ );
399  }
401  //**********************************************************************************************
402 
403  //**Schur product 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 schurAssign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& 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  schurAssign( ~lhs, rhs.dm_ );
426  }
428  //**********************************************************************************************
429 
430  //**Schur product assignment to sparse matrices*************************************************
443  template< typename MT2 // Type of the target sparse matrix
444  , bool SO2 > // Storage order of the target dense matrix
445  friend inline void schurAssign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
446  {
448 
449  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
450  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
451 
452  schurAssign( ~lhs, rhs.dm_ );
453  }
455  //**********************************************************************************************
456 
457  //**Multiplication assignment to dense matrices*************************************************
470  template< typename MT2 // Type of the target dense matrix
471  , bool SO2 > // Storage order of the target dense matrix
472  friend inline void multAssign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
473  {
475 
476  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
477  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
478 
479  multAssign( ~lhs, rhs.sm_ );
480  }
482  //**********************************************************************************************
483 
484  //**Multiplication assignment to sparse matrices************************************************
497  template< typename MT2 // Type of the target sparse matrix
498  , bool SO2 > // Storage order of the target sparse matrix
499  friend inline void multAssign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
500  {
502 
503  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
504  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
505 
506  multAssign( ~lhs, rhs.sm_ );
507  }
509  //**********************************************************************************************
510 
511  //**SMP assignment to dense matrices************************************************************
523  template< typename MT2 // Type of the target dense matrix
524  , bool SO2 > // Storage order of the target dense matrix
525  friend inline void smpAssign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
526  {
528 
529  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
530  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
531 
532  assign( ~lhs, rhs.dm_ );
533  }
535  //**********************************************************************************************
536 
537  //**SMP assignment to sparse matrices***********************************************************
549  template< typename MT2 // Type of the target sparse matrix
550  , bool SO2 > // Storage order of the target dense matrix
551  friend inline void smpAssign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
552  {
554 
555  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
556  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
557 
558  assign( ~lhs, rhs.dm_ );
559  }
561  //**********************************************************************************************
562 
563  //**SMP addition assignment to dense matrices***************************************************
576  template< typename MT2 // Type of the target dense matrix
577  , bool SO2 > // Storage order of the target dense matrix
578  friend inline void smpAddAssign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
579  {
581 
582  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
583  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
584 
585  addAssign( ~lhs, rhs.dm_ );
586  }
588  //**********************************************************************************************
589 
590  //**SMP addition assignment to sparse matrices**************************************************
603  template< typename MT2 // Type of the target sparse matrix
604  , bool SO2 > // Storage order of the target dense matrix
605  friend inline void smpAddAssign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
606  {
608 
609  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
610  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
611 
612  addAssign( ~lhs, rhs.dm_ );
613  }
615  //**********************************************************************************************
616 
617  //**SMP subtraction assignment to dense matrices************************************************
630  template< typename MT2 // Type of the target dense matrix
631  , bool SO2 > // Storage order of the target dense matrix
632  friend inline void smpSubAssign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
633  {
635 
636  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
637  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
638 
639  subAssign( ~lhs, rhs.dm_ );
640  }
642  //**********************************************************************************************
643 
644  //**SMP subtraction assignment to sparse matrices***********************************************
657  template< typename MT2 // Type of the target sparse matrix
658  , bool SO2 > // Storage order of the target dense matrix
659  friend inline void smpSubAssign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
660  {
662 
663  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
664  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
665 
666  subAssign( ~lhs, rhs.dm_ );
667  }
669  //**********************************************************************************************
670 
671  //**SMP Schur product assignment to dense matrices**********************************************
684  template< typename MT2 // Type of the target dense matrix
685  , bool SO2 > // Storage order of the target dense matrix
686  friend inline void smpSchurAssign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
687  {
689 
690  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
691  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
692 
693  schurAssign( ~lhs, rhs.dm_ );
694  }
696  //**********************************************************************************************
697 
698  //**SMP Schur product assignment to sparse matrices*********************************************
711  template< typename MT2 // Type of the target sparse matrix
712  , bool SO2 > // Storage order of the target dense matrix
713  friend inline void smpSchurAssign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
714  {
716 
717  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
718  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
719 
720  schurAssign( ~lhs, rhs.dm_ );
721  }
723  //**********************************************************************************************
724 
725  //**SMP multiplication assignment to dense matrices*********************************************
738  template< typename MT2 // Type of the target dense matrix
739  , bool SO2 > // Storage order of the target dense matrix
740  friend inline void smpMultAssign( DenseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
741  {
743 
744  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
745  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
746 
747  multAssign( ~lhs, rhs.sm_ );
748  }
750  //**********************************************************************************************
751 
752  //**SMP multiplication assignment to sparse matrices********************************************
765  template< typename MT2 // Type of the target sparse matrix
766  , bool SO2 > // Storage order of the target sparse matrix
767  friend inline void smpMultAssign( SparseMatrix<MT2,SO2>& lhs, const DMatSerialExpr& rhs )
768  {
770 
771  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
772  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
773 
774  multAssign( ~lhs, rhs.sm_ );
775  }
777  //**********************************************************************************************
778 
779  //**Compile time checks*************************************************************************
784  //**********************************************************************************************
785 };
786 //*************************************************************************************************
787 
788 
789 
790 
791 //=================================================================================================
792 //
793 // GLOBAL FUNCTIONS
794 //
795 //=================================================================================================
796 
797 //*************************************************************************************************
814 template< typename MT // Type of the dense matrix
815  , bool SO > // Storage order
816 inline decltype(auto) serial( const DenseMatrix<MT,SO>& dm )
817 {
819 
820  using ReturnType = const DMatSerialExpr<MT,SO>;
821  return ReturnType( ~dm );
822 }
823 //*************************************************************************************************
824 
825 
826 
827 
828 //=================================================================================================
829 //
830 // GLOBAL RESTRUCTURING FUNCTIONS
831 //
832 //=================================================================================================
833 
834 //*************************************************************************************************
845 template< typename MT // Type of the dense matrix
846  , bool SO > // Storage order
847 inline decltype(auto) serial( const DMatSerialExpr<MT,SO>& dm )
848 {
849  return dm;
850 }
852 //*************************************************************************************************
853 
854 
855 
856 
857 //=================================================================================================
858 //
859 // SIZE SPECIALIZATIONS
860 //
861 //=================================================================================================
862 
863 //*************************************************************************************************
865 template< typename MT, bool SO >
866 struct Size< DMatSerialExpr<MT,SO>, 0UL >
867  : public Size<MT,0UL>
868 {};
869 
870 template< typename MT, bool SO >
871 struct Size< DMatSerialExpr<MT,SO>, 1UL >
872  : public Size<MT,1UL>
873 {};
875 //*************************************************************************************************
876 
877 
878 
879 
880 //=================================================================================================
881 //
882 // ISALIGNED SPECIALIZATIONS
883 //
884 //=================================================================================================
885 
886 //*************************************************************************************************
888 template< typename MT, bool SO >
889 struct IsAligned< DMatSerialExpr<MT,SO> >
890  : public IsAligned<MT>
891 {};
893 //*************************************************************************************************
894 
895 
896 
897 
898 //=================================================================================================
899 //
900 // ISSYMMETRIC SPECIALIZATIONS
901 //
902 //=================================================================================================
903 
904 //*************************************************************************************************
906 template< typename MT, bool SO >
907 struct IsSymmetric< DMatSerialExpr<MT,SO> >
908  : public IsSymmetric<MT>
909 {};
911 //*************************************************************************************************
912 
913 
914 
915 
916 //=================================================================================================
917 //
918 // ISHERMITIAN SPECIALIZATIONS
919 //
920 //=================================================================================================
921 
922 //*************************************************************************************************
924 template< typename MT, bool SO >
925 struct IsHermitian< DMatSerialExpr<MT,SO> >
926  : public IsHermitian<MT>
927 {};
929 //*************************************************************************************************
930 
931 
932 
933 
934 //=================================================================================================
935 //
936 // ISLOWER SPECIALIZATIONS
937 //
938 //=================================================================================================
939 
940 //*************************************************************************************************
942 template< typename MT, bool SO >
943 struct IsLower< DMatSerialExpr<MT,SO> >
944  : public IsLower<MT>
945 {};
947 //*************************************************************************************************
948 
949 
950 
951 
952 //=================================================================================================
953 //
954 // ISUNILOWER SPECIALIZATIONS
955 //
956 //=================================================================================================
957 
958 //*************************************************************************************************
960 template< typename MT, bool SO >
961 struct IsUniLower< DMatSerialExpr<MT,SO> >
962  : public IsUniLower<MT>
963 {};
965 //*************************************************************************************************
966 
967 
968 
969 
970 //=================================================================================================
971 //
972 // ISSTRICTLYLOWER SPECIALIZATIONS
973 //
974 //=================================================================================================
975 
976 //*************************************************************************************************
978 template< typename MT, bool SO >
979 struct IsStrictlyLower< DMatSerialExpr<MT,SO> >
980  : public IsStrictlyLower<MT>
981 {};
983 //*************************************************************************************************
984 
985 
986 
987 
988 //=================================================================================================
989 //
990 // ISUPPER SPECIALIZATIONS
991 //
992 //=================================================================================================
993 
994 //*************************************************************************************************
996 template< typename MT, bool SO >
997 struct IsUpper< DMatSerialExpr<MT,SO> >
998  : public IsUpper<MT>
999 {};
1001 //*************************************************************************************************
1002 
1003 
1004 
1005 
1006 //=================================================================================================
1007 //
1008 // ISUNIUPPER SPECIALIZATIONS
1009 //
1010 //=================================================================================================
1011 
1012 //*************************************************************************************************
1014 template< typename MT, bool SO >
1015 struct IsUniUpper< DMatSerialExpr<MT,SO> >
1016  : public IsUniUpper<MT>
1017 {};
1019 //*************************************************************************************************
1020 
1021 
1022 
1023 
1024 //=================================================================================================
1025 //
1026 // ISSTRICTLYUPPER SPECIALIZATIONS
1027 //
1028 //=================================================================================================
1029 
1030 //*************************************************************************************************
1032 template< typename MT, bool SO >
1033 struct IsStrictlyUpper< DMatSerialExpr<MT,SO> >
1034  : public IsStrictlyUpper<MT>
1035 {};
1037 //*************************************************************************************************
1038 
1039 } // namespace blaze
1040 
1041 #endif
Header file for auxiliary alias declarations.
DMatSerialExpr(const MT &dm) noexcept
Constructor for the DMatSerialExpr class.
Definition: DMatSerialExpr.h:118
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:215
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:94
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
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: DMatSerialExpr.h:225
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:87
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: DMatSerialExpr.h:203
Header file for the Computation base class.
OppositeType_< MT > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatSerialExpr.h:93
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
Header file for the If class template.
ResultType_< MT > ResultType
Result type for expression template evaluations.
Definition: DMatSerialExpr.h:92
Expression object for the forced serial evaluation of dense matrices.The DMatSerialExpr class represe...
Definition: DMatSerialExpr.h:85
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DMatSerialExpr.h:130
If_< IsExpression< MT >, const MT, const MT &> Operand
Composite data type of the dense matrix expression.
Definition: DMatSerialExpr.h:102
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
Header file for the IsLower type trait.
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: DMatSerialExpr.h:161
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:235
Header file for the IsStrictlyLower type trait.
const ResultType CompositeType
Data type for composite expression templates.
Definition: DMatSerialExpr.h:99
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.
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:171
ReturnType_< MT > ReturnType
Return type for expression template evaluations.
Definition: DMatSerialExpr.h:96
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:816
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:95
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
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
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: DMatSerialExpr.h:145
Operand operand() const noexcept
Returns the dense matrix operand.
Definition: DMatSerialExpr.h:181
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:242
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.