mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 11:49:02 +08:00
Make numext::as_uint a device function.
This commit is contained in:
parent
60faa9f897
commit
0aeaf5f451
@ -681,10 +681,11 @@ bool not_equal_strict(const double& x,const double& y) { return std::not_equal_t
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** \internal extract the bits of the float \a x */
|
/** \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;
|
unsigned int ret;
|
||||||
std::memcpy(&ret, &x, sizeof(float));
|
EIGEN_USING_STD(memcpy);
|
||||||
|
memcpy(&ret, &x, sizeof(float));
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user