Operator IF

Operator Library: Logic

The IF operator checks if a condition input is true and forwards the corresponding values of the data input. The operator is equipped with a parameterizable number of input links I0..In-1. With each input link comes a conditional input Condition. If a condition is true, the data of its corresponding input is forwarded to the output. If all condition inputs are false, the Else input is used. If more than one condition input is true, all corresponding input links are forwarded to the output and combined using a logic OR operation. The operator can be used with kernels. Each kernel component is selected independently.

I/O Properties

Property Value
Operator Type O
輸入連結 I0, data input
I1..In-1, data input
Else, data input
Condition0..n-1, data input
Output Link O, data output

支援的 Link 格式

Link Parameter 輸入連線 I0 Input Link I1..In-1 Input Link Else Input Link Condition0..n-1 Output Link O
Bit Width [1, 64]1 如 I0 如 I0 1 如 I0
Arithmetic {unsigned, signed} 如 I0 如 I0 unsigned 如 I0
Parallelism any 如 I0 如 I0 如 I0 如 I0
Kernel Columns any 如 I0 如 I0 如 I0 如 I0
Kernel Rows any 如 I0 如 I0 如 I0 如 I0
Img Protocol {VALT_IMAGE2D, VALT_LINE1D, VALT_PIXEL0D, VALT_SIGNAL} 如 I0 如 I0 如 I0 如 I0
Color Format any 如 I0 如 I0 VAF_GRAY 如 I0
Color Flavor any 如 I0 如 I0 FL_NONE 如 I0
Max. Img Width any 如 I0 如 I0 如 I0 如 I0
Max. Img Height any 如 I0 如 I0 如 I0 如 I0

1

The range of the input Bit Width is [1, 64] for unsigned values. For signed inputs, the range is [2, 64]. For unsigned color inputs, the range is [3, 63] and for signed color, the range is [6, 63].

參數

無

使用範例

The use of operator IF is shown in the following examples: