Mojo function
lop
lop[lut: SIMD[int32, 1]](a: SIMD[int32, 1], b: SIMD[int32, 1], c: SIMD[int32, 1]) -> SIMD[int32, 1]
Performs an arbitrary logical operation on 3 inputs using a lookup table.
Implements a 3-input lookup table (LUT) operation. The result is determined by bits in the lookup table value for each input combination.
Note:
- Only supported on NVIDIA GPUs.
- Maps to the LOP3.B32 PTX instruction.
- Lookup table value determines output for each possible input combo.
Parameters:
- lut (
SIMD
): 32-bit lookup table value that defines the logical operation.
Args:
Returns:
SIMD
: Result of applying the lookup table operation to the inputs.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!