spike_bitwise_or

Contents

spike_bitwise_or#

class braintools.spike_bitwise_or(x, y)#

Perform a bitwise OR operation on spike tensors.

This function computes the OR operation between two spike tensors. The OR operation is implemented using the formula: x + y - x * y, which is equivalent to the OR operation for binary values.

Parameters:
  • x (Tensor) – The first input spike tensor.

  • y (Tensor) – The second input spike tensor.

Returns:

The result of the bitwise OR operation applied to the input tensors.

The output tensor has the same shape as the input tensors.

Return type:

Tensor

Note

This operation assumes that the input tensors contain binary (0 or 1) values. For non-binary inputs, the behavior may not correspond to a true bitwise OR.