Operator ABS

Operator Library: Arithmetics

The operator calculates the absolute value of the input, i.e.

Note that the absolute value of the smallest possible negative value will require the same number of bits as its positive equivalent. Therefore, the output bit width is equal to the input bit width. For example, in 8 bit representation, the smallest value will be -128 while the maximum value is 127. After the absolute operation -128 becomes +128 what still requires 8 bit.

I/O Properties

Property Value
Operator Type O
Input Link I, data input
Output Link O, data output

Supported Link Format

Link Parameter Input Link I Output Link O
Bit Width [2, 64] as I
Arithmetic 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 VAF_GRAY, VAF_COLOR as I
Color Flavor FL_NONE as I
Max. Img Width any as I
Max. Img Height any as I

Parameters

None

Examples of Use

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