MCPcopy Create free account
hub / github.com/apache/singa / select

Function select

include/half.hpp:731–738  ·  view source on GitHub ↗

Select value or signaling NaN. \param x preferred half-precision value \param y ignored half-precision value except for signaling NaN \return \a y if signaling NaN, \a x otherwise \exception FE_INVALID if \a y is signaling NaN

Source from the content-addressed store, hash-verified

729 /// \return \a y if signaling NaN, \a x otherwise
730 /// \exception FE_INVALID if \a y is signaling NaN
731 inline HALF_CONSTEXPR_NOERR unsigned int select(unsigned int x, unsigned int HALF_UNUSED_NOERR(y))
732 {
733 #if HALF_ERRHANDLING
734 return (((y&0x7FFF)>0x7C00) && !(y&0x200)) ? signal(y) : x;
735 #else
736 return x;
737 #endif
738 }
739
740 /// Raise domain error and return NaN.
741 /// return quiet NaN

Callers 4

fmaxFunction · 0.85
fminFunction · 0.85
hypotFunction · 0.85
powFunction · 0.85

Calls 1

signalFunction · 0.85

Tested by

no test coverage detected