Conv2dVpu#
Fully qualified name: pvaApl::Conv2dVpu
Defined in public/src/primitive/pvaAplConv2dVpu.hpp
-
template<int32_t KernelSize, typename DataType>
class Conv2dVpu# 2D Convolution (Conv2d) primitive template class
- Template Parameters:
KernelSize – 2D Convolution Kernel Size. (Square shape: KernelSize x KernelSize)
DataType – Data Type
Public Functions
- inline void Update( )#
Update the src_even buffer, src_odd buffer, dst buffer pointers for the Conv2d algorithm.
- Parameters:
src_even – Pointer to the src_even buffer which contains even rows of the input image.
src_odd – Pointer to the src_odd buffer which contains odd rows of the input image.
dst – Pointer to the dst buffer where the result is written to.
- inline void Init(
- DataType *src_even_tp,
- int32_t src_even_lp,
- DataType *src_odd_tp,
- int32_t src_odd_lp,
- DataType *knl_tp,
- int32_t knl_lp,
- DataType *dst_tp,
- int32_t dst_lp,
- int32_t qbits,
- int32_t tw,
- int32_t th,
- DataType *cb_even,
- DataType *cb_odd,
- int32_t cb_len,
Initialize the Conv2d algorithm parameters, setup agens for the Execute method.
- Parameters:
src_even_tp – Pointer to the src_even buffer which contains even rows.
src_even_lp – Line pitch of the src_even_v circular buffer.
src_odd_tp – Pointer to the src_odd buffer which contains odd rows.
src_odd_lp – Line pitch of the src_odd_v circular buffer.
knl_tp – Pointer to the knl_v buffer which contains convolution kernel coefficients.
knl_lp – Line pitch of the knl_v buffer.
dst_tp – Pointer to the dst buffer where the result is written to.
dst_lp – Line pitch of the dst_v buffer.
qbits – Number of bits to round the result to.
tw – Tile width.
th – Tile height.
cb_even – Pointer to the src_even_v circular buffer.
cb_odd – Pointer to the src_odd_v circular buffer.
cb_len – Length of the circular buffer.
-
inline void Execute()#
Execute the conv2d algorithm with the given kernel size and data type.