Debian Codegraph @

src/f16-vsqrt/gen/f16-vsqrt-fp16arith-sqrt-u1.c

raw symbols SCIP
1 // Auto-generated file. Do not edit!
2 // Template: src/f16-vsqrt/fp16arith-sqrt.c.in
3 // Generator: tools/xngen
4 //
5 // Copyright 2022 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 #include <math.h>
12
13 #include <arm_fp16.h>
14
15 #include "xnnpack/common.h"
16 #include "xnnpack/intrinsics-polyfill.h"
17 #include "xnnpack/vunary.h"
18
19
20 void xnn_f16_vsqrt_ukernel__fp16arith_sqrt_u1(
21 size_t batch,
22 const xnn_float16* input,
23 xnn_float16* output,
24 const struct xnn_f16_default_params params[restrict XNN_MIN_ELEMENTS(1)]) XNN_OOB_READS
25 {
26 assert(batch != 0);
27 assert(batch % sizeof(float16_t) == 0);
28 assert(input != NULL);
29 assert(output != NULL);
30
31 const float16_t* i = (const float16_t*) input;
32 float16_t* o = (float16_t*) output;
33 do {
34 float16_t vacc = *i++;
35 vacc = vsqrth_f16(vacc);
36 *o++ = vacc;
37 batch -= sizeof(float16_t);
38 } while (batch != 0);
39 }