MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / CheckForOverflow

Function CheckForOverflow

tensorflow/python/lib/core/py_seq_tensor.cc:381–384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

379// Returns `true` if `out` overflows when converted from `as_double`.
380template <class T>
381static inline bool CheckForOverflow(double as_double, T* out) {
382 return (sizeof(T) < sizeof(double) && std::isinf(*out) &&
383 std::isfinite(as_double));
384}
385
386// There is no `std::isinf` that takes `Eigen::half` as argument but Eigen
387// provides `Eigen::half_impl::isinf` instead.

Callers

nothing calls this directly

Calls 2

isinfClass · 0.85
isfiniteClass · 0.85

Tested by

no test coverage detected