• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/params.h>
12 #include <xnnpack/common.h>
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 
19 #define DECLARE_F32_ARGMAXPOOL_UNIPASS_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 float** input,                                       \
25       size_t input_offset,                                       \
26       float* output,                                             \
27       uint32_t* index,                                           \
28       size_t input_increment,                                    \
29       size_t output_increment,                                   \
30       const union xnn_f32_output_params* params);
31 
32 DECLARE_F32_ARGMAXPOOL_UNIPASS_UKERNEL_FUNCTION(xnn_f32_argmaxpool_ukernel_4x__psimd_c4)
33 DECLARE_F32_ARGMAXPOOL_UNIPASS_UKERNEL_FUNCTION(xnn_f32_argmaxpool_ukernel_4x__sse2_c4)
34 DECLARE_F32_ARGMAXPOOL_UNIPASS_UKERNEL_FUNCTION(xnn_f32_argmaxpool_ukernel_4x__scalar_c1)
35 
36 DECLARE_F32_ARGMAXPOOL_UNIPASS_UKERNEL_FUNCTION(xnn_f32_argmaxpool_ukernel_9x__psimd_c4)
37 DECLARE_F32_ARGMAXPOOL_UNIPASS_UKERNEL_FUNCTION(xnn_f32_argmaxpool_ukernel_9x__sse2_c4)
38 DECLARE_F32_ARGMAXPOOL_UNIPASS_UKERNEL_FUNCTION(xnn_f32_argmaxpool_ukernel_9x__scalar_c1)
39 
40 
41 #define DECLARE_F32_ARGMAXPOOL_MULTIPASS_UKERNEL_FUNCTION(fn_name) \
42   XNN_INTERNAL void fn_name(                                       \
43       size_t output_pixels,                                        \
44       size_t kernel_elements,                                      \
45       size_t channels,                                             \
46       const float** input,                                         \
47       size_t input_offset,                                         \
48       float* accumulation_buffer,                                  \
49       uint32_t* index_buffer,                                      \
50       float* output,                                               \
51       uint32_t* index,                                             \
52       size_t input_increment,                                      \
53       size_t output_increment,                                     \
54       const union xnn_f32_output_params* params);
55 
56 DECLARE_F32_ARGMAXPOOL_MULTIPASS_UKERNEL_FUNCTION(xnn_f32_argmaxpool_ukernel_9p8x__psimd_c4)
57 DECLARE_F32_ARGMAXPOOL_MULTIPASS_UKERNEL_FUNCTION(xnn_f32_argmaxpool_ukernel_9p8x__sse2_c4)
58 DECLARE_F32_ARGMAXPOOL_MULTIPASS_UKERNEL_FUNCTION(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1)
59 
60 
61 #ifdef __cplusplus
62 }  // extern "C"
63 #endif
64