arm_svdf_get_buffer_sizes_s8.c 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * SPDX-FileCopyrightText: Copyright 2023 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. * Project: CMSIS NN Library
  20. * Title: arm_svdf_get_buffer_sizes_s8.c
  21. * Description: Collection of get buffer size functions for svdf s8 layer function.
  22. *
  23. * $Date: 5 September 2023
  24. * $Revision: V.1.0.0
  25. *
  26. * Target : Arm(R) M-Profile Architecture
  27. *
  28. * -------------------------------------------------------------------- */
  29. #include "arm_nnfunctions.h"
  30. /**
  31. * @ingroup SVDF
  32. */
  33. /**
  34. * @addtogroup GetBufferSizeSVDF
  35. * @{
  36. */
  37. int32_t arm_svdf_s8_get_buffer_size_dsp(const cmsis_nn_dims *weights_feature_dims)
  38. {
  39. (void)weights_feature_dims;
  40. return 0;
  41. }
  42. int32_t arm_svdf_s8_get_buffer_size_mve(const cmsis_nn_dims *weights_feature_dims)
  43. {
  44. return weights_feature_dims->n * sizeof(int32_t);
  45. }
  46. int32_t arm_svdf_s8_get_buffer_size(const cmsis_nn_dims *weights_feature_dims)
  47. {
  48. #if defined(ARM_MATH_MVEI)
  49. return arm_svdf_s8_get_buffer_size_mve(weights_feature_dims);
  50. #else
  51. return arm_svdf_s8_get_buffer_size_dsp(weights_feature_dims);
  52. #endif
  53. }
  54. /**
  55. * @} end of GetBufferSizeSVDF group
  56. */