Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 

77 lignes
2.1 KiB

  1. /*
  2. * Copyright (C) 2010-2021 Arm Limited or its affiliates.
  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_concatenation_s8_y.c
  21. * Description: s8 version of concatenation along the Y axis
  22. *
  23. * $Date: October 2019
  24. * $Revision: V.1.0.0
  25. *
  26. * Target Processor: Cortex-M cores
  27. *
  28. * -------------------------------------------------------------------- */
  29. #include "arm_nnfunctions.h"
  30. #include "arm_nnsupportfunctions.h"
  31. /**
  32. * @ingroup groupNN
  33. */
  34. /**
  35. * @addtogroup Concatenation
  36. * @{
  37. */
  38. /*
  39. * s8 version of concatenation along the Y axis
  40. *
  41. * Refer to header file for details.
  42. *
  43. */
  44. void arm_concatenation_s8_y(const int8_t *input,
  45. const uint16_t input_x,
  46. const uint16_t input_y,
  47. const uint16_t input_z,
  48. const uint16_t input_w,
  49. int8_t *output,
  50. const uint16_t output_y,
  51. const uint32_t offset_y)
  52. {
  53. const uint32_t num_iterations = input_z * input_w;
  54. const uint32_t input_copy_size = input_x * input_y;
  55. const uint32_t output_stride = input_x * output_y;
  56. output += offset_y * input_x;
  57. uint32_t i;
  58. // Copy per tile
  59. for (i = 0; i < num_iterations; ++i)
  60. {
  61. arm_memcpy_q7(output, input, input_copy_size);
  62. input += input_copy_size;
  63. output += output_stride;
  64. }
  65. }
  66. /**
  67. * @} end of Concatenation group
  68. */