@@ -32,6 +32,7 @@ extern "C" {
3232#endif
3333
3434// --------------------- guru interface from fortran ------------------------
35+ FINUFFT_EXPORT
3536void finufft_makeplan_ (int *type, int *n_dims, i64 *n_modes, int *iflag, int *n_transf,
3637 f64 *tol, finufft_plan *plan, finufft_opts *o, int *ier) {
3738 if (!plan)
@@ -45,6 +46,7 @@ void finufft_makeplan_(int *type, int *n_dims, i64 *n_modes, int *iflag, int *n_
4546 }
4647}
4748
49+ FINUFFT_EXPORT
4850void finufft_setpts_ (finufft_plan *plan, i64 *M, f64 *xj, f64 *yj, f64 *zj, i64 *nk,
4951 f64 *s, f64 *t, f64 *u, int *ier) {
5052 if (!*plan) {
@@ -56,20 +58,23 @@ void finufft_setpts_(finufft_plan *plan, i64 *M, f64 *xj, f64 *yj, f64 *zj, i64
5658 *ier = finufft_setpts (*plan, *M, xj, yj, zj, nk_safe, s, t, u);
5759}
5860
61+ FINUFFT_EXPORT
5962void finufft_execute_ (finufft_plan *plan, c128 *weights, c128 *result, int *ier) {
6063 if (!plan)
6164 fprintf (stderr, " %s fortran: finufft_plan unallocated!" , __func__);
6265 else
6366 *ier = finufft_execute (*plan, weights, result);
6467}
6568
69+ FINUFFT_EXPORT
6670void finufft_execute_adjoint_ (finufft_plan *plan, c128 *weights, c128 *result, int *ier) {
6771 if (!plan)
6872 fprintf (stderr, " %s fortran: finufft_plan unallocated!" , __func__);
6973 else
7074 *ier = finufft_execute_adjoint (*plan, weights, result);
7175}
7276
77+ FINUFFT_EXPORT
7378void finufft_destroy_ (finufft_plan *plan, int *ier) {
7479 if (!plan)
7580 fprintf (stderr, " %s fortran: finufft_plan unallocated!" , __func__);
@@ -79,6 +84,7 @@ void finufft_destroy_(finufft_plan *plan, int *ier) {
7984
8085// ------------ use FINUFFT to set the default options ---------------------
8186// (Note the finufft_opts is created in f90-style derived types, not here)
87+ FINUFFT_EXPORT
8288void finufft_default_opts_ (finufft_opts *o) {
8389 if (!o)
8490 fprintf (stderr, " %s fortran: opts must be allocated!\n " , __func__);
@@ -89,102 +95,121 @@ void finufft_default_opts_(finufft_opts *o) {
8995
9096// -------------- simple and many-vector interfaces --------------------
9197// --- 1D ---
98+ FINUFFT_EXPORT
9299void finufft1d1_ (i64 *nj, f64 *xj, c128 *cj, int *iflag, f64 *eps, i64 *ms, c128 *fk,
93100 finufft_opts *o, int *ier) {
94101 *ier = finufft1d1 (*nj, xj, cj, *iflag, *eps, *ms, fk, o);
95102}
96103
104+ FINUFFT_EXPORT
97105void finufft1d1many_ (int *ntransf, i64 *nj, f64 *xj, c128 *cj, int *iflag, f64 *eps,
98106 i64 *ms, c128 *fk, finufft_opts *o, int *ier) {
99107 *ier = finufft1d1many (*ntransf, *nj, xj, cj, *iflag, *eps, *ms, fk, o);
100108}
101109
110+ FINUFFT_EXPORT
102111void finufft1d2_ (i64 *nj, f64 *xj, c128 *cj, int *iflag, f64 *eps, i64 *ms, c128 *fk,
103112 finufft_opts *o, int *ier) {
104113 *ier = finufft1d2 (*nj, xj, cj, *iflag, *eps, *ms, fk, o);
105114}
106115
116+ FINUFFT_EXPORT
107117void finufft1d2many_ (int *ntransf, i64 *nj, f64 *xj, c128 *cj, int *iflag, f64 *eps,
108118 i64 *ms, c128 *fk, finufft_opts *o, int *ier) {
109119 *ier = finufft1d2many (*ntransf, *nj, xj, cj, *iflag, *eps, *ms, fk, o);
110120}
111121
122+ FINUFFT_EXPORT
112123void finufft1d3_ (i64 *nj, f64 *x, c128 *c, int *iflag, f64 *eps, i64 *nk, f64 *s, c128 *f,
113124 finufft_opts *o, int *ier) {
114125 *ier = finufft1d3 (*nj, x, c, *iflag, *eps, *nk, s, f, o);
115126}
116127
128+ FINUFFT_EXPORT
117129void finufft1d3many_ (int *ntransf, i64 *nj, f64 *x, c128 *c, int *iflag, f64 *eps,
118130 i64 *nk, f64 *s, c128 *f, finufft_opts *o, int *ier) {
119131 *ier = finufft1d3many (*ntransf, *nj, x, c, *iflag, *eps, *nk, s, f, o);
120132}
121133
122134// --- 2D ---
135+ FINUFFT_EXPORT
123136void finufft2d1_ (i64 *nj, f64 *xj, f64 *yj, c128 *cj, int *iflag, f64 *eps, i64 *ms,
124137 i64 *mt, c128 *fk, finufft_opts *o, int *ier) {
125138 *ier = finufft2d1 (*nj, xj, yj, cj, *iflag, *eps, *ms, *mt, fk, o);
126139}
140+ FINUFFT_EXPORT
127141void finufft2d1many_ (int *ntransf, i64 *nj, f64 *xj, f64 *yj, c128 *cj, int *iflag,
128142 f64 *eps, i64 *ms, i64 *mt, c128 *fk, finufft_opts *o, int *ier) {
129143 *ier = finufft2d1many (*ntransf, *nj, xj, yj, cj, *iflag, *eps, *ms, *mt, fk, o);
130144}
131145
146+ FINUFFT_EXPORT
132147void finufft2d2_ (i64 *nj, f64 *xj, f64 *yj, c128 *cj, int *iflag, f64 *eps, i64 *ms,
133148 i64 *mt, c128 *fk, finufft_opts *o, int *ier) {
134149 *ier = finufft2d2 (*nj, xj, yj, cj, *iflag, *eps, *ms, *mt, fk, o);
135150}
151+ FINUFFT_EXPORT
136152void finufft2d2many_ (int *ntransf, i64 *nj, f64 *xj, f64 *yj, c128 *cj, int *iflag,
137153 f64 *eps, i64 *ms, i64 *mt, c128 *fk, finufft_opts *o, int *ier) {
138154 *ier = finufft2d2many (*ntransf, *nj, xj, yj, cj, *iflag, *eps, *ms, *mt, fk, o);
139155}
140156
157+ FINUFFT_EXPORT
141158void finufft2d3_ (i64 *nj, f64 *x, f64 *y, c128 *c, int *iflag, f64 *eps, i64 *nk, f64 *s,
142159 f64 *t, c128 *f, finufft_opts *o, int *ier) {
143160 *ier = finufft2d3 (*nj, x, y, c, *iflag, *eps, *nk, s, t, f, o);
144161}
145162
163+ FINUFFT_EXPORT
146164void finufft2d3many_ (int *ntransf, i64 *nj, f64 *x, f64 *y, c128 *c, int *iflag, f64 *eps,
147165 i64 *nk, f64 *s, f64 *t, c128 *f, finufft_opts *o, int *ier) {
148166 *ier = finufft2d3many (*ntransf, *nj, x, y, c, *iflag, *eps, *nk, s, t, f, o);
149167}
150168
151169// --- 3D ---
170+ FINUFFT_EXPORT
152171void finufft3d1_ (i64 *nj, f64 *xj, f64 *yj, f64 *zj, c128 *cj, int *iflag, f64 *eps,
153172 i64 *ms, i64 *mt, i64 *mu, c128 *fk, finufft_opts *o, int *ier) {
154173 *ier = finufft3d1 (*nj, xj, yj, zj, cj, *iflag, *eps, *ms, *mt, *mu, fk, o);
155174}
156175
176+ FINUFFT_EXPORT
157177void finufft3d1many_ (int *ntransf, i64 *nj, f64 *xj, f64 *yj, f64 *zj, c128 *cj,
158178 int *iflag, f64 *eps, i64 *ms, i64 *mt, i64 *mu, c128 *fk,
159179 finufft_opts *o, int *ier) {
160180 *ier =
161181 finufft3d1many (*ntransf, *nj, xj, yj, zj, cj, *iflag, *eps, *ms, *mt, *mu, fk, o);
162182}
163183
184+ FINUFFT_EXPORT
164185void finufft3d2_ (i64 *nj, f64 *xj, f64 *yj, f64 *zj, c128 *cj, int *iflag, f64 *eps,
165186 i64 *ms, i64 *mt, i64 *mu, c128 *fk, finufft_opts *o, int *ier) {
166187 *ier = finufft3d2 (*nj, xj, yj, zj, cj, *iflag, *eps, *ms, *mt, *mu, fk, o);
167188}
168189
190+ FINUFFT_EXPORT
169191void finufft3d2many_ (int *ntransf, i64 *nj, f64 *xj, f64 *yj, f64 *zj, c128 *cj,
170192 int *iflag, f64 *eps, i64 *ms, i64 *mt, i64 *mu, c128 *fk,
171193 finufft_opts *o, int *ier) {
172194 *ier =
173195 finufft3d2many (*ntransf, *nj, xj, yj, zj, cj, *iflag, *eps, *ms, *mt, *mu, fk, o);
174196}
175197
198+ FINUFFT_EXPORT
176199void finufft3d3_ (i64 *nj, f64 *x, f64 *y, f64 *z, c128 *c, int *iflag, f64 *eps, i64 *nk,
177200 f64 *s, f64 *t, f64 *u, c128 *f, finufft_opts *o, int *ier) {
178201 *ier = finufft3d3 (*nj, x, y, z, c, *iflag, *eps, *nk, s, t, u, f, o);
179202}
180203
204+ FINUFFT_EXPORT
181205void finufft3d3many_ (int *ntransf, i64 *nj, f64 *x, f64 *y, f64 *z, c128 *c, int *iflag,
182206 f64 *eps, i64 *nk, f64 *s, f64 *t, f64 *u, c128 *f, finufft_opts *o,
183207 int *ier) {
184208 *ier = finufft3d3many (*ntransf, *nj, x, y, z, c, *iflag, *eps, *nk, s, t, u, f, o);
185209}
186210
187211// --------------------- guru interface from fortran ------------------------
212+ FINUFFT_EXPORT
188213void finufftf_makeplan_ (int *type, int *n_dims, i64 *n_modes, int *iflag, int *n_transf,
189214 f32 *tol, finufftf_plan *plan, finufft_opts *o, int *ier) {
190215 if (!plan)
@@ -198,6 +223,7 @@ void finufftf_makeplan_(int *type, int *n_dims, i64 *n_modes, int *iflag, int *n
198223 }
199224}
200225
226+ FINUFFT_EXPORT
201227void finufftf_setpts_ (finufftf_plan *plan, i64 *M, f32 *xj, f32 *yj, f32 *zj, i64 *nk,
202228 f32 *s, f32 *t, f32 *u, int *ier) {
203229 if (!*plan) {
@@ -209,20 +235,23 @@ void finufftf_setpts_(finufftf_plan *plan, i64 *M, f32 *xj, f32 *yj, f32 *zj, i6
209235 *ier = finufftf_setpts (*plan, *M, xj, yj, zj, nk_safe, s, t, u);
210236}
211237
238+ FINUFFT_EXPORT
212239void finufftf_execute_ (finufftf_plan *plan, c64 *weights, c64 *result, int *ier) {
213240 if (!plan)
214241 fprintf (stderr, " %s fortran: finufft_plan unallocated!" , __func__);
215242 else
216243 *ier = finufftf_execute (*plan, weights, result);
217244}
218245
246+ FINUFFT_EXPORT
219247void finufftf_execute_adjoint_ (finufftf_plan *plan, c64 *weights, c64 *result, int *ier) {
220248 if (!plan)
221249 fprintf (stderr, " %s fortran: finufft_plan unallocated!" , __func__);
222250 else
223251 *ier = finufftf_execute_adjoint (*plan, weights, result);
224252}
225253
254+ FINUFFT_EXPORT
226255void finufftf_destroy_ (finufftf_plan *plan, int *ier) {
227256 if (!plan)
228257 fprintf (stderr, " %s fortran: finufft_plan unallocated!" , __func__);
@@ -232,6 +261,7 @@ void finufftf_destroy_(finufftf_plan *plan, int *ier) {
232261
233262// ------------ use FINUFFT to set the default options ---------------------
234263// (Note the finufft_opts is created in f90-style derived types, not here)
264+ FINUFFT_EXPORT
235265void finufftf_default_opts_ (finufft_opts *o) {
236266 if (!o)
237267 fprintf (stderr, " %s fortran: opts must be allocated!\n " , __func__);
@@ -242,95 +272,113 @@ void finufftf_default_opts_(finufft_opts *o) {
242272
243273// -------------- simple and many-vector interfaces --------------------
244274// --- 1D ---
275+ FINUFFT_EXPORT
245276void finufftf1d1_ (i64 *nj, f32 *xj, c64 *cj, int *iflag, f32 *eps, i64 *ms, c64 *fk,
246277 finufft_opts *o, int *ier) {
247278 *ier = finufftf1d1 (*nj, xj, cj, *iflag, *eps, *ms, fk, o);
248279}
249280
281+ FINUFFT_EXPORT
250282void finufftf1d1many_ (int *ntransf, i64 *nj, f32 *xj, c64 *cj, int *iflag, f32 *eps,
251283 i64 *ms, c64 *fk, finufft_opts *o, int *ier) {
252284 *ier = finufftf1d1many (*ntransf, *nj, xj, cj, *iflag, *eps, *ms, fk, o);
253285}
254286
287+ FINUFFT_EXPORT
255288void finufftf1d2_ (i64 *nj, f32 *xj, c64 *cj, int *iflag, f32 *eps, i64 *ms, c64 *fk,
256289 finufft_opts *o, int *ier) {
257290 *ier = finufftf1d2 (*nj, xj, cj, *iflag, *eps, *ms, fk, o);
258291}
259292
293+ FINUFFT_EXPORT
260294void finufftf1d2many_ (int *ntransf, i64 *nj, f32 *xj, c64 *cj, int *iflag, f32 *eps,
261295 i64 *ms, c64 *fk, finufft_opts *o, int *ier) {
262296 *ier = finufftf1d2many (*ntransf, *nj, xj, cj, *iflag, *eps, *ms, fk, o);
263297}
264298
299+ FINUFFT_EXPORT
265300void finufftf1d3_ (i64 *nj, f32 *x, c64 *c, int *iflag, f32 *eps, i64 *nk, f32 *s, c64 *f,
266301 finufft_opts *o, int *ier) {
267302 *ier = finufftf1d3 (*nj, x, c, *iflag, *eps, *nk, s, f, o);
268303}
269304
305+ FINUFFT_EXPORT
270306void finufftf1d3many_ (int *ntransf, i64 *nj, f32 *x, c64 *c, int *iflag, f32 *eps,
271307 i64 *nk, f32 *s, c64 *f, finufft_opts *o, int *ier) {
272308 *ier = finufftf1d3many (*ntransf, *nj, x, c, *iflag, *eps, *nk, s, f, o);
273309}
274310
275311// --- 2D ---
312+ FINUFFT_EXPORT
276313void finufftf2d1_ (i64 *nj, f32 *xj, f32 *yj, c64 *cj, int *iflag, f32 *eps, i64 *ms,
277314 i64 *mt, c64 *fk, finufft_opts *o, int *ier) {
278315 *ier = finufftf2d1 (*nj, xj, yj, cj, *iflag, *eps, *ms, *mt, fk, o);
279316}
317+ FINUFFT_EXPORT
280318void finufftf2d1many_ (int *ntransf, i64 *nj, f32 *xj, f32 *yj, c64 *cj, int *iflag,
281319 f32 *eps, i64 *ms, i64 *mt, c64 *fk, finufft_opts *o, int *ier) {
282320 *ier = finufftf2d1many (*ntransf, *nj, xj, yj, cj, *iflag, *eps, *ms, *mt, fk, o);
283321}
284322
323+ FINUFFT_EXPORT
285324void finufftf2d2_ (i64 *nj, f32 *xj, f32 *yj, c64 *cj, int *iflag, f32 *eps, i64 *ms,
286325 i64 *mt, c64 *fk, finufft_opts *o, int *ier) {
287326 *ier = finufftf2d2 (*nj, xj, yj, cj, *iflag, *eps, *ms, *mt, fk, o);
288327}
328+ FINUFFT_EXPORT
289329void finufftf2d2many_ (int *ntransf, i64 *nj, f32 *xj, f32 *yj, c64 *cj, int *iflag,
290330 f32 *eps, i64 *ms, i64 *mt, c64 *fk, finufft_opts *o, int *ier) {
291331 *ier = finufftf2d2many (*ntransf, *nj, xj, yj, cj, *iflag, *eps, *ms, *mt, fk, o);
292332}
293333
334+ FINUFFT_EXPORT
294335void finufftf2d3_ (i64 *nj, f32 *x, f32 *y, c64 *c, int *iflag, f32 *eps, i64 *nk, f32 *s,
295336 f32 *t, c64 *f, finufft_opts *o, int *ier) {
296337 *ier = finufftf2d3 (*nj, x, y, c, *iflag, *eps, *nk, s, t, f, o);
297338}
298339
340+ FINUFFT_EXPORT
299341void finufftf2d3many_ (int *ntransf, i64 *nj, f32 *x, f32 *y, c64 *c, int *iflag, f32 *eps,
300342 i64 *nk, f32 *s, f32 *t, c64 *f, finufft_opts *o, int *ier) {
301343 *ier = finufftf2d3many (*ntransf, *nj, x, y, c, *iflag, *eps, *nk, s, t, f, o);
302344}
303345
304346// --- 3D ---
347+ FINUFFT_EXPORT
305348void finufftf3d1_ (i64 *nj, f32 *xj, f32 *yj, f32 *zj, c64 *cj, int *iflag, f32 *eps,
306349 i64 *ms, i64 *mt, i64 *mu, c64 *fk, finufft_opts *o, int *ier) {
307350 *ier = finufftf3d1 (*nj, xj, yj, zj, cj, *iflag, *eps, *ms, *mt, *mu, fk, o);
308351}
309352
353+ FINUFFT_EXPORT
310354void finufftf3d1many_ (int *ntransf, i64 *nj, f32 *xj, f32 *yj, f32 *zj, c64 *cj,
311355 int *iflag, f32 *eps, i64 *ms, i64 *mt, i64 *mu, c64 *fk,
312356 finufft_opts *o, int *ier) {
313357 *ier =
314358 finufftf3d1many (*ntransf, *nj, xj, yj, zj, cj, *iflag, *eps, *ms, *mt, *mu, fk, o);
315359}
316360
361+ FINUFFT_EXPORT
317362void finufftf3d2_ (i64 *nj, f32 *xj, f32 *yj, f32 *zj, c64 *cj, int *iflag, f32 *eps,
318363 i64 *ms, i64 *mt, i64 *mu, c64 *fk, finufft_opts *o, int *ier) {
319364 *ier = finufftf3d2 (*nj, xj, yj, zj, cj, *iflag, *eps, *ms, *mt, *mu, fk, o);
320365}
321366
367+ FINUFFT_EXPORT
322368void finufftf3d2many_ (int *ntransf, i64 *nj, f32 *xj, f32 *yj, f32 *zj, c64 *cj,
323369 int *iflag, f32 *eps, i64 *ms, i64 *mt, i64 *mu, c64 *fk,
324370 finufft_opts *o, int *ier) {
325371 *ier =
326372 finufftf3d2many (*ntransf, *nj, xj, yj, zj, cj, *iflag, *eps, *ms, *mt, *mu, fk, o);
327373}
328374
375+ FINUFFT_EXPORT
329376void finufftf3d3_ (i64 *nj, f32 *x, f32 *y, f32 *z, c64 *c, int *iflag, f32 *eps, i64 *nk,
330377 f32 *s, f32 *t, f32 *u, c64 *f, finufft_opts *o, int *ier) {
331378 *ier = finufftf3d3 (*nj, x, y, z, c, *iflag, *eps, *nk, s, t, u, f, o);
332379}
333380
381+ FINUFFT_EXPORT
334382void finufftf3d3many_ (int *ntransf, i64 *nj, f32 *x, f32 *y, f32 *z, c64 *c, int *iflag,
335383 f32 *eps, i64 *nk, f32 *s, f32 *t, f32 *u, c64 *f, finufft_opts *o,
336384 int *ier) {
0 commit comments