Olaf
Overly Lightweight Acoustic Fingerprinting
Loading...
Searching...
No Matches
pffft.h
Go to the documentation of this file.
1/* Copyright (c) 2013 Julien Pommier ( pommier@modartt.com )
2
3 Based on original fortran 77 code from FFTPACKv4 from NETLIB,
4 authored by Dr Paul Swarztrauber of NCAR, in 1985.
5
6 As confirmed by the NCAR fftpack software curators, the following
7 FFTPACKv5 license applies to FFTPACKv4 sources. My changes are
8 released under the same terms.
9
10 FFTPACK license:
11
12 http://www.cisl.ucar.edu/css/software/fftpack5/ftpk.html
13
14 Copyright (c) 2004 the University Corporation for Atmospheric
15 Research ("UCAR"). All rights reserved. Developed by NCAR's
16 Computational and Information Systems Laboratory, UCAR,
17 www.cisl.ucar.edu.
18
19 Redistribution and use of the Software in source and binary forms,
20 with or without modification, is permitted provided that the
21 following conditions are met:
22
23 - Neither the names of NCAR's Computational and Information Systems
24 Laboratory, the University Corporation for Atmospheric Research,
25 nor the names of its sponsors or contributors may be used to
26 endorse or promote products derived from this Software without
27 specific prior written permission.
28
29 - Redistributions of source code must retain the above copyright
30 notices, this list of conditions, and the disclaimer below.
31
32 - Redistributions in binary form must reproduce the above copyright
33 notice, this list of conditions, and the disclaimer below in the
34 documentation and/or other materials provided with the
35 distribution.
36
37 THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
38 EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE WARRANTIES OF
39 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
40 NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT
41 HOLDERS BE LIABLE FOR ANY CLAIM, INDIRECT, INCIDENTAL, SPECIAL,
42 EXEMPLARY, OR CONSEQUENTIAL DAMAGES OR OTHER LIABILITY, WHETHER IN AN
43 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
44 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
45 SOFTWARE.
46*/
47
76
77#ifndef PFFFT_H
78#define PFFFT_H
79
80#include <stddef.h> // for size_t
81
82#ifdef __cplusplus
83extern "C" {
84#endif
85
95 typedef struct PFFFT_Setup PFFFT_Setup;
96
101 typedef enum { PFFFT_FORWARD, PFFFT_BACKWARD } pffft_direction_t;
102
107 typedef enum { PFFFT_REAL, PFFFT_COMPLEX } pffft_transform_t;
108
115
120
139 void pffft_transform(PFFFT_Setup *setup, const float *input, float *output, float *work, pffft_direction_t direction);
140
148 void pffft_transform_ordered(PFFFT_Setup *setup, const float *input, float *output, float *work, pffft_direction_t direction);
149
162 void pffft_zreorder(PFFFT_Setup *setup, const float *input, float *output, pffft_direction_t direction);
163
176 void pffft_zconvolve_accumulate(PFFFT_Setup *setup, const float *dft_a, const float *dft_b, float *dft_ab, float scaling);
177
183 void *pffft_aligned_malloc(size_t nb_bytes);
184
188 void pffft_aligned_free(void *);
189
193 int pffft_simd_size(void);
194
195#ifdef __cplusplus
196}
197#endif
198
199#endif // PFFFT_H
void pffft_aligned_free(void *)
Free the aligned buffers.
Definition pffft.c:261
pffft_direction_t
direction of the transform
Definition pffft.h:101
void pffft_destroy_setup(PFFFT_Setup *)
Free the resources used by the fft.
Definition pffft.c:1261
void pffft_zconvolve_accumulate(PFFFT_Setup *setup, const float *dft_a, const float *dft_b, float *dft_ab, float scaling)
void pffft_transform_ordered(PFFFT_Setup *setup, const float *input, float *output, float *work, pffft_direction_t direction)
Definition pffft.c:1882
PFFFT_Setup * pffft_new_setup(int N, pffft_transform_t transform)
Definition pffft.c:1210
void pffft_zreorder(PFFFT_Setup *setup, const float *input, float *output, pffft_direction_t direction)
void pffft_transform(PFFFT_Setup *setup, const float *input, float *output, float *work, pffft_direction_t direction)
Definition pffft.c:1878
int pffft_simd_size(void)
Definition pffft.c:265
void * pffft_aligned_malloc(size_t nb_bytes)
Definition pffft.c:253
pffft_transform_t
type of transform
Definition pffft.h:107
Internal state for a PFFFT transform instance.
Definition pffft.c:1200
int N
Definition pffft.c:1201
pffft_transform_t transform
Definition pffft.c:1204