Skip to content
fn

bitwise_or_op

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

Python wrappers

Public Python APIs implemented by this engine symbol.

Element-wise bitwise OR.

Computes out[i] = a[i] | b[i] for every element. Defined on integer and Bool dtypes; on Bool inputs this is equivalent to logical OR.

Non-differentiable: no autograd node is registered.

Math

out[i]=a[i] ∨bit b[i]. \mathrm{out}[i] = a[i] \,\vee_{\text{bit}}\, b[i].

References

NumPy numpy.bitwise_or.

See Also

bitwise_and_op, bitwise_xor_op

Parameters

a, bTensorImplPtr
Operands of identical shape, integer-or-Bool dtype, and device.

Returns

TensorImplPtr

Tensor of the same shape and dtype as the inputs.

Raises

LucidError
If shapes/devices differ, or if the input dtype is not integer or Bool.