MCPcopy Create free account
hub / github.com/apache/tvm-ffi / FastMathSafePosInf

Method FastMathSafePosInf

src/ffi/extra/json_parser.cc:302–313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300
301 private:
302 static double FastMathSafePosInf() {
303#ifdef __FAST_MATH__
304 union {
305 uint64_t from;
306 double to;
307 } u;
308 u.from = 0x7FF0000000000000ULL; // write "from", read "to"
309 return u.to;
310#else
311 return std::numeric_limits<double>::infinity();
312#endif
313 }
314
315 static double FastMathSafeNegInf() {
316#ifdef __FAST_MATH__

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected