Skip to content
fn

pow_inplace_op

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

In-place elementwise exponentiation: writes aba^b back into a.

Math

ai←aibia_i \leftarrow a_i^{b_i}

See Also

pow_op — out-of-place counterpart.

Parameters

aTensorImplPtr
Base / in-place target. Must be non-null and must not share storage with a view.
bTensorImplPtr
Exponent. Must be non-null and broadcastable into a->shape(). Domain restrictions (e.g. 000^0, negative base with fractional exponent) follow the backend's convention.

Returns

TensorImplPtr

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

Raises

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