mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-28 23:04:18 +08:00
Use EIGEN_USING_STD to fix CUDA compilation error on BFloat16.h.
This commit is contained in:
parent
ee714f79f7
commit
f93841b53e
@ -485,10 +485,12 @@ EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC float bfloat16_to_float(__bfloat16_raw h)
|
|||||||
// --- standard functions ---
|
// --- standard functions ---
|
||||||
|
|
||||||
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool (isinf)(const bfloat16& a) {
|
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool (isinf)(const bfloat16& a) {
|
||||||
return std::isinf EIGEN_NOT_A_MACRO(float(a));
|
EIGEN_USING_STD(isinf);
|
||||||
|
return (isinf)(float(a));
|
||||||
}
|
}
|
||||||
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool (isnan)(const bfloat16& a) {
|
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool (isnan)(const bfloat16& a) {
|
||||||
return std::isnan EIGEN_NOT_A_MACRO(float(a));
|
EIGEN_USING_STD(isnan);
|
||||||
|
return (isnan)(float(a));
|
||||||
}
|
}
|
||||||
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool (isfinite)(const bfloat16& a) {
|
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool (isfinite)(const bfloat16& a) {
|
||||||
return !(isinf EIGEN_NOT_A_MACRO (a)) && !(isnan EIGEN_NOT_A_MACRO (a));
|
return !(isinf EIGEN_NOT_A_MACRO (a)) && !(isnan EIGEN_NOT_A_MACRO (a));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user