AI Engine API User Guide (AIE) 2022.2
Special Multiplications

Overview

AIE provides hardware support to accelerate special multiplications that can be used to accelerate specific application use cases like (but not limited to) signal processing.

Classes

struct  aie::sliding_mul_ops< Lanes, Points, CoeffStep, DataStepX, DataStepY, CoeffType, DataType, AccumTag >
 
struct  aie::sliding_mul_sym_ops< Lanes, Points, CoeffStep, DataStepX, DataStepY, CoeffType, DataType, AccumTag >
 
struct  aie::sliding_mul_sym_uct_ops< Lanes, Points, CoeffStep, DataStep, CoeffType, DataType, AccumTag >
 

Typedefs

template<unsigned Lanes, unsigned Points, int CoeffStep, int DataStepX, ElemBaseType CoeffType, ElemBaseType DataType, AccumElemBaseType AccumTag = detail::default_accum_tag_t<CoeffType, DataType>>
using aie::sliding_mul_sym_x_ops = sliding_mul_sym_ops< Lanes, Points, CoeffStep, DataStepX, 1, CoeffType, DataType, AccumTag >
  More...
 
template<unsigned Lanes, unsigned Points, int CoeffStep, int DataStepXY, ElemBaseType CoeffType, ElemBaseType DataType, AccumElemBaseType AccumTag = detail::default_accum_tag_t<CoeffType, DataType>>
using aie::sliding_mul_sym_xy_ops = sliding_mul_sym_ops< Lanes, Points, CoeffStep, DataStepXY, DataStepXY, CoeffType, DataType, AccumTag >
  More...
 
template<unsigned Lanes, unsigned Points, int CoeffStep, int DataStepY, ElemBaseType CoeffType, ElemBaseType DataType, AccumElemBaseType AccumTag = detail::default_accum_tag_t<CoeffType, DataType>>
using aie::sliding_mul_sym_y_ops = sliding_mul_sym_ops< Lanes, Points, CoeffStep, 1, DataStepY, CoeffType, DataType, AccumTag >
  More...
 
template<unsigned Lanes, unsigned Points, int CoeffStep, int DataStepX, ElemBaseType CoeffType, ElemBaseType DataType, AccumElemBaseType AccumTag = detail::default_accum_tag_t<CoeffType, DataType>>
using aie::sliding_mul_x_ops = sliding_mul_ops< Lanes, Points, CoeffStep, DataStepX, 1, CoeffType, DataType, AccumTag >
  More...
 
template<unsigned Lanes, unsigned Points, int CoeffStep, int DataStepXY, ElemBaseType CoeffType, ElemBaseType DataType, AccumElemBaseType AccumTag = detail::default_accum_tag_t<CoeffType, DataType>>
using aie::sliding_mul_xy_ops = sliding_mul_ops< Lanes, Points, CoeffStep, DataStepXY, DataStepXY, CoeffType, DataType, AccumTag >
  More...
 
template<unsigned Lanes, unsigned Points, int CoeffStep, int DataStepY, ElemBaseType CoeffType, ElemBaseType DataType, AccumElemBaseType AccumTag = detail::default_accum_tag_t<CoeffType, DataType>>
using aie::sliding_mul_y_ops = sliding_mul_ops< Lanes, Points, CoeffStep, 1, DataStepY, CoeffType, DataType, AccumTag >
  More...
 

Functions

template<unsigned Lanes, AccumOrOp Acc, Vector VecCoeff = void, Vector VecData = void, Vector... NextVecData>
auto aie::accumulate (const Acc &acc, const VecCoeff &coeff, unsigned coeff_start, const VecData &data, const NextVecData &...next_data) -> operand_base_type_t< Acc >
  More...
 
template<unsigned Lanes, AccumElemBaseType AccumTag = accauto, Vector VecCoeff = void, Vector VecData = void, Vector... NextVecData>
auto aie::accumulate (const VecCoeff &coeff, unsigned coeff_start, const VecData &data, const NextVecData &...next_data) -> accum< std::conditional_t< std::is_same_v< AccumTag, accauto >, detail::default_accum_tag_t< typename VecCoeff::value_type, typename VecData::value_type >, AccumTag >, Lanes >
  More...
 

Class Documentation

◆ aie::sliding_mul_ops

struct aie::sliding_mul_ops
template<unsigned Lanes, unsigned Points, int CoeffStep, int DataStepX, int DataStepY, ElemBaseType CoeffType, ElemBaseType DataType, AccumElemBaseType AccumTag = detail::default_accum_tag_t<CoeffType, DataType>>
struct aie::sliding_mul_ops< Lanes, Points, CoeffStep, DataStepX, DataStepY, CoeffType, DataType, AccumTag >

This type provides a parametrized multiplication that implements the following compute pattern:

DSX = DataStepX
DSY = DataStepY
CS = CoeffStep
P = Points
L = Lanes
c_s = coeff_start
d_s = data_start
out[0] = coeff[c_s] * data[d_s + ] + coeff[c_s + CS] * data[d_s + DSX] + ... + coeff[c_s + (P-1) * CS] * data[d_s + (P-1) * DSX]
out[1] = coeff[c_s] * data[d_s + DSY] + coeff[c_s + CS] * data[d_s + DSY + DSX] + ... + coeff[c_s + (P-1) * CS] * data[d_s + DSY + (P-1) * DSX]
...
out[L-1] = coeff[c_s] * data[d_s + (L-1) * DSY] + coeff[c_s + CS] * data[d_s + (L-1) * DSY + DSX] + ... + coeff[c_s + (P-1) * CS] * data[d_s + (L-1) * DSY + (P-1) * DSX]
Supported parameters for sliding_mul with 48b accumulation
Types (coeff x data)LanesCoeffStepDataStepXDataStepYcoeff_startdata_start
16b x 16b 8
16
1,2,3,41 1 Unsigned smaller than 16Signed
16b x 32b 8
16
1,2,3,41,2,3,41,2
1
Unsigned smaller than 16Signed
32b x 16b 8
16
1,2,3,41,2,3,41,2
1
Unsigned smaller than 16Signed
16b x c16b 4
8
1,2,3,41,2,3,41,2,3,4
1,2
Unsigned smaller than 16Signed
c16b x 16b 4
8
1,2,3,41,2,3,41,2,3,4
1,2
Unsigned smaller than 16Signed
c16b x c16b4
8
1,2,3,41,2,3,41,2,3,4
1,2
Unsigned smaller than 16Signed
c16b x 32b 4
8
1,2,3,41,2,3,41,2,3,4
1,2
Unsigned smaller than 16Signed
32b x c16b 4
8
1,2,3,41,2,3,41,2,3,4
1,2
Unsigned smaller than 16Signed
c32b x 16b 4
8
1,2,3,41,2,3,41,2,3,4
1,2
Unsigned smaller than 16Signed
16b x c32b 4
8
1,2,3,41,2,3,41,2,3,4
1,2
Unsigned smaller than 16Signed
c32b x c16b4 1,2,3,41,2,3,41,2,3,4 Unsigned smaller than 16Signed
c16b x c32b4 1,2,3,41,2,3,41,2,3,4 Unsigned smaller than 16Signed
Supported parameters for sliding_mul with 80b accumulation
Types (coeff x data)LanesCoeffStepDataStepXDataStepYcoeff_startdata_start
32b x 16b 8 1,2,3,41,2,3,41,2 Unsigned smaller than 16Signed
16b x 32b 8 1,2,3,41,2,3,41,2 Unsigned smaller than 16Signed
32b x 32b 4
8
1,2,3,41,2,3,41,2,3,4
1,2
Unsigned smaller than 16Signed
32b x c16b 4 1,2,3,41,2,3,41,2,3,4 Unsigned smaller than 16Signed
c16b x 32b 4 1,2,3,41,2,3,41,2,3,4 Unsigned smaller than 16Signed
c32b x 16b 4 1,2,3,41,2,3,41,2,3,4 Unsigned smaller than 16Signed
16b x c32b 4 1,2,3,41,2,3,41,2,3,4 Unsigned smaller than 16Signed
c32b x c16b4 1,2,3,41,2,3,41,2,3,4 Unsigned smaller than 16Signed
c16b x c32b4 1,2,3,41,2,3,41,2,3,4 Unsigned smaller than 16Signed
c32b x 32b 2
4
1,2,3,41,2,3,41,2,3,4 Unsigned smaller than 16Signed
32b x c32b 2
4
1,2,3,41,2,3,41,2,3,4 Unsigned smaller than 16Signed
c32b x c32b2 1,2,3,41,2,3,41,2,3,4 Unsigned smaller than 16Signed
Supported parameters for sliding_mul with floating point accumulation
Types (coeff x data)LanesCoeffStepDataStepXDataStepYcoeff_startdata_start
float x float 81,2,3,41,2,3,41,2 Unsigned smaller than 16Signed
float x cfloat 41,2,3 1,2,3,41,2,3Unsigned smaller than 16Signed
cfloat x float 41,2,3,41,2,3,41,2,3Unsigned smaller than 16Signed
cfloat x cfloat41,2,3 1,2,3,41,2,3Unsigned smaller than 16Signed
Template Parameters
LanesNumber of output elements.
PointsNumber of data elements used to compute each lane.
CoeffStepStep used to select elements from the coeff buffer. This step is applied to element selection within a lane.
DataStepXStep used to select elements from the data buffer. This step is applied to element selection within a lane.
DataStepYStep used to select elements from the data buffer. This step is applied to element selection accross lanes.
CoeffTypeType of the coefficient elements.
DataTypeType of the data elements.
AccumTagAccumulator tag that specifies the required accumulation bits. The class must be compatible with the result of the multiplication of the coefficient and data types (real/complex).

