• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* ----------------------------------------------------------------------
2  * Project:      CMSIS DSP Library
3  * Title:        arm_float_to_f64.c
4  * Description:  Converts the elements of the floating-point vector to floating-point 64 bit vector
5  *
6  * $Date:        18 August 2022
7  * $Revision:    V1.0.0
8  *
9  * Target Processor: Cortex-M and Cortex-A cores
10  * -------------------------------------------------------------------- */
11 /*
12  * Copyright (C) 2010-2022 ARM Limited or its affiliates. All rights reserved.
13  *
14  * SPDX-License-Identifier: Apache-2.0
15  *
16  * Licensed under the Apache License, Version 2.0 (the License); you may
17  * not use this file except in compliance with the License.
18  * You may obtain a copy of the License at
19  *
20  * www.apache.org/licenses/LICENSE-2.0
21  *
22  * Unless required by applicable law or agreed to in writing, software
23  * distributed under the License is distributed on an AS IS BASIS, WITHOUT
24  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25  * See the License for the specific language governing permissions and
26  * limitations under the License.
27  */
28 
29 #include "dsp/support_functions.h"
30 
31 
32 
33 
34 /**
35   @ingroup groupSupport
36  */
37 
38 /**
39   @addtogroup float_to_x
40   @{
41  */
42 
43 /**
44   @brief         Converts the elements of the floating-point vector to f64 vector.
45   @param[in]     pSrc       points to the f32 input vector
46   @param[out]    pDst       points to the f64 output vector
47   @param[in]     blockSize  number of samples in each vector
48   @return        none
49 
50  */
51 
arm_float_to_f64(const float32_t * pSrc,float64_t * pDst,uint32_t blockSize)52 void arm_float_to_f64(
53   const float32_t * pSrc,
54         float64_t * pDst,
55         uint32_t blockSize)
56 
57 {
58     const float32_t *pIn = pSrc;      /* Src pointer */
59     uint32_t  blkCnt;           /* loop counter */
60 
61     /*
62      * Loop over blockSize number of values
63      */
64     blkCnt = blockSize;
65 
66     while (blkCnt > 0U)
67     {
68 
69         *pDst++ = (float64_t) * pIn++;
70         /*
71          * Decrement the loop counter
72          */
73         blkCnt--;
74     }
75 }
76 
77 
78 
79 /**
80   @} end of float_to_x group
81  */
82 
83 
84 
85 
86