Operator XOR

Operator Library: Logic

オペレータ XOR は、ビット単位の論理 XOR (排他的論理和) 演算を実行します。 対応する入力ビット値の合計が奇数の場合、各出力ビットは論理「1」に設定され、それ以外の場合は出力は「0」になります。 入力リンクの数は、モジュールのインスタンス化時に選択する必要があります。

したがって、n 個の入力の出力ビット i は次のようになります。

I/O Properties

Property 値
Operator Type O
入力リンク I0、データ入力
I1..In-1、データ入力
Output Link O, data output

Supported Link Format

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

1

符号なし値の場合、入力 Bit Width の範囲は [1, 64] です。 符号付き入力の場合、範囲は [2, 64] です。 符号なしカラー入力の場合、範囲は [3, 63] であり、符号付きカラーの場合、範囲は [6, 63] です。

パラメーター

None

使用例

オペレータ XOR の使用例を次に示します: