diff options
author | Gael Guennebaud <g.gael@free.fr> | 2019-01-17 11:33:43 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2019-01-17 11:33:43 +0100 |
commit | 7f32109c11b9cbc3cedc72e59683bf5839d35d75 (patch) | |
tree | dadc81487fe8012a5d930f91b33e1a8ab90c3ca0 /Eigen/src/plugins | |
parent | 7b35c26b1c73e6b1048eda69ab5ef18924770379 (diff) |
Add conjugateIf<bool> members to DesneBase, TriangularView, SelfadjointView, and make PartialPivLU use it.
Diffstat (limited to 'Eigen/src/plugins')
-rw-r--r-- | Eigen/src/plugins/CommonCwiseUnaryOps.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Eigen/src/plugins/CommonCwiseUnaryOps.h b/Eigen/src/plugins/CommonCwiseUnaryOps.h index 89f4faaac..5418dc415 100644 --- a/Eigen/src/plugins/CommonCwiseUnaryOps.h +++ b/Eigen/src/plugins/CommonCwiseUnaryOps.h @@ -76,6 +76,20 @@ conjugate() const return ConjugateReturnType(derived()); } +/// \returns an expression of the complex conjugate of \c *this if Cond==true, returns derived() otherwise. +/// +EIGEN_DOC_UNARY_ADDONS(conjugate,complex conjugate) +/// +/// \sa conjugate() +template<bool Cond> +EIGEN_DEVICE_FUNC +inline typename internal::conditional<Cond,ConjugateReturnType,const Derived&>::type +conjugateIf() const +{ + typedef typename internal::conditional<Cond,ConjugateReturnType,const Derived&>::type ReturnType; + return ReturnType(derived()); +} + /// \returns a read-only expression of the real part of \c *this. /// EIGEN_DOC_UNARY_ADDONS(real,real part function) |