Debian Codegraph @

src/f32-rminmax/gen/f32-rmax-scalar-u1.c

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