Skip to content
fn

div_inplace_op

→TensorImplPtr
int div_inplace_op(const int & a, const int & b)

In-place elementwise division: writes a/ba / b back into a.

Math

ai←aibia_i \leftarrow \frac{a_i}{b_i}

See Also

div_op — out-of-place counterpart.

Parameters

aTensorImplPtr
Left operand and in-place target. Must be non-null and must not share storage with a view.
bTensorImplPtr
Right operand. Must be non-null and broadcastable into a->shape(). Division by zero follows the backend's IEEE-754 convention (typically ±∞\pm\infty or NaN).

Returns

TensorImplPtr

The same pointer as a, now holding the quotient storage.

Raises

ShapeMismatch
If the broadcast output would change a's shape.
RuntimeError
If a shares storage with a view.