| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
#include <assert.h> |
| 11 |
|
| 12 |
#include "xnnpack/common.h" |
| 13 |
#include "xnnpack/math.h" |
| 14 |
#include "xnnpack/vbinary.h" |
| 15 |
|
| 16 |
|
| 17 |
void xnn_f32_vrsubc_ukernel__scalar_u1( |
| 18 |
size_t batch, |
| 19 |
const float* input_a, |
| 20 |
const float* input_b, |
| 21 |
float* output, |
| 22 |
const struct xnn_f32_default_params params[restrict XNN_MIN_ELEMENTS(1)]) |
| 23 |
{ |
| 24 |
assert(batch != 0); |
| 25 |
assert(batch % sizeof(float) == 0); |
| 26 |
assert(input_a != NULL); |
| 27 |
assert(input_b != NULL); |
| 28 |
assert(output != NULL); |
| 29 |
|
| 30 |
const float vb = *input_b; |
| 31 |
|
| 32 |
for (; batch >= sizeof(float); batch -= sizeof(float)) { |
| 33 |
const float va = *input_a++; |
| 34 |
float vacc = vb - va; |
| 35 |
*output++ = vacc; |
| 36 |
} |
| 37 |
} |