#include "sw/device/tests/kelvin/hps-c-port/ml_input.h" | |
#include "sw/device/tests/kelvin/hps-c-port/sw/init/kelvin.h" | |
void ml_input(const int len, const uint8_t *image, int8_t *input) { | |
int vlmax; getmaxvl_b_m(vlmax); | |
assert(vlmax == 128); | |
assert((len & (128 - 1)) == 0); | |
for (int i = 0; i < len; i += 128) { | |
vld_b_p_x_m(v0, image); | |
vsub_b_vx_m(v0, v0, 128); | |
vst_b_p_x_m(v0, input); | |
} | |
} |