35 #ifndef _BLAZE_MATH_EXPRESSIONS_DMATINVEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_DMATINVEXPR_H_
117 enum { vectorizable = 0 };
120 enum { smpAssignable = 0 };
139 return dm_.columns();
169 template<
typename T >
171 return dm_.isAliased( alias );
181 template<
typename T >
183 return dm_.isAliased( alias );
204 template<
typename MT2
213 assign( ~lhs, rhs.
dm_ );
231 template<
typename MT2
249 const TmpType tmp(
serial( rhs ) );
267 template<
typename MT2
269 friend inline void addAssign( DenseMatrix<MT2,SO2>& lhs,
const DMatInvExpr& rhs )
276 const ResultType tmp(
serial( rhs ) );
277 addAssign( ~lhs, tmp );
298 template<
typename MT2
300 friend inline void subAssign( DenseMatrix<MT2,SO2>& lhs,
const DMatInvExpr& rhs )
307 const ResultType tmp(
serial( rhs ) );
308 subAssign( ~lhs, tmp );
373 template<
typename MT
416 template<
typename MT
418 inline typename DMatInvExpr<MT,SO>::Operand
inv(
const DMatInvExpr<MT,SO>& dm )
438 template<
typename MT,
bool SO >
439 struct Rows< DMatInvExpr<MT,SO> > :
public Rows<MT>
455 template<
typename MT,
bool SO >
456 struct Columns< DMatInvExpr<MT,SO> > :
public Columns<MT>
472 template<
typename MT,
bool SO >
473 struct IsSymmetric< DMatInvExpr<MT,SO> > :
public IsTrue< IsSymmetric<MT>::value >
489 template<
typename MT,
bool SO >
490 struct IsHermitian< DMatInvExpr<MT,SO> > :
public IsTrue< IsHermitian<MT>::value >
506 template<
typename MT,
bool SO >
507 struct IsLower< DMatInvExpr<MT,SO> > :
public IsTrue< IsUpper<MT>::value >
523 template<
typename MT,
bool SO >
524 struct IsUniLower< DMatInvExpr<MT,SO> > :
public IsTrue< IsUniUpper<MT>::value >
540 template<
typename MT,
bool SO >
541 struct IsUpper< DMatInvExpr<MT,SO> > :
public IsTrue< IsLower<MT>::value >
557 template<
typename MT,
bool SO >
558 struct IsUniUpper< DMatInvExpr<MT,SO> > :
public IsTrue< IsUniLower<MT>::value >
574 template<
typename MT >
575 struct DMatInvExprTrait< DMatInvExpr<MT,false> >
579 typedef typename SelectType< IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value
580 ,
typename DMatInvExpr<MT,false>::Operand
581 , INVALID_TYPE >::Type Type;
590 template<
typename MT >
591 struct TDMatInvExprTrait< DMatInvExpr<MT,true> >
595 typedef typename SelectType< IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value
596 ,
typename DMatInvExpr<MT,true>::Operand
597 , INVALID_TYPE >::Type Type;
MT::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: DMatInvExpr.h:104
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exceptionThis macro encapsulates the default way of...
Definition: Exception.h:187
Operand dm_
Dense matrix of the inversion expression.
Definition: DMatInvExpr.h:189
Header file for the Rows type trait.
Header file for the IsUniUpper type trait.
Header file for basic type definitions.
BLAZE_ALWAYS_INLINE bool isSquare(const Matrix< MT, SO > &matrix)
Checks if the given matrix is a square matrix.
Definition: Matrix.h:603
MT::CompositeType CT
Composite type of the dense matrix expression.
Definition: DMatInvExpr.h:96
#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
Header file for the TDMatInvExprTrait class template.
Operand operand() const
Returns the dense matrix operand.
Definition: DMatInvExpr.h:158
#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 IsColumnMajorMatrix type trait.
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2588
size_t columns() const
Returns the current number of columns of the matrix.
Definition: DMatInvExpr.h:148
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:721
Header file for the Computation base class.
Header file for the MatInvExpr base class.
DMatInvExpr(const MT &dm)
Constructor for the DMatInvExpr class.
Definition: DMatInvExpr.h:128
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
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: DMatInvExpr.h:182
Constraint on the data type.
Constraint on the data type.
void invert(const HermitianProxy< MT > &proxy)
In-place inversion of the represented element.
Definition: HermitianProxy.h:767
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 IsSymmetric type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the DenseMatrix base class.
Header file for the Columns type trait.
Header file for the IsLower type trait.
#define BLAZE_CONSTRAINT_MUST_BE_REFERENCE_TYPE(T)
Constraint on the data type.In case the given data type T is not a reference type, a compilation error is created.
Definition: Reference.h:78
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
Header file for the SelectType class template.
Header file for all forward declarations for expression class templates.
Header file for the serial shim.
Header file for the DMatInvExprTrait class template.
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2587
Header file for run time assertion macros.
Utility type for generic codes.
MT::ReturnType ReturnType
Return type for expression template evaluations.
Definition: DMatInvExpr.h:106
MT::ResultType ResultType
Result type for expression template evaluations.
Definition: DMatInvExpr.h:102
Base class for all matrix inversion expression templates.The MatInvExpr class serves as a tag for all...
Definition: MatInvExpr.h:65
DMatInvExpr< MT, SO > This
Type of this DMatInvExpr instance.
Definition: DMatInvExpr.h:101
MT::OppositeType OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatInvExpr.h:103
#define BLAZE_CONSTRAINT_MATRICES_MUST_HAVE_SAME_STORAGE_ORDER(T1, T2)
Constraint on the data type.In case either of the two given data types T1 or T2 is not a matrix type ...
Definition: StorageOrder.h:122
Expression object for dense matrix inversions.The DMatInvExpr class represents the compile time expre...
Definition: DMatInvExpr.h:89
MT::ResultType RT
Result type of the dense matrix expression.
Definition: DMatInvExpr.h:95
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: DMatInvExpr.h:170
Header file for the IsRowMajorMatrix type trait.
Base class for all compute expression templates.The Computation class serves as a tag for all computa...
Definition: Computation.h:59
SelectType< IsExpression< MT >::value, const MT, const MT & >::Type Operand
Composite data type of the dense matrix expression.
Definition: DMatInvExpr.h:112
#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
const ResultType CompositeType
Data type for composite expression templates.
Definition: DMatInvExpr.h:109
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2583
Header file for the IsTrue value trait.
Header file for the IsUpper type trait.
Header file for exception macros.
MT::ElementType ElementType
Resulting element type.
Definition: DMatInvExpr.h:105
Header file for the IsHermitian type trait.
const DMatInvExpr< MT, SO > inv(const DenseMatrix< MT, SO > &dm)
Calculation of the inverse of the given dense matrix.
Definition: DMatInvExpr.h:375
size_t rows() const
Returns the current number of rows of the matrix.
Definition: DMatInvExpr.h:138
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.