Public Types

using accum_type = accum< std::conditional_t< std::is_same_v< AccumTag, accauto >, detail::default_accum_tag_t< CoeffType, DataType >, AccumTag >, Lanes >
 
using coeff_type = typename impl_type::coeff_type
 
using data_type = typename impl_type::data_type
 
using impl_type = detail::sliding_mul< Lanes, Points, CoeffStep, DataStepX, DataStepY, accum_bits, CoeffType, DataType >
 
enum class  MulType { Mul , Acc_Mul , NegMul }
 

Static Public Member Functions

template<AccumOrOp Acc, VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type mac (const Acc &acc, const VecCoeff &coeff, unsigned coeff_start, const VecData &data, unsigned data_start)
  More...
 
template<VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type mul (const VecCoeff &coeff, unsigned coeff_start, const VecData &data, unsigned data_start)
  More...
 
template<MulType Mul, VectorOrOp VecCoeff, VectorOrOp VecData, AccumOrOp... Acc>
static constexpr accum_type mul_common (const VecCoeff &coeff, unsigned coeff_start, const VecData &data, unsigned data_start, const Acc &...acc)
 
template<VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type negmul (const VecCoeff &coeff, unsigned coeff_start, const VecData &data, unsigned data_start)
  More...
 

Static Public Attributes

static constexpr unsigned columns_per_mul = impl_type::columns_per_mul
 
static constexpr unsigned lanes = impl_type::lanes
 
static constexpr unsigned lanes_per_mul = impl_type::lanes_per_mul
 
static constexpr unsigned num_mul = impl_type::num_mul
 
static constexpr unsigned points = impl_type::points
 

Member Enumeration Documentation

◆ MulType

template<unsigned Lanes, unsigned Points, int CoeffStep, int DataStepX, int DataStepY, ElemBaseType CoeffType, ElemBaseType DataType, AccumElemBaseType AccumTag = detail::default_accum_tag_t<CoeffType, DataType>>
enum class aie::sliding_mul_ops::MulType
strong
Enumerator
Mul 
Acc_Mul 
NegMul 

Member Function Documentation

◆ mac()

template<unsigned Lanes, unsigned Points, int CoeffStep, int DataStepX, int DataStepY, ElemBaseType CoeffType, ElemBaseType DataType, AccumElemBaseType AccumTag = detail::default_accum_tag_t<CoeffType, DataType>>
template<AccumOrOp Acc, VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type aie::sliding_mul_ops< Lanes, Points, CoeffStep, DataStepX, DataStepY, CoeffType, DataType, AccumTag >::mac ( const Acc &  acc,
const VecCoeff &  coeff,
unsigned  coeff_start,
const VecData &  data,
unsigned  data_start 
)
inlinestaticconstexpr

Performs a multiply-add with the pattern defined by the class parameters using the input coefficient and data arguments.

Parameters
accAccumulator that is added to the result of the multiplication.
coeffVector of coefficients. Vectors limited to 256b and 512b on AIE and AIE-ML respectively.
coeff_startIndex of the first coefficient element to be used in the multiplication.
dataVector of data samples.
data_startIndex of the first data element to be used in the multiplication.

◆ mul()

template<unsigned Lanes, unsigned Points, int CoeffStep, int DataStepX, int DataStepY, ElemBaseType CoeffType, ElemBaseType DataType, AccumElemBaseType AccumTag = detail::default_accum_tag_t<CoeffType, DataType>>
template<VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type aie::sliding_mul_ops< Lanes, Points, CoeffStep, DataStepX, DataStepY, CoeffType, DataType, AccumTag >::mul ( const VecCoeff &  coeff,
unsigned  coeff_start,
const VecData &  data,
unsigned  data_start 
)
inlinestaticconstexpr

Performs the multiplication pattern defined by the class parameters using the input coefficient and data arguments.

Parameters
coeffVector of coefficients. Vectors limited to 256b and 512b on AIE and AIE-ML respectively.
coeff_startIndex of the first coefficient element to be used in the multiplication.
dataVector of data samples.
data_startIndex of the first data element to be used in the multiplication.

◆ negmul()

template<unsigned Lanes, unsigned Points, int CoeffStep, int DataStepX, int DataStepY, ElemBaseType CoeffType, ElemBaseType DataType, AccumElemBaseType AccumTag = detail::default_accum_tag_t<CoeffType, DataType>>
template<VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type aie::sliding_mul_ops< Lanes, Points, CoeffStep, DataStepX, DataStepY, CoeffType, DataType, AccumTag >::negmul ( const VecCoeff &  coeff,
unsigned  coeff_start,
const VecData &  data,
unsigned  data_start 
)
inlinestaticconstexpr

Performs a negation of the multiplication pattern defined by the class parameters using the input coefficient and data arguments.

Parameters
coeffVector of coefficients. Vectors limited to 256b and 512b on AIE and AIE-ML respectively.
coeff_startIndex of the first coefficient element to be used in the multiplication.
dataVector of data samples.
data_startIndex of the first data element to be used in the multiplication.

◆ aie::sliding_mul_sym_ops

struct aie::sliding_mul_sym_ops
template<unsigned Lanes, unsigned Points, int CoeffStep, int DataStepX, int DataStepY, ElemBaseType CoeffType, ElemBaseType DataType, AccumElemBaseType AccumTag = detail::default_accum_tag_t<CoeffType, DataType>>
struct aie::sliding_mul_sym_ops< Lanes, Points, CoeffStep, DataStepX, DataStepY, CoeffType, DataType, AccumTag >

This type provides a parametrized multiplication that implements the following compute pattern:

