aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/util/Meta.h
diff options
context:
space:
mode:
authorGravatar Rasmus Munk Larsen <rmlarsen@google.com>2020-07-22 00:33:41 +0000
committerGravatar Rasmus Munk Larsen <rmlarsen@google.com>2020-07-22 00:33:41 +0000
commit0aeaf5f451443a314ec4915af607520fd9b99866 (patch)
tree2def55e0d1adfa56855e534027c597dace88592d /Eigen/src/Core/util/Meta.h
parent60faa9f8979a2df6a689bd0a9d926da9b982bb81 (diff)
Make numext::as_uint a device function.
Diffstat (limited to 'Eigen/src/Core/util/Meta.h')
-rwxr-xr-xEigen/src/Core/util/Meta.h5
1 files changed, 3 insertions, 2 deletions
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;
}