-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathminfft.F03
169 lines (167 loc) · 6.25 KB
/
minfft.F03
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
! A minimalistic FFT library
! Copyright (c) 2016-2024 Alexander Mukhin
! SPDX-License-Identifier: MIT
#if MINFFT_SINGLE
#define MINFFT_R C_FLOAT
#define MINFFT_C C_FLOAT_COMPLEX
#else
#define MINFFT_R C_DOUBLE
#define MINFFT_C C_DOUBLE_COMPLEX
#endif
module minfft
use,intrinsic :: iso_c_binding, only: minfft_real=>MINFFT_R, &
minfft_cmpl=>MINFFT_C, &
minfft_aux=>C_PTR, &
C_INT,C_NULL_PTR
implicit none
interface
subroutine minfft_dft(x,y,a) bind(C)
import
complex(minfft_cmpl),dimension(*),intent(in) :: x
complex(minfft_cmpl),dimension(*),intent(out) :: y
type(minfft_aux),value :: a
end subroutine
subroutine minfft_invdft(x,y,a) bind(C)
import
complex(minfft_cmpl),dimension(*),intent(in) :: x
complex(minfft_cmpl),dimension(*),intent(out) :: y
type(minfft_aux),value :: a
end subroutine
subroutine minfft_realdft(x,z,a) bind(C)
import
real(minfft_real),dimension(*),intent(in) :: x
complex(minfft_cmpl),dimension(*),intent(out) :: z
type(minfft_aux),value :: a
end subroutine
subroutine minfft_invrealdft(z,y,a) bind(C)
import
complex(minfft_cmpl),dimension(*),intent(in) :: z
real(minfft_real),dimension(*),intent(out) :: y
type(minfft_aux),value :: a
end subroutine
subroutine minfft_dct2(x,y,a) bind(C)
import
real(minfft_real),dimension(*),intent(in) :: x
real(minfft_real),dimension(*),intent(out) :: y
type(minfft_aux),value :: a
end subroutine
subroutine minfft_dst2(x,y,a) bind(C)
import
real(minfft_real),dimension(*),intent(in) :: x
real(minfft_real),dimension(*),intent(out) :: y
type(minfft_aux),value :: a
end subroutine
subroutine minfft_dct3(x,y,a) bind(C)
import
real(minfft_real),dimension(*),intent(in) :: x
real(minfft_real),dimension(*),intent(out) :: y
type(minfft_aux),value :: a
end subroutine
subroutine minfft_dst3(x,y,a) bind(C)
import
real(minfft_real),dimension(*),intent(in) :: x
real(minfft_real),dimension(*),intent(out) :: y
type(minfft_aux),value :: a
end subroutine
subroutine minfft_dct4(x,y,a) bind(C)
import
real(minfft_real),dimension(*),intent(in) :: x
real(minfft_real),dimension(*),intent(out) :: y
type(minfft_aux),value :: a
end subroutine
subroutine minfft_dst4(x,y,a) bind(C)
import
real(minfft_real),dimension(*),intent(in) :: x
real(minfft_real),dimension(*),intent(out) :: y
type(minfft_aux),value :: a
end subroutine
function minfft_mkaux_dft_1d(n) bind(C)
import
integer(C_INT),value :: n
type(minfft_aux) :: minfft_mkaux_dft_1d
end function
function minfft_mkaux_dft_2d(n1,n2) bind(C)
import
integer(C_INT),value :: n1,n2
type(minfft_aux) :: minfft_mkaux_dft_2d
end function
function minfft_mkaux_dft_3d(n1,n2,n3) bind(C)
import
integer(C_INT),value :: n1,n2,n3
type(minfft_aux) :: minfft_mkaux_dft_3d
end function
function minfft_mkaux_dft(d,ns) bind(C)
import
integer(C_INT),value :: d
integer(C_INT),dimension(*),intent(in) :: ns
type(minfft_aux) :: minfft_mkaux_dft
end function
function minfft_mkaux_realdft_1d(n) bind(C)
import
integer(C_INT),value :: n
type(minfft_aux) :: minfft_mkaux_realdft_1d
end function
function minfft_mkaux_realdft_2d(n1,n2) bind(C)
import
integer(C_INT),value :: n1,n2
type(minfft_aux) :: minfft_mkaux_realdft_2d
end function
function minfft_mkaux_realdft_3d(n1,n2,n3) bind(C)
import
integer(C_INT),value :: n1,n2,n3
type(minfft_aux) :: minfft_mkaux_realdft_3d
end function
function minfft_mkaux_realdft(d,ns) bind(C)
import
integer(C_INT),value :: d
integer(C_INT),dimension(*),intent(in) :: ns
type(minfft_aux) :: minfft_mkaux_realdft
end function
function minfft_mkaux_t2t3_1d(n) bind(C)
import
integer(C_INT),value :: n
type(minfft_aux) :: minfft_mkaux_t2t3_1d
end function
function minfft_mkaux_t2t3_2d(n1,n2) bind(C)
import
integer(C_INT),value :: n1,n2
type(minfft_aux) :: minfft_mkaux_t2t3_2d
end function
function minfft_mkaux_t2t3_3d(n1,n2,n3) bind(C)
import
integer(C_INT),value :: n1,n2,n3
type(minfft_aux) :: minfft_mkaux_t2t3_3d
end function
function minfft_mkaux_t2t3(d,ns) bind(C)
import
integer(C_INT),value :: d
integer(C_INT),dimension(*),intent(in) :: ns
type(minfft_aux) :: minfft_mkaux_t2t3
end function
function minfft_mkaux_t4_1d(n) bind(C)
import
integer(C_INT),value :: n
type(minfft_aux) :: minfft_mkaux_t4_1d
end function
function minfft_mkaux_t4_2d(n1,n2) bind(C)
import
integer(C_INT),value :: n1,n2
type(minfft_aux) :: minfft_mkaux_t4_2d
end function
function minfft_mkaux_t4_3d(n1,n2,n3) bind(C)
import
integer(C_INT),value :: n1,n2,n3
type(minfft_aux) :: minfft_mkaux_t4_3d
end function
function minfft_mkaux_t4(d,ns) bind(C)
import
integer(C_INT),value :: d
integer(C_INT),dimension(*),intent(in) :: ns
type(minfft_aux) :: minfft_mkaux_t4
end function
subroutine minfft_free_aux(a) bind(C)
import
type(minfft_aux),value :: a
end subroutine
end interface
end module