L = Lanes
P = Points
CS = CoeffStep
DSX = DataStepX
DSY = DataStepY
c_s = coeff_start
d_s = data_start
OP = Operation type: '+' for symmetric, '-' for anisymmetric
out[0] = coeff[c_s] * (data[d_s + ] OP data[d_s + (P-1) * DSX]) + coeff[c_s + CS] * (data[d_s + DSX] OP data[d_s + (P-2) * DSX]) + ...
+ coeff[c_s + (P/2-1 * CS)] * (data[d_s + (P/2-1) * DSX] OP data[d_s + P/2 * DSX]);
out[1] = coeff[c_s] * (data[d_s + DSY] OP data[d_s + DSY + (P-1) * DSX]) + coeff[c_s + CS] * (data[d_s + DSY + DSX] OP data[d_s + DSY + (P-2) * DSX]) + ...
+ coeff[c_s + (P/2-1 * CS)] * (data[d_s + DSY + (P/2-1) * DSX] OP data[d_s + DSY + P/2 * DSX]);
...
out[L-1] = coeff[c_s] * (data[d_s + (L-1) * DSY] OP data[d_s + (L-1) * DSY + (P-1) * DSX]) + coeff[c_s + CS] * (data[d_s + (L-1) * DSY + DSX] OP data[d_s + (L-1) * DSY + (P-2) * DSX]) + ...
+ coeff[c_s + (P/2-1 * CS)] * (data[d_s + (L-1) * DSY + (P/2-1) * DSX] OP data[d_s + (L-1) * DSY + P/2 * DSX]);
Operation
Definition: expr.hpp:62
Supported parameters for sliding_mul_sym with 48b accumulation
Types (coeff x data)LanesCoeffStepDataStepXDataStepYcoeff_startdata_start
16b x 16b 8
16
1,2,3,41 1 Unsigned smaller than 16Signed
16b x 32b 8
16
1,2,3,41,2,3,41,2
1
Unsigned smaller than 16Signed
32b x 16b 8
16
1,2,3,41,2,3,41,2
1
Unsigned smaller than 16Signed
16b x c16b 4
8
1,2,3,41,2,3,41,2,3,4
1,2
Unsigned smaller than 16Signed
c16b x 16b 4
8
1,2,3,41,2,3,41,2,3,4
1,2
Unsigned smaller than 16Signed
c16b x c16b4
8
1,2,3,41,2,3,41,2,3,4
1,2
Unsigned smaller than 16Signed
c16b x 32b 4
8
1,2,3,41,2,3,41,2,3,4
1,2
Unsigned smaller than 16Signed
32b x c16b 4
8
1,2,3,41,2,3,41,2,3,4
1,2
Unsigned smaller than 16Signed
c32b x 16b 4
8
1,2,3,41,2,3,41,2,3,4
1,2
Unsigned smaller than 16Signed
16b x c32b 4
8
1,2,3,41,2,3,41,2,3,4
1,2
Unsigned smaller than 16Signed
c32b x c16b4 1,2,3,41,2,3,41,2,3,4 Unsigned smaller than 16Signed
c16b x c32b4 1,2,3,41,2,3,41,2,3,4 Unsigned smaller than 16Signed
Supported parameters for sliding_mul_sym with 80b accumulation
Types (coeff x data)LanesCoeffStepDataStepXDataStepYcoeff_startdata_start
32b x 16b 8 1,2,3,41,2,3,41,2 Unsigned smaller than 16Signed
16b x 32b 8 1,2,3,41,2,3,41,2 Unsigned smaller than 16Signed
32b x 32b 4 1,2,3,41,2,3,41,2,3,4
1,2
Unsigned smaller than 16Signed
32b x c16b 4 1,2,3,41,2,3,41,2,3,4 Unsigned smaller than 16Signed
c16b x 32b 4 1,2,3,41,2,3,41,2,3,4 Unsigned smaller than 16Signed
c32b x 16b 4 1,2,3,41,2,3,41,2,3,4 Unsigned smaller than 16Signed
16b x c32b 4 1,2,3,41,2,3,41,2,3,4 Unsigned smaller than 16Signed
c32b x c16b4 1,2,3,41,2,3,41,2,3,4 Unsigned smaller than 16Signed
c16b x c32b4 1,2,3,41,2,3,41,2,3,4 Unsigned smaller than 16Signed
c32b x 32b 2
4
1,2,3,41,2,3,41,2,3,4 Unsigned smaller than 16Signed
32b x c32b 2
4
1,2,3,41,2,3,41,2,3,4 Unsigned smaller than 16Signed
c32b x c32b2 1,2,3,41,2,3,41,2,3,4 Unsigned smaller than 16Signed
Template Parameters
LanesNumber of output elements.
PointsNumber of data elements used to compute each lane.
CoeffStepStep used to select elements from the coeff buffer. This step is applied to element selection within a lane.
DataStepXStep used to select elements from the data buffer. This step is applied to element selection within a lane.
DataStepYStep used to select elements from the data buffer. This step is applied to element selection across lanes.
CoeffTypeType of the coefficient elements.
DataTypeType of the data elements.
AccumTagAccumulator tag that specifies the required accumulation bits. The class must be compatible with the result of the multiplication of the coefficient and data types (real/complex).

Public Types

using accum_type = accum< std::conditional_t< std::is_same_v< AccumTag, accauto >, detail::default_accum_tag_t< CoeffType, DataType >, AccumTag >, Lanes >
 
using coeff_type = typename impl_type::coeff_type
 
using data_type = typename impl_type::data_type
 
using impl_type = detail::sliding_mul_sym< Lanes, Points, CoeffStep, DataStepX, DataStepY, accum_bits, CoeffType, DataType >
 
enum class  SymMulType { Sym , Antisym , Acc_Sym , Acc_Antisym }
 

Static Public Member Functions

template<AccumOrOp Acc, VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type mac_antisym (const Acc &acc, const VecCoeff &coeff, unsigned coeff_start, const VecData &data, unsigned data_start)
  More...
 
template<AccumOrOp Acc, VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type mac_antisym (const Acc &acc, const VecCoeff &coeff, unsigned coeff_start, const VecData &data, unsigned ldata_start, unsigned rdata_start)
  More...
 
template<AccumOrOp Acc, VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type mac_antisym (const Acc &acc, const VecCoeff &coeff, unsigned coeff_start, const VecData &ldata, unsigned ldata_start, const VecData &rdata, unsigned rdata_start)
  More...
 
template<AccumOrOp Acc, VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type mac_sym (const Acc &acc, const VecCoeff &coeff, unsigned coeff_start, const VecData &data, unsigned data_start)
  More...
 
template<AccumOrOp Acc, VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type mac_sym (const Acc &acc, const VecCoeff &coeff, unsigned coeff_start, const VecData &data, unsigned ldata_start, unsigned rdata_start)
  More...
 
template<AccumOrOp Acc, VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type mac_sym (const Acc &acc, const VecCoeff &coeff, unsigned coeff_start, const VecData &ldata, unsigned ldata_start, const VecData &rdata, unsigned rdata_start)
  More...
 
template<VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type mul_antisym (const VecCoeff &coeff, unsigned coeff_start, const VecData &data, unsigned data_start)
  More...
 
template<VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type mul_antisym (const VecCoeff &coeff, unsigned coeff_start, const VecData &data, unsigned ldata_start, unsigned rdata_start)
  More...
 
template<VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type mul_antisym (const VecCoeff &coeff, unsigned coeff_start, const VecData &ldata, unsigned ldata_start, const VecData &rdata, unsigned rdata_start)
  More...
 
template<SymMulType MulType, VectorOrOp VecCoeff, VectorOrOp VecData, AccumOrOp... Acc>
static constexpr accum_type mul_common (const VecCoeff &coeff, unsigned coeff_start, const VecData &data, unsigned data_start, const Acc &...acc)
 
