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
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
90 typedef struct PFFFT_Setup PFFFT_Setup;
91
96 typedef enum { PFFFT_FORWARD, PFFFT_BACKWARD } pffft_direction_t;
97
102 typedef enum { PFFFT_REAL, PFFFT_COMPLEX } pffft_transform_t;
103
110
115
134 void pffft_transform(PFFFT_Setup *setup, const float *input, float *output, float *work, pffft_direction_t direction);
135
143 void pffft_transform_ordered(PFFFT_Setup *setup, const float *input, float *output, float *work, pffft_direction_t direction);
144
157 void pffft_zreorder(PFFFT_Setup *setup, const float *input, float *output, pffft_direction_t direction);
158
171 void pffft_zconvolve_accumulate(PFFFT_Setup *setup, const float *dft_a, const float *dft_b, float *dft_ab, float scaling);
172
178 void *pffft_aligned_malloc(size_t nb_bytes);
179
183 void pffft_aligned_free(void *);
184
188 int pffft_simd_size();
189
190#ifdef __cplusplus
191}
192#endif
193
194#endif // PFFFT_H
int pffft_simd_size()
Definition: pffft.c:265
void pffft_aligned_free(void *)
Free the aligned buffers.
Definition: pffft.c:261
pffft_direction_t
direction of the transform
Definition: pffft.h:96
void pffft_destroy_setup(PFFFT_Setup *)
Free the resources used by the fft.
Definition: pffft.c:1258
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:1879
PFFFT_Setup * pffft_new_setup(int N, pffft_transform_t transform)
Definition: pffft.c:1207
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:1875
void * pffft_aligned_malloc(size_t nb_bytes)
Definition: pffft.c:253
pffft_transform_t
type of transform
Definition: pffft.h:102
Definition: pffft.c:1197