From 2f81b6363f3cf549270a18aeaa61abff9698f11f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Wagner?= Date: Thu, 23 Apr 2020 17:25:08 +0200 Subject: [PATCH] BooleanRedux.h: Add more EIGEN_DEVICE_FUNC qualifiers. This enables operator== on Eigen matrices in device code. (cherry picked from commit 0aebe19aca58d78434cf724ef954a8383b2bf7c9) --- Eigen/src/Core/BooleanRedux.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Eigen/src/Core/BooleanRedux.h b/Eigen/src/Core/BooleanRedux.h index 8409d8749..98b2b27ab 100644 --- a/Eigen/src/Core/BooleanRedux.h +++ b/Eigen/src/Core/BooleanRedux.h @@ -23,7 +23,7 @@ struct all_unroller row = (UnrollCount-1) % Traits::RowsAtCompileTime }; - static inline bool run(const Derived &mat) + EIGEN_DEVICE_FUNC static inline bool run(const Derived &mat) { return all_unroller::run(mat) && mat.coeff(row, col); } @@ -32,13 +32,13 @@ struct all_unroller template struct all_unroller { - static inline bool run(const Derived &/*mat*/) { return true; } + EIGEN_DEVICE_FUNC static inline bool run(const Derived &/*mat*/) { return true; } }; template struct all_unroller { - static inline bool run(const Derived &) { return false; } + EIGEN_DEVICE_FUNC static inline bool run(const Derived &) { return false; } }; template @@ -50,7 +50,7 @@ struct any_unroller row = (UnrollCount-1) % Traits::RowsAtCompileTime }; - static inline bool run(const Derived &mat) + EIGEN_DEVICE_FUNC static inline bool run(const Derived &mat) { return any_unroller::run(mat) || mat.coeff(row, col); } @@ -59,13 +59,13 @@ struct any_unroller template struct any_unroller { - static inline bool run(const Derived & /*mat*/) { return false; } + EIGEN_DEVICE_FUNC static inline bool run(const Derived & /*mat*/) { return false; } }; template struct any_unroller { - static inline bool run(const Derived &) { return false; } + EIGEN_DEVICE_FUNC static inline bool run(const Derived &) { return false; } }; } // end namespace internal