Implementing kernel
C++ engine symbols that back this Python API.Element-wise bitwise left shift.
Shifts the bits of input to the left by other positions, filling
vacated low-order bits with zero. Equivalent to integer multiplication by
modulo the dtype width.
Parameters
Returns
TensorShifted tensor with shape broadcast(input.shape, other.shape).
Notes
Mathematical definition (modulo the dtype's bit width ):
High-order bits are lost on overflow. Not differentiable.
Examples
>>> import lucid
>>> a = lucid.tensor([1, 2, 4], dtype=lucid.int32)
>>> lucid.bitwise_left_shift(a, 2)
Tensor([4, 8, 16])