Skip to content

tuple_lshTupleLshTupleLshtuple_lshtuple_lsh🔗

説明🔗

tuple_lshTupleLshTupleLshtuple_lshtuple_lsh — tuple をビット単位で左にシフトする。

書式🔗

tuple_lsh( integer T, integer Shift, out integer Lsh )void TupleLsh( const HTuple& T, const HTuple& Shift, HTuple* Lsh )static void HOperatorSet.TupleLsh( HTuple t, HTuple shift, out HTuple lsh )def tuple_lsh( t: MaybeSequence[int], shift: MaybeSequence[int] ) -> Sequence[int]

def tuple_lsh_s( t: MaybeSequence[int], shift: MaybeSequence[int] ) -> intHerror tuple_lsh( const Hlong T, const Hlong Shift, Hlong* Lsh )

Herror T_tuple_lsh( const Htuple T, const Htuple Shift, Htuple* Lsh )

HTuple HTuple::TupleLsh( const HTuple& Shift ) const

HTuple HTuple.TupleLsh( HTuple shift )

説明🔗

tuple_lshTupleLsh は tuple Ttt のビットに関して Shiftshiftshift 位置だけ左へシフトします。オーバーフローを起こさなけ れば計算は \(2^{\textrm{Shift}}\) の掛け算に相当します。Ttt が負なら結果はハードウエアに依存します。Shiftshiftshift が負または 32 より大きければ結果は定義されません。両方の tuple が同じ長さなら 、対応した tuple の要素がシフトされます。そうでない場合、 Ttt または Shiftshiftshift は長さ 1 になる必要があります。長 い tuple のそれぞれの要素と長さ 1 の tuple 要素との間で計算されま す。入力 tuples は整数です。

例外: 入力tuple が 空🔗

入力tupleが空の場合、この関数は空のtupleを返します。

HDevelopインライン演算🔗

HDevelopは tuple_lshTupleLsh の代わりとなるインライン演算を備えており、以下の構文形式で使 用することができます::

Lsh := lsh(T, Shift)

実行情報🔗

実行情報
  • マルチスレッドタイプ: リエントラント(非排他なオペレーターと並列に動作)

  • マルチスレッドスコープ: グローバル(他のスレッドから呼び出される可能性あり)

  • 並列演算処理には未対応

パラメーター🔗

Ttt (input_control) integer(-array) → (integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (Hlong)

入力 tuple

Shiftshiftshift (input_control) integer(-array) → (integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (Hlong)

入力 tuple のシフトする数

Lshlshlsh (output_control) integer(-array) → (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)

シフトした入力 tuple

他のオペレーターとの組み合わせ🔗

組み合わせ

他の選択候補

tuple_multTupleMult

関連項目

tuple_rshTupleRsh

モジュール🔗

Foundation