Operator Reference
tuple_lsh (Operator)
tuple_lsh
— Shift a tuple bitwise to the left.
Signature
Description
tuple_lsh
shifts the tuple T
bitwise to the left by
Shift
places. If no overflow occurs, this operation is
equivalent to a multiplication by 2^{Shift
}. If T
is negative, the result depends on the hardware. If Shift
is negative or larger than 32, the result is undefined. If both
tuples have the same length the corresponding elements of both
tuples are shifted. Otherwise, either T
or Shift
must have length 1. In this case, the operation is performed for
each element of the longer tuple with the single element of the
other tuple. The input tuples must contain only integer numbers.
Exception: Empty input tuples
If either or both of the input tuples are empty, the operator returns an empty tuple.
HDevelop In-line Operation
HDevelop provides an in-line operation for tuple_lsh
,
which can be used in an expression in the following syntax:
Lsh := lsh(T, Shift)
Execution Information
- Multithreading type: independent (runs in parallel even with exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Parameters
T
(input_control) integer(-array) →
(integer)
Input tuple.
Shift
(input_control) integer(-array) →
(integer)
Number of places to shift the input tuple.
Lsh
(output_control) integer(-array) →
(integer)
Shifted input tuple.
Alternatives
See also
Module
Foundation