Spaces:
Runtime error
Runtime error
template <typename T> | |
DEVICE | |
inline T infinity() { | |
const unsigned long long ieee754inf = 0x7ff0000000000000; | |
return __longlong_as_double(ieee754inf); | |
return std::numeric_limits<T>::infinity(); | |
} | |
template <> | |
DEVICE | |
inline double infinity() { | |
return __longlong_as_double(0x7ff0000000000000ULL); | |
return std::numeric_limits<double>::infinity(); | |
} | |
template <> | |
DEVICE | |
inline float infinity() { | |
return __int_as_float(0x7f800000); | |
return std::numeric_limits<float>::infinity(); | |
} | |
inline void cuda_synchronize() { | |
checkCuda(cudaDeviceSynchronize()); | |
} | |