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 #pragma once 7 8 #include <stddef.h> 9 #include <stdint.h> 10 11 #include <xnnpack/common.h> 12 #include <xnnpack/microparams.h> 13 14 #ifdef __cplusplus 15 extern "C" { 16 #endif 17 18 19 #define DECLARE_F16_PAVGPOOL_MINMAX_MULTIPASS_UKERNEL_FUNCTION(fn_name) \ 20 XNN_INTERNAL void fn_name( \ 21 size_t output_pixels, \ 22 size_t kernel_elements, \ 23 size_t channels, \ 24 const void** input, \ 25 size_t input_offset, \ 26 const void* zero, \ 27 const void* multiplier, \ 28 void* buffer, \ 29 void* output, \ 30 size_t input_increment, \ 31 size_t output_increment, \ 32 const union xnn_f16_minmax_params* params); 33 34 DECLARE_F16_PAVGPOOL_MINMAX_MULTIPASS_UKERNEL_FUNCTION(xnn_f16_pavgpool_minmax_ukernel_9p8x__avx2_c8) 35 DECLARE_F16_PAVGPOOL_MINMAX_MULTIPASS_UKERNEL_FUNCTION(xnn_f16_pavgpool_minmax_ukernel_9p8x__neonfp16arith_c8) 36 37 38 #define DECLARE_F16_PAVGPOOL_MINMAX_UNIPASS_UKERNEL_FUNCTION(fn_name) \ 39 XNN_INTERNAL void fn_name( \ 40 size_t output_pixels, \ 41 size_t kernel_elements, \ 42 size_t channels, \ 43 const void** input, \ 44 size_t input_offset, \ 45 const void* zero, \ 46 const void* multiplier, \ 47 void* output, \ 48 size_t input_increment, \ 49 size_t output_increment, \ 50 const union xnn_f16_minmax_params* params); 51 52 DECLARE_F16_PAVGPOOL_MINMAX_UNIPASS_UKERNEL_FUNCTION(xnn_f16_pavgpool_minmax_ukernel_9x__avx2_c8) 53 DECLARE_F16_PAVGPOOL_MINMAX_UNIPASS_UKERNEL_FUNCTION(xnn_f16_pavgpool_minmax_ukernel_9x__neonfp16arith_c8) 54 55 56 #define DECLARE_F32_PAVGPOOL_MINMAX_MULTIPASS_UKERNEL_FUNCTION(fn_name) \ 57 XNN_INTERNAL void fn_name( \ 58 size_t output_pixels, \ 59 size_t kernel_elements, \ 60 size_t channels, \ 61 const float** input, \ 62 size_t input_offset, \ 63 const float* zero, \ 64 const float* multiplier, \ 65 float* buffer, \ 66 float* output, \ 67 size_t input_increment, \ 68 size_t output_increment, \ 69 const union xnn_f32_minmax_params* params); 70 71 DECLARE_F32_PAVGPOOL_MINMAX_MULTIPASS_UKERNEL_FUNCTION(xnn_f32_pavgpool_minmax_ukernel_9p8x__neon_c4) 72 DECLARE_F32_PAVGPOOL_MINMAX_MULTIPASS_UKERNEL_FUNCTION(xnn_f32_pavgpool_minmax_ukernel_9p8x__scalar_c1) 73 DECLARE_F32_PAVGPOOL_MINMAX_MULTIPASS_UKERNEL_FUNCTION(xnn_f32_pavgpool_minmax_ukernel_9p8x__sse_c4) 74 DECLARE_F32_PAVGPOOL_MINMAX_MULTIPASS_UKERNEL_FUNCTION(xnn_f32_pavgpool_minmax_ukernel_9p8x__wasm_c1) 75 DECLARE_F32_PAVGPOOL_MINMAX_MULTIPASS_UKERNEL_FUNCTION(xnn_f32_pavgpool_minmax_ukernel_9p8x__wasmsimd_arm_c4) 76 DECLARE_F32_PAVGPOOL_MINMAX_MULTIPASS_UKERNEL_FUNCTION(xnn_f32_pavgpool_minmax_ukernel_9p8x__wasmsimd_x86_c4) 77 78 79 #define DECLARE_F32_PAVGPOOL_MINMAX_UNIPASS_UKERNEL_FUNCTION(fn_name) \ 80 XNN_INTERNAL void fn_name( \ 81 size_t output_pixels, \ 82 size_t kernel_elements, \ 83 size_t channels, \ 84 const float** input, \ 85 size_t input_offset, \ 86 const float* zero, \ 87 const float* multiplier, \ 88 float* output, \ 89 size_t input_increment, \ 90 size_t output_increment, \ 91 const union xnn_f32_minmax_params* params); 92 93 DECLARE_F32_PAVGPOOL_MINMAX_UNIPASS_UKERNEL_FUNCTION(xnn_f32_pavgpool_minmax_ukernel_9x__neon_c4) 94 DECLARE_F32_PAVGPOOL_MINMAX_UNIPASS_UKERNEL_FUNCTION(xnn_f32_pavgpool_minmax_ukernel_9x__scalar_c1) 95 DECLARE_F32_PAVGPOOL_MINMAX_UNIPASS_UKERNEL_FUNCTION(xnn_f32_pavgpool_minmax_ukernel_9x__sse_c4) 96 DECLARE_F32_PAVGPOOL_MINMAX_UNIPASS_UKERNEL_FUNCTION(xnn_f32_pavgpool_minmax_ukernel_9x__wasm_c1) 97 DECLARE_F32_PAVGPOOL_MINMAX_UNIPASS_UKERNEL_FUNCTION(xnn_f32_pavgpool_minmax_ukernel_9x__wasmsimd_arm_c4) 98 DECLARE_F32_PAVGPOOL_MINMAX_UNIPASS_UKERNEL_FUNCTION(xnn_f32_pavgpool_minmax_ukernel_9x__wasmsimd_x86_c4) 99 100 101 #ifdef __cplusplus 102 } // extern "C" 103 #endif 104