In-place element-wise negation: writes back into a.
Equivalent to a = neg_op(a) but reuses a's storage and bumps
its version counter. Useful for negating large activations without
allocating a second buffer.
Math
See Also
neg_op — out-of-place counterpart.
Parameters
aTensorImplPtrTensor to negate in place. Must be non-null.
Returns
TensorImplPtrThe same pointer as a, now holding the negated storage.
Raises
ShapeMismatchIf
neg_op returns a tensor whose shape differs from a->shape() (should never happen under the standard schema).