template<SymMulType MulType, VectorOrOp VecCoeff, VectorOrOp VecData, AccumOrOp... Acc>
static constexpr accum_type mul_common (const VecCoeff &coeff, unsigned coeff_start, const VecData &data, unsigned ldata_start, unsigned rdata_start, const Acc &...acc)
 
template<SymMulType MulType, VectorOrOp VecCoeff, VectorOrOp VecData, AccumOrOp... Acc>
static constexpr accum_type mul_common (const VecCoeff &coeff, unsigned coeff_start, const VecData &ldata, unsigned ldata_start, const VecData &rdata, unsigned rdata_start, const Acc &...acc)
 
template<VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type mul_sym (const VecCoeff &coeff, unsigned coeff_start, const VecData &data, unsigned data_start)
  More...
 
template<VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type mul_sym (const VecCoeff &coeff, unsigned coeff_start, const VecData &data, unsigned ldata_start, unsigned rdata_start)
  More...
 
template<VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type mul_sym (const VecCoeff &coeff, unsigned coeff_start, const VecData &ldata, unsigned ldata_start, const VecData &rdata, unsigned rdata_start)
  More...
 

Static Public Attributes

static constexpr unsigned columns_per_mul = impl_type::columns_per_mul
 
static constexpr unsigned lanes = impl_type::lanes
 
static constexpr unsigned lanes_per_mul = impl_type::lanes_per_mul
 
static constexpr unsigned num_mul = impl_type::num_mul
 
static constexpr unsigned points = impl_type::points
 

Member Enumeration Documentation

◆ SymMulType

template<unsigned Lanes, unsigned Points, int CoeffStep, int DataStepX, int DataStepY, ElemBaseType CoeffType, ElemBaseType DataType, AccumElemBaseType AccumTag = detail::default_accum_tag_t<CoeffType, DataType>>
enum class aie::sliding_mul_sym_ops::SymMulType
strong
Enumerator
Sym 
Antisym 
Acc_Sym 
Acc_Antisym 

Member Function Documentation

◆ mac_antisym() [1/3]

template<unsigned Lanes, unsigned Points, int CoeffStep, int DataStepX, int DataStepY, ElemBaseType CoeffType, ElemBaseType DataType, AccumElemBaseType AccumTag = detail::default_accum_tag_t<CoeffType, DataType>>
template<AccumOrOp Acc, VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type aie::sliding_mul_sym_ops< Lanes, Points, CoeffStep, DataStepX, DataStepY, CoeffType, DataType, AccumTag >::mac_antisym ( const Acc &  acc,
const VecCoeff &  coeff,
unsigned  coeff_start,
const VecData &  data,
unsigned  data_start 
)
inlinestaticconstexpr

Performs the antisymmetric multiply-add pattern defined by the class parameters using the input coefficient and data arguments. This variant allows two separate start indices for left/right elements.

Parameters
accAccumulator to be added to the result of the multiplication.
coeffVector of coefficients. On AIE the size is limited to vectors of up to 256 bits.
coeff_startIndex of the first coefficient element to be used in the multiplication.
dataVector of data samples.
data_startIndex of the first data element to be used in the multiplication.

◆ mac_antisym() [2/3]

template<unsigned Lanes, unsigned Points, int CoeffStep, int DataStepX, int DataStepY, ElemBaseType CoeffType, ElemBaseType DataType, AccumElemBaseType AccumTag = detail::default_accum_tag_t<CoeffType, DataType>>
template<AccumOrOp Acc, VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type aie::sliding_mul_sym_ops< Lanes, Points, CoeffStep, DataStepX, DataStepY, CoeffType, DataType, AccumTag >::mac_antisym ( const Acc &  acc,
const VecCoeff &  coeff,
unsigned  coeff_start,
const VecData &  data,
unsigned  ldata_start,
unsigned  rdata_start 
)
inlinestaticconstexpr

Performs the antisymmetric multiply-add pattern defined by the class parameters using the input coefficient and data arguments. This variant allows two separate start indices for left/right elements.

Parameters
accAccumulator to be added to the result of the multiplication.
coeffVector of coefficients. On AIE the size is limited to vectors of up to 256 bits.
coeff_startIndex of the first coefficient element to be used in the multiplication.
dataVector of data samples.
ldata_startIndex of the first left data element to be used in the multiplication.
rdata_startIndex of the first right data element to be used in the multiplication.

◆ mac_antisym() [3/3]

template<unsigned Lanes, unsigned Points, int CoeffStep, int DataStepX, int DataStepY, ElemBaseType CoeffType, ElemBaseType DataType, AccumElemBaseType AccumTag = detail::default_accum_tag_t<CoeffType, DataType>>
template<AccumOrOp Acc, VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type aie::sliding_mul_sym_ops< Lanes, Points, CoeffStep, DataStepX, DataStepY, CoeffType, DataType, AccumTag >::mac_antisym ( const Acc &  acc,
const VecCoeff &  coeff,
unsigned  coeff_start,
const VecData &  ldata,
unsigned  ldata_start,
const VecData &  rdata,
unsigned  rdata_start 
)
inlinestaticconstexpr

Performs the antisymmetric multiply-add pattern defined by the class parameters using the input coefficient and data arguments. This variant uses two input buffers for left/right elements.

Parameters
accAccumulator to be added to the result of the multiplication.
coeffVector of coefficients. On AIE the size is limited to vectors of up to 256 bits.
coeff_startIndex of the first coefficient element to be used in the multiplication.
ldataVector of left data samples. The size is limitted to vectors of up to 512 bits.
ldata_startIndex of the first left data element to be used in the multiplication.
rdataVector of right data samples. The size is limitted to vectors of up to 512 bits.
rdata_startIndex of the first right data element to be used in the multiplication.

◆ mac_sym() [1/3]

template<unsigned Lanes, unsigned Points, int CoeffStep, int DataStepX, int DataStepY, ElemBaseType CoeffType, ElemBaseType DataType, AccumElemBaseType AccumTag = detail::default_accum_tag_t<CoeffType, DataType>>
template<AccumOrOp Acc, VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type aie::sliding_mul_sym_ops< Lanes, Points, CoeffStep, DataStepX, DataStepY, CoeffType, DataType, AccumTag >::mac_sym ( const Acc &  acc,
const VecCoeff &  coeff,
unsigned  coeff_start,
const VecData &  data,
unsigned  data_start 
)
inlinestaticconstexpr

Performs the symmetric multiply-add pattern defined by the class parameters using the input coefficient and data arguments.

Parameters
accAccumulator to be added to the result of the multiplication.
coeffVector of coefficients. On AIE the size is limited to vectors of up to 256 bits.
coeff_startIndex of the first coefficient element to be used in the multiplication.
dataVector of data samples.
data_startIndex of the first data element to be used in the multiplication.

◆ mac_sym() [2/3]

template<unsigned Lanes, unsigned Points, int CoeffStep, int DataStepX, int DataStepY, ElemBaseType CoeffType, ElemBaseType DataType, AccumElemBaseType AccumTag = detail::default_accum_tag_t<CoeffType, DataType>>
template<AccumOrOp Acc, VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type aie::sliding_mul_sym_ops< Lanes, Points, CoeffStep, DataStepX, DataStepY, CoeffType, DataType, AccumTag >::mac_sym ( const Acc &  acc,
const VecCoeff &  coeff,
unsigned  coeff_start,
const VecData &  data,
unsigned  ldata_start,
unsigned  rdata_start 
)
inlinestaticconstexpr

Performs the symmetric multiply-add pattern defined by the class parameters using the input coefficient and data arguments. This variant allows two separate start indices for left/right elements.

Parameters
accAccumulator to be added to the result of the multiplication.
coeffVector of coefficients. On AIE the size is limited to vectors of up to 256 bits.
coeff_startIndex of the first coefficient element to be used in the multiplication.
dataVector of data samples.
ldata_startIndex of the first left data element to be used in the multiplication.
rdata_startIndex of the first right data element to be used in the multiplication.

