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_MINMAX_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_minmax_params* params); 33 34 DECLARE_F32_MAXPOOL_MINMAX_UKERNEL_FUNCTION(xnn_f32_maxpool_minmax_ukernel_9p8x__sse_c4) 35 DECLARE_F32_MAXPOOL_MINMAX_UKERNEL_FUNCTION(xnn_f32_maxpool_minmax_ukernel_9p8x__neon_c4) 36 DECLARE_F32_MAXPOOL_MINMAX_UKERNEL_FUNCTION(xnn_f32_maxpool_minmax_ukernel_9p8x__wasmsimd_arm_c4) 37 DECLARE_F32_MAXPOOL_MINMAX_UKERNEL_FUNCTION(xnn_f32_maxpool_minmax_ukernel_9p8x__wasmsimd_x86_c4) 38 DECLARE_F32_MAXPOOL_MINMAX_UKERNEL_FUNCTION(xnn_f32_maxpool_minmax_ukernel_9p8x__wasm_c1) 39 DECLARE_F32_MAXPOOL_MINMAX_UKERNEL_FUNCTION(xnn_f32_maxpool_minmax_ukernel_9p8x__scalar_c1) 40 41 42 #define DECLARE_U8_MAXPOOL_MINMAX_UKERNEL_FUNCTION(fn_name) \ 43 XNN_INTERNAL void fn_name( \ 44 size_t output_pixels, \ 45 size_t kernel_size, \ 46 size_t channels, \ 47 const uint8_t** input, \ 48 size_t input_offset, \ 49 uint8_t* output, \ 50 size_t input_increment, \ 51 size_t output_increment, \ 52 const union xnn_u8_minmax_params* params); 53 54 DECLARE_U8_MAXPOOL_MINMAX_UKERNEL_FUNCTION(xnn_u8_maxpool_minmax_ukernel_9p8x__neon_c16) 55 DECLARE_U8_MAXPOOL_MINMAX_UKERNEL_FUNCTION(xnn_u8_maxpool_minmax_ukernel_9p8x__sse2_c16) 56 DECLARE_U8_MAXPOOL_MINMAX_UKERNEL_FUNCTION(xnn_u8_maxpool_minmax_ukernel_9p8x__scalar_c1) 57 58 59 #ifdef __cplusplus 60 } // extern "C" 61 #endif 62