1 /*
2  * SPDX-FileCopyrightText: Copyright 2021-2024 Arm Limited and/or its affiliates <open-source-office@arm.com>
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Licensed under the Apache License, Version 2.0 (the License); you may
7  * not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an AS IS BASIS, WITHOUT
14  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
19 /* ----------------------------------------------------------------------
20  * Project:      CMSIS NN Library
21  * Title:        arm_convolve_wrapper_s16.c
22  * Description:  s16 convolution layer wrapper function with the main purpose to call the optimal kernel available in
23  * cmsis-nn to perform the convolution.
24  *
25  * $Date:        23 April 2024
26  * $Revision:    V.3.0.0
27  *
28  * Target :  Arm(R) M-Profile Architecture
29  *
30  * -------------------------------------------------------------------- */
31 
32 #include "arm_nnfunctions.h"
33 
34 /**
35  *  @ingroup Public
36  */
37 
38 /**
39  * @addtogroup NNConv
40  * @{
41  */
42 
43 /*
44  * Convolution layer
45  *
46  * Refer header file for details.
47  *
48  */
49 
arm_convolve_wrapper_s16(const cmsis_nn_context * ctx,const cmsis_nn_conv_params * conv_params,const cmsis_nn_per_channel_quant_params * quant_params,const cmsis_nn_dims * input_dims,const int16_t * input_data,const cmsis_nn_dims * filter_dims,const int8_t * filter_data,const cmsis_nn_dims * bias_dims,const cmsis_nn_bias_data * bias_data,const cmsis_nn_dims * output_dims,int16_t * output_data)50 arm_cmsis_nn_status arm_convolve_wrapper_s16(const cmsis_nn_context *ctx,
51                                              const cmsis_nn_conv_params *conv_params,
52                                              const cmsis_nn_per_channel_quant_params *quant_params,
53                                              const cmsis_nn_dims *input_dims,
54                                              const int16_t *input_data,
55                                              const cmsis_nn_dims *filter_dims,
56                                              const int8_t *filter_data,
57                                              const cmsis_nn_dims *bias_dims,
58                                              const cmsis_nn_bias_data *bias_data,
59                                              const cmsis_nn_dims *output_dims,
60                                              int16_t *output_data)
61 {
62     return arm_convolve_s16(ctx,
63                             conv_params,
64                             quant_params,
65                             input_dims,
66                             input_data,
67                             filter_dims,
68                             filter_data,
69                             bias_dims,
70                             bias_data,
71                             output_dims,
72                             output_data);
73 }
74 
75 /**
76  * @} end of NNConv group
77  */
78