◆ mac_sym() [3/3]

template<unsigned Lanes, unsigned Points, int CoeffStep, int DataStepX, int DataStepY, ElemBaseType CoeffType, ElemBaseType DataType, AccumElemBaseType AccumTag = detail::default_accum_tag_t<CoeffType, DataType>>
template<AccumOrOp Acc, VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type aie::sliding_mul_sym_ops< Lanes, Points, CoeffStep, DataStepX, DataStepY, CoeffType, DataType, AccumTag >::mac_sym ( const Acc &  acc,
const VecCoeff &  coeff,
unsigned  coeff_start,
const VecData &  ldata,
unsigned  ldata_start,
const VecData &  rdata,
unsigned  rdata_start 
)
inlinestaticconstexpr

Performs the symmetric multiply-add pattern defined by the class parameters using the input coefficient and data arguments. This variant uses two input buffers for left/right elements.

Parameters
accAccumulator to be added to the result of the multiplication.
coeffVector of coefficients. On AIE the size is limited to vectors of up to 256 bits.
coeff_startIndex of the first coefficient element to be used in the multiplication.
ldataVector of left data samples. The size is limitted to vectors of up to 512 bits.
ldata_startIndex of the first left data element to be used in the multiplication.
rdataVector of right data samples. The size is limitted to vectors of up to 512 bits.
rdata_startIndex of the first right data element to be used in the multiplication.

◆ mul_antisym() [1/3]

template<unsigned Lanes, unsigned Points, int CoeffStep, int DataStepX, int DataStepY, ElemBaseType CoeffType, ElemBaseType DataType, AccumElemBaseType AccumTag = detail::default_accum_tag_t<CoeffType, DataType>>
template<VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type aie::sliding_mul_sym_ops< Lanes, Points, CoeffStep, DataStepX, DataStepY, CoeffType, DataType, AccumTag >::mul_antisym ( const VecCoeff &  coeff,
unsigned  coeff_start,
const VecData &  data,
unsigned  data_start 
)
inlinestaticconstexpr

Performs the antisymmetric multiplication pattern defined by the class parameters using the input coefficient and data arguments. This variant allows two separate start indices for left/right elements.

Parameters
coeffVector of coefficients. On AIE the size is limited to vectors of up to 256 bits.
coeff_startIndex of the first coefficient element to be used in the multiplication.
dataVector of data samples.
data_startIndex of the first data element to be used in the multiplication.

◆ mul_antisym() [2/3]

template<unsigned Lanes, unsigned Points, int CoeffStep, int DataStepX, int DataStepY, ElemBaseType CoeffType, ElemBaseType DataType, AccumElemBaseType AccumTag = detail::default_accum_tag_t<CoeffType, DataType>>
template<VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type aie::sliding_mul_sym_ops< Lanes, Points, CoeffStep, DataStepX, DataStepY, CoeffType, DataType, AccumTag >::mul_antisym ( const VecCoeff &  coeff,
unsigned  coeff_start,
const VecData &  data,
unsigned  ldata_start,
unsigned  rdata_start 
)
inlinestaticconstexpr

Performs the antisymmetric multiplication pattern defined by the class parameters using the input coefficient and data arguments. This variant allows two separate start indices for left/right elements.

Parameters
coeffVector of coefficients. On AIE the size is limited to vectors of up to 256 bits.
coeff_startIndex of the first coefficient element to be used in the multiplication.
dataVector of data samples.
ldata_startIndex of the first left data element to be used in the multiplication.
rdata_startIndex of the first right data element to be used in the multiplication.

◆ mul_antisym() [3/3]

template<unsigned Lanes, unsigned Points, int CoeffStep, int DataStepX, int DataStepY, ElemBaseType CoeffType, ElemBaseType DataType, AccumElemBaseType AccumTag = detail::default_accum_tag_t<CoeffType, DataType>>
template<VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type aie::sliding_mul_sym_ops< Lanes, Points, CoeffStep, DataStepX, DataStepY, CoeffType, DataType, AccumTag >::mul_antisym ( const VecCoeff &  coeff,
unsigned  coeff_start,
const VecData &  ldata,
unsigned  ldata_start,
const VecData &  rdata,
unsigned  rdata_start 
)
inlinestaticconstexpr

Performs the antisymmetric multiplication pattern defined by the class parameters using the input coefficient and data arguments. This variant uses two input buffers for left/right elements.

Parameters
coeffVector of coefficients. On AIE the size is limited to vectors of up to 256 bits.
coeff_startIndex of the first coefficient element to be used in the multiplication.
ldataVector of left data samples. The size is limitted to vectors of up to 512 bits.
ldata_startIndex of the first left data element to be used in the multiplication.
rdataVector of right data samples. The size is limitted to vectors of up to 512 bits.
rdata_startIndex of the first right data element to be used in the multiplication.

◆ mul_sym() [1/3]

template<unsigned Lanes, unsigned Points, int CoeffStep, int DataStepX, int DataStepY, ElemBaseType CoeffType, ElemBaseType DataType, AccumElemBaseType AccumTag = detail::default_accum_tag_t<CoeffType, DataType>>
template<VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type aie::sliding_mul_sym_ops< Lanes, Points, CoeffStep, DataStepX, DataStepY, CoeffType, DataType, AccumTag >::mul_sym ( const VecCoeff &  coeff,
unsigned  coeff_start,
const VecData &  data,
unsigned  data_start 
)
inlinestaticconstexpr

Performs the symmetric multiplication pattern defined by the class parameters using the input coefficient and data arguments.

Parameters
coeffVector of coefficients. On AIE the size is limited to vectors of up to 256 bits.
coeff_startIndex of the first coefficient element to be used in the multiplication.
dataVector of data samples.
data_startIndex of the first data element to be used in the multiplication.

◆ mul_sym() [2/3]

template<unsigned Lanes, unsigned Points, int CoeffStep, int DataStepX, int DataStepY, ElemBaseType CoeffType, ElemBaseType DataType, AccumElemBaseType AccumTag = detail::default_accum_tag_t<CoeffType, DataType>>
template<VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type aie::sliding_mul_sym_ops< Lanes, Points, CoeffStep, DataStepX, DataStepY, CoeffType, DataType, AccumTag >::mul_sym ( const VecCoeff &  coeff,
unsigned  coeff_start,
const VecData &  data,
unsigned  ldata_start,
unsigned  rdata_start 
)
inlinestaticconstexpr

Performs the symmetric multiplication pattern defined by the class parameters using the input coefficient and data arguments. This variant allows two separate start indices for left/right elements.

Parameters
coeffVector of coefficients. On AIE the size is limited to vectors of up to 256 bits.
coeff_startIndex of the first coefficient element to be used in the multiplication.
dataVector of data samples.
ldata_startIndex of the first left data element to be used in the multiplication.
rdata_startIndex of the first right data element to be used in the multiplication.

◆ mul_sym() [3/3]

template<unsigned Lanes, unsigned Points, int CoeffStep, int DataStepX, int DataStepY, ElemBaseType CoeffType, ElemBaseType DataType, AccumElemBaseType AccumTag = detail::default_accum_tag_t<CoeffType, DataType>>
template<VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type aie::sliding_mul_sym_ops< Lanes, Points, CoeffStep, DataStepX, DataStepY, CoeffType, DataType, AccumTag >::mul_sym ( const VecCoeff &  coeff,
unsigned  coeff_start,
const VecData &  ldata,
unsigned  ldata_start,
const VecData &  rdata,
unsigned  rdata_start 
)
inlinestaticconstexpr

