| AI Engine Intrinsics User Guide (AIE) v2025.2

Loading...
Searching...
No Matches
Functions
Simple
Intrinsics » Vector Operations » Vector Arithmetic

## Overview

Simple Integer Vector Arithmetic Operations.

## Functions
v16int32 | abs16 (v16int32 xbuff)
| Lane by lane 32-bit absolute value computation.
v32int16 | abs32 (v32int16 xbuff)
| Lane by lane 16-bit absolute value computation.
v16int32 | add16 (v16int32 xbuff, v16int32 ybuff)
| Lane by lane 32-bit real addition.
v32int16 | add32 (v32int16 xbuff, v32int16 ybuff)
| Lane by lane 16-bit real addition.
v16int32 | sub16 (v16int32 xbuff, v16int32 ybuff)
| Lane by lane 32-bit real subtraction.
v32int16 | sub32 (v32int16 xbuff, v32int16 ybuff)
| Lane by lane 16-bit real subtraction.

## Operators
v16acc48 | operator+ (v16acc48 a, v16int16 b)
| Lane by lane addition.
v8acc48 | operator+ (v8acc48 a, v8int16 b)
| Lane by lane addition.
v8int16 | operator+ (v8int16 a, v8int16 b)
| Lane by lane addition.
v16int16 | operator+ (v16int16 a, v16int16 b)
| Lane by lane addition.
v8cacc48 | operator+ (v8cacc48 a, v8cint16 b)
| Lane by lane addition.
v4cacc48 | operator+ (v4cacc48 a, v4cint16 b)
| Lane by lane addition.
v8cint16 | operator+ (v8cint16 a, v8cint16 b)
| Lane by lane addition.
v4cint16 | operator+ (v4cint16 a, v4cint16 b)
| Lane by lane addition.
v8acc80 | operator+ (v8acc80 a, v8int32 b)
| Lane by lane addition.
v4acc80 | operator+ (v4acc80 a, v4int32 b)
| Lane by lane addition.
v4int32 | operator+ (v4int32 a, v4int32 b)
| Lane by lane addition.
v8int32 | operator+ (v8int32 a, v8int32 b)
| Lane by lane addition.
v4cacc80 | operator+ (v4cacc80 a, v4cint32 b)
| Lane by lane addition.
v4cint32 | operator+ (v4cint32 a, v4cint32 b)
| Lane by lane addition.
v2cacc80 | operator+ (v2cacc80 a, v2cint32 b)
| Lane by lane addition.
v2cint32 | operator+ (v2cint32 a, v2cint32 b)
| Lane by lane addition.

## Subtraction
v16acc48 | operator- (v16acc48 a, v16int16 b)
| Lane by lane subtraction. Output = a - b.
v8acc48 | operator- (v8acc48 a, v8int16 b)
| Lane by lane subtraction. Output = a - b.
v8int16 | operator- (v8int16 a, v8int16 b)
| Lane by lane subtraction. Output = a - b.
v16int16 | operator- (v16int16 a, v16int16 b)
| Lane by lane subtraction. Output = a - b.
v8cacc48 | operator- (v8cacc48 a, v8cint16 b)
| Lane by lane subtraction. Output = a - b.
v4cacc48 | operator- (v4cacc48 a, v4cint16 b)
| Lane by lane subtraction. Output = a - b.
v8cint16 | operator- (v8cint16 a, v8cint16 b)
| Lane by lane subtraction. Output = a - b.
v4cint16 | operator- (v4cint16 a, v4cint16 b)
| Lane by lane subtraction. Output = a - b.
v8acc80 | operator- (v8acc80 a, v8int32 b)
| Lane by lane subtraction. Output = a - b.
v4acc80 | operator- (v4acc80 a, v4int32 b)
| Lane by lane subtraction. Output = a - b.
v4int32 | operator- (v4int32 a, v4int32 b)
| Lane by lane subtraction. Output = a - b.
v8int32 | operator- (v8int32 a, v8int32 b)
| Lane by lane subtraction. Output = a - b.
v4cacc80 | operator- (v4cacc80 a, v4cint32 b)
| Lane by lane subtraction. Output = a - b.
v4cint32 | operator- (v4cint32 a, v4cint32 b)
| Lane by lane subtraction. Output = a - b.
v2cacc80 | operator- (v2cacc80 a, v2cint32 b)
| Lane by lane subtraction. Output = a - b.
v2cint32 | operator- (v2cint32 a, v2cint32 b)
| Lane by lane subtraction. Output = a - b.

