blob: 485c1cc391dfea485ecb7b8ad70cdab9b131a05e [file] [log] [blame]
Marat Dukhan80fc9322019-09-29 21:06:36 -07001// Copyright 2019 Google LLC
2//
3// This source code is licensed under the BSD-style license found in the
4// LICENSE file in the root directory of this source tree.
XNNPACK Teamb455b122019-09-27 18:10:33 -07005
6#include <assert.h>
7
8#include <xnnpack/zip.h>
9
10
11void xnn_x8_zip_x3_ukernel__scalar(
12 size_t n,
13 const uint8_t* input,
14 uint8_t* output)
15{
16 const uint8_t* x = input;
17 const uint8_t* y = (const uint8_t*) ((uintptr_t) x + n);
18 const uint8_t* z = (const uint8_t*) ((uintptr_t) y + n);
19 uint8_t* o = output;
20
21 do {
22 const uint8_t vx = *x++;
23 const uint8_t vy = *y++;
24 const uint8_t vz = *z++;
25 o[0] = vx;
26 o[1] = vy;
27 o[2] = vz;
28 o += 3;
29
30 n -= sizeof(uint8_t);
31 } while (n != 0);
32}