Edge AI Add-on API 2.3.0
Loading...
Searching...
No Matches

◆ nrf_axon_axpb_2d_8_16()

nrf_axon_result_e nrf_axon_axpb_2d_8_16 ( const int8_t * x_ptr,
int32_t a_scalar,
int32_t b_scalar,
int16_t * output,
uint16_t height,
uint16_t width,
bool input_is_packed,
uint8_t rounding_bits,
nrf_axon_syncmode_blocking_e block_mode,
bool keep_reservation )

#include <include/drivers/axon/nrf_axon_dsp_intrinsics.h>

"axpb"=>"a times x + b" Multiplies each vector value by "a" and adds "b" Input vector can be 2 dimensional for improved performance. Note that if width is an odd number, each row of output will have a padding short at the end.

Parameters
x_ptrx vector input. 8bit integers.
a_scalar"a" scalar value to multiply with input , 32bit integer.
b_scalar"b" scalar value to add to input, 32bit integer.
out_ptroutput vector. 16bit integers, no extra stride, and rounded by rounding_bits. output can overlap input.
heightHeight of the input/output in rows. Should be less than width for optimal performance.
widthWidth of the input/output in elements. Should be greater than height for optimal performance. If not a muultiple of 2, output width will be 0 padded rounded to the next multiple of 2. Maximum 1024.
boolinput_is_packed if true, input has no padding between rows. if false, input rows start on 32bit boundaries (n/a when width is a multiple of 4)
rounding_bitsNumber of bits to round the output by. 0 => no rounding, maximum of 32.
block_moderecommnended to be set to NRF_AXON_SYNC_MODE_BLOCKING_POLLING.
keep_reservationset to true if there are subsequent axon operations to execute immediately on completion. true prevents axon from be taken by another user and/or being powered off. Set to false if axon will not be used immediately after to free axon for other users and/or power down if idle.
Returns
kAxonResultSuccess on success or a negative error code (see nrf_axon_result_e)