## Unary minus (signal inversion)
v16int16 | operator- (v16int16 a)
| Lane by lane unary minus (signal inversion)
v8int16 | operator- (v8int16 a)
| Lane by lane unary minus (signal inversion)
v8cint16 | operator- (v8cint16 a)
| Lane by lane unary minus (signal inversion)
v4cint16 | operator- (v4cint16 a)
| Lane by lane unary minus (signal inversion)
v8int32 | operator- (v8int32 a)
| Lane by lane unary minus (signal inversion)
v4int32 | operator- (v4int32 a)
| Lane by lane unary minus (signal inversion)
v4cint32 | operator- (v4cint32 a)
| Lane by lane unary minus (signal inversion)
v2cint32 | operator- (v2cint32 a)
| Lane by lane unary minus (signal inversion)
v32int16 | operator+ (v32int16 a, v32int16 b)
| Lane by lane unary minus (signal inversion)
v32int16 | operator- (v32int16 a, v32int16 b)
| Lane by lane unary minus (signal inversion)
v16int32 | operator+ (v16int32 a, v16int32 b)
| Lane by lane unary minus (signal inversion)
v16int32 | operator- (v16int32 a, v16int32 b)
| Lane by lane unary minus (signal inversion)
v16cint16 | operator+ (v16cint16 a, v16cint16 b)
| Lane by lane unary minus (signal inversion)
v16cint16 | operator- (v16cint16 a, v16cint16 b)
| Lane by lane unary minus (signal inversion)
v8cint32 | operator+ (v8cint32 a, v8cint32 b)
| Lane by lane unary minus (signal inversion)
v8cint32 | operator- (v8cint32 a, v8cint32 b)
| Lane by lane unary minus (signal inversion)
v64int8 | operator+ (v64int8 a, v64int8 b)
| Lane by lane unary minus (signal inversion)
v64int8 | operator- (v64int8 a, v64int8 b)
| Lane by lane unary minus (signal inversion)
v64uint8 | operator+ (v64uint8 a, v64uint8 b)
| Lane by lane unary minus (signal inversion)
v64uint8 | operator- (v64uint8 a, v64uint8 b)
| Lane by lane unary minus (signal inversion)

## Function Documentation

## ◆ abs16()

v16int32 abs16 | ( | v16int32 | xbuff | ) |

Lane by lane 32-bit absolute value computation.

## ◆ abs32()

v32int16 abs32 | ( | v32int16 | xbuff | ) |

Lane by lane 16-bit absolute value computation.

## ◆ add16()

v16int32 add16 | ( | v16int32 | xbuff,
|  | v16int32 | ybuff
| ) |  |

Lane by lane 32-bit real addition.

## ◆ add32()

v32int16 add32 | ( | v32int16 | xbuff,
|  | v32int16 | ybuff
| ) |  |

Lane by lane 16-bit real addition.

## ◆ operator+() [1/22]

v16acc48 operator+ | ( | v16acc48 | a,
|  | v16int16 | b
| ) |  |

Lane by lane addition.

## ◆ operator+() [2/22]

v16cint16 operator+ | ( | v16cint16 | a,
|  | v16cint16 | b
| ) |  |

Lane by lane unary minus (signal inversion)

## ◆ operator+() [3/22]

v16int16 operator+ | ( | v16int16 | a,
|  | v16int16 | b
| ) |  |

Lane by lane addition.

## ◆ operator+() [4/22]

v16int32 operator+ | ( | v16int32 | a,
|  | v16int32 | b
| ) |  |

Lane by lane unary minus (signal inversion)

## ◆ operator+() [5/22]

v2cacc80 operator+ | ( | v2cacc80 | a,
|  | v2cint32 | b
| ) |  |

Lane by lane addition.

## ◆ operator+() [6/22]

v2cint32 operator+ | ( | v2cint32 | a,
|  | v2cint32 | b
| ) |  |

Lane by lane addition.

## ◆ operator+() [7/22]

v32int16 operator+ | ( | v32int16 | a,
|  | v32int16 | b
| ) |  |

