1 // 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. 5 6 #include <assert.h> 7 8 #include <xnnpack/zip.h> 9 10 xnn_x8_zip_xm_ukernel__scalar(size_t n,size_t m,const uint8_t * input,uint8_t * output)11void xnn_x8_zip_xm_ukernel__scalar( 12 size_t n, 13 size_t m, 14 const uint8_t* input, 15 uint8_t* output) 16 { 17 assert(n != 0); 18 assert(m >= 4); 19 20 size_t k = n; 21 do { 22 size_t l = m; 23 const uint8_t* input_column = input++; 24 do { 25 *output++ = *input_column; 26 input_column = (uint8_t*) ((uintptr_t) input_column + n); 27 } while (--l != 0); 28 k -= sizeof(uint8_t); 29 } while (k != 0); 30 } 31