Skip to contents

Element-wise left bit shift.

Usage

nv_shift_left(lhs, rhs)

Arguments

lhs, rhs

(tensorish)
Left and right operand. Operands are promoted to a common data type. Scalars are broadcast to the shape of the other operand.

Value

tensorish
Has the same shape and the promoted common data type of the inputs.

See also

nvl_shift_left() for the underlying primitive.

Examples

jit_eval({
  x <- nv_tensor(c(1L, 2L, 4L))
  y <- nv_tensor(c(1L, 2L, 1L))
  nv_shift_left(x, y)
})
#> AnvilTensor
#>  2
#>  8
#>  8
#> [ CPUi32{3} ]