From 92a77a596bdf6b685120ac1a90c06ab1a24d0734 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Girinon?= Date: Wed, 13 Sep 2023 04:16:52 +0000 Subject: [PATCH] Fix call to static functions from device by adding EIGEN_DEVICE_FUNC attribute to run methods --- Eigen/src/Geometry/Transform.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Eigen/src/Geometry/Transform.h b/Eigen/src/Geometry/Transform.h index 8f64863be..1cfff1b7b 100644 --- a/Eigen/src/Geometry/Transform.h +++ b/Eigen/src/Geometry/Transform.h @@ -1432,7 +1432,7 @@ struct transform_left_product_impl typedef Transform TransformType; typedef typename TransformType::MatrixType MatrixType; typedef Transform ResultType; - static ResultType run(const Other& other,const TransformType& tr) + static EIGEN_DEVICE_FUNC ResultType run(const Other& other,const TransformType& tr) { return ResultType(other * tr.matrix()); } }; @@ -1443,7 +1443,7 @@ struct transform_left_product_impl TransformType; typedef typename TransformType::MatrixType MatrixType; typedef Transform ResultType; - static ResultType run(const Other& other,const TransformType& tr) + static EIGEN_DEVICE_FUNC ResultType run(const Other& other,const TransformType& tr) { ResultType res; res.matrix().noalias() = other.template block(0,0) * tr.matrix(); @@ -1459,7 +1459,7 @@ struct transform_left_product_impl typedef Transform TransformType; typedef typename TransformType::MatrixType MatrixType; typedef TransformType ResultType; - static ResultType run(const Other& other,const TransformType& tr) + static EIGEN_DEVICE_FUNC ResultType run(const Other& other,const TransformType& tr) { ResultType res; res.affine().noalias() = other * tr.matrix(); @@ -1475,7 +1475,7 @@ struct transform_left_product_impl TransformType; typedef typename TransformType::MatrixType MatrixType; typedef TransformType ResultType; - static ResultType run(const Other& other,const TransformType& tr) + static EIGEN_DEVICE_FUNC ResultType run(const Other& other,const TransformType& tr) { ResultType res; res.matrix().noalias() = other.template block(0,0) * tr.matrix(); @@ -1491,7 +1491,7 @@ struct transform_left_product_impl typedef Transform TransformType; typedef typename TransformType::MatrixType MatrixType; typedef TransformType ResultType; - static ResultType run(const Other& other, const TransformType& tr) + static EIGEN_DEVICE_FUNC ResultType run(const Other& other, const TransformType& tr) { TransformType res; if(Mode!=int(AffineCompact)) @@ -1513,7 +1513,7 @@ struct transform_transform_product_impl typedef Transform Lhs; typedef Transform Rhs; typedef Transform ResultType; - static ResultType run(const Lhs& lhs, const Rhs& rhs) + static EIGEN_DEVICE_FUNC ResultType run(const Lhs& lhs, const Rhs& rhs) { ResultType res; res.linear() = lhs.linear() * rhs.linear(); @@ -1529,7 +1529,7 @@ struct transform_transform_product_impl typedef Transform Lhs; typedef Transform Rhs; typedef Transform ResultType; - static ResultType run(const Lhs& lhs, const Rhs& rhs) + static EIGEN_DEVICE_FUNC ResultType run(const Lhs& lhs, const Rhs& rhs) { return ResultType( lhs.matrix() * rhs.matrix() ); } @@ -1541,7 +1541,7 @@ struct transform_transform_product_impl Lhs; typedef Transform Rhs; typedef Transform ResultType; - static ResultType run(const Lhs& lhs, const Rhs& rhs) + static EIGEN_DEVICE_FUNC ResultType run(const Lhs& lhs, const Rhs& rhs) { ResultType res; res.matrix().template topRows() = lhs.matrix() * rhs.matrix(); @@ -1556,7 +1556,7 @@ struct transform_transform_product_impl Lhs; typedef Transform Rhs; typedef Transform ResultType; - static ResultType run(const Lhs& lhs, const Rhs& rhs) + static EIGEN_DEVICE_FUNC ResultType run(const Lhs& lhs, const Rhs& rhs) { ResultType res(lhs.matrix().template leftCols() * rhs.matrix()); res.matrix().col(Dim) += lhs.matrix().col(Dim);