MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Call

Method Call

tensorflow/compiler/xla/python/bfloat16.cc:920–939  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

918 return {npy_bfloat16, npy_bfloat16, npy_bfloat16, npy_bfloat16};
919 }
920 static void Call(char** args, npy_intp* dimensions, npy_intp* steps,
921 void* data) {
922 const char* i0 = args[0];
923 const char* i1 = args[1];
924 char* o0 = args[2];
925 char* o1 = args[3];
926 for (npy_intp k = 0; k < *dimensions; k++) {
927 bfloat16 x = *reinterpret_cast<const bfloat16*>(i0);
928 bfloat16 y = *reinterpret_cast<const bfloat16*>(i1);
929 float floordiv, mod;
930 std::tie(floordiv, mod) =
931 divmod(static_cast<float>(x), static_cast<float>(y));
932 *reinterpret_cast<bfloat16*>(o0) = bfloat16(floordiv);
933 *reinterpret_cast<bfloat16*>(o1) = bfloat16(mod);
934 i0 += steps[0];
935 i1 += steps[1];
936 o0 += steps[2];
937 o1 += steps[3];
938 }
939 }
940};
941struct Fmod {
942 bfloat16 operator()(bfloat16 a, bfloat16 b) {

Callers

nothing calls this directly

Calls 1

divmodFunction · 0.85

Tested by

no test coverage detected