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

Method modf

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

Source from the content-addressed store, hash-verified

1198 /// \param iptr address to store integer part at
1199 /// \return fractional part
1200 MEGDNN_HOST MEGDNN_DEVICE static bfloat16 modf(float arg, bfloat16* iptr) {
1201 float fptr = 0.f;
1202 bfloat16 ret = bfloat16(
1203 binary_t(),
1204 float2bfloat16<bfloat16::round_style>(std::modf(arg, &fptr)));
1205 *iptr = fptr;
1206 return ret;
1207 }
1208
1209 /// Scaling implementation.
1210 /// \param arg number to scale

Callers

nothing calls this directly

Calls 3

bfloat16Class · 0.85
binary_tClass · 0.70
modfFunction · 0.70

Tested by

no test coverage detected