Converts a PyBfloat16 into a PyInt.
| 203 | |
| 204 | // Converts a PyBfloat16 into a PyInt. |
| 205 | PyObject* PyBfloat16_Int(PyObject* self) { |
| 206 | bfloat16 x = PyBfloat16_Bfloat16(self); |
| 207 | long y = static_cast<long>(x); // NOLINT |
| 208 | return TfPyInt_FromLong(y); |
| 209 | } |
| 210 | |
| 211 | // Negates a PyBfloat16. |
| 212 | PyObject* PyBfloat16_Negative(PyObject* self) { |
nothing calls this directly
no test coverage detected