Skip to main content

ClikaRT::ops::bitwise_left_shift

function

bitwise_left_shift()

Tensor bitwise_left_shift(Tensor a, ScalarOrTensor other)

Elementwise a << other. Integer dtypes only (Bool refuses; a shifted Bool byte has no meaning); otherwise dtype law as bitwise_and. The shift is a TOTAL function: a count outside [0, bit_width), negative included, yields the fully shifted-out value (zero fill), identically on every backend.

Returns: the broadcast-shaped shifted values at the shared dtype.

Throws

  • ClikaRT::Error: (INVALID_ARGUMENT) when the operand dtypes differ, for a floating-point or Bool operand, or broadcast-incompatible shapes.

Declared in ClikaRT/compute/ops.h, line 1585