interpolation_functions_f16.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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. #ifndef _INTERPOLATION_FUNCTIONS_F16_H_
  26. #define _INTERPOLATION_FUNCTIONS_F16_H_
  27. #include "arm_math_types_f16.h"
  28. #include "arm_math_memory.h"
  29. #include "dsp/none.h"
  30. #include "dsp/utils.h"
  31. #ifdef __cplusplus
  32. extern "C"
  33. {
  34. #endif
  35. #if defined(ARM_FLOAT16_SUPPORTED)
  36. typedef struct
  37. {
  38. uint32_t nValues; /**< nValues */
  39. float16_t x1; /**< x1 */
  40. float16_t xSpacing; /**< xSpacing */
  41. float16_t *pYData; /**< pointer to the table of Y values */
  42. } arm_linear_interp_instance_f16;
  43. /**
  44. * @brief Instance structure for the floating-point bilinear interpolation function.
  45. */
  46. typedef struct
  47. {
  48. uint16_t numRows;/**< number of rows in the data table. */
  49. uint16_t numCols;/**< number of columns in the data table. */
  50. float16_t *pData; /**< points to the data table. */
  51. } arm_bilinear_interp_instance_f16;
  52. /**
  53. * @addtogroup LinearInterpolate
  54. * @{
  55. */
  56. /**
  57. * @brief Process function for the floating-point Linear Interpolation Function.
  58. * @param[in,out] S is an instance of the floating-point Linear Interpolation structure
  59. * @param[in] x input sample to process
  60. * @return y processed output sample.
  61. *
  62. */
  63. float16_t arm_linear_interp_f16(
  64. arm_linear_interp_instance_f16 * S,
  65. float16_t x);
  66. /**
  67. * @} end of LinearInterpolate group
  68. */
  69. /**
  70. * @addtogroup BilinearInterpolate
  71. * @{
  72. */
  73. /**
  74. * @brief Floating-point bilinear interpolation.
  75. * @param[in,out] S points to an instance of the interpolation structure.
  76. * @param[in] X interpolation coordinate.
  77. * @param[in] Y interpolation coordinate.
  78. * @return out interpolated value.
  79. */
  80. float16_t arm_bilinear_interp_f16(
  81. const arm_bilinear_interp_instance_f16 * S,
  82. float16_t X,
  83. float16_t Y);
  84. /**
  85. * @} end of BilinearInterpolate group
  86. */
  87. #endif /*defined(ARM_FLOAT16_SUPPORTED)*/
  88. #ifdef __cplusplus
  89. }
  90. #endif
  91. #endif /* ifndef _INTERPOLATION_FUNCTIONS_F16_H_ */