![]() |
Edge AI Add-on API 2.3.0
|
| 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.
| x_ptr | x 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_ptr | output vector. 16bit integers, no extra stride, and rounded by rounding_bits. output can overlap input. |
| height | Height of the input/output in rows. Should be less than width for optimal performance. |
| width | Width 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. |
| bool | input_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_bits | Number of bits to round the output by. 0 => no rounding, maximum of 32. |
| block_mode | recommnended to be set to NRF_AXON_SYNC_MODE_BLOCKING_POLLING. |
| keep_reservation | set 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. |