Operator ShiftLeft

Operator Library: Arithmetics

このオペレータは、入力データの算術左シフトを実行します。 シフトするビット数は、パラメータ Shift を使用して定義します。 入力の各ビットは、パラメータで指定されたビット数だけ左にシフトされます。新しく挿入される最下位ビットの値は 0になります。

ビットシフトは通常、値を2のべき乗でスケーリングするために使用されます。 たとえば、1ビットの左シフトは値を2倍にします。 2ビットの左シフトは入力値を4倍にします。

各色成分は個別にシフトされます。

I/O Property

Property 値
オペレータータイプ O
Input Link I, data input
Output Link O, data output

サポートされているリンクフォーマット

Link Parameter Input Link I Output Link O
Bit Width [1, 64] unsigned、[2, 64] signed auto1
Arithmetic {unsigned, signed} as I
Parallelism any as I
Kernel Columns any as I
Kernel Rows any as I
Img Protocol {VALT_IMAGE2D, VALT_LINE1D, VALT_PIXEL0D} as I
Color Format any as I
Color Flavor any as I
Max. Img Width any as I
Max. Img Height any as I

1

出力の Bit Width は、入力の Bit Width にパラメータ Shift の値を加算したものです。

パラメーター

Shift
タイプ static パラメータ
Default 0
範囲 [0, 64 - Input BitWidth]

このパラメータは、入力を左シフトするビット数を定義します。

使用例

ShiftLeft オペレータの使用方法は、次の例に示されています。