| AI Engine-ML Intrinsics User Guide (v2025.2)

Loading...
Searching...
No Matches
Functions
Emulated Multiply-accumulate of Complex Float and Float datatypes
Vector Operations » Multiply Accumulate

## Overview

Elementwise operations based on the already emulated FP32 operations (see intr_gpvectorop_mul_emul_float). These operations might not have optimal performance.

For an explanation how these operations works and the different accuracies provided, please refer to Multiply Accumulate.

! /**

## Functions
_INLINE v8caccfloat | mac_elem_8_conf (v8float v1, v8cfloat v2, v8caccfloat acc, int zero_acc, int sub_mask, int sub_mul, int sub_acc1)
_INLINE v8caccfloat | msc_elem_8_conf (v8float v1, v8cfloat v2, v8caccfloat acc, int zero_acc, int sub_mask, int sub_mul, int sub_acc1)
_INLINE v8caccfloat | mul_elem_8_conf (v8float v1, v8cfloat v2, int sub_mask, int sub_mul)
_INLINE v8caccfloat | negmul_elem_8_conf (v8float v1, v8cfloat v2, int sub_mask, int sub_mul)

## Emulated element-wise multiplication of complex float and complex float
v8caccfloat | mul_elem_8_conf (v8cfloat v1, v8cfloat v2, int sub_mul)
v8caccfloat | negmul_elem_8_conf (v8cfloat v1, v8cfloat v2, int sub_mul)

## Emulated element-wise multiplication of float and complex float
v8caccfloat | mul_elem_8_conf (v8float v1, v8cfloat v2, int sub_mul)
v8caccfloat | mul_elem_8_conf (v8cfloat v1, v8float v2, int sub_mul)

## Emulated Multiplication of Channel by channel complex multiplication of float and cfloat with dynamic negation of multiplication result, negation of acc1, and zeroing of acc1
v8caccfloat | mac_elem_8_conf (v8float v1, v8cfloat v2, v8caccfloat acc, int zero_acc, int sub_mul, int sub_acc1)
v8caccfloat | mac_elem_8_conf (v8cfloat v1, v8float v2, v8caccfloat acc, int zero_acc, int sub_mul, int sub_acc1)
v8caccfloat | msc_elem_8_conf (v8float v1, v8cfloat v2, v8caccfloat acc, int zero_acc, int sub_mul, int sub_acc1)
v8caccfloat | msc_elem_8_conf (v8cfloat v1, v8float v2, v8caccfloat acc, int zero_acc, int sub_mul, int sub_acc1)

## Emulated Multiplication of Channel by channel complex multiplication of cfloat and cfloat with dynamic negation of multiplication result, negation of acc1, and zeroing of acc1
v8caccfloat | mac_elem_8_conf (v8cfloat v1, v8cfloat v2, v8caccfloat acc, int zero_acc, int sub_mul, int sub_acc1)
v8caccfloat | msc_elem_8_conf (v8cfloat v1, v8cfloat v2, v8caccfloat acc, int zero_acc, int sub_mul, int sub_acc1)
v8caccfloat | negmsc_elem_8_conf (v8cfloat v1, v8cfloat v2, v8caccfloat acc, int zero_acc, int sub_mul, int sub_acc1)

## Function Documentation

## ◆ mac_elem_8_conf() [1/4]

v8caccfloat mac_elem_8_conf | ( | v8cfloat | v1,
|  | v8cfloat | v2,
|  | v8caccfloat | acc,
|  | int | zero_acc,
|  | int | sub_mul,
|  | int | sub_acc1 )

Parameters

  v1 | Vector A
  v2 | Vector B
  acc | Accumulator 1 input
  zero_acc | Zeroing mask for acc1
  sub_mul | Negation mask of multiplication result
  sub_acc1 | Negation mask of acc1

Returns
  Result of operation

## ◆ mac_elem_8_conf() [2/4]

v8caccfloat mac_elem_8_conf | ( | v8cfloat | v1,
|  | v8float | v2,
|  | v8caccfloat | acc,
|  | int | zero_acc,
|  | int | sub_mul,
|  | int | sub_acc1 )

Parameters

  v1 | Vector A
  v2 | Vector B
  acc | Accumulator 1 input
  zero_acc | Zeroing mask for acc1
  sub_mul | Negation mask of multiplication result
  sub_acc1 | Negation mask of acc1

Returns
  Result of operation

## ◆ mac_elem_8_conf() [3/4]

_INLINE v8caccfloat mac_elem_8_conf | ( | v8float | v1,
|  | v8cfloat | v2,
|  | v8caccfloat | acc,
|  | int | zero_acc,
|  | int | sub_mask,
|  | int | sub_mul,
|  | int | sub_acc1 )

Parameters

  v1 | Matrix A
  v2 | Matrix B
  acc | Accumulator 1 input

Returns
  Result of operation

## ◆ mac_elem_8_conf() [4/4]

v8caccfloat mac_elem_8_conf | ( | v8float | v1,
|  | v8cfloat | v2,
|  | v8caccfloat | acc,
|  | int | zero_acc,
|  | int | sub_mul,
|  | int | sub_acc1 )

Parameters

  v1 | Vector A
  v2 | Vector B
  acc | Accumulator 1 input
  zero_acc | Zeroing mask for acc1
  sub_mul | Negation mask of multiplication result
  sub_acc1 | Negation mask of acc1

Returns
  Result of operation

## ◆ msc_elem_8_conf() [1/4]

v8caccfloat msc_elem_8_conf | ( | v8cfloat | v1,
|  | v8cfloat | v2,
|  | v8caccfloat | acc,
|  | int | zero_acc,
|  | int | sub_mul,
|  | int | sub_acc1 )

Parameters

  v1 | Vector A
  v2 | Vector B
  acc | Accumulator 1 input
  zero_acc | Zeroing mask for acc1
  sub_mul | Negation mask of multiplication result
  sub_acc1 | Negation mask of acc1

Returns
  Result of operation

## ◆ msc_elem_8_conf() [2/4]

v8caccfloat msc_elem_8_conf | ( | v8cfloat | v1,
|  | v8float | v2,
|  | v8caccfloat | acc,
|  | int | zero_acc,
|  | int | sub_mul,
|  | int | sub_acc1 )

Parameters

  v1 | Vector A
  v2 | Vector B
  acc | Accumulator 1 input
  zero_acc | Zeroing mask for acc1
  sub_mul | Negation mask of multiplication result
  sub_acc1 | Negation mask of acc1

Returns
  Result of operation

## ◆ msc_elem_8_conf() [3/4]

_INLINE v8caccfloat msc_elem_8_conf | ( | v8float | v1,
|  | v8cfloat | v2,
|  | v8caccfloat | acc,
|  | int | zero_acc,
|  | int | sub_mask,
|  | int | sub_mul,
|  | int | sub_acc1 )

Parameters

  v1 | Matrix A
  v2 | Matrix B
  acc | Accumulator 1 input

Returns
  Result of operation

## ◆ msc_elem_8_conf() [4/4]

v8caccfloat msc_elem_8_conf | ( | v8float | v1,
|  | v8cfloat | v2,
|  | v8caccfloat | acc,
|  | int | zero_acc,
|  | int | sub_mul,
|  | int | sub_acc1 )

Parameters

  v1 | Vector A
  v2 | Vector B
  acc | Accumulator 1 input
  zero_acc | Zeroing mask for acc1
  sub_mul | Negation mask of multiplication result
  sub_acc1 | Negation mask of acc1

Returns
  Result of operation

## ◆ mul_elem_8_conf() [1/4]

v8caccfloat mul_elem_8_conf | ( | v8cfloat | v1,
|  | v8cfloat | v2,
|  | int | sub_mul )

Parameters

  v1 | Vector A
  v2 | Vector B
  sub_mul | Negation mask of multiplication result

Returns
  Result of operation

## ◆ mul_elem_8_conf() [2/4]

v8caccfloat mul_elem_8_conf | ( | v8cfloat | v1,
|  | v8float | v2,
|  | int | sub_mul )

Parameters

  v1 | Vector A
  v2 | Vector B
  sub_mul | Negation mask of multiplication result

Returns
  Result of operation

## ◆ mul_elem_8_conf() [3/4]

_INLINE v8caccfloat mul_elem_8_conf | ( | v8float | v1,
|  | v8cfloat | v2,
|  | int | sub_mask,
|  | int | sub_mul )

Parameters

  v1 | Matrix A
  v2 | Matrix B

Returns
  Result of operation

## ◆ mul_elem_8_conf() [4/4]

v8caccfloat mul_elem_8_conf | ( | v8float | v1,
|  | v8cfloat | v2,
|  | int | sub_mul )

Parameters

  v1 | Vector A
  v2 | Vector B
  sub_mul | Negation mask of multiplication result

Returns
  Result of operation

## ◆ negmsc_elem_8_conf()

v8caccfloat negmsc_elem_8_conf | ( | v8cfloat | v1,
|  | v8cfloat | v2,
|  | v8caccfloat | acc,
|  | int | zero_acc,
|  | int | sub_mul,
|  | int | sub_acc1 )

Parameters

  v1 | Vector A
  v2 | Vector B
  acc | Accumulator 1 input
  zero_acc | Zeroing mask for acc1
  sub_mul | Negation mask of multiplication result
  sub_acc1 | Negation mask of acc1

Returns
  Result of operation

## ◆ negmul_elem_8_conf() [1/2]

v8caccfloat negmul_elem_8_conf | ( | v8cfloat | v1,
|  | v8cfloat | v2,
|  | int | sub_mul )

Parameters

  v1 | Vector A
  v2 | Vector B
  sub_mul | Negation mask of multiplication result

Returns
  Result of operation

## ◆ negmul_elem_8_conf() [2/2]

_INLINE v8caccfloat negmul_elem_8_conf | ( | v8float | v1,
|  | v8cfloat | v2,
|  | int | sub_mask,
|  | int | sub_mul )

Parameters

  v1 | Matrix A
  v2 | Matrix B

Returns
  Result of operation