libdspl-2.0
Библиотека алгоритмов цифровой обработки сигналов
fft_free.c
1 /*
2 * Copyright (c) 2015-2024 Sergey Bakhurin
3 * Digital Signal Processing Library [http://dsplib.org]
4 *
5 * This file is part of libdspl-2.0.
6 *
7 * is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * DSPL is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 #include <stdlib.h>
22 #include <stdio.h>
23 #include <string.h>
24 #include <float.h>
25 
26 #include "dspl.h"
27 
28 
29 
30 
31 
32 
33 #ifdef DOXYGEN_ENGLISH
34 
46 #endif
47 #ifdef DOXYGEN_RUSSIAN
48 
60 #endif
61 void DSPL_API fft_free(fft_t *pfft)
62 {
63  if(!pfft)
64  return;
65  if(pfft->w)
66  free(pfft->w);
67  if(pfft->t0)
68  free(pfft->t0);
69  if(pfft->t1)
70  free(pfft->t1);
71 
72  if(pfft->w1024)
73  free(pfft->w1024);
74 
75  if(pfft->w2048)
76  free(pfft->w2048);
77 
78  if(pfft->w4096)
79  free(pfft->w4096);
80 
81  memset(pfft, 0, sizeof(fft_t));
82 }
83 
complex_t * w1024
Definition: dspl.h:289
complex_t * t1
Definition: dspl.h:281
complex_t * t0
Definition: dspl.h:280
void fft_free(fft_t *pfft)
Очистить структуру fft_t алгоритма БПФ
Definition: fft_free.c:61
Структура данных объекта быстрого преобразования Фурье
Definition: dspl.h:277
complex_t * w4096
Definition: dspl.h:291
complex_t * w
Definition: dspl.h:279
complex_t * w2048
Definition: dspl.h:290