MCPcopy Create free account
hub / github.com/OpenNMT/CTranslate2 / round

Function round

include/half_float/half.hpp:4095–4095  ·  view source on GitHub ↗

Nearest integer. See also:** Documentation for [std::round](https://en.cppreference.com/w/cpp/numeric/math/round). \param arg half to round \return nearest integer, rounded away from zero in half-way cases \exception FE_INVALID for signaling NaN \exception FE_INEXACT if value had to be rounded

Source from the content-addressed store, hash-verified

4093 /// \exception FE_INVALID for signaling NaN
4094 /// \exception FE_INEXACT if value had to be rounded
4095 inline half round(half arg) { return half(detail::binary, detail::integral<std::round_to_nearest,false,true>(arg.data_)); }
4096
4097 /// Nearest integer.
4098 /// **See also:** Documentation for [std::lround](https://en.cppreference.com/w/cpp/numeric/math/round).

Callers 1

get_max_candidatesFunction · 0.85

Calls 1

halfClass · 0.85

Tested by

no test coverage detected