MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / bfloat162int

Function bfloat162int

dnn/include/megdnn/dtype/bfloat16.hpp:416–418  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

414/// representation of bfloat16-precision value \return integral value
415template <typename T>
416MEGDNN_HOST MEGDNN_DEVICE T bfloat162int(uint16 value) {
417 return static_cast<T>(bfloat162float(value));
418}
419
420/// Round bfloat16 number to nearest integer value.
421/// \tparam R rounding mode to use, `round_indeterminate` for fastest rounding

Callers

nothing calls this directly

Calls 1

bfloat162floatFunction · 0.85

Tested by

no test coverage detected