| 215 | } |
| 216 | |
| 217 | PyObject* PyBfloat16_Add(PyObject* a, PyObject* b) { |
| 218 | bfloat16 x, y; |
| 219 | if (SafeCastToBfloat16(a, &x) && SafeCastToBfloat16(b, &y)) { |
| 220 | return PyBfloat16_FromBfloat16(x + y).release(); |
| 221 | } |
| 222 | return PyArray_Type.tp_as_number->nb_add(a, b); |
| 223 | } |
| 224 | |
| 225 | PyObject* PyBfloat16_Subtract(PyObject* a, PyObject* b) { |
| 226 | bfloat16 x, y; |
nothing calls this directly
no test coverage detected