Skip to content
fn

minimum_inplace_op

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

In-place elementwise minimum: writes min⁡(a,b)\min(a, b) back into a.

Math

ai←min⁡(ai,bi)a_i \leftarrow \min(a_i, b_i)

See Also

minimum_op — out-of-place counterpart. maximum_inplace_op — elementwise maximum sibling.

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().

Returns

TensorImplPtr

The same pointer as a, now holding the elementwise minima.

Raises

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