Performs the symmetric multiplication pattern defined by the class parameters using the input coefficient and data arguments. This variant uses two input buffers for left/right elements.

Parameters
coeffVector of coefficients. On AIE the size is limited to vectors of up to 256 bits.
coeff_startIndex of the first coefficient element to be used in the multiplication.
ldataVector of left data samples. The size is limitted to vectors of up to 512 bits.
ldata_startIndex of the first left data element to be used in the multiplication.
rdataVector of right data samples. The size is limitted to vectors of up to 512 bits.
rdata_startIndex of the first right data element to be used in the multiplication.

◆ aie::sliding_mul_sym_uct_ops

struct aie::sliding_mul_sym_uct_ops
template<unsigned Lanes, unsigned Points, int CoeffStep, int DataStep, ElemBaseType CoeffType, ElemBaseType DataType, AccumElemBaseType AccumTag = detail::default_accum_tag_t<CoeffType, DataType>>
struct aie::sliding_mul_sym_uct_ops< Lanes, Points, CoeffStep, DataStep, CoeffType, DataType, AccumTag >

This type provides a parametrized multiplication across the lower half of its lanes (equivalent to sliding_mul_sym_ops), and upshifts one selected set of data in the upper half of the lanes.

It implements the following compute pattern:

L = Lanes
P = Points
CS = CoeffStep
DS = DataStep
c_s = coeff_start
d_s = data_start
ups = uct_shift
out[0] = coeff[c_s] * (data[d_s + ] + data[d_s + (P-1) * DS]) + coeff[c_s + CS] * (data[d_s + DS] + data[d_s + (P-2) * DS]) + ...
+ coeff[c_s + (P/2-1 * CS)] * (data[d_s + (P/2-1) * DS] + data[d_s + P/2 * DS]);
out[1] = coeff[c_s] * (data[d_s + DS] + data[d_s + P * DS]) + coeff[c_s + CS] * (data[d_s + 2 * DS] + data[d_s + (P-1) * DS]) + ...
+ coeff[c_s + (P/2-1 * CS)] * (data[d_s + P/2 * DS] + data[d_s + (P/2+1) * DS]);
...
out[L/2-1] = coeff[c_s] * (data[d_s + (L/2-1) * DS] + data[d_s + (P+L/2-2) * DS]) + coeff[c_s + CS] * (data[d_s + L/2 * DS] + data[d_s + (P+L/2-3) * DS]) + ...
+ coeff[c_s + (P/2-1 * CS)] * (data[d_s + (P/2+L/2-2) * DS] + data[d_s + (P/2+L/2-1) * DS]);
out[L/2] = data[d_s + P/2 * DS] << ups
out[L/2+1] = data[d_s + (P/2+1) * DS] << ups
...
out[L-1] = data[d_s + (P/2+L/2-1) * DS] << ups
Supported parameters for sliding_mul_sym_uct with 48b accumulation
Types (coeff x data)LanesCoeffStepDataStepXDataStepYcoeff_startdata_start
c16b x c16b41,2,3,41,2,3,41,2,3,4Unsigned smaller than 16Signed
32b x c16b 41,2,3,41,2,3,41,2,3,4Unsigned smaller than 16Signed
c32b x c16b41,2,3,41,2,3,41,2,3,4Unsigned smaller than 16Signed
Template Parameters
LanesNumber of output elements.
PointsNumber of data elements used to compute each lane in the first half of the output Lanes.
CoeffStepStep used to select elements from the coeff buffer. This step is applied to element selection within a lane.
DataStepStep used to select elements from the data buffer. This step is applied to element selection within a lane and across lanes.
CoeffTypeType of the coefficient elements.
DataTypeType of the data elements.
AccumTagAccumulator tag that specifies the required accumulation bits. The class must be compatible with the result of the multiplication of the coefficient and data types (real/complex).

Public Types

using accum_type = accum< std::conditional_t< std::is_same_v< AccumTag, accauto >, detail::default_accum_tag_t< CoeffType, DataType >, AccumTag >, Lanes >
 
using coeff_type = typename impl_type::coeff_type
 
using data_type = typename impl_type::data_type
 
using impl_type = detail::sliding_mul_sym_uct< Lanes, Points, CoeffStep, DataStep, accum_bits, CoeffType, DataType >
 
enum class  SymMulType { Sym , Antisym , Acc_Sym , Acc_Antisym }
 

Static Public Member Functions

template<AccumOrOp Acc, VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type mac_antisym_uct (const Acc &acc, const VecCoeff &coeff, unsigned coeff_start, const VecData &data, unsigned data_start, unsigned uct_shift)
 
template<AccumOrOp Acc, VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type mac_antisym_uct (const Acc &acc, const VecCoeff &coeff, unsigned coeff_start, const VecData &ldata, unsigned ldata_start, const VecData &rdata, unsigned rdata_start, unsigned uct_shift)
 
template<AccumOrOp Acc, VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type mac_sym_uct (const Acc &acc, const VecCoeff &coeff, unsigned coeff_start, const VecData &data, unsigned data_start, unsigned uct_shift)
 
template<AccumOrOp Acc, VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type mac_sym_uct (const Acc &acc, const VecCoeff &coeff, unsigned coeff_start, const VecData &ldata, unsigned ldata_start, const VecData &rdata, unsigned rdata_start, unsigned uct_shift)
 
template<VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type mul_antisym_uct (const VecCoeff &coeff, unsigned coeff_start, const VecData &data, unsigned data_start, unsigned uct_shift)
 
template<VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type mul_antisym_uct (const VecCoeff &coeff, unsigned coeff_start, const VecData &ldata, unsigned ldata_start, const VecData &rdata, unsigned rdata_start, unsigned uct_shift)
 
template<SymMulType MulType, VectorOrOp VecCoeff, VectorOrOp VecData, AccumOrOp... Acc>
static constexpr accum_type mul_common (const VecCoeff &coeff, unsigned coeff_start, const VecData &data, unsigned data_start, unsigned uct_shift, const Acc &...acc)
 
template<SymMulType MulType, VectorOrOp VecCoeff, VectorOrOp VecData, AccumOrOp... Acc>
static constexpr accum_type mul_common (const VecCoeff &coeff, unsigned coeff_start, const VecData &ldata, unsigned ldata_start, const VecData &rdata, unsigned rdata_start, unsigned uct_shift, const Acc &...acc)
 
template<VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type mul_sym_uct (const VecCoeff &coeff, unsigned coeff_start, const VecData &data, unsigned data_start, unsigned uct_shift)
 
template<VectorOrOp VecCoeff, VectorOrOp VecData>
static constexpr accum_type mul_sym_uct (const VecCoeff &coeff, unsigned coeff_start, const VecData &ldata, unsigned ldata_start, const VecData &rdata, unsigned rdata_start, unsigned uct_shift)
 

Static Public Attributes

static constexpr unsigned columns_per_mul = impl_type::columns_per_mul
 
static constexpr unsigned lanes = impl_type::lanes
 
static constexpr unsigned lanes_per_mul = impl_type::lanes_per_mul
 
static constexpr unsigned num_mul = impl_type::num_mul
 
static constexpr unsigned points = impl_type::points
 

Member Enumeration Documentation

◆ SymMulType

template<unsigned Lanes, unsigned Points, int CoeffStep, int DataStep, ElemBaseType CoeffType, ElemBaseType DataType, AccumElemBaseType AccumTag = detail::default_accum_tag_t<CoeffType, DataType>>
enum class aie::sliding_mul_sym_uct_ops::SymMulType
strong
Enumerator
Sym 
Antisym 
Acc_Sym 
Acc_Antisym 

Typedef Documentation

◆ sliding_mul_sym_x_ops

