Debian Codegraph @

src/f32-vbinary/gen/f32-vrdivc-scalar-u2.c

raw symbols SCIP
1 // Auto-generated file. Do not edit!
2 // Template: src/f32-vbinary/vopc-scalar.c.in
3 // Generator: tools/xngen
4 //
5 // Copyright 2019 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/vbinary.h"
15
16
17 void xnn_f32_vrdivc_ukernel__scalar_u2(
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 >= 2 * sizeof(float); batch -= 2 * sizeof(float)) {
33 const float va0 = input_a[0];
34 const float va1 = input_a[1];
35 input_a += 2;
36
37 float vacc0 = vb / va0;
38 float vacc1 = vb / va1;
39
40
41 output[0] = vacc0;
42 output[1] = vacc1;
43 output += 2;
44 }
45 if XNN_UNLIKELY(batch != 0) {
46 assert(batch == sizeof(float));
47 const float va = *input_a;
48 float vacc = vb / va;
49 *output = vacc;
50 }
51 }