| 387 | // provides `Eigen::half_impl::isinf` instead. |
| 388 | template <> |
| 389 | inline bool CheckForOverflow<Eigen::half>(double as_double, Eigen::half* out) { |
| 390 | return (sizeof(Eigen::half) < sizeof(double) && |
| 391 | Eigen::half_impl::isinf(*out) && std::isfinite(as_double)); |
| 392 | } |
| 393 | |
| 394 | template <class T> |
| 395 | const char* ConvertOneFloat(PyObject* v, T* out) { |