1 /******************************************************************************
2  * @file     interpolation_functions_f16.h
3  * @brief    Public header file for CMSIS DSP Library
4  * @version  V1.10.0
5  * @date     08 July 2021
6  * Target Processor: Cortex-M and Cortex-A cores
7  ******************************************************************************/
8 /*
9  * Copyright (c) 2010-2020 Arm Limited or its affiliates. All rights reserved.
10  *
11  * SPDX-License-Identifier: Apache-2.0
12  *
13  * Licensed under the Apache License, Version 2.0 (the License); you may
14  * not use this file except in compliance with the License.
15  * You may obtain a copy of the License at
16  *
17  * www.apache.org/licenses/LICENSE-2.0
18  *
19  * Unless required by applicable law or agreed to in writing, software
20  * distributed under the License is distributed on an AS IS BASIS, WITHOUT
21  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22  * See the License for the specific language governing permissions and
23  * limitations under the License.
24  */
25 
26 
27 #ifndef INTERPOLATION_FUNCTIONS_F16_H_
28 #define INTERPOLATION_FUNCTIONS_F16_H_
29 
30 #include "arm_math_types_f16.h"
31 #include "arm_math_memory.h"
32 
33 #include "dsp/none.h"
34 #include "dsp/utils.h"
35 
36 #ifdef   __cplusplus
37 extern "C"
38 {
39 #endif
40 
41 #if defined(ARM_FLOAT16_SUPPORTED)
42 
43 /**
44  * @brief Instance structure for the half floating-point Linear Interpolate function.
45  */
46 typedef struct
47 {
48     uint32_t  nValues;        /**< nValues */
49     float16_t x1;             /**< x1 */
50     float16_t xSpacing;       /**< xSpacing */
51     const float16_t *pYData;        /**< pointer to the table of Y values */
52 } arm_linear_interp_instance_f16;
53 
54 /**
55  * @brief Instance structure for the floating-point bilinear interpolation function.
56  */
57 typedef struct
58 {
59     uint16_t  numRows;/**< number of rows in the data table. */
60     uint16_t  numCols;/**< number of columns in the data table. */
61     const float16_t *pData; /**< points to the data table. */
62 } arm_bilinear_interp_instance_f16;
63 
64   /**
65    * @addtogroup LinearInterpolate
66    * @{
67    */
68 
69     /**
70    * @brief  Process function for the floating-point Linear Interpolation Function.
71    * @param[in,out] S  is an instance of the floating-point Linear Interpolation structure
72    * @param[in]     x  input sample to process
73    * @return y processed output sample.
74    */
75   float16_t arm_linear_interp_f16(
76   const arm_linear_interp_instance_f16 * S,
77   float16_t x);
78 
79     /**
80    * @} end of LinearInterpolate group
81    */
82 
83 /**
84    * @addtogroup BilinearInterpolate
85    * @{
86    */
87 
88   /**
89   * @brief  Floating-point bilinear interpolation.
90   * @param[in,out] S  points to an instance of the interpolation structure.
91   * @param[in]     X  interpolation coordinate.
92   * @param[in]     Y  interpolation coordinate.
93   * @return out interpolated value.
94   */
95   float16_t arm_bilinear_interp_f16(
96   const arm_bilinear_interp_instance_f16 * S,
97   float16_t X,
98   float16_t Y);
99 
100 
101   /**
102    * @} end of BilinearInterpolate group
103    */
104 #endif /*defined(ARM_FLOAT16_SUPPORTED)*/
105 #ifdef   __cplusplus
106 }
107 #endif
108 
109 #endif /* ifndef _INTERPOLATION_FUNCTIONS_F16_H_ */
110