Operator OR

Operator Library: Logic

「或」運算子執行位元層級的邏輯或運算。 若任何一個對應的位元為「1」,則每個輸出位元皆設為邏輯「1」;否則,輸出為「0」。 輸入連接數必須在模組實例化時選定。

因此,n 個輸入的輸出位元 i 為

I/O Properties

Property Value
Operator Type O
Input Links I0, data input
I1..In-1, data input
Output Link O,資料輸出

Supported Link Format

Link Parameter 輸入連結 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]。

Parameters

無

Examples of Use

以下範例展示了「OR」運算子的用法:

  • 《成敗難料》

    範例 — 此實作可偵測二值影像中的四種簡單模式。 每當偵測到匹配時,輸出值將被設為 1。

  • 'Grid Overlay Fading'

    範例 - 將網格疊加到輸入影像。 網格像素值由輸入像素值決定。