template<unsigned Lanes, unsigned Points, int CoeffStep, int DataStepX, ElemBaseType CoeffType, ElemBaseType DataType, AccumElemBaseType AccumTag = detail::default_accum_tag_t<CoeffType, DataType>>
using aie::sliding_mul_sym_x_ops = typedef sliding_mul_sym_ops<Lanes, Points, CoeffStep, DataStepX, 1, CoeffType, DataType, AccumTag>

Similar to sliding_mul_sym_ops, but DataStepY is always 1.

L = Lanes
P = Points
CS = CoeffStep
DSX = DataStepX
c_s = coeff_start
d_s = data_start
out[0] = coeff[c_s] * (data[d_s + ] + data[d_s + (P-1) * DSX]) + coeff[c_s + CS] * (data[d_s + DSX] + data[d_s + (P-2) * DSX]) + ...
+ coeff[c_s + (P/2-1 * CS)] * (data[d_s + (P/2-1) * DSX] + data[d_s + P/2 * DSX]);
out[1] = coeff[c_s] * (data[d_s + 1] + data[d_s + 1 + (P-1) * DSX]) + coeff[c_s + CS] * (data[d_s + 1 + DSX] + data[d_s + 1 + (P-2) * DSX]) + ...
+ coeff[c_s + (P/2-1 * CS)] * (data[d_s + 1 + (P/2-1) * DSX] + data[d_s + 1 + P/2 * DSX]);
...
out[L-1] = coeff[c_s] * (data[d_s + (L-1)] + data[d_s + (L-1) + (P-1) * DSX]) + coeff[c_s + CS] * (data[d_s + (L-1) + DSX] + data[d_s + (L-1) + (P-2) * DSX]) + ...
+ coeff[c_s + (P/2-1 * CS)] * (data[d_s + (L-1) + (P/2-1) * DSX] + data[d_s + (L-1) + P/2 * DSX]);
Template Parameters
LanesNumber of output elements.
PointsNumber of data elements used to compute each lane.
CoeffStepStep used to select elements from the coeff buffer. This step is applied to element selection within a lane.
DataStepXStep used to select elements from the data buffer. This step is applied to element selection within a lane.
CoeffTypeType of the coefficient elements.
DataTypeType of the data elements.
AccumTagAccumulator tag that specifies the required accumulation bits. The class must be compatible with the result of the multiplication of the coefficient and data types (real/complex).

◆ sliding_mul_sym_xy_ops

template<unsigned Lanes, unsigned Points, int CoeffStep, int DataStepXY, ElemBaseType CoeffType, ElemBaseType DataType, AccumElemBaseType AccumTag = detail::default_accum_tag_t<CoeffType, DataType>>
using aie::sliding_mul_sym_xy_ops = typedef sliding_mul_sym_ops<Lanes, Points, CoeffStep, DataStepXY, DataStepXY, CoeffType, DataType, AccumTag>

Similar to sliding_mul_sym_ops, but DataStepX is equal to DataStepY.

L = Lanes
P = Points
CS = CoeffStep
DS = DataStepXY
c_s = coeff_start
d_s = data_start
out[0] = coeff[c_s] * (data[d_s + ] + data[d_s + (P-1) * DS]) + coeff[c_s + CS] * (data[d_s + DS] + data[d_s + (P-2) * DS]) + ...
+ coeff[c_s + (P/2-1 * CS)] * (data[d_s + (P/2-1) * DS] + data[d_s + P/2 * DS]);
out[1] = coeff[c_s] * (data[d_s + DS] + data[d_s + P * DS]) + coeff[c_s + CS] * (data[d_s + 2 * DS] + data[d_s + (P-1) * DS]) + ...
+ coeff[c_s + (P/2-1 * CS)] * (data[d_s + P/2 * DS] + data[d_s + (P/2+1) * DS]);
...
out[L-1] = coeff[c_s] * (data[d_s + (L-1) * DS] + data[d_s + (P+L-2) * DS]) + coeff[c_s + CS] * (data[d_s + L * DS] + data[d_s + (P+L-3) * DS]) + ...
+ coeff[c_s + (P/2-1 * CS)] * (data[d_s + (P/2+L-2) * DS] + data[d_s + (P/2+L-1) * DS]);
Template Parameters
LanesNumber of output elements.
PointsNumber of data elements used to compute each lane.
CoeffStepStep used to select elements from the coeff buffer. This step is applied to element selection within a lane.
DataStepXYStep used to select elements from the data buffer. This step is applied to element selection within a lane and across lanes.
CoeffTypeType of the coefficient elements.
DataTypeType of the data elements.
AccumTagAccumulator tag that specifies the required accumulation bits. The class must be compatible with the result of the multiplication of the coefficient and data types (real/complex).

◆ sliding_mul_sym_y_ops

template<unsigned Lanes, unsigned Points, int CoeffStep, int DataStepY, ElemBaseType CoeffType, ElemBaseType DataType, AccumElemBaseType AccumTag = detail::default_accum_tag_t<CoeffType, DataType>>
using aie::sliding_mul_sym_y_ops = typedef sliding_mul_sym_ops<Lanes, Points, CoeffStep, 1, DataStepY, CoeffType, DataType, AccumTag>

Similar to sliding_mul_sym_ops, but DataStepX is always 1.

L = Lanes
P = Points
CS = CoeffStep
DSY = DataStepY
c_s = coeff_start
d_s = data_start
out[0] = coeff[c_s] * (data[d_s + ] + data[d_s + (P-1)]) + coeff[c_s + CS] * (data[d_s + 1] + data[d_s + (P-2)]) + ...
+ coeff[c_s + (P/2-1 * CS)] * (data[d_s + (P/2-1)] + data[d_s + P/2]);
out[1] = coeff[c_s] * (data[d_s + DSY] + data[d_s + DSY + (P-1)]) + coeff[c_s + CS] * (data[d_s + DSY + 1] + data[d_s + DSY + (P-2)]) + ...
+ coeff[c_s + (P/2-1 * CS)] * (data[d_s + DSY + (P/2-1)] + data[d_s + DSY + P/2]);
...
out[L-1] = coeff[c_s] * (data[d_s + (L-1) * DSY] + data[d_s + (L-1) * DSY + (P-1)]) + coeff[c_s + CS] * (data[d_s + (L-1) * DSY + 1] + data[d_s + (L-1) * DSY + (P-2)]) + ...
+ coeff[c_s + (P/2-1 * CS)] * (data[d_s + (L-1) * DSY + (P/2-1)] + data[d_s + (L-1) * DSY + P/2]);
Template Parameters
LanesNumber of output elements.
PointsNumber of data elements used to compute each lane.
CoeffStepStep used to select elements from the coeff buffer. This step is applied to element selection within a lane.
DataStepYStep used to select elements from the data buffer. This step is applied to element selection across lanes.
CoeffTypeType of the coefficient elements.
DataTypeType of the data elements.
AccumTagAccumulator tag that specifies the required accumulation bits. The class must be compatible with the result of the multiplication of the coefficient and data types (real/complex).

◆ sliding_mul_x_ops

template<unsigned Lanes, unsigned Points, int CoeffStep, int DataStepX, ElemBaseType CoeffType, ElemBaseType DataType, AccumElemBaseType AccumTag = detail::default_accum_tag_t<CoeffType, DataType>>
using aie::sliding_mul_x_ops = typedef sliding_mul_ops<Lanes, Points, CoeffStep, DataStepX, 1, CoeffType, DataType, AccumTag>

Similar to sliding_mul_ops, but DataStepY is always 1.

