(git:e70887f)
Loading...
Searching...
No Matches
fft_api_F.h
Go to the documentation of this file.
1/*----------------------------------------------------------------------------*/
2/* CP2K: A general program to perform molecular dynamics simulations */
3/* Copyright 2000-2026 CP2K developers group <https://cp2k.org> */
4/* */
5/* SPDX-License-Identifier: BSD-3-Clause */
6/*----------------------------------------------------------------------------*/
7#ifndef FFT_API_F_H
8#define FFT_API_F_H
9
10#include <complex.h>
11#include <stdbool.h>
12
13// Keep in accordance to fft_api.F
14#define FFT_LIBRARY_BACKEND_DEFAULT 1
15#define FFT_LIBRARY_BACKEND_FFTW 2
16#define FFT_LIBRARY_BACKEND_GPU 3
17#define FFT_LIBRARY_FFTW_MODE_ESTIMATE 11
18#define FFT_LIBRARY_FFTW_MODE_MEASURE 12
19#define FFT_LIBRARY_FFTW_MODE_PATIENT 13
20#define FFT_LIBRARY_FFTW_MODE_EXHAUSTIVE 14
21
22/*******************************************************************************
23 * \brief Fortran interface for fft_library_init.
24 *
25 * \param backend_F Fortran-side FFT backend selector.
26 * \param fftw_plan FFTW planning mode.
27 * \param use_guru_interface Whether the FFTW guru interface may be used.
28 * \param wisdom_file Path to the FFTW wisdom file.
29 * \author Frederick Stein
30 ******************************************************************************/
31int fft_library_init_F(const int backend_F, const int fftw_plan,
32 const bool use_guru_interface, const char *wisdom_file);
33
34/*******************************************************************************
35 * \brief Fortran interface for fft_library_finalize.
36 *
37 * \param wisdom_file Path to the FFTW wisdom file.
38 * \author Frederick Stein
39 ******************************************************************************/
40void fft_library_finalize_F(const char *wisdom_file);
41
42typedef void (*fft_print_func_t)(const char *, int, int);
43/*******************************************************************************
44 * \brief Fortran interface for fft_print_timing_report.
45 *
46 * \param threshold Minimum relative timing value to report.
47 * \param fortran_comm Fortran MPI communicator handle.
48 * \author Frederick Stein
49 ******************************************************************************/
50void fft_print_timing_report_F(const double threshold, const int fortran_comm);
51/*******************************************************************************
52 * \brief Fortran interface for fft_print_timing_report_unit.
53 *
54 * \param threshold Minimum relative timing value to report.
55 * \param print_func Callback used to write the timing report.
56 * \param output_unit Fortran output unit for the timing report.
57 * \param fortran_comm Fortran MPI communicator handle.
58 * \author Frederick Stein
59 ******************************************************************************/
60void fft_print_timing_report_unit_F(const double threshold,
62 const int output_unit,
63 const int fortran_comm);
64
65/*******************************************************************************
66 * \brief Fortran interface for fft_backend_in_use.
67 *
68 * \author Frederick Stein
69 ******************************************************************************/
71
72/*******************************************************************************
73 * \brief Fortran interface for fft_has_guru_interface.
74 *
75 * \author Frederick Stein
76 ******************************************************************************/
78
79/*******************************************************************************
80 * \brief Allocate buffer of type double.
81 * \author Frederick Stein
82 ******************************************************************************/
83void fft_allocate_double_F(const int length, double **buffer);
84
85/*******************************************************************************
86 * \brief Allocate buffer of type double complex.
87 * \author Frederick Stein
88 ******************************************************************************/
89void fft_allocate_complex_F(const int length, double complex **buffer);
90
91/*******************************************************************************
92 * \brief Allocate buffer of type double.
93 * \author Frederick Stein
94 ******************************************************************************/
95void fft_free_double_F(double *buffer);
96
97/*******************************************************************************
98 * \brief Allocate buffer of type double complex.
99 * \author Frederick Stein
100 ******************************************************************************/
101void fft_free_complex_F(double complex *buffer);
102
103/*******************************************************************************
104 * \brief Fortran interface for fft_register_1d_local.
105 *
106 * \param dir FFT direction: true for forward, false for backward.
107 * \param fft_size Size of the transform in each dimension.
108 * \param number_of_ffts Number of independent transforms (batch size).
109 * \param transpose_in Whether the input has the transposed layout.
110 * \param transpose_out Whether the output has the transposed layout.
111 * \param leading_dimension_in Leading dimension of the input buffer.
112 * \param leading_dimension_out Leading dimension of the output buffer.
113 * \param grid_in Input grid buffer.
114 * \param grid_out Output grid buffer.
115 * \author Frederick Stein
116 ******************************************************************************/
117void fft_register_1d_local_F(const bool dir, const int fft_size,
118 const int number_of_ffts, const bool transpose_in,
119 const bool transpose_out,
120 const int leading_dimension_in,
121 const int leading_dimension_out,
122 double complex *grid_in, double complex *grid_out);
123
124/*******************************************************************************
125 * \brief Fortran interface for fft_register_2d_local.
126 *
127 * \param dir FFT direction: true for forward, false for backward.
128 * \param fft_size Size of the transform in each dimension.
129 * \param number_of_ffts Number of independent transforms (batch size).
130 * \param transpose_in Whether the input has the transposed layout.
131 * \param transpose_out Whether the output has the transposed layout.
132 * \param grid_in Input grid buffer.
133 * \param grid_out Output grid buffer.
134 * \author Frederick Stein
135 ******************************************************************************/
136void fft_register_2d_local_F(const bool dir, const int fft_size[2],
137 const int number_of_ffts, const bool transpose_in,
138 const bool transpose_out, double complex *grid_in,
139 double complex *grid_out);
140
141/*******************************************************************************
142 * \brief Fortran interface for fft_register_3d_local.
143 *
144 * \param dir FFT direction: true for forward, false for backward.
145 * \param fft_size Size of the transform in each dimension.
146 * \param number_of_ffts Number of independent transforms (batch size).
147 * \param transpose_in Whether the input has the transposed layout.
148 * \param transpose_out Whether the output has the transposed layout.
149 * \param grid_in Input grid buffer.
150 * \param grid_out Output grid buffer.
151 * \author Frederick Stein
152 ******************************************************************************/
153void fft_register_3d_local_F(const bool dir, const int fft_size[3],
154 const int number_of_ffts, const bool transpose_in,
155 const bool transpose_out, double complex *grid_in,
156 double complex *grid_out);
157
158/*******************************************************************************
159 * \brief Fortran interface for fft_register_1d_local_inplace.
160 *
161 * \param dir FFT direction: true for forward, false for backward.
162 * \param fft_size Size of the transform in each dimension.
163 * \param number_of_ffts Number of independent transforms (batch size).
164 * \param transpose Whether the in-place buffer has the transposed layout.
165 * \param leading_dimension Leading dimension of the in-place buffer.
166 * \param grid In-place grid buffer.
167 * \author Frederick Stein
168 ******************************************************************************/
169void fft_register_1d_local_inplace_F(const bool dir, const int fft_size,
170 const int number_of_ffts,
171 const bool transpose,
172 const int leading_dimension,
173 double complex *grid);
174
175/*******************************************************************************
176 * \brief Fortran interface for fft_register_2d_local_inplace.
177 *
178 * \param dir FFT direction: true for forward, false for backward.
179 * \param fft_size Size of the transform in each dimension.
180 * \param number_of_ffts Number of independent transforms (batch size).
181 * \param transpose Whether the in-place buffer has the transposed layout.
182 * \param grid In-place grid buffer.
183 * \author Frederick Stein
184 ******************************************************************************/
185void fft_register_2d_local_inplace_F(const bool dir, const int fft_size[2],
186 const int number_of_ffts,
187 const bool transpose,
188 double complex *grid);
189
190/*******************************************************************************
191 * \brief Fortran interface for fft_register_3d_local_inplace.
192 *
193 * \param dir FFT direction: true for forward, false for backward.
194 * \param fft_size Size of the transform in each dimension.
195 * \param number_of_ffts Number of independent transforms (batch size).
196 * \param transpose Whether the in-place buffer has the transposed layout.
197 * \param grid In-place grid buffer.
198 * \author Frederick Stein
199 ******************************************************************************/
200void fft_register_3d_local_inplace_F(const bool dir, const int fft_size[3],
201 const int number_of_ffts,
202 const bool transpose,
203 double complex *grid);
204
205/*******************************************************************************
206 * \brief Fortran interface for fft_1d_local.
207 *
208 * \param dir FFT direction: true for forward, false for backward.
209 * \param fft_size Size of the transform in each dimension.
210 * \param number_of_ffts Number of independent transforms (batch size).
211 * \param transpose_in Whether the input has the transposed layout.
212 * \param transpose_out Whether the output has the transposed layout.
213 * \param leading_dimension_in Leading dimension of the input buffer.
214 * \param leading_dimension_out Leading dimension of the output buffer.
215 * \param grid_in Input grid buffer.
216 * \param grid_out Output grid buffer.
217 * \author Frederick Stein
218 ******************************************************************************/
219void fft_1d_local_F(const bool dir, const int fft_size,
220 const int number_of_ffts, const bool transpose_in,
221 const bool transpose_out, const int leading_dimension_in,
222 const int leading_dimension_out, double complex *grid_in,
223 double complex *grid_out);
224
225/*******************************************************************************
226 * \brief Fortran interface for fft_2d_local.
227 *
228 * \param dir FFT direction: true for forward, false for backward.
229 * \param fft_size Size of the transform in each dimension.
230 * \param number_of_ffts Number of independent transforms (batch size).
231 * \param transpose_in Whether the input has the transposed layout.
232 * \param transpose_out Whether the output has the transposed layout.
233 * \param grid_in Input grid buffer.
234 * \param grid_out Output grid buffer.
235 * \author Frederick Stein
236 ******************************************************************************/
237void fft_2d_local_F(const bool dir, const int fft_size[2],
238 const int number_of_ffts, const bool transpose_in,
239 const bool transpose_out, double complex *grid_in,
240 double complex *grid_out);
241
242/*******************************************************************************
243 * \brief Fortran interface for fft_3d_local.
244 *
245 * \param dir FFT direction: true for forward, false for backward.
246 * \param fft_size Size of the transform in each dimension.
247 * \param number_of_ffts Number of independent transforms (batch size).
248 * \param transpose_in Whether the input has the transposed layout.
249 * \param transpose_out Whether the output has the transposed layout.
250 * \param grid_in Input grid buffer.
251 * \param grid_out Output grid buffer.
252 * \author Frederick Stein
253 ******************************************************************************/
254void fft_3d_local_F(const bool dir, const int fft_size[3],
255 const int number_of_ffts, const bool transpose_in,
256 const bool transpose_out, double complex *grid_in,
257 double complex *grid_out);
258
259/*******************************************************************************
260 * \brief Fortran interface for fft_1d_local_inplace.
261 *
262 * \param dir FFT direction: true for forward, false for backward.
263 * \param fft_size Size of the transform in each dimension.
264 * \param number_of_ffts Number of independent transforms (batch size).
265 * \param transpose Whether the in-place buffer has the transposed layout.
266 * \param leading_dimension Leading dimension of the in-place buffer.
267 * \param grid In-place grid buffer.
268 * \author Frederick Stein
269 ******************************************************************************/
270void fft_1d_local_inplace_F(const bool dir, const int fft_size,
271 const int number_of_ffts, const bool transpose,
272 const int leading_dimension, double complex *grid);
273
274/*******************************************************************************
275 * \brief Fortran interface for fft_2d_local_inplace.
276 *
277 * \param dir FFT direction: true for forward, false for backward.
278 * \param fft_size Size of the transform in each dimension.
279 * \param number_of_ffts Number of independent transforms (batch size).
280 * \param transpose Whether the in-place buffer has the transposed layout.
281 * \param grid In-place grid buffer.
282 * \author Frederick Stein
283 ******************************************************************************/
284void fft_2d_local_inplace_F(const bool dir, const int fft_size[2],
285 const int number_of_ffts, const bool transpose,
286 double complex *grid);
287
288/*******************************************************************************
289 * \brief Fortran interface for fft_3d_local_inplace.
290 *
291 * \param dir FFT direction: true for forward, false for backward.
292 * \param fft_size Size of the transform in each dimension.
293 * \param number_of_ffts Number of independent transforms (batch size).
294 * \param transpose Whether the in-place buffer has the transposed layout.
295 * \param grid In-place grid buffer.
296 * \author Frederick Stein
297 ******************************************************************************/
298void fft_3d_local_inplace_F(const bool dir, const int fft_size[3],
299 const int number_of_ffts, const bool transpose,
300 double complex *grid);
301
302/*******************************************************************************
303 * \brief Fortran interface for fft_register_1d_r2c_local.
304 *
305 * \param fft_size Size of the transform in each dimension.
306 * \param number_of_ffts Number of independent transforms (batch size).
307 * \param transpose_in Whether the input has the transposed layout.
308 * \param transpose_out Whether the output has the transposed layout.
309 * \param leading_dimension_in Leading dimension of the input buffer.
310 * \param leading_dimension_out Leading dimension of the output buffer.
311 * \param grid_in Input grid buffer.
312 * \param grid_out Output grid buffer.
313 * \author Frederick Stein
314 ******************************************************************************/
315void fft_register_1d_r2c_local_F(const int fft_size, const int number_of_ffts,
316 const bool transpose_in,
317 const bool transpose_out,
318 const int leading_dimension_in,
319 const int leading_dimension_out,
320 double *grid_in, double complex *grid_out);
321/*******************************************************************************
322 * \brief Fortran interface for fft_register_1d_c2r_local.
323 *
324 * \param fft_size Size of the transform in each dimension.
325 * \param number_of_ffts Number of independent transforms (batch size).
326 * \param transpose_in Whether the input has the transposed layout.
327 * \param transpose_out Whether the output has the transposed layout.
328 * \param leading_dimension_in Leading dimension of the input buffer.
329 * \param leading_dimension_out Leading dimension of the output buffer.
330 * \param grid_in Input grid buffer.
331 * \param grid_out Output grid buffer.
332 * \author Frederick Stein
333 ******************************************************************************/
334void fft_register_1d_c2r_local_F(const int fft_size, const int number_of_ffts,
335 const bool transpose_in,
336 const bool transpose_out,
337 const int leading_dimension_in,
338 const int leading_dimension_out,
339 double complex *grid_in, double *grid_out);
340/*******************************************************************************
341 * \brief Fortran interface for fft_register_2d_r2c_local.
342 *
343 * \param fft_size Size of the transform in each dimension.
344 * \param number_of_ffts Number of independent transforms (batch size).
345 * \param transpose_in Whether the input has the transposed layout.
346 * \param transpose_out Whether the output has the transposed layout.
347 * \param grid_in Input grid buffer.
348 * \param grid_out Output grid buffer.
349 * \author Frederick Stein
350 ******************************************************************************/
351void fft_register_2d_r2c_local_F(const int fft_size[2],
352 const int number_of_ffts,
353 const bool transpose_in,
354 const bool transpose_out, double *grid_in,
355 double complex *grid_out);
356/*******************************************************************************
357 * \brief Fortran interface for fft_register_2d_c2r_local.
358 *
359 * \param fft_size Size of the transform in each dimension.
360 * \param number_of_ffts Number of independent transforms (batch size).
361 * \param transpose_in Whether the input has the transposed layout.
362 * \param transpose_out Whether the output has the transposed layout.
363 * \param grid_in Input grid buffer.
364 * \param grid_out Output grid buffer.
365 * \author Frederick Stein
366 ******************************************************************************/
367void fft_register_2d_c2r_local_F(const int fft_size[2],
368 const int number_of_ffts,
369 const bool transpose_in,
370 const bool transpose_out,
371 double complex *grid_in, double *grid_out);
372/*******************************************************************************
373 * \brief Fortran interface for fft_register_3d_r2c_local.
374 *
375 * \param fft_size Size of the transform in each dimension.
376 * \param number_of_ffts Number of independent transforms (batch size).
377 * \param transpose_in Whether the input has the transposed layout.
378 * \param transpose_out Whether the output has the transposed layout.
379 * \param grid_in Input grid buffer.
380 * \param grid_out Output grid buffer.
381 * \author Frederick Stein
382 ******************************************************************************/
383void fft_register_3d_r2c_local_F(const int fft_size[3],
384 const int number_of_ffts,
385 const bool transpose_in,
386 const bool transpose_out, double *grid_in,
387 double complex *grid_out);
388/*******************************************************************************
389 * \brief Fortran interface for fft_register_3d_c2r_local.
390 *
391 * \param fft_size Size of the transform in each dimension.
392 * \param number_of_ffts Number of independent transforms (batch size).
393 * \param transpose_in Whether the input has the transposed layout.
394 * \param transpose_out Whether the output has the transposed layout.
395 * \param grid_in Input grid buffer.
396 * \param grid_out Output grid buffer.
397 * \author Frederick Stein
398 ******************************************************************************/
399void fft_register_3d_c2r_local_F(const int fft_size[3],
400 const int number_of_ffts,
401 const bool transpose_in,
402 const bool transpose_out,
403 double complex *grid_in, double *grid_out);
404
405/*******************************************************************************
406 * \brief Fortran interface for fft_1d_r2c_local.
407 *
408 * \param fft_size Size of the transform in each dimension.
409 * \param number_of_ffts Number of independent transforms (batch size).
410 * \param transpose_in Whether the input has the transposed layout.
411 * \param transpose_out Whether the output has the transposed layout.
412 * \param leading_dimension_in Leading dimension of the input buffer.
413 * \param leading_dimension_out Leading dimension of the output buffer.
414 * \param grid_in Input grid buffer.
415 * \param grid_out Output grid buffer.
416 * \author Frederick Stein
417 ******************************************************************************/
418void fft_1d_r2c_local_F(const int fft_size, const int number_of_ffts,
419 const bool transpose_in, const bool transpose_out,
420 const int leading_dimension_in,
421 const int leading_dimension_out, double *grid_in,
422 double complex *grid_out);
423/*******************************************************************************
424 * \brief Fortran interface for fft_1d_c2r_local.
425 *
426 * \param fft_size Size of the transform in each dimension.
427 * \param number_of_ffts Number of independent transforms (batch size).
428 * \param transpose_in Whether the input has the transposed layout.
429 * \param transpose_out Whether the output has the transposed layout.
430 * \param leading_dimension_in Leading dimension of the input buffer.
431 * \param leading_dimension_out Leading dimension of the output buffer.
432 * \param grid_in Input grid buffer.
433 * \param grid_out Output grid buffer.
434 * \author Frederick Stein
435 ******************************************************************************/
436void fft_1d_c2r_local_F(const int fft_size, const int number_of_ffts,
437 const bool transpose_in, const bool transpose_out,
438 const int leading_dimension_in,
439 const int leading_dimension_out,
440 double complex *grid_in, double *grid_out);
441/*******************************************************************************
442 * \brief Fortran interface for fft_2d_r2c_local.
443 *
444 * \param fft_size Size of the transform in each dimension.
445 * \param number_of_ffts Number of independent transforms (batch size).
446 * \param transpose_in Whether the input has the transposed layout.
447 * \param transpose_out Whether the output has the transposed layout.
448 * \param grid_in Input grid buffer.
449 * \param grid_out Output grid buffer.
450 * \author Frederick Stein
451 ******************************************************************************/
452void fft_2d_r2c_local_F(const int fft_size[2], const int number_of_ffts,
453 const bool transpose_in, const bool transpose_out,
454 double *grid_in, double complex *grid_out);
455/*******************************************************************************
456 * \brief Fortran interface for fft_2d_c2r_local.
457 *
458 * \param fft_size Size of the transform in each dimension.
459 * \param number_of_ffts Number of independent transforms (batch size).
460 * \param transpose_in Whether the input has the transposed layout.
461 * \param transpose_out Whether the output has the transposed layout.
462 * \param grid_in Input grid buffer.
463 * \param grid_out Output grid buffer.
464 * \author Frederick Stein
465 ******************************************************************************/
466void fft_2d_c2r_local_F(const int fft_size[2], const int number_of_ffts,
467 const bool transpose_in, const bool transpose_out,
468 double complex *grid_in, double *grid_out);
469/*******************************************************************************
470 * \brief Fortran interface for fft_3d_r2c_local.
471 *
472 * \param fft_size Size of the transform in each dimension.
473 * \param number_of_ffts Number of independent transforms (batch size).
474 * \param transpose_in Whether the input has the transposed layout.
475 * \param transpose_out Whether the output has the transposed layout.
476 * \param grid_in Input grid buffer.
477 * \param grid_out Output grid buffer.
478 * \author Frederick Stein
479 ******************************************************************************/
480void fft_3d_r2c_local_F(const int fft_size[3], const int number_of_ffts,
481 const bool transpose_in, const bool transpose_out,
482 double *grid_in, double complex *grid_out);
483/*******************************************************************************
484 * \brief Fortran interface for fft_3d_c2r_local.
485 *
486 * \param fft_size Size of the transform in each dimension.
487 * \param number_of_ffts Number of independent transforms (batch size).
488 * \param transpose_in Whether the input has the transposed layout.
489 * \param transpose_out Whether the output has the transposed layout.
490 * \param grid_in Input grid buffer.
491 * \param grid_out Output grid buffer.
492 * \author Frederick Stein
493 ******************************************************************************/
494void fft_3d_c2r_local_F(const int fft_size[3], const int number_of_ffts,
495 const bool transpose_in, const bool transpose_out,
496 double complex *grid_in, double *grid_out);
497
498/*******************************************************************************
499 * \brief Fortran interface for fft_register_1d_r2c_local_inplace.
500 *
501 * \param fft_size Size of the transform in each dimension.
502 * \param number_of_ffts Number of independent transforms (batch size).
503 * \param transpose Whether the in-place buffer has the transposed layout.
504 * \param leading_dimension Leading dimension of the in-place buffer.
505 * \param grid In-place grid buffer.
506 * \author Frederick Stein
507 ******************************************************************************/
508void fft_register_1d_r2c_local_inplace_F(const int fft_size,
509 const int number_of_ffts,
510 const bool transpose,
511 const int leading_dimension,
512 double *grid);
513/*******************************************************************************
514 * \brief Fortran interface for fft_register_1d_c2r_local_inplace.
515 *
516 * \param fft_size Size of the transform in each dimension.
517 * \param number_of_ffts Number of independent transforms (batch size).
518 * \param transpose Whether the in-place buffer has the transposed layout.
519 * \param leading_dimension Leading dimension of the in-place buffer.
520 * \param grid In-place grid buffer.
521 * \author Frederick Stein
522 ******************************************************************************/
523void fft_register_1d_c2r_local_inplace_F(const int fft_size,
524 const int number_of_ffts,
525 const bool transpose,
526 const int leading_dimension,
527 double *grid);
528/*******************************************************************************
529 * \brief Fortran interface for fft_register_2d_r2c_local_inplace.
530 *
531 * \param fft_size Size of the transform in each dimension.
532 * \param number_of_ffts Number of independent transforms (batch size).
533 * \param transpose Whether the in-place buffer has the transposed layout.
534 * \param grid In-place grid buffer.
535 * \author Frederick Stein
536 ******************************************************************************/
537void fft_register_2d_r2c_local_inplace_F(const int fft_size[2],
538 const int number_of_ffts,
539 const bool transpose, double *grid);
540/*******************************************************************************
541 * \brief Fortran interface for fft_register_2d_c2r_local_inplace.
542 *
543 * \param fft_size Size of the transform in each dimension.
544 * \param number_of_ffts Number of independent transforms (batch size).
545 * \param transpose Whether the in-place buffer has the transposed layout.
546 * \param grid In-place grid buffer.
547 * \author Frederick Stein
548 ******************************************************************************/
549void fft_register_2d_c2r_local_inplace_F(const int fft_size[2],
550 const int number_of_ffts,
551 const bool transpose, double *grid);
552/*******************************************************************************
553 * \brief Fortran interface for fft_register_3d_r2c_local_inplace.
554 *
555 * \param fft_size Size of the transform in each dimension.
556 * \param number_of_ffts Number of independent transforms (batch size).
557 * \param transpose Whether the in-place buffer has the transposed layout.
558 * \param grid In-place grid buffer.
559 * \author Frederick Stein
560 ******************************************************************************/
561void fft_register_3d_r2c_local_inplace_F(const int fft_size[3],
562 const int number_of_ffts,
563 const bool transpose, double *grid);
564/*******************************************************************************
565 * \brief Fortran interface for fft_register_3d_c2r_local_inplace.
566 *
567 * \param fft_size Size of the transform in each dimension.
568 * \param number_of_ffts Number of independent transforms (batch size).
569 * \param transpose Whether the in-place buffer has the transposed layout.
570 * \param grid In-place grid buffer.
571 * \author Frederick Stein
572 ******************************************************************************/
573void fft_register_3d_c2r_local_inplace_F(const int fft_size[3],
574 const int number_of_ffts,
575 const bool transpose, double *grid);
576
577/*******************************************************************************
578 * \brief Fortran interface for fft_1d_r2c_local_inplace.
579 *
580 * \param fft_size Size of the transform in each dimension.
581 * \param number_of_ffts Number of independent transforms (batch size).
582 * \param transpose Whether the in-place buffer has the transposed layout.
583 * \param leading_dimension Leading dimension of the in-place buffer.
584 * \param grid In-place grid buffer.
585 * \author Frederick Stein
586 ******************************************************************************/
587void fft_1d_r2c_local_inplace_F(const int fft_size, const int number_of_ffts,
588 const bool transpose,
589 const int leading_dimension, double *grid);
590/*******************************************************************************
591 * \brief Fortran interface for fft_1d_c2r_local_inplace.
592 *
593 * \param fft_size Size of the transform in each dimension.
594 * \param number_of_ffts Number of independent transforms (batch size).
595 * \param transpose Whether the in-place buffer has the transposed layout.
596 * \param leading_dimension Leading dimension of the in-place buffer.
597 * \param grid In-place grid buffer.
598 * \author Frederick Stein
599 ******************************************************************************/
600void fft_1d_c2r_local_inplace_F(const int fft_size, const int number_of_ffts,
601 const bool transpose,
602 const int leading_dimension, double *grid);
603/*******************************************************************************
604 * \brief Fortran interface for fft_2d_r2c_local_inplace.
605 *
606 * \param fft_size Size of the transform in each dimension.
607 * \param number_of_ffts Number of independent transforms (batch size).
608 * \param transpose Whether the in-place buffer has the transposed layout.
609 * \param grid In-place grid buffer.
610 * \author Frederick Stein
611 ******************************************************************************/
612void fft_2d_r2c_local_inplace_F(const int fft_size[2], const int number_of_ffts,
613 const bool transpose, double *grid);
614/*******************************************************************************
615 * \brief Fortran interface for fft_2d_c2r_local_inplace.
616 *
617 * \param fft_size Size of the transform in each dimension.
618 * \param number_of_ffts Number of independent transforms (batch size).
619 * \param transpose Whether the in-place buffer has the transposed layout.
620 * \param grid In-place grid buffer.
621 * \author Frederick Stein
622 ******************************************************************************/
623void fft_2d_c2r_local_inplace_F(const int fft_size[2], const int number_of_ffts,
624 const bool transpose, double *grid);
625/*******************************************************************************
626 * \brief Fortran interface for fft_3d_r2c_local_inplace.
627 *
628 * \param fft_size Size of the transform in each dimension.
629 * \param number_of_ffts Number of independent transforms (batch size).
630 * \param transpose Whether the in-place buffer has the transposed layout.
631 * \param grid In-place grid buffer.
632 * \author Frederick Stein
633 ******************************************************************************/
634void fft_3d_r2c_local_inplace_F(const int fft_size[3], const int number_of_ffts,
635 const bool transpose, double *grid);
636/*******************************************************************************
637 * \brief Fortran interface for fft_3d_c2r_local_inplace.
638 *
639 * \param fft_size Size of the transform in each dimension.
640 * \param number_of_ffts Number of independent transforms (batch size).
641 * \param transpose Whether the in-place buffer has the transposed layout.
642 * \param grid In-place grid buffer.
643 * \author Frederick Stein
644 ******************************************************************************/
645void fft_3d_c2r_local_inplace_F(const int fft_size[3], const int number_of_ffts,
646 const bool transpose, double *grid);
647
648#endif
649// EOF
static void print_func(const char *msg, int msglen, int output_unit)
Wrapper for printf, passed to dbm_library_print_stats.
Definition dbm_miniapp.c:26
void fft_2d_c2r_local_F(const int fft_size[2], const int number_of_ffts, const bool transpose_in, const bool transpose_out, double complex *grid_in, double *grid_out)
Fortran interface for fft_2d_c2r_local.
Definition fft_api_F.c:604
void fft_register_3d_c2r_local_F(const int fft_size[3], const int number_of_ffts, const bool transpose_in, const bool transpose_out, double complex *grid_in, double *grid_out)
Fortran interface for fft_register_3d_c2r_local.
Definition fft_api_F.c:519
void fft_register_3d_r2c_local_inplace_F(const int fft_size[3], const int number_of_ffts, const bool transpose, double *grid)
Fortran interface for fft_register_3d_r2c_local_inplace.
Definition fft_api_F.c:732
void fft_1d_c2r_local_inplace_F(const int fft_size, const int number_of_ffts, const bool transpose, const int leading_dimension, double *grid)
Fortran interface for fft_1d_c2r_local_inplace.
Definition fft_api_F.c:785
void fft_register_3d_r2c_local_F(const int fft_size[3], const int number_of_ffts, const bool transpose_in, const bool transpose_out, double *grid_in, double complex *grid_out)
Fortran interface for fft_register_3d_r2c_local.
Definition fft_api_F.c:498
void fft_1d_r2c_local_inplace_F(const int fft_size, const int number_of_ffts, const bool transpose, const int leading_dimension, double *grid)
Fortran interface for fft_1d_r2c_local_inplace.
Definition fft_api_F.c:767
void fft_1d_local_F(const bool dir, const int fft_size, const int number_of_ffts, const bool transpose_in, const bool transpose_out, const int leading_dimension_in, const int leading_dimension_out, double complex *grid_in, double complex *grid_out)
Fortran interface for fft_1d_local.
Definition fft_api_F.c:296
void fft_1d_c2r_local_F(const int fft_size, const int number_of_ffts, const bool transpose_in, const bool transpose_out, const int leading_dimension_in, const int leading_dimension_out, double complex *grid_in, double *grid_out)
Fortran interface for fft_1d_c2r_local.
Definition fft_api_F.c:565
void fft_2d_r2c_local_F(const int fft_size[2], const int number_of_ffts, const bool transpose_in, const bool transpose_out, double *grid_in, double complex *grid_out)
Fortran interface for fft_2d_r2c_local.
Definition fft_api_F.c:586
void fft_register_3d_c2r_local_inplace_F(const int fft_size[3], const int number_of_ffts, const bool transpose, double *grid)
Fortran interface for fft_register_3d_c2r_local_inplace.
Definition fft_api_F.c:749
void fft_print_timing_report_F(const double threshold, const int fortran_comm)
Fortran interface for fft_print_timing_report.
Definition fft_api_F.c:79
void fft_register_3d_local_inplace_F(const bool dir, const int fft_size[3], const int number_of_ffts, const bool transpose, double complex *grid)
Fortran interface for fft_register_3d_local_inplace.
Definition fft_api_F.c:273
void fft_2d_c2r_local_inplace_F(const int fft_size[2], const int number_of_ffts, const bool transpose, double *grid)
Fortran interface for fft_2d_c2r_local_inplace.
Definition fft_api_F.c:817
void fft_3d_r2c_local_inplace_F(const int fft_size[3], const int number_of_ffts, const bool transpose, double *grid)
Fortran interface for fft_3d_r2c_local_inplace.
Definition fft_api_F.c:832
void fft_print_timing_report_unit_F(const double threshold, fft_print_func_t print_func, const int output_unit, const int fortran_comm)
Fortran interface for fft_print_timing_report_unit.
Definition fft_api_F.c:92
void fft_free_double_F(double *buffer)
Allocate buffer of type double.
Definition fft_api_F.c:125
void fft_register_2d_r2c_local_F(const int fft_size[2], const int number_of_ffts, const bool transpose_in, const bool transpose_out, double *grid_in, double complex *grid_out)
Fortran interface for fft_register_2d_r2c_local.
Definition fft_api_F.c:456
void fft_register_1d_local_inplace_F(const bool dir, const int fft_size, const int number_of_ffts, const bool transpose, const int leading_dimension, double complex *grid)
Fortran interface for fft_register_1d_local_inplace.
Definition fft_api_F.c:236
void fft_allocate_complex_F(const int length, double complex **buffer)
Allocate buffer of type double complex.
Definition fft_api_F.c:116
int fft_backend_in_use_F()
Fortran interface for fft_backend_in_use.
Definition fft_api_F.c:139
void fft_register_3d_local_F(const bool dir, const int fft_size[3], const int number_of_ffts, const bool transpose_in, const bool transpose_out, double complex *grid_in, double complex *grid_out)
Fortran interface for fft_register_3d_local.
Definition fft_api_F.c:216
void fft_library_finalize_F(const char *wisdom_file)
Fortran interface for fft_library_finalize.
Definition fft_api_F.c:67
void fft_allocate_double_F(const int length, double **buffer)
Allocate buffer of type double.
Definition fft_api_F.c:106
void fft_register_1d_local_F(const bool dir, const int fft_size, const int number_of_ffts, const bool transpose_in, const bool transpose_out, const int leading_dimension_in, const int leading_dimension_out, double complex *grid_in, double complex *grid_out)
Fortran interface for fft_register_1d_local.
Definition fft_api_F.c:171
void fft_3d_local_inplace_F(const bool dir, const int fft_size[3], const int number_of_ffts, const bool transpose, double complex *grid)
Fortran interface for fft_3d_local_inplace.
Definition fft_api_F.c:390
void fft_register_2d_local_F(const bool dir, const int fft_size[2], const int number_of_ffts, const bool transpose_in, const bool transpose_out, double complex *grid_in, double complex *grid_out)
Fortran interface for fft_register_2d_local.
Definition fft_api_F.c:195
void fft_register_2d_r2c_local_inplace_F(const int fft_size[2], const int number_of_ffts, const bool transpose, double *grid)
Fortran interface for fft_register_2d_r2c_local_inplace.
Definition fft_api_F.c:698
void fft_3d_c2r_local_inplace_F(const int fft_size[3], const int number_of_ffts, const bool transpose, double *grid)
Fortran interface for fft_3d_c2r_local_inplace.
Definition fft_api_F.c:848
void fft_register_2d_c2r_local_F(const int fft_size[2], const int number_of_ffts, const bool transpose_in, const bool transpose_out, double complex *grid_in, double *grid_out)
Fortran interface for fft_register_2d_c2r_local.
Definition fft_api_F.c:477
void fft_2d_local_inplace_F(const bool dir, const int fft_size[2], const int number_of_ffts, const bool transpose, double complex *grid)
Fortran interface for fft_2d_local_inplace.
Definition fft_api_F.c:373
void fft_register_1d_c2r_local_inplace_F(const int fft_size, const int number_of_ffts, const bool transpose, const int leading_dimension, double *grid)
Fortran interface for fft_register_1d_c2r_local_inplace.
Definition fft_api_F.c:679
void fft_3d_local_F(const bool dir, const int fft_size[3], const int number_of_ffts, const bool transpose_in, const bool transpose_out, double complex *grid_in, double complex *grid_out)
Fortran interface for fft_3d_local.
Definition fft_api_F.c:337
void fft_2d_r2c_local_inplace_F(const int fft_size[2], const int number_of_ffts, const bool transpose, double *grid)
Fortran interface for fft_2d_r2c_local_inplace.
Definition fft_api_F.c:802
void fft_3d_r2c_local_F(const int fft_size[3], const int number_of_ffts, const bool transpose_in, const bool transpose_out, double *grid_in, double complex *grid_out)
Fortran interface for fft_3d_r2c_local.
Definition fft_api_F.c:622
void fft_2d_local_F(const bool dir, const int fft_size[2], const int number_of_ffts, const bool transpose_in, const bool transpose_out, double complex *grid_in, double complex *grid_out)
Fortran interface for fft_2d_local.
Definition fft_api_F.c:317
void fft_register_2d_c2r_local_inplace_F(const int fft_size[2], const int number_of_ffts, const bool transpose, double *grid)
Fortran interface for fft_register_2d_c2r_local_inplace.
Definition fft_api_F.c:715
void fft_register_2d_local_inplace_F(const bool dir, const int fft_size[2], const int number_of_ffts, const bool transpose, double complex *grid)
Fortran interface for fft_register_2d_local_inplace.
Definition fft_api_F.c:255
void fft_register_1d_r2c_local_F(const int fft_size, const int number_of_ffts, const bool transpose_in, const bool transpose_out, const int leading_dimension_in, const int leading_dimension_out, double *grid_in, double complex *grid_out)
Fortran interface for fft_register_1d_r2c_local.
Definition fft_api_F.c:410
bool fft_has_guru_interface_F()
Fortran interface for fft_has_guru_interface.
Definition fft_api_F.c:155
void fft_free_complex_F(double complex *buffer)
Allocate buffer of type double complex.
Definition fft_api_F.c:132
void(* fft_print_func_t)(const char *, int, int)
Definition fft_api_F.h:42
void fft_1d_local_inplace_F(const bool dir, const int fft_size, const int number_of_ffts, const bool transpose, const int leading_dimension, double complex *grid)
Fortran interface for fft_1d_local_inplace.
Definition fft_api_F.c:356
void fft_register_1d_r2c_local_inplace_F(const int fft_size, const int number_of_ffts, const bool transpose, const int leading_dimension, double *grid)
Fortran interface for fft_register_1d_r2c_local_inplace.
Definition fft_api_F.c:659
int fft_library_init_F(const int backend_F, const int fftw_plan, const bool use_guru_interface, const char *wisdom_file)
Fortran interface for fft_library_init.
Definition fft_api_F.c:25
void fft_3d_c2r_local_F(const int fft_size[3], const int number_of_ffts, const bool transpose_in, const bool transpose_out, double complex *grid_in, double *grid_out)
Fortran interface for fft_3d_c2r_local.
Definition fft_api_F.c:641
void fft_register_1d_c2r_local_F(const int fft_size, const int number_of_ffts, const bool transpose_in, const bool transpose_out, const int leading_dimension_in, const int leading_dimension_out, double complex *grid_in, double *grid_out)
Fortran interface for fft_register_1d_c2r_local.
Definition fft_api_F.c:434
void fft_1d_r2c_local_F(const int fft_size, const int number_of_ffts, const bool transpose_in, const bool transpose_out, const int leading_dimension_in, const int leading_dimension_out, double *grid_in, double complex *grid_out)
Fortran interface for fft_1d_r2c_local.
Definition fft_api_F.c:542
static void const int const int const int const int const int const double const int const int const int int GRID_CONST_WHEN_COLLOCATE double GRID_CONST_WHEN_INTEGRATE double * grid