asc.experimental.asctile.bitwise_not

asc.experimental.asctile.bitwise_not(input: LocalTensor) → LocalTensor

Computes the element-wise NOT (bitwise) of input.

The supported data types for the input are: int8, int16, int32, int64.

Parameters:

input – The input value (tensor)

Returns:

The result tensor

Return type:

LocalTensor

Raises:

RuntimeError – If the input dtype is not supported for this operation

Examples

Compute the element-wise NOT (bitwise) of all tensor elements:

input = asctile.copy_in(tensor, [0, 0], [128, 256])
result = asctile.bitwise_not(input)

This function can also be called via an unary operator on LocalTensor, as ~input instead of bitwise_not(input).