Skip to content
fn

square_inplace_op

→TensorImplPtr
int square_inplace_op(const int & a)

In-place square: writes x2x^2 back into a.

Math

ai←ai2a_i \leftarrow a_i^2

See Also

square_op — out-of-place counterpart.

Parameters

aTensorImplPtr
Tensor to square in place. Must be non-null.

Returns

TensorImplPtr

The same pointer as a.