Lane by lane unary minus (signal inversion)

## ◆ operator+() [8/22]

v4acc80 operator+ | ( | v4acc80 | a,
|  | v4int32 | b
| ) |  |

Lane by lane addition.

## ◆ operator+() [9/22]

v4cacc48 operator+ | ( | v4cacc48 | a,
|  | v4cint16 | b
| ) |  |

Lane by lane addition.

## ◆ operator+() [10/22]

v4cacc80 operator+ | ( | v4cacc80 | a,
|  | v4cint32 | b
| ) |  |

Lane by lane addition.

## ◆ operator+() [11/22]

v4cint16 operator+ | ( | v4cint16 | a,
|  | v4cint16 | b
| ) |  |

Lane by lane addition.

## ◆ operator+() [12/22]

v4cint32 operator+ | ( | v4cint32 | a,
|  | v4cint32 | b
| ) |  |

Lane by lane addition.

## ◆ operator+() [13/22]

v4int32 operator+ | ( | v4int32 | a,
|  | v4int32 | b
| ) |  |

Lane by lane addition.

## ◆ operator+() [14/22]

v64int8 operator+ | ( | v64int8 | a,
|  | v64int8 | b
| ) |  |

Lane by lane unary minus (signal inversion)

## ◆ operator+() [15/22]

v64uint8 operator+ | ( | v64uint8 | a,
|  | v64uint8 | b
| ) |  |

Lane by lane unary minus (signal inversion)

## ◆ operator+() [16/22]

v8acc48 operator+ | ( | v8acc48 | a,
|  | v8int16 | b
| ) |  |

Lane by lane addition.

## ◆ operator+() [17/22]

v8acc80 operator+ | ( | v8acc80 | a,
|  | v8int32 | b
| ) |  |

Lane by lane addition.

## ◆ operator+() [18/22]

v8cacc48 operator+ | ( | v8cacc48 | a,
|  | v8cint16 | b
| ) |  |

Lane by lane addition.

## ◆ operator+() [19/22]

v8cint16 operator+ | ( | v8cint16 | a,
|  | v8cint16 | b
| ) |  |

Lane by lane addition.

## ◆ operator+() [20/22]

v8cint32 operator+ | ( | v8cint32 | a,
|  | v8cint32 | b
| ) |  |

Lane by lane unary minus (signal inversion)

## ◆ operator+() [21/22]

v8int16 operator+ | ( | v8int16 | a,
|  | v8int16 | b
| ) |  |

Lane by lane addition.

## ◆ operator+() [22/22]

v8int32 operator+ | ( | v8int32 | a,
|  | v8int32 | b
| ) |  |

Lane by lane addition.

## ◆ operator-() [1/30]

v16acc48 operator- | ( | v16acc48 | a,
|  | v16int16 | b
| ) |  |

Lane by lane subtraction. Output = a - b.

## ◆ operator-() [2/30]

v16cint16 operator- | ( | v16cint16 | a,
|  | v16cint16 | b
| ) |  |

Lane by lane unary minus (signal inversion)

## ◆ operator-() [3/30]

v16int16 operator- | ( | v16int16 | a | ) |

Lane by lane unary minus (signal inversion)

## ◆ operator-() [4/30]

v16int16 operator- | ( | v16int16 | a,
|  | v16int16 | b
| ) |  |

Lane by lane subtraction. Output = a - b.

## ◆ operator-() [5/30]

v16int32 operator- | ( | v16int32 | a,
|  | v16int32 | b
| ) |  |

Lane by lane unary minus (signal inversion)

## ◆ operator-() [6/30]

v2cacc80 operator- | ( | v2cacc80 | a,
|  | v2cint32 | b
| ) |  |

Lane by lane subtraction. Output = a - b.

## ◆ operator-() [7/30]

v2cint32 operator- | ( | v2cint32 | a | ) |

Lane by lane unary minus (signal inversion)

## ◆ operator-() [8/30]

v2cint32 operator- | ( | v2cint32 | a,
|  | v2cint32 | b
| ) |  |

Lane by lane subtraction. Output = a - b.

## ◆ operator-() [9/30]

v32int16 operator- | ( | v32int16 | a,
|  | v32int16 | b
| ) |  |

Lane by lane unary minus (signal inversion)