L = Lanes
P = Points
CS = CoeffStep
DSX = DataStepX
c_s = coeff_start
d_s = data_start
out[0] = coeff[c_s] * data[d_s + 0] + coeff[c_s + CS] * data[d_s + DSX] + ... + coeff[c_s + (P-1) * CS] * data[d_s + (P-1) * DSX]
out[1] = coeff[c_s] * data[d_s + 1] + coeff[c_s + CS] * data[d_s + 1 + DSX] + ... + coeff[c_s + (P-1) * CS] * data[d_s + 1 + (P-1) * DSX]
...
out[L-1] = coeff[c_s] * data[d_s + (L-1)] + coeff[c_s + CS] * data[d_s + (L-1) + DSX] + ... + coeff[c_s + (P-1) * CS] * data[d_s + (L-1) + (P-1) * DSX]
Template Parameters
LanesNumber of output elements.
PointsNumber of data elements used to compute each lane.
CoeffStepStep used to select elements from the coeff buffer. This step is applied to element selection within a lane.
DataStepXStep used to select elements from the data buffer. This step is applied to element selection within a lane.
CoeffTypeType of the coefficient elements.
DataTypeType of the data elements.
AccumTagAccumulator tag that specifies the required accumulation bits. The class must be compatible with the result of the multiplication of the coefficient and data types (real/complex).

◆ sliding_mul_xy_ops

template<unsigned Lanes, unsigned Points, int CoeffStep, int DataStepXY, ElemBaseType CoeffType, ElemBaseType DataType, AccumElemBaseType AccumTag = detail::default_accum_tag_t<CoeffType, DataType>>
using aie::sliding_mul_xy_ops = typedef sliding_mul_ops<Lanes, Points, CoeffStep, DataStepXY, DataStepXY, CoeffType, DataType, AccumTag>

Similar to sliding_mul_ops, but DataStepX is equal to DataStepY.

L = Lanes
P = Points
CS = CoeffStep
DS = DataStepXY
c_s = coeff_start
d_s = data_start
out[0] = coeff[c_s] * data[d_s + ] + coeff[c_s + CS] * data[d_s + DS] + ... + coeff[c_s + (P-1) * CS] * data[d_s + (P-1) * DS]
out[1] = coeff[c_s] * data[d_s + DS] + coeff[c_s + CS] * data[d_s + 2 * DS] + ... + coeff[c_s + (P-1) * CS] * data[d_s + P * DS]
...
out[L-1] = coeff[c_s] * data[d_s + (L-1) * DS] + coeff[c_s + CS] * data[d_s + L * DS] + ... + coeff[c_s + (P-1) * CS] * data[d_s + (P+L-2) * DS]
Template Parameters
LanesNumber of output elements.
PointsNumber of data elements used to compute each lane.
CoeffStepStep used to select elements from the coeff buffer. This step is applied to element selection within a lane.
DataStepXYStep used to select elements from the data buffer. This step is applied to element selection within a lane and across lanes.
CoeffTypeType of the coefficient elements.
DataTypeType of the data elements.
AccumTagAccumulator tag that specifies the required accumulation bits. The class must be compatible with the result of the multiplication of the coefficient and data types (real/complex).

◆ sliding_mul_y_ops

template<unsigned Lanes, unsigned Points, int CoeffStep, int DataStepY, ElemBaseType CoeffType, ElemBaseType DataType, AccumElemBaseType AccumTag = detail::default_accum_tag_t<CoeffType, DataType>>
using aie::sliding_mul_y_ops = typedef sliding_mul_ops<Lanes, Points, CoeffStep, 1, DataStepY, CoeffType, DataType, AccumTag>

Similar to sliding_mul_ops, but DataStepX is always 1.

L = Lanes
P = Points
CS = CoeffStep
DSY = DataStepY
c_s = coeff_start
d_s = data_start
out[0] = coeff[c_s] * data[d_s + ] + coeff[c_s + CS] * data[d_s + 1] + ... + coeff[c_s + (P-1) * CS] * data[d_s + (P-1)]
out[1] = coeff[c_s] * data[d_s + DSY] + coeff[c_s + CS] * data[d_s + DSY + 1] + ... + coeff[c_s + (P-1) * CS] * data[d_s + DSY + (P-1)]
...
out[L-1] = coeff[c_s] * data[d_s + (L-1) * DSY] + coeff[c_s + CS] * data[d_s + (L-1) * DSY + 1] + ... + coeff[c_s + (P-1) * CS] * data[d_s + (L-1) * DSY + (P-1)]
Template Parameters
LanesNumber of output elements.
PointsNumber of data elements used to compute each lane.
CoeffStepStep used to select elements from the coeff buffer. This step is applied to element selection within a lane.
DataStepYStep used to select elements from the data buffer. This step is applied to element selection accross lanes.
CoeffTypeType of the coefficient elements.
DataTypeType of the data elements.
AccumTagAccumulator tag that specifies the required accumulation bits. The class must be compatible with the result of the multiplication of the coefficient and data types (real/complex).

Function Documentation

◆ accumulate() [1/2]

template<unsigned Lanes, AccumOrOp Acc, Vector VecCoeff = void, Vector VecData = void, Vector... NextVecData>
auto aie::accumulate ( const Acc &  acc,
const VecCoeff &  coeff,
unsigned  coeff_start,
const VecData &  data,
const NextVecData &...  next_data 
) -> operand_base_type_t<Acc>

This function provides a parametrized multiplication that implements the following compute pattern:

L = Lanes
C = sizeof...(next_data) + 1
c_s = coeff_start
out[0] += coeff[c_s] * data_0[0] + coeff[c_s + 1] * data_1[0] + ... + coeff[c_s + (C-1)] * data_C-1[0]
out[1] += coeff[c_s] * data_0[1] + coeff[c_s + 1] * data_1[1] + ... + coeff[c_s + (C-1)] * data_C-1[1]
...
out[L-1] += coeff[c_s] * data_0[L-1] + coeff[c_s + 1] * data_1[L-1] + ... + coeff[c_s + (C-1)] * data_C-1[L-1]
Template Parameters
LanesNumber of output elements.
Parameters
accAccumulator to which the result of the accumulation is added (or subtracted). The type must meet AccumOrOp.
coeffVector of coefficients. Vectors limited to 256b and 512b on AIE and AIE-ML respectively.
coeff_startFirst element from the coeff vector to be used.
dataFirst vector of data.
next_dataRest of the data vectors.

◆ accumulate() [2/2]

template<unsigned Lanes, AccumElemBaseType AccumTag = accauto, Vector VecCoeff = void, Vector VecData = void, Vector... NextVecData>
auto aie::accumulate ( const VecCoeff &  coeff,
unsigned  coeff_start,
const VecData &  data,
const NextVecData &...  next_data 
) -> accum<std::conditional_t<std::is_same_v<AccumTag, accauto>, detail::default_accum_tag_t<typename VecCoeff::value_type, typename VecData::value_type>, AccumTag>, Lanes>

This function provides a parametrized multiplication that implements the following compute pattern:

L = Lanes
C = sizeof...(next_data) + 1
c_s = coeff_start
out[0] = coeff[c_s] * data_0[0] + coeff[c_s + 1] * data_1[0] + ... + coeff[c_s + (C-1)] * data_C-1[0]
out[1] = coeff[c_s] * data_0[1] + coeff[c_s + 1] * data_1[1] + ... + coeff[c_s + (C-1)] * data_C-1[1]
...
out[L-1] = coeff[c_s] * data_0[L-1] + coeff[c_s + 1] * data_1[L-1] + ... + coeff[c_s + (C-1)] * data_C-1[L-1]
Template Parameters
LanesNumber of output elements.
AccumTagAccumulator tag that specifies the required accumulation bits. The class must be compatible with the result of the multiplication of the coefficient and data types (real/complex).
Parameters
coeffVector of coefficients. Vectors limited to 256b and 512b on AIE and AIE-ML respectively.
coeff_startFirst element from the coeff vector to be used.
dataFirst vector of data.
next_dataRest of the data vectors.