diff options
author | Gael Guennebaud <g.gael@free.fr> | 2013-08-01 16:26:57 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2013-08-01 16:26:57 +0200 |
commit | ddf775363147fc7ee778b42c21b642f085193f55 (patch) | |
tree | dc08320f7a4dd5812599a84f0c8fa2c31a70e210 /Eigen/src/Geometry/OrthoMethods.h | |
parent | 55b57fcba6e56bea5c084cc756b50a447985e5c2 (diff) |
Add nvcc support for small eigenvalues decompositions and workaround lack of support for std::swap and std::numeric_limits
Diffstat (limited to 'Eigen/src/Geometry/OrthoMethods.h')
-rw-r--r-- | Eigen/src/Geometry/OrthoMethods.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Eigen/src/Geometry/OrthoMethods.h b/Eigen/src/Geometry/OrthoMethods.h index 556bc8160..26be3ee5b 100644 --- a/Eigen/src/Geometry/OrthoMethods.h +++ b/Eigen/src/Geometry/OrthoMethods.h @@ -132,6 +132,7 @@ struct unitOrthogonal_selector typedef typename NumTraits<Scalar>::Real RealScalar; typedef typename Derived::Index Index; typedef Matrix<Scalar,2,1> Vector2; + EIGEN_DEVICE_FUNC static inline VectorType run(const Derived& src) { VectorType perp = VectorType::Zero(src.size()); @@ -154,6 +155,7 @@ struct unitOrthogonal_selector<Derived,3> typedef typename plain_matrix_type<Derived>::type VectorType; typedef typename traits<Derived>::Scalar Scalar; typedef typename NumTraits<Scalar>::Real RealScalar; + EIGEN_DEVICE_FUNC static inline VectorType run(const Derived& src) { VectorType perp; @@ -192,6 +194,7 @@ template<typename Derived> struct unitOrthogonal_selector<Derived,2> { typedef typename plain_matrix_type<Derived>::type VectorType; + EIGEN_DEVICE_FUNC static inline VectorType run(const Derived& src) { return VectorType(-numext::conj(src.y()), numext::conj(src.x())).normalized(); } }; |