From 0aeaf5f451443a314ec4915af607520fd9b99866 Mon Sep 17 00:00:00 2001 From: Rasmus Munk Larsen Date: Wed, 22 Jul 2020 00:33:41 +0000 Subject: Make numext::as_uint a device function. --- Eigen/src/Core/util/Meta.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Eigen/src/Core/util/Meta.h') diff --git a/Eigen/src/Core/util/Meta.h b/Eigen/src/Core/util/Meta.h index e9e2f1873..c892e499c 100755 --- a/Eigen/src/Core/util/Meta.h +++ b/Eigen/src/Core/util/Meta.h @@ -681,10 +681,11 @@ bool not_equal_strict(const double& x,const double& y) { return std::not_equal_t #endif /** \internal extract the bits of the float \a x */ -inline unsigned int as_uint(float x) +EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC unsigned int as_uint(float x) { unsigned int ret; - std::memcpy(&ret, &x, sizeof(float)); + EIGEN_USING_STD(memcpy); + memcpy(&ret, &x, sizeof(float)); return ret; } -- cgit v1.2.3