-
Notifications
You must be signed in to change notification settings - Fork 0
/
pffft.odin
30 lines (25 loc) · 992 Bytes
/
pffft.odin
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package pffft
// Building pffft on MacOS:
// clang pffft.c pffft.h -c -O2 -Os -fPIC
// ar rcs pffft.a pffft.o
foreign import lib "pffft.a"
Direction :: enum {
FORWARD,
BACKWARD,
}
Transform :: enum {
REAL,
COMPLEX,
}
@(default_calling_convention="c", link_prefix="pffft_")
foreign lib {
new_setup :: proc(N: int, transform: Transform) -> rawptr ---
destroy_setup :: proc(setup: rawptr) ---
transform :: proc(setup: rawptr, input: [^]f32, output: [^]f32, work: [^]f32, direction: Direction) ---
transform_ordered :: proc(setup: rawptr, input: [^]f32, output: [^]f32, work: [^]f32, direction: Direction) ---
zreorder :: proc(setup: rawptr, input: [^]f32, output: [^]f32, direction: Direction) ---
zconvolve_accumulate :: proc(setup: rawptr, dft_a: [^]f32, dft_b: [^]f32, dft_ab: [^]f32, scaling: f32) ---
aligned_malloc :: proc(nb_bytes: uint) -> rawptr ---
aligned_free :: proc(setup: rawptr) ---
simd_size :: proc() -> int ---
}