Debian Codegraph @

src/qu8-rsum/gen/qu8-rsum-scalar-u1.c

raw
1 // Auto-generated file. Do not edit!
2 // Template: src/qu8-rsum/scalar.c.in
3 // Generator: tools/xngen
4 //
5 // This source code is licensed under the BSD-style license found in the
6 // LICENSE file in the root directory of this source tree.
7
8 #include <assert.h>
9
10 #include "xnnpack/common.h"
11 #include "xnnpack/math.h"
12 #include "xnnpack/reduce.h"
13
14
15 void xnn_qu8_rsum_ukernel__scalar_u1(
16 size_t batch,
17 const uint8_t* restrict input,
18 uint32_t* restrict output,
19 const struct xnn_qs8_rsum_params params[restrict XNN_MIN_ELEMENTS(1)])
20 {
21 assert(batch != 0);
22 assert(input != NULL);
23 assert(output != NULL);
24 assert(params != NULL);
25
26 uint32_t vacc0 = 0;
27 do {
28 const uint32_t vt = (uint32_t) *input++;
29 vacc0 += vt;
30 batch -= sizeof(uint8_t);
31 } while (batch != 0);
32
33 *output += vacc0;
34 }