riscv_sorting.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /******************************************************************************
  2. * @file riscv_sorting.h
  3. * @brief Private header file for NMSIS DSP Library
  4. * @version V1.7.0
  5. * @date 2019
  6. ******************************************************************************/
  7. /*
  8. * Copyright (c) 2010-2019 Arm Limited or its affiliates. All rights reserved.
  9. * Copyright (c) 2019 Nuclei Limited. 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 _RISCV_SORTING_H_
  26. #define _RISCV_SORTING_H_
  27. #include "riscv_math.h"
  28. #ifdef __cplusplus
  29. extern "C"
  30. {
  31. #endif
  32. /**
  33. * @param[in] S points to an instance of the sorting structure.
  34. * @param[in] pSrc points to the block of input data.
  35. * @param[out] pDst points to the block of output data.
  36. * @param[in] blockSize number of samples to process.
  37. */
  38. void riscv_bubble_sort_f32(
  39. const riscv_sort_instance_f32 * S,
  40. float32_t * pSrc,
  41. float32_t * pDst,
  42. uint32_t blockSize);
  43. /**
  44. * @param[in] S points to an instance of the sorting structure.
  45. * @param[in] pSrc points to the block of input data.
  46. * @param[out] pDst points to the block of output data.
  47. * @param[in] blockSize number of samples to process.
  48. */
  49. void riscv_heap_sort_f32(
  50. const riscv_sort_instance_f32 * S,
  51. float32_t * pSrc,
  52. float32_t * pDst,
  53. uint32_t blockSize);
  54. /**
  55. * @param[in] S points to an instance of the sorting structure.
  56. * @param[in] pSrc points to the block of input data.
  57. * @param[out] pDst points to the block of output data.
  58. * @param[in] blockSize number of samples to process.
  59. */
  60. void riscv_insertion_sort_f32(
  61. const riscv_sort_instance_f32 * S,
  62. float32_t *pSrc,
  63. float32_t* pDst,
  64. uint32_t blockSize);
  65. /**
  66. * @param[in] S points to an instance of the sorting structure.
  67. * @param[in] pSrc points to the block of input data.
  68. * @param[out] pDst points to the block of output data
  69. * @param[in] blockSize number of samples to process.
  70. */
  71. void riscv_quick_sort_f32(
  72. const riscv_sort_instance_f32 * S,
  73. float32_t * pSrc,
  74. float32_t * pDst,
  75. uint32_t blockSize);
  76. /**
  77. * @param[in] S points to an instance of the sorting structure.
  78. * @param[in] pSrc points to the block of input data.
  79. * @param[out] pDst points to the block of output data
  80. * @param[in] blockSize number of samples to process.
  81. */
  82. void riscv_selection_sort_f32(
  83. const riscv_sort_instance_f32 * S,
  84. float32_t * pSrc,
  85. float32_t * pDst,
  86. uint32_t blockSize);
  87. /**
  88. * @param[in] S points to an instance of the sorting structure.
  89. * @param[in] pSrc points to the block of input data.
  90. * @param[out] pDst points to the block of output data
  91. * @param[in] blockSize number of samples to process.
  92. */
  93. void riscv_bitonic_sort_f32(
  94. const riscv_sort_instance_f32 * S,
  95. float32_t * pSrc,
  96. float32_t * pDst,
  97. uint32_t blockSize);
  98. #ifdef __cplusplus
  99. }
  100. #endif
  101. #endif /* _RISCV_SORTING_H */