MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / operator()

Method operator()

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

Source from the content-addressed store, hash-verified

1004};
1005struct Heaviside {
1006 bfloat16 operator()(bfloat16 bx, bfloat16 h0) {
1007 float x = static_cast<float>(bx);
1008 if (std::isnan(x)) {
1009 return bx;
1010 }
1011 if (x < 0) {
1012 return bfloat16(0.0f);
1013 }
1014 if (x > 0) {
1015 return bfloat16(1.0f);
1016 }
1017 return h0; // x == 0
1018 }
1019};
1020struct Conjugate {
1021 bfloat16 operator()(bfloat16 a) { return a; }

Callers

nothing calls this directly

Calls 1

isnanClass · 0.85

Tested by

no test coverage detected