MCPcopy Create free account
hub / github.com/ml-explore/mlx / reciprocal

Function reciprocal

mlx/ops.cpp:2831–2834  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2829}
2830
2831array reciprocal(const array& a, StreamOrDevice s /* = {} */) {
2832 auto dtype = at_least_float(a.dtype());
2833 return divide(array(1.0f, dtype), a, to_stream(s));
2834}
2835
2836array add(const array& a, const array& b, StreamOrDevice s /* = {} */) {
2837 auto out_type = promote_types(a.dtype(), b.dtype());

Callers 5

mlx_divide_itemFunction · 0.85
init_opsFunction · 0.85
ropeFunction · 0.85
pinvFunction · 0.85
ops_tests.cppFile · 0.85

Calls 4

divideFunction · 0.85
to_streamFunction · 0.85
at_least_floatFunction · 0.70
arrayFunction · 0.70

Tested by

no test coverage detected