• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) Facebook, Inc. and its affiliates.
2 // All rights reserved.
3 //
4 // Copyright 2019 Google LLC
5 //
6 // This source code is licensed under the BSD-style license found in the
7 // LICENSE file in the root directory of this source tree.
8 
9 #pragma once
10 
11 #include <stddef.h>
12 #include <stdint.h>
13 
14 #include <xnnpack/params.h>
15 #include <xnnpack/common.h>
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 
22 #define DECLARE_F32_MAXPOOL_UKERNEL_FUNCTION(fn_name) \
23   XNN_INTERNAL void fn_name(                          \
24       size_t output_pixels,                           \
25       size_t kernel_size,                             \
26       size_t channels,                                \
27       const float** input,                            \
28       size_t input_offset,                            \
29       float* output,                                  \
30       size_t input_increment,                         \
31       size_t output_increment,                        \
32       const union xnn_f32_output_params* params);
33 
34 DECLARE_F32_MAXPOOL_UKERNEL_FUNCTION(xnn_f32_maxpool_ukernel_9p8x__sse_c4)
35 DECLARE_F32_MAXPOOL_UKERNEL_FUNCTION(xnn_f32_maxpool_ukernel_9p8x__psimd_c4)
36 DECLARE_F32_MAXPOOL_UKERNEL_FUNCTION(xnn_f32_maxpool_ukernel_9p8x__wasm_c1)
37 DECLARE_F32_MAXPOOL_UKERNEL_FUNCTION(xnn_f32_maxpool_ukernel_9p8x__scalar_c1)
38 
39 
40 #define DECLARE_U8_MAXPOOL_UKERNEL_FUNCTION(fn_name) \
41   XNN_INTERNAL void fn_name(                         \
42       size_t output_pixels,                          \
43       size_t kernel_size,                            \
44       size_t channels,                               \
45       const uint8_t** input,                         \
46       size_t input_offset,                           \
47       uint8_t* output,                               \
48       size_t input_increment,                        \
49       size_t output_increment,                       \
50       const union xnn_u8_output_params* params);
51 
52 DECLARE_U8_MAXPOOL_UKERNEL_FUNCTION(xnn_u8_maxpool_ukernel_9p8x__neon_c16)
53 DECLARE_U8_MAXPOOL_UKERNEL_FUNCTION(xnn_u8_maxpool_ukernel_9p8x__sse2_c16)
54 DECLARE_U8_MAXPOOL_UKERNEL_FUNCTION(xnn_u8_maxpool_ukernel_9p8x__scalar_c1)
55 
56 
57 #ifdef __cplusplus
58 }  // extern "C"
59 #endif
60