## ◆ operator-() [10/30]

v4acc80 operator- | ( | v4acc80 | a,
|  | v4int32 | b
| ) |  |

Lane by lane subtraction. Output = a - b.

## ◆ operator-() [11/30]

v4cacc48 operator- | ( | v4cacc48 | a,
|  | v4cint16 | b
| ) |  |

Lane by lane subtraction. Output = a - b.

## ◆ operator-() [12/30]

v4cacc80 operator- | ( | v4cacc80 | a,
|  | v4cint32 | b
| ) |  |

Lane by lane subtraction. Output = a - b.

## ◆ operator-() [13/30]

v4cint16 operator- | ( | v4cint16 | a | ) |

Lane by lane unary minus (signal inversion)

## ◆ operator-() [14/30]

v4cint16 operator- | ( | v4cint16 | a,
|  | v4cint16 | b
| ) |  |

Lane by lane subtraction. Output = a - b.

## ◆ operator-() [15/30]

v4cint32 operator- | ( | v4cint32 | a | ) |

Lane by lane unary minus (signal inversion)

## ◆ operator-() [16/30]

v4cint32 operator- | ( | v4cint32 | a,
|  | v4cint32 | b
| ) |  |

Lane by lane subtraction. Output = a - b.

## ◆ operator-() [17/30]

v4int32 operator- | ( | v4int32 | a | ) |

Lane by lane unary minus (signal inversion)

## ◆ operator-() [18/30]

v4int32 operator- | ( | v4int32 | a,
|  | v4int32 | b
| ) |  |

Lane by lane subtraction. Output = a - b.

## ◆ operator-() [19/30]

v64int8 operator- | ( | v64int8 | a,
|  | v64int8 | b
| ) |  |

Lane by lane unary minus (signal inversion)

## ◆ operator-() [20/30]

v64uint8 operator- | ( | v64uint8 | a,
|  | v64uint8 | b
| ) |  |

Lane by lane unary minus (signal inversion)

## ◆ operator-() [21/30]

v8acc48 operator- | ( | v8acc48 | a,
|  | v8int16 | b
| ) |  |

Lane by lane subtraction. Output = a - b.

## ◆ operator-() [22/30]

v8acc80 operator- | ( | v8acc80 | a,
|  | v8int32 | b
| ) |  |

Lane by lane subtraction. Output = a - b.

## ◆ operator-() [23/30]

v8cacc48 operator- | ( | v8cacc48 | a,
|  | v8cint16 | b
| ) |  |

Lane by lane subtraction. Output = a - b.

## ◆ operator-() [24/30]

v8cint16 operator- | ( | v8cint16 | a | ) |

Lane by lane unary minus (signal inversion)

## ◆ operator-() [25/30]

v8cint16 operator- | ( | v8cint16 | a,
|  | v8cint16 | b
| ) |  |

Lane by lane subtraction. Output = a - b.

## ◆ operator-() [26/30]

v8cint32 operator- | ( | v8cint32 | a,
|  | v8cint32 | b
| ) |  |

Lane by lane unary minus (signal inversion)

## ◆ operator-() [27/30]

v8int16 operator- | ( | v8int16 | a | ) |

Lane by lane unary minus (signal inversion)

## ◆ operator-() [28/30]

v8int16 operator- | ( | v8int16 | a,
|  | v8int16 | b
| ) |  |

Lane by lane subtraction. Output = a - b.

## ◆ operator-() [29/30]

v8int32 operator- | ( | v8int32 | a | ) |

Lane by lane unary minus (signal inversion)

## ◆ operator-() [30/30]

v8int32 operator- | ( | v8int32 | a,
|  | v8int32 | b
| ) |  |

Lane by lane subtraction. Output = a - b.

## ◆ sub16()

v16int32 sub16 | ( | v16int32 | xbuff,
|  | v16int32 | ybuff
| ) |  |

Lane by lane 32-bit real subtraction.

for (int i = 0; i < 16; i++)
o[i] = x[i] - y[i]

## ◆ sub32()

v32int16 sub32 | ( | v32int16 | xbuff,
|  | v32int16 | ybuff
| ) |  |

Lane by lane 16-bit real subtraction.

for (int i = 0; i < 32; i++)
o[i] = x[i] - y[i]