arm_mat_init_q31.c 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /* ----------------------------------------------------------------------
  2. * Copyright (C) 2010-2014 ARM Limited. All rights reserved.
  3. *
  4. * $Date: 31. July 2014
  5. * $Revision: V1.4.4
  6. *
  7. * Project: CMSIS DSP Library
  8. * Title: arm_mat_init_q31.c
  9. *
  10. * Description: Q31 matrix initialization.
  11. * Target Processor: Cortex-M4/Cortex-M3/Cortex-M0
  12. *
  13. * Redistribution and use in source and binary forms, with or without
  14. * modification, are permitted provided that the following conditions
  15. * are met:
  16. * - Redistributions of source code must retain the above copyright
  17. * notice, this list of conditions and the following disclaimer.
  18. * - Redistributions in binary form must reproduce the above copyright
  19. * notice, this list of conditions and the following disclaimer in
  20. * the documentation and/or other materials provided with the
  21. * distribution.
  22. * - Neither the name of ARM LIMITED nor the names of its contributors
  23. * may be used to endorse or promote products derived from this
  24. * software without specific prior written permission.
  25. *
  26. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  27. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  28. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  29. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  30. * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  31. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  32. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  33. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  34. * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  35. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
  36. * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  37. * POSSIBILITY OF SUCH DAMAGE.
  38. * -------------------------------------------------------------------------- */
  39. #include "arm_math.h"
  40. /**
  41. * @ingroup groupMatrix
  42. */
  43. /**
  44. * @defgroup MatrixInit Matrix Initialization
  45. *
  46. */
  47. /**
  48. * @addtogroup MatrixInit
  49. * @{
  50. */
  51. /**
  52. * @brief Q31 matrix initialization.
  53. * @param[in,out] *S points to an instance of the floating-point matrix structure.
  54. * @param[in] nRows number of rows in the matrix.
  55. * @param[in] nColumns number of columns in the matrix.
  56. * @param[in] *pData points to the matrix data array.
  57. * @return none
  58. */
  59. void arm_mat_init_q31(
  60. arm_matrix_instance_q31 * S,
  61. uint16_t nRows,
  62. uint16_t nColumns,
  63. q31_t * pData)
  64. {
  65. /* Assign Number of Rows */
  66. S->numRows = nRows;
  67. /* Assign Number of Columns */
  68. S->numCols = nColumns;
  69. /* Assign Data pointer */
  70. S->pData = pData;
  71. }
  72. /**
  73. * @} end of MatrixInit group
  74. */