fn
bitwise_right_shift_op
→TensorImplPtrint bitwise_right_shift_op(const int & a, const int & b)Python wrappers
Public Python APIs implemented by this engine symbol.Element-wise right shift.
Computes out[i] = a[i] >> b[i] for every element. Defined only on
signed integer dtypes (I8/I16/I32/I64); Bool is
rejected. On signed inputs the shift is arithmetic (sign-extending),
matching the C++ operator>> convention used by the backend.
Non-differentiable: no autograd node is registered.
Math
For negative a[i] the result is the floor of the true division,
i.e. the standard arithmetic-shift result.
References
NumPy numpy.right_shift.
See Also
bitwise_left_shift_op
Parameters
aTensorImplPtrValue to shift. Signed integer dtype.
bTensorImplPtrShift amount per element. Must match
a in shape, dtype, and device.Returns
TensorImplPtrTensor of the same shape and dtype as the inputs.
Raises
LucidErrorIf shapes/devices differ, or if the input dtype is not one of
I8/I16/I32/I64.Notes
- Floating-point and Bool inputs are rejected at the dispatch layer.
- No broadcasting — shapes must match exactly.