Element-wise logical right bit shift.
Value
(arrayish)
Has the inputs' broadcast shape and x's data type.
See also
prim_shift_right_logical() for the underlying primitive.
Examples
x <- nv_array(c(8L, 16L, 32L))
shift <- nv_array(c(1L, 2L, 3L))
nv_shift_right_logical(x, shift)
#> AnvlArray
#> 4
#> 4
#> 4
#> [ CPUi32{3} ]
# the result keeps `x`'s data type, which `shift` is brought to
nv_shift_right_logical(nv_scalar(32L, "i64"), nv_scalar(2L, "i32"))
#> AnvlArray
#> 8
#> [ CPUi64{} ]
# a scalar is broadcast
nv_shift_right_logical(x, 1L)
#> AnvlArray
#> 4
#> 8
#> 16
#> [ CPUi32{3} ]