interpolation_functions_f16.h 3.0 KB

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