fftw3.f03 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264
  1. ! Generated automatically. DO NOT EDIT!
  2. integer, parameter :: C_FFTW_R2R_KIND = C_INT32_T
  3. integer(C_INT), parameter :: FFTW_R2HC = 0
  4. integer(C_INT), parameter :: FFTW_HC2R = 1
  5. integer(C_INT), parameter :: FFTW_DHT = 2
  6. integer(C_INT), parameter :: FFTW_REDFT00 = 3
  7. integer(C_INT), parameter :: FFTW_REDFT01 = 4
  8. integer(C_INT), parameter :: FFTW_REDFT10 = 5
  9. integer(C_INT), parameter :: FFTW_REDFT11 = 6
  10. integer(C_INT), parameter :: FFTW_RODFT00 = 7
  11. integer(C_INT), parameter :: FFTW_RODFT01 = 8
  12. integer(C_INT), parameter :: FFTW_RODFT10 = 9
  13. integer(C_INT), parameter :: FFTW_RODFT11 = 10
  14. integer(C_INT), parameter :: FFTW_FORWARD = -1
  15. integer(C_INT), parameter :: FFTW_BACKWARD = +1
  16. integer(C_INT), parameter :: FFTW_MEASURE = 0
  17. integer(C_INT), parameter :: FFTW_DESTROY_INPUT = 1
  18. integer(C_INT), parameter :: FFTW_UNALIGNED = 2
  19. integer(C_INT), parameter :: FFTW_CONSERVE_MEMORY = 4
  20. integer(C_INT), parameter :: FFTW_EXHAUSTIVE = 8
  21. integer(C_INT), parameter :: FFTW_PRESERVE_INPUT = 16
  22. integer(C_INT), parameter :: FFTW_PATIENT = 32
  23. integer(C_INT), parameter :: FFTW_ESTIMATE = 64
  24. integer(C_INT), parameter :: FFTW_WISDOM_ONLY = 2097152
  25. integer(C_INT), parameter :: FFTW_ESTIMATE_PATIENT = 128
  26. integer(C_INT), parameter :: FFTW_BELIEVE_PCOST = 256
  27. integer(C_INT), parameter :: FFTW_NO_DFT_R2HC = 512
  28. integer(C_INT), parameter :: FFTW_NO_NONTHREADED = 1024
  29. integer(C_INT), parameter :: FFTW_NO_BUFFERING = 2048
  30. integer(C_INT), parameter :: FFTW_NO_INDIRECT_OP = 4096
  31. integer(C_INT), parameter :: FFTW_ALLOW_LARGE_GENERIC = 8192
  32. integer(C_INT), parameter :: FFTW_NO_RANK_SPLITS = 16384
  33. integer(C_INT), parameter :: FFTW_NO_VRANK_SPLITS = 32768
  34. integer(C_INT), parameter :: FFTW_NO_VRECURSE = 65536
  35. integer(C_INT), parameter :: FFTW_NO_SIMD = 131072
  36. integer(C_INT), parameter :: FFTW_NO_SLOW = 262144
  37. integer(C_INT), parameter :: FFTW_NO_FIXED_RADIX_LARGE_N = 524288
  38. integer(C_INT), parameter :: FFTW_ALLOW_PRUNING = 1048576
  39. type, bind(C) :: fftw_iodim
  40. integer(C_INT) n, is, os
  41. end type fftw_iodim
  42. type, bind(C) :: fftw_iodim64
  43. integer(C_INTPTR_T) n, is, os
  44. end type fftw_iodim64
  45. interface
  46. type(C_PTR) function fftw_plan_dft(rank,n,in,out,sign,flags) bind(C, name='fftw_plan_dft')
  47. import
  48. integer(C_INT), value :: rank
  49. integer(C_INT), dimension(*), intent(in) :: n
  50. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in
  51. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out
  52. integer(C_INT), value :: sign
  53. integer(C_INT), value :: flags
  54. end function fftw_plan_dft
  55. type(C_PTR) function fftw_plan_dft_1d(n,in,out,sign,flags) bind(C, name='fftw_plan_dft_1d')
  56. import
  57. integer(C_INT), value :: n
  58. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in
  59. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out
  60. integer(C_INT), value :: sign
  61. integer(C_INT), value :: flags
  62. end function fftw_plan_dft_1d
  63. type(C_PTR) function fftw_plan_dft_2d(n0,n1,in,out,sign,flags) bind(C, name='fftw_plan_dft_2d')
  64. import
  65. integer(C_INT), value :: n0
  66. integer(C_INT), value :: n1
  67. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in
  68. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out
  69. integer(C_INT), value :: sign
  70. integer(C_INT), value :: flags
  71. end function fftw_plan_dft_2d
  72. type(C_PTR) function fftw_plan_dft_3d(n0,n1,n2,in,out,sign,flags) bind(C, name='fftw_plan_dft_3d')
  73. import
  74. integer(C_INT), value :: n0
  75. integer(C_INT), value :: n1
  76. integer(C_INT), value :: n2
  77. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in
  78. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out
  79. integer(C_INT), value :: sign
  80. integer(C_INT), value :: flags
  81. end function fftw_plan_dft_3d
  82. type(C_PTR) function fftw_plan_many_dft(rank,n,howmany,in,inembed,istride,idist,out,onembed,ostride,odist,sign,flags) &
  83. bind(C, name='fftw_plan_many_dft')
  84. import
  85. integer(C_INT), value :: rank
  86. integer(C_INT), dimension(*), intent(in) :: n
  87. integer(C_INT), value :: howmany
  88. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in
  89. integer(C_INT), dimension(*), intent(in) :: inembed
  90. integer(C_INT), value :: istride
  91. integer(C_INT), value :: idist
  92. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out
  93. integer(C_INT), dimension(*), intent(in) :: onembed
  94. integer(C_INT), value :: ostride
  95. integer(C_INT), value :: odist
  96. integer(C_INT), value :: sign
  97. integer(C_INT), value :: flags
  98. end function fftw_plan_many_dft
  99. type(C_PTR) function fftw_plan_guru_dft(rank,dims,howmany_rank,howmany_dims,in,out,sign,flags) &
  100. bind(C, name='fftw_plan_guru_dft')
  101. import
  102. integer(C_INT), value :: rank
  103. type(fftw_iodim), dimension(*), intent(in) :: dims
  104. integer(C_INT), value :: howmany_rank
  105. type(fftw_iodim), dimension(*), intent(in) :: howmany_dims
  106. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in
  107. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out
  108. integer(C_INT), value :: sign
  109. integer(C_INT), value :: flags
  110. end function fftw_plan_guru_dft
  111. type(C_PTR) function fftw_plan_guru_split_dft(rank,dims,howmany_rank,howmany_dims,ri,ii,ro,io,flags) &
  112. bind(C, name='fftw_plan_guru_split_dft')
  113. import
  114. integer(C_INT), value :: rank
  115. type(fftw_iodim), dimension(*), intent(in) :: dims
  116. integer(C_INT), value :: howmany_rank
  117. type(fftw_iodim), dimension(*), intent(in) :: howmany_dims
  118. real(C_DOUBLE), dimension(*), intent(out) :: ri
  119. real(C_DOUBLE), dimension(*), intent(out) :: ii
  120. real(C_DOUBLE), dimension(*), intent(out) :: ro
  121. real(C_DOUBLE), dimension(*), intent(out) :: io
  122. integer(C_INT), value :: flags
  123. end function fftw_plan_guru_split_dft
  124. type(C_PTR) function fftw_plan_guru64_dft(rank,dims,howmany_rank,howmany_dims,in,out,sign,flags) &
  125. bind(C, name='fftw_plan_guru64_dft')
  126. import
  127. integer(C_INT), value :: rank
  128. type(fftw_iodim64), dimension(*), intent(in) :: dims
  129. integer(C_INT), value :: howmany_rank
  130. type(fftw_iodim64), dimension(*), intent(in) :: howmany_dims
  131. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in
  132. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out
  133. integer(C_INT), value :: sign
  134. integer(C_INT), value :: flags
  135. end function fftw_plan_guru64_dft
  136. type(C_PTR) function fftw_plan_guru64_split_dft(rank,dims,howmany_rank,howmany_dims,ri,ii,ro,io,flags) &
  137. bind(C, name='fftw_plan_guru64_split_dft')
  138. import
  139. integer(C_INT), value :: rank
  140. type(fftw_iodim64), dimension(*), intent(in) :: dims
  141. integer(C_INT), value :: howmany_rank
  142. type(fftw_iodim64), dimension(*), intent(in) :: howmany_dims
  143. real(C_DOUBLE), dimension(*), intent(out) :: ri
  144. real(C_DOUBLE), dimension(*), intent(out) :: ii
  145. real(C_DOUBLE), dimension(*), intent(out) :: ro
  146. real(C_DOUBLE), dimension(*), intent(out) :: io
  147. integer(C_INT), value :: flags
  148. end function fftw_plan_guru64_split_dft
  149. subroutine fftw_execute_dft(p,in,out) bind(C, name='fftw_execute_dft')
  150. import
  151. type(C_PTR), value :: p
  152. complex(C_DOUBLE_COMPLEX), dimension(*), intent(inout) :: in
  153. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out
  154. end subroutine fftw_execute_dft
  155. subroutine fftw_execute_split_dft(p,ri,ii,ro,io) bind(C, name='fftw_execute_split_dft')
  156. import
  157. type(C_PTR), value :: p
  158. real(C_DOUBLE), dimension(*), intent(inout) :: ri
  159. real(C_DOUBLE), dimension(*), intent(inout) :: ii
  160. real(C_DOUBLE), dimension(*), intent(out) :: ro
  161. real(C_DOUBLE), dimension(*), intent(out) :: io
  162. end subroutine fftw_execute_split_dft
  163. type(C_PTR) function fftw_plan_many_dft_r2c(rank,n,howmany,in,inembed,istride,idist,out,onembed,ostride,odist,flags) &
  164. bind(C, name='fftw_plan_many_dft_r2c')
  165. import
  166. integer(C_INT), value :: rank
  167. integer(C_INT), dimension(*), intent(in) :: n
  168. integer(C_INT), value :: howmany
  169. real(C_DOUBLE), dimension(*), intent(out) :: in
  170. integer(C_INT), dimension(*), intent(in) :: inembed
  171. integer(C_INT), value :: istride
  172. integer(C_INT), value :: idist
  173. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out
  174. integer(C_INT), dimension(*), intent(in) :: onembed
  175. integer(C_INT), value :: ostride
  176. integer(C_INT), value :: odist
  177. integer(C_INT), value :: flags
  178. end function fftw_plan_many_dft_r2c
  179. type(C_PTR) function fftw_plan_dft_r2c(rank,n,in,out,flags) bind(C, name='fftw_plan_dft_r2c')
  180. import
  181. integer(C_INT), value :: rank
  182. integer(C_INT), dimension(*), intent(in) :: n
  183. real(C_DOUBLE), dimension(*), intent(out) :: in
  184. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out
  185. integer(C_INT), value :: flags
  186. end function fftw_plan_dft_r2c
  187. type(C_PTR) function fftw_plan_dft_r2c_1d(n,in,out,flags) bind(C, name='fftw_plan_dft_r2c_1d')
  188. import
  189. integer(C_INT), value :: n
  190. real(C_DOUBLE), dimension(*), intent(out) :: in
  191. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out
  192. integer(C_INT), value :: flags
  193. end function fftw_plan_dft_r2c_1d
  194. type(C_PTR) function fftw_plan_dft_r2c_2d(n0,n1,in,out,flags) bind(C, name='fftw_plan_dft_r2c_2d')
  195. import
  196. integer(C_INT), value :: n0
  197. integer(C_INT), value :: n1
  198. real(C_DOUBLE), dimension(*), intent(out) :: in
  199. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out
  200. integer(C_INT), value :: flags
  201. end function fftw_plan_dft_r2c_2d
  202. type(C_PTR) function fftw_plan_dft_r2c_3d(n0,n1,n2,in,out,flags) bind(C, name='fftw_plan_dft_r2c_3d')
  203. import
  204. integer(C_INT), value :: n0
  205. integer(C_INT), value :: n1
  206. integer(C_INT), value :: n2
  207. real(C_DOUBLE), dimension(*), intent(out) :: in
  208. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out
  209. integer(C_INT), value :: flags
  210. end function fftw_plan_dft_r2c_3d
  211. type(C_PTR) function fftw_plan_many_dft_c2r(rank,n,howmany,in,inembed,istride,idist,out,onembed,ostride,odist,flags) &
  212. bind(C, name='fftw_plan_many_dft_c2r')
  213. import
  214. integer(C_INT), value :: rank
  215. integer(C_INT), dimension(*), intent(in) :: n
  216. integer(C_INT), value :: howmany
  217. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in
  218. integer(C_INT), dimension(*), intent(in) :: inembed
  219. integer(C_INT), value :: istride
  220. integer(C_INT), value :: idist
  221. real(C_DOUBLE), dimension(*), intent(out) :: out
  222. integer(C_INT), dimension(*), intent(in) :: onembed
  223. integer(C_INT), value :: ostride
  224. integer(C_INT), value :: odist
  225. integer(C_INT), value :: flags
  226. end function fftw_plan_many_dft_c2r
  227. type(C_PTR) function fftw_plan_dft_c2r(rank,n,in,out,flags) bind(C, name='fftw_plan_dft_c2r')
  228. import
  229. integer(C_INT), value :: rank
  230. integer(C_INT), dimension(*), intent(in) :: n
  231. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in
  232. real(C_DOUBLE), dimension(*), intent(out) :: out
  233. integer(C_INT), value :: flags
  234. end function fftw_plan_dft_c2r
  235. type(C_PTR) function fftw_plan_dft_c2r_1d(n,in,out,flags) bind(C, name='fftw_plan_dft_c2r_1d')
  236. import
  237. integer(C_INT), value :: n
  238. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in
  239. real(C_DOUBLE), dimension(*), intent(out) :: out
  240. integer(C_INT), value :: flags
  241. end function fftw_plan_dft_c2r_1d
  242. type(C_PTR) function fftw_plan_dft_c2r_2d(n0,n1,in,out,flags) bind(C, name='fftw_plan_dft_c2r_2d')
  243. import
  244. integer(C_INT), value :: n0
  245. integer(C_INT), value :: n1
  246. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in
  247. real(C_DOUBLE), dimension(*), intent(out) :: out
  248. integer(C_INT), value :: flags
  249. end function fftw_plan_dft_c2r_2d
  250. type(C_PTR) function fftw_plan_dft_c2r_3d(n0,n1,n2,in,out,flags) bind(C, name='fftw_plan_dft_c2r_3d')
  251. import
  252. integer(C_INT), value :: n0
  253. integer(C_INT), value :: n1
  254. integer(C_INT), value :: n2
  255. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in
  256. real(C_DOUBLE), dimension(*), intent(out) :: out
  257. integer(C_INT), value :: flags
  258. end function fftw_plan_dft_c2r_3d
  259. type(C_PTR) function fftw_plan_guru_dft_r2c(rank,dims,howmany_rank,howmany_dims,in,out,flags) &
  260. bind(C, name='fftw_plan_guru_dft_r2c')
  261. import
  262. integer(C_INT), value :: rank
  263. type(fftw_iodim), dimension(*), intent(in) :: dims
  264. integer(C_INT), value :: howmany_rank
  265. type(fftw_iodim), dimension(*), intent(in) :: howmany_dims
  266. real(C_DOUBLE), dimension(*), intent(out) :: in
  267. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out
  268. integer(C_INT), value :: flags
  269. end function fftw_plan_guru_dft_r2c
  270. type(C_PTR) function fftw_plan_guru_dft_c2r(rank,dims,howmany_rank,howmany_dims,in,out,flags) &
  271. bind(C, name='fftw_plan_guru_dft_c2r')
  272. import
  273. integer(C_INT), value :: rank
  274. type(fftw_iodim), dimension(*), intent(in) :: dims
  275. integer(C_INT), value :: howmany_rank
  276. type(fftw_iodim), dimension(*), intent(in) :: howmany_dims
  277. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in
  278. real(C_DOUBLE), dimension(*), intent(out) :: out
  279. integer(C_INT), value :: flags
  280. end function fftw_plan_guru_dft_c2r
  281. type(C_PTR) function fftw_plan_guru_split_dft_r2c(rank,dims,howmany_rank,howmany_dims,in,ro,io,flags) &
  282. bind(C, name='fftw_plan_guru_split_dft_r2c')
  283. import
  284. integer(C_INT), value :: rank
  285. type(fftw_iodim), dimension(*), intent(in) :: dims
  286. integer(C_INT), value :: howmany_rank
  287. type(fftw_iodim), dimension(*), intent(in) :: howmany_dims
  288. real(C_DOUBLE), dimension(*), intent(out) :: in
  289. real(C_DOUBLE), dimension(*), intent(out) :: ro
  290. real(C_DOUBLE), dimension(*), intent(out) :: io
  291. integer(C_INT), value :: flags
  292. end function fftw_plan_guru_split_dft_r2c
  293. type(C_PTR) function fftw_plan_guru_split_dft_c2r(rank,dims,howmany_rank,howmany_dims,ri,ii,out,flags) &
  294. bind(C, name='fftw_plan_guru_split_dft_c2r')
  295. import
  296. integer(C_INT), value :: rank
  297. type(fftw_iodim), dimension(*), intent(in) :: dims
  298. integer(C_INT), value :: howmany_rank
  299. type(fftw_iodim), dimension(*), intent(in) :: howmany_dims
  300. real(C_DOUBLE), dimension(*), intent(out) :: ri
  301. real(C_DOUBLE), dimension(*), intent(out) :: ii
  302. real(C_DOUBLE), dimension(*), intent(out) :: out
  303. integer(C_INT), value :: flags
  304. end function fftw_plan_guru_split_dft_c2r
  305. type(C_PTR) function fftw_plan_guru64_dft_r2c(rank,dims,howmany_rank,howmany_dims,in,out,flags) &
  306. bind(C, name='fftw_plan_guru64_dft_r2c')
  307. import
  308. integer(C_INT), value :: rank
  309. type(fftw_iodim64), dimension(*), intent(in) :: dims
  310. integer(C_INT), value :: howmany_rank
  311. type(fftw_iodim64), dimension(*), intent(in) :: howmany_dims
  312. real(C_DOUBLE), dimension(*), intent(out) :: in
  313. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out
  314. integer(C_INT), value :: flags
  315. end function fftw_plan_guru64_dft_r2c
  316. type(C_PTR) function fftw_plan_guru64_dft_c2r(rank,dims,howmany_rank,howmany_dims,in,out,flags) &
  317. bind(C, name='fftw_plan_guru64_dft_c2r')
  318. import
  319. integer(C_INT), value :: rank
  320. type(fftw_iodim64), dimension(*), intent(in) :: dims
  321. integer(C_INT), value :: howmany_rank
  322. type(fftw_iodim64), dimension(*), intent(in) :: howmany_dims
  323. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in
  324. real(C_DOUBLE), dimension(*), intent(out) :: out
  325. integer(C_INT), value :: flags
  326. end function fftw_plan_guru64_dft_c2r
  327. type(C_PTR) function fftw_plan_guru64_split_dft_r2c(rank,dims,howmany_rank,howmany_dims,in,ro,io,flags) &
  328. bind(C, name='fftw_plan_guru64_split_dft_r2c')
  329. import
  330. integer(C_INT), value :: rank
  331. type(fftw_iodim64), dimension(*), intent(in) :: dims
  332. integer(C_INT), value :: howmany_rank
  333. type(fftw_iodim64), dimension(*), intent(in) :: howmany_dims
  334. real(C_DOUBLE), dimension(*), intent(out) :: in
  335. real(C_DOUBLE), dimension(*), intent(out) :: ro
  336. real(C_DOUBLE), dimension(*), intent(out) :: io
  337. integer(C_INT), value :: flags
  338. end function fftw_plan_guru64_split_dft_r2c
  339. type(C_PTR) function fftw_plan_guru64_split_dft_c2r(rank,dims,howmany_rank,howmany_dims,ri,ii,out,flags) &
  340. bind(C, name='fftw_plan_guru64_split_dft_c2r')
  341. import
  342. integer(C_INT), value :: rank
  343. type(fftw_iodim64), dimension(*), intent(in) :: dims
  344. integer(C_INT), value :: howmany_rank
  345. type(fftw_iodim64), dimension(*), intent(in) :: howmany_dims
  346. real(C_DOUBLE), dimension(*), intent(out) :: ri
  347. real(C_DOUBLE), dimension(*), intent(out) :: ii
  348. real(C_DOUBLE), dimension(*), intent(out) :: out
  349. integer(C_INT), value :: flags
  350. end function fftw_plan_guru64_split_dft_c2r
  351. subroutine fftw_execute_dft_r2c(p,in,out) bind(C, name='fftw_execute_dft_r2c')
  352. import
  353. type(C_PTR), value :: p
  354. real(C_DOUBLE), dimension(*), intent(inout) :: in
  355. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out
  356. end subroutine fftw_execute_dft_r2c
  357. subroutine fftw_execute_dft_c2r(p,in,out) bind(C, name='fftw_execute_dft_c2r')
  358. import
  359. type(C_PTR), value :: p
  360. complex(C_DOUBLE_COMPLEX), dimension(*), intent(inout) :: in
  361. real(C_DOUBLE), dimension(*), intent(out) :: out
  362. end subroutine fftw_execute_dft_c2r
  363. subroutine fftw_execute_split_dft_r2c(p,in,ro,io) bind(C, name='fftw_execute_split_dft_r2c')
  364. import
  365. type(C_PTR), value :: p
  366. real(C_DOUBLE), dimension(*), intent(inout) :: in
  367. real(C_DOUBLE), dimension(*), intent(out) :: ro
  368. real(C_DOUBLE), dimension(*), intent(out) :: io
  369. end subroutine fftw_execute_split_dft_r2c
  370. subroutine fftw_execute_split_dft_c2r(p,ri,ii,out) bind(C, name='fftw_execute_split_dft_c2r')
  371. import
  372. type(C_PTR), value :: p
  373. real(C_DOUBLE), dimension(*), intent(inout) :: ri
  374. real(C_DOUBLE), dimension(*), intent(inout) :: ii
  375. real(C_DOUBLE), dimension(*), intent(out) :: out
  376. end subroutine fftw_execute_split_dft_c2r
  377. type(C_PTR) function fftw_plan_many_r2r(rank,n,howmany,in,inembed,istride,idist,out,onembed,ostride,odist,kind,flags) &
  378. bind(C, name='fftw_plan_many_r2r')
  379. import
  380. integer(C_INT), value :: rank
  381. integer(C_INT), dimension(*), intent(in) :: n
  382. integer(C_INT), value :: howmany
  383. real(C_DOUBLE), dimension(*), intent(out) :: in
  384. integer(C_INT), dimension(*), intent(in) :: inembed
  385. integer(C_INT), value :: istride
  386. integer(C_INT), value :: idist
  387. real(C_DOUBLE), dimension(*), intent(out) :: out
  388. integer(C_INT), dimension(*), intent(in) :: onembed
  389. integer(C_INT), value :: ostride
  390. integer(C_INT), value :: odist
  391. integer(C_FFTW_R2R_KIND), dimension(*), intent(in) :: kind
  392. integer(C_INT), value :: flags
  393. end function fftw_plan_many_r2r
  394. type(C_PTR) function fftw_plan_r2r(rank,n,in,out,kind,flags) bind(C, name='fftw_plan_r2r')
  395. import
  396. integer(C_INT), value :: rank
  397. integer(C_INT), dimension(*), intent(in) :: n
  398. real(C_DOUBLE), dimension(*), intent(out) :: in
  399. real(C_DOUBLE), dimension(*), intent(out) :: out
  400. integer(C_FFTW_R2R_KIND), dimension(*), intent(in) :: kind
  401. integer(C_INT), value :: flags
  402. end function fftw_plan_r2r
  403. type(C_PTR) function fftw_plan_r2r_1d(n,in,out,kind,flags) bind(C, name='fftw_plan_r2r_1d')
  404. import
  405. integer(C_INT), value :: n
  406. real(C_DOUBLE), dimension(*), intent(out) :: in
  407. real(C_DOUBLE), dimension(*), intent(out) :: out
  408. integer(C_FFTW_R2R_KIND), value :: kind
  409. integer(C_INT), value :: flags
  410. end function fftw_plan_r2r_1d
  411. type(C_PTR) function fftw_plan_r2r_2d(n0,n1,in,out,kind0,kind1,flags) bind(C, name='fftw_plan_r2r_2d')
  412. import
  413. integer(C_INT), value :: n0
  414. integer(C_INT), value :: n1
  415. real(C_DOUBLE), dimension(*), intent(out) :: in
  416. real(C_DOUBLE), dimension(*), intent(out) :: out
  417. integer(C_FFTW_R2R_KIND), value :: kind0
  418. integer(C_FFTW_R2R_KIND), value :: kind1
  419. integer(C_INT), value :: flags
  420. end function fftw_plan_r2r_2d
  421. type(C_PTR) function fftw_plan_r2r_3d(n0,n1,n2,in,out,kind0,kind1,kind2,flags) bind(C, name='fftw_plan_r2r_3d')
  422. import
  423. integer(C_INT), value :: n0
  424. integer(C_INT), value :: n1
  425. integer(C_INT), value :: n2
  426. real(C_DOUBLE), dimension(*), intent(out) :: in
  427. real(C_DOUBLE), dimension(*), intent(out) :: out
  428. integer(C_FFTW_R2R_KIND), value :: kind0
  429. integer(C_FFTW_R2R_KIND), value :: kind1
  430. integer(C_FFTW_R2R_KIND), value :: kind2
  431. integer(C_INT), value :: flags
  432. end function fftw_plan_r2r_3d
  433. type(C_PTR) function fftw_plan_guru_r2r(rank,dims,howmany_rank,howmany_dims,in,out,kind,flags) &
  434. bind(C, name='fftw_plan_guru_r2r')
  435. import
  436. integer(C_INT), value :: rank
  437. type(fftw_iodim), dimension(*), intent(in) :: dims
  438. integer(C_INT), value :: howmany_rank
  439. type(fftw_iodim), dimension(*), intent(in) :: howmany_dims
  440. real(C_DOUBLE), dimension(*), intent(out) :: in
  441. real(C_DOUBLE), dimension(*), intent(out) :: out
  442. integer(C_FFTW_R2R_KIND), dimension(*), intent(in) :: kind
  443. integer(C_INT), value :: flags
  444. end function fftw_plan_guru_r2r
  445. type(C_PTR) function fftw_plan_guru64_r2r(rank,dims,howmany_rank,howmany_dims,in,out,kind,flags) &
  446. bind(C, name='fftw_plan_guru64_r2r')
  447. import
  448. integer(C_INT), value :: rank
  449. type(fftw_iodim64), dimension(*), intent(in) :: dims
  450. integer(C_INT), value :: howmany_rank
  451. type(fftw_iodim64), dimension(*), intent(in) :: howmany_dims
  452. real(C_DOUBLE), dimension(*), intent(out) :: in
  453. real(C_DOUBLE), dimension(*), intent(out) :: out
  454. integer(C_FFTW_R2R_KIND), dimension(*), intent(in) :: kind
  455. integer(C_INT), value :: flags
  456. end function fftw_plan_guru64_r2r
  457. subroutine fftw_execute_r2r(p,in,out) bind(C, name='fftw_execute_r2r')
  458. import
  459. type(C_PTR), value :: p
  460. real(C_DOUBLE), dimension(*), intent(inout) :: in
  461. real(C_DOUBLE), dimension(*), intent(out) :: out
  462. end subroutine fftw_execute_r2r
  463. subroutine fftw_destroy_plan(p) bind(C, name='fftw_destroy_plan')
  464. import
  465. type(C_PTR), value :: p
  466. end subroutine fftw_destroy_plan
  467. subroutine fftw_forget_wisdom() bind(C, name='fftw_forget_wisdom')
  468. import
  469. end subroutine fftw_forget_wisdom
  470. subroutine fftw_cleanup() bind(C, name='fftw_cleanup')
  471. import
  472. end subroutine fftw_cleanup
  473. subroutine fftw_set_timelimit(t) bind(C, name='fftw_set_timelimit')
  474. import
  475. real(C_DOUBLE), value :: t
  476. end subroutine fftw_set_timelimit
  477. subroutine fftw_plan_with_nthreads(nthreads) bind(C, name='fftw_plan_with_nthreads')
  478. import
  479. integer(C_INT), value :: nthreads
  480. end subroutine fftw_plan_with_nthreads
  481. integer(C_INT) function fftw_planner_nthreads() bind(C, name='fftw_planner_nthreads')
  482. import
  483. end function fftw_planner_nthreads
  484. integer(C_INT) function fftw_init_threads() bind(C, name='fftw_init_threads')
  485. import
  486. end function fftw_init_threads
  487. subroutine fftw_cleanup_threads() bind(C, name='fftw_cleanup_threads')
  488. import
  489. end subroutine fftw_cleanup_threads
  490. ! Unable to generate Fortran interface for fftw_threads_set_callback
  491. subroutine fftw_make_planner_thread_safe() bind(C, name='fftw_make_planner_thread_safe')
  492. import
  493. end subroutine fftw_make_planner_thread_safe
  494. integer(C_INT) function fftw_export_wisdom_to_filename(filename) bind(C, name='fftw_export_wisdom_to_filename')
  495. import
  496. character(C_CHAR), dimension(*), intent(in) :: filename
  497. end function fftw_export_wisdom_to_filename
  498. subroutine fftw_export_wisdom_to_file(output_file) bind(C, name='fftw_export_wisdom_to_file')
  499. import
  500. type(C_PTR), value :: output_file
  501. end subroutine fftw_export_wisdom_to_file
  502. type(C_PTR) function fftw_export_wisdom_to_string() bind(C, name='fftw_export_wisdom_to_string')
  503. import
  504. end function fftw_export_wisdom_to_string
  505. subroutine fftw_export_wisdom(write_char,data) bind(C, name='fftw_export_wisdom')
  506. import
  507. type(C_FUNPTR), value :: write_char
  508. type(C_PTR), value :: data
  509. end subroutine fftw_export_wisdom
  510. integer(C_INT) function fftw_import_system_wisdom() bind(C, name='fftw_import_system_wisdom')
  511. import
  512. end function fftw_import_system_wisdom
  513. integer(C_INT) function fftw_import_wisdom_from_filename(filename) bind(C, name='fftw_import_wisdom_from_filename')
  514. import
  515. character(C_CHAR), dimension(*), intent(in) :: filename
  516. end function fftw_import_wisdom_from_filename
  517. integer(C_INT) function fftw_import_wisdom_from_file(input_file) bind(C, name='fftw_import_wisdom_from_file')
  518. import
  519. type(C_PTR), value :: input_file
  520. end function fftw_import_wisdom_from_file
  521. integer(C_INT) function fftw_import_wisdom_from_string(input_string) bind(C, name='fftw_import_wisdom_from_string')
  522. import
  523. character(C_CHAR), dimension(*), intent(in) :: input_string
  524. end function fftw_import_wisdom_from_string
  525. integer(C_INT) function fftw_import_wisdom(read_char,data) bind(C, name='fftw_import_wisdom')
  526. import
  527. type(C_FUNPTR), value :: read_char
  528. type(C_PTR), value :: data
  529. end function fftw_import_wisdom
  530. subroutine fftw_fprint_plan(p,output_file) bind(C, name='fftw_fprint_plan')
  531. import
  532. type(C_PTR), value :: p
  533. type(C_PTR), value :: output_file
  534. end subroutine fftw_fprint_plan
  535. subroutine fftw_print_plan(p) bind(C, name='fftw_print_plan')
  536. import
  537. type(C_PTR), value :: p
  538. end subroutine fftw_print_plan
  539. type(C_PTR) function fftw_sprint_plan(p) bind(C, name='fftw_sprint_plan')
  540. import
  541. type(C_PTR), value :: p
  542. end function fftw_sprint_plan
  543. type(C_PTR) function fftw_malloc(n) bind(C, name='fftw_malloc')
  544. import
  545. integer(C_SIZE_T), value :: n
  546. end function fftw_malloc
  547. type(C_PTR) function fftw_alloc_real(n) bind(C, name='fftw_alloc_real')
  548. import
  549. integer(C_SIZE_T), value :: n
  550. end function fftw_alloc_real
  551. type(C_PTR) function fftw_alloc_complex(n) bind(C, name='fftw_alloc_complex')
  552. import
  553. integer(C_SIZE_T), value :: n
  554. end function fftw_alloc_complex
  555. subroutine fftw_free(p) bind(C, name='fftw_free')
  556. import
  557. type(C_PTR), value :: p
  558. end subroutine fftw_free
  559. subroutine fftw_flops(p,add,mul,fmas) bind(C, name='fftw_flops')
  560. import
  561. type(C_PTR), value :: p
  562. real(C_DOUBLE), intent(out) :: add
  563. real(C_DOUBLE), intent(out) :: mul
  564. real(C_DOUBLE), intent(out) :: fmas
  565. end subroutine fftw_flops
  566. real(C_DOUBLE) function fftw_estimate_cost(p) bind(C, name='fftw_estimate_cost')
  567. import
  568. type(C_PTR), value :: p
  569. end function fftw_estimate_cost
  570. real(C_DOUBLE) function fftw_cost(p) bind(C, name='fftw_cost')
  571. import
  572. type(C_PTR), value :: p
  573. end function fftw_cost
  574. integer(C_INT) function fftw_alignment_of(p) bind(C, name='fftw_alignment_of')
  575. import
  576. real(C_DOUBLE), dimension(*), intent(out) :: p
  577. end function fftw_alignment_of
  578. end interface
  579. type, bind(C) :: fftwf_iodim
  580. integer(C_INT) n, is, os
  581. end type fftwf_iodim
  582. type, bind(C) :: fftwf_iodim64
  583. integer(C_INTPTR_T) n, is, os
  584. end type fftwf_iodim64
  585. interface
  586. type(C_PTR) function fftwf_plan_dft(rank,n,in,out,sign,flags) bind(C, name='fftwf_plan_dft')
  587. import
  588. integer(C_INT), value :: rank
  589. integer(C_INT), dimension(*), intent(in) :: n
  590. complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: in
  591. complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: out
  592. integer(C_INT), value :: sign
  593. integer(C_INT), value :: flags
  594. end function fftwf_plan_dft
  595. type(C_PTR) function fftwf_plan_dft_1d(n,in,out,sign,flags) bind(C, name='fftwf_plan_dft_1d')
  596. import
  597. integer(C_INT), value :: n
  598. complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: in
  599. complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: out
  600. integer(C_INT), value :: sign
  601. integer(C_INT), value :: flags
  602. end function fftwf_plan_dft_1d
  603. type(C_PTR) function fftwf_plan_dft_2d(n0,n1,in,out,sign,flags) bind(C, name='fftwf_plan_dft_2d')
  604. import
  605. integer(C_INT), value :: n0
  606. integer(C_INT), value :: n1
  607. complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: in
  608. complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: out
  609. integer(C_INT), value :: sign
  610. integer(C_INT), value :: flags
  611. end function fftwf_plan_dft_2d
  612. type(C_PTR) function fftwf_plan_dft_3d(n0,n1,n2,in,out,sign,flags) bind(C, name='fftwf_plan_dft_3d')
  613. import
  614. integer(C_INT), value :: n0
  615. integer(C_INT), value :: n1
  616. integer(C_INT), value :: n2
  617. complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: in
  618. complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: out
  619. integer(C_INT), value :: sign
  620. integer(C_INT), value :: flags
  621. end function fftwf_plan_dft_3d
  622. type(C_PTR) function fftwf_plan_many_dft(rank,n,howmany,in,inembed,istride,idist,out,onembed,ostride,odist,sign,flags) &
  623. bind(C, name='fftwf_plan_many_dft')
  624. import
  625. integer(C_INT), value :: rank
  626. integer(C_INT), dimension(*), intent(in) :: n
  627. integer(C_INT), value :: howmany
  628. complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: in
  629. integer(C_INT), dimension(*), intent(in) :: inembed
  630. integer(C_INT), value :: istride
  631. integer(C_INT), value :: idist
  632. complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: out
  633. integer(C_INT), dimension(*), intent(in) :: onembed
  634. integer(C_INT), value :: ostride
  635. integer(C_INT), value :: odist
  636. integer(C_INT), value :: sign
  637. integer(C_INT), value :: flags
  638. end function fftwf_plan_many_dft
  639. type(C_PTR) function fftwf_plan_guru_dft(rank,dims,howmany_rank,howmany_dims,in,out,sign,flags) &
  640. bind(C, name='fftwf_plan_guru_dft')
  641. import
  642. integer(C_INT), value :: rank
  643. type(fftwf_iodim), dimension(*), intent(in) :: dims
  644. integer(C_INT), value :: howmany_rank
  645. type(fftwf_iodim), dimension(*), intent(in) :: howmany_dims
  646. complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: in
  647. complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: out
  648. integer(C_INT), value :: sign
  649. integer(C_INT), value :: flags
  650. end function fftwf_plan_guru_dft
  651. type(C_PTR) function fftwf_plan_guru_split_dft(rank,dims,howmany_rank,howmany_dims,ri,ii,ro,io,flags) &
  652. bind(C, name='fftwf_plan_guru_split_dft')
  653. import
  654. integer(C_INT), value :: rank
  655. type(fftwf_iodim), dimension(*), intent(in) :: dims
  656. integer(C_INT), value :: howmany_rank
  657. type(fftwf_iodim), dimension(*), intent(in) :: howmany_dims
  658. real(C_FLOAT), dimension(*), intent(out) :: ri
  659. real(C_FLOAT), dimension(*), intent(out) :: ii
  660. real(C_FLOAT), dimension(*), intent(out) :: ro
  661. real(C_FLOAT), dimension(*), intent(out) :: io
  662. integer(C_INT), value :: flags
  663. end function fftwf_plan_guru_split_dft
  664. type(C_PTR) function fftwf_plan_guru64_dft(rank,dims,howmany_rank,howmany_dims,in,out,sign,flags) &
  665. bind(C, name='fftwf_plan_guru64_dft')
  666. import
  667. integer(C_INT), value :: rank
  668. type(fftwf_iodim64), dimension(*), intent(in) :: dims
  669. integer(C_INT), value :: howmany_rank
  670. type(fftwf_iodim64), dimension(*), intent(in) :: howmany_dims
  671. complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: in
  672. complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: out
  673. integer(C_INT), value :: sign
  674. integer(C_INT), value :: flags
  675. end function fftwf_plan_guru64_dft
  676. type(C_PTR) function fftwf_plan_guru64_split_dft(rank,dims,howmany_rank,howmany_dims,ri,ii,ro,io,flags) &
  677. bind(C, name='fftwf_plan_guru64_split_dft')
  678. import
  679. integer(C_INT), value :: rank
  680. type(fftwf_iodim64), dimension(*), intent(in) :: dims
  681. integer(C_INT), value :: howmany_rank
  682. type(fftwf_iodim64), dimension(*), intent(in) :: howmany_dims
  683. real(C_FLOAT), dimension(*), intent(out) :: ri
  684. real(C_FLOAT), dimension(*), intent(out) :: ii
  685. real(C_FLOAT), dimension(*), intent(out) :: ro
  686. real(C_FLOAT), dimension(*), intent(out) :: io
  687. integer(C_INT), value :: flags
  688. end function fftwf_plan_guru64_split_dft
  689. subroutine fftwf_execute_dft(p,in,out) bind(C, name='fftwf_execute_dft')
  690. import
  691. type(C_PTR), value :: p
  692. complex(C_FLOAT_COMPLEX), dimension(*), intent(inout) :: in
  693. complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: out
  694. end subroutine fftwf_execute_dft
  695. subroutine fftwf_execute_split_dft(p,ri,ii,ro,io) bind(C, name='fftwf_execute_split_dft')
  696. import
  697. type(C_PTR), value :: p
  698. real(C_FLOAT), dimension(*), intent(inout) :: ri
  699. real(C_FLOAT), dimension(*), intent(inout) :: ii
  700. real(C_FLOAT), dimension(*), intent(out) :: ro
  701. real(C_FLOAT), dimension(*), intent(out) :: io
  702. end subroutine fftwf_execute_split_dft
  703. type(C_PTR) function fftwf_plan_many_dft_r2c(rank,n,howmany,in,inembed,istride,idist,out,onembed,ostride,odist,flags) &
  704. bind(C, name='fftwf_plan_many_dft_r2c')
  705. import
  706. integer(C_INT), value :: rank
  707. integer(C_INT), dimension(*), intent(in) :: n
  708. integer(C_INT), value :: howmany
  709. real(C_FLOAT), dimension(*), intent(out) :: in
  710. integer(C_INT), dimension(*), intent(in) :: inembed
  711. integer(C_INT), value :: istride
  712. integer(C_INT), value :: idist
  713. complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: out
  714. integer(C_INT), dimension(*), intent(in) :: onembed
  715. integer(C_INT), value :: ostride
  716. integer(C_INT), value :: odist
  717. integer(C_INT), value :: flags
  718. end function fftwf_plan_many_dft_r2c
  719. type(C_PTR) function fftwf_plan_dft_r2c(rank,n,in,out,flags) bind(C, name='fftwf_plan_dft_r2c')
  720. import
  721. integer(C_INT), value :: rank
  722. integer(C_INT), dimension(*), intent(in) :: n
  723. real(C_FLOAT), dimension(*), intent(out) :: in
  724. complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: out
  725. integer(C_INT), value :: flags
  726. end function fftwf_plan_dft_r2c
  727. type(C_PTR) function fftwf_plan_dft_r2c_1d(n,in,out,flags) bind(C, name='fftwf_plan_dft_r2c_1d')
  728. import
  729. integer(C_INT), value :: n
  730. real(C_FLOAT), dimension(*), intent(out) :: in
  731. complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: out
  732. integer(C_INT), value :: flags
  733. end function fftwf_plan_dft_r2c_1d
  734. type(C_PTR) function fftwf_plan_dft_r2c_2d(n0,n1,in,out,flags) bind(C, name='fftwf_plan_dft_r2c_2d')
  735. import
  736. integer(C_INT), value :: n0
  737. integer(C_INT), value :: n1
  738. real(C_FLOAT), dimension(*), intent(out) :: in
  739. complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: out
  740. integer(C_INT), value :: flags
  741. end function fftwf_plan_dft_r2c_2d
  742. type(C_PTR) function fftwf_plan_dft_r2c_3d(n0,n1,n2,in,out,flags) bind(C, name='fftwf_plan_dft_r2c_3d')
  743. import
  744. integer(C_INT), value :: n0
  745. integer(C_INT), value :: n1
  746. integer(C_INT), value :: n2
  747. real(C_FLOAT), dimension(*), intent(out) :: in
  748. complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: out
  749. integer(C_INT), value :: flags
  750. end function fftwf_plan_dft_r2c_3d
  751. type(C_PTR) function fftwf_plan_many_dft_c2r(rank,n,howmany,in,inembed,istride,idist,out,onembed,ostride,odist,flags) &
  752. bind(C, name='fftwf_plan_many_dft_c2r')
  753. import
  754. integer(C_INT), value :: rank
  755. integer(C_INT), dimension(*), intent(in) :: n
  756. integer(C_INT), value :: howmany
  757. complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: in
  758. integer(C_INT), dimension(*), intent(in) :: inembed
  759. integer(C_INT), value :: istride
  760. integer(C_INT), value :: idist
  761. real(C_FLOAT), dimension(*), intent(out) :: out
  762. integer(C_INT), dimension(*), intent(in) :: onembed
  763. integer(C_INT), value :: ostride
  764. integer(C_INT), value :: odist
  765. integer(C_INT), value :: flags
  766. end function fftwf_plan_many_dft_c2r
  767. type(C_PTR) function fftwf_plan_dft_c2r(rank,n,in,out,flags) bind(C, name='fftwf_plan_dft_c2r')
  768. import
  769. integer(C_INT), value :: rank
  770. integer(C_INT), dimension(*), intent(in) :: n
  771. complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: in
  772. real(C_FLOAT), dimension(*), intent(out) :: out
  773. integer(C_INT), value :: flags
  774. end function fftwf_plan_dft_c2r
  775. type(C_PTR) function fftwf_plan_dft_c2r_1d(n,in,out,flags) bind(C, name='fftwf_plan_dft_c2r_1d')
  776. import
  777. integer(C_INT), value :: n
  778. complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: in
  779. real(C_FLOAT), dimension(*), intent(out) :: out
  780. integer(C_INT), value :: flags
  781. end function fftwf_plan_dft_c2r_1d
  782. type(C_PTR) function fftwf_plan_dft_c2r_2d(n0,n1,in,out,flags) bind(C, name='fftwf_plan_dft_c2r_2d')
  783. import
  784. integer(C_INT), value :: n0
  785. integer(C_INT), value :: n1
  786. complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: in
  787. real(C_FLOAT), dimension(*), intent(out) :: out
  788. integer(C_INT), value :: flags
  789. end function fftwf_plan_dft_c2r_2d
  790. type(C_PTR) function fftwf_plan_dft_c2r_3d(n0,n1,n2,in,out,flags) bind(C, name='fftwf_plan_dft_c2r_3d')
  791. import
  792. integer(C_INT), value :: n0
  793. integer(C_INT), value :: n1
  794. integer(C_INT), value :: n2
  795. complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: in
  796. real(C_FLOAT), dimension(*), intent(out) :: out
  797. integer(C_INT), value :: flags
  798. end function fftwf_plan_dft_c2r_3d
  799. type(C_PTR) function fftwf_plan_guru_dft_r2c(rank,dims,howmany_rank,howmany_dims,in,out,flags) &
  800. bind(C, name='fftwf_plan_guru_dft_r2c')
  801. import
  802. integer(C_INT), value :: rank
  803. type(fftwf_iodim), dimension(*), intent(in) :: dims
  804. integer(C_INT), value :: howmany_rank
  805. type(fftwf_iodim), dimension(*), intent(in) :: howmany_dims
  806. real(C_FLOAT), dimension(*), intent(out) :: in
  807. complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: out
  808. integer(C_INT), value :: flags
  809. end function fftwf_plan_guru_dft_r2c
  810. type(C_PTR) function fftwf_plan_guru_dft_c2r(rank,dims,howmany_rank,howmany_dims,in,out,flags) &
  811. bind(C, name='fftwf_plan_guru_dft_c2r')
  812. import
  813. integer(C_INT), value :: rank
  814. type(fftwf_iodim), dimension(*), intent(in) :: dims
  815. integer(C_INT), value :: howmany_rank
  816. type(fftwf_iodim), dimension(*), intent(in) :: howmany_dims
  817. complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: in
  818. real(C_FLOAT), dimension(*), intent(out) :: out
  819. integer(C_INT), value :: flags
  820. end function fftwf_plan_guru_dft_c2r
  821. type(C_PTR) function fftwf_plan_guru_split_dft_r2c(rank,dims,howmany_rank,howmany_dims,in,ro,io,flags) &
  822. bind(C, name='fftwf_plan_guru_split_dft_r2c')
  823. import
  824. integer(C_INT), value :: rank
  825. type(fftwf_iodim), dimension(*), intent(in) :: dims
  826. integer(C_INT), value :: howmany_rank
  827. type(fftwf_iodim), dimension(*), intent(in) :: howmany_dims
  828. real(C_FLOAT), dimension(*), intent(out) :: in
  829. real(C_FLOAT), dimension(*), intent(out) :: ro
  830. real(C_FLOAT), dimension(*), intent(out) :: io
  831. integer(C_INT), value :: flags
  832. end function fftwf_plan_guru_split_dft_r2c
  833. type(C_PTR) function fftwf_plan_guru_split_dft_c2r(rank,dims,howmany_rank,howmany_dims,ri,ii,out,flags) &
  834. bind(C, name='fftwf_plan_guru_split_dft_c2r')
  835. import
  836. integer(C_INT), value :: rank
  837. type(fftwf_iodim), dimension(*), intent(in) :: dims
  838. integer(C_INT), value :: howmany_rank
  839. type(fftwf_iodim), dimension(*), intent(in) :: howmany_dims
  840. real(C_FLOAT), dimension(*), intent(out) :: ri
  841. real(C_FLOAT), dimension(*), intent(out) :: ii
  842. real(C_FLOAT), dimension(*), intent(out) :: out
  843. integer(C_INT), value :: flags
  844. end function fftwf_plan_guru_split_dft_c2r
  845. type(C_PTR) function fftwf_plan_guru64_dft_r2c(rank,dims,howmany_rank,howmany_dims,in,out,flags) &
  846. bind(C, name='fftwf_plan_guru64_dft_r2c')
  847. import
  848. integer(C_INT), value :: rank
  849. type(fftwf_iodim64), dimension(*), intent(in) :: dims
  850. integer(C_INT), value :: howmany_rank
  851. type(fftwf_iodim64), dimension(*), intent(in) :: howmany_dims
  852. real(C_FLOAT), dimension(*), intent(out) :: in
  853. complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: out
  854. integer(C_INT), value :: flags
  855. end function fftwf_plan_guru64_dft_r2c
  856. type(C_PTR) function fftwf_plan_guru64_dft_c2r(rank,dims,howmany_rank,howmany_dims,in,out,flags) &
  857. bind(C, name='fftwf_plan_guru64_dft_c2r')
  858. import
  859. integer(C_INT), value :: rank
  860. type(fftwf_iodim64), dimension(*), intent(in) :: dims
  861. integer(C_INT), value :: howmany_rank
  862. type(fftwf_iodim64), dimension(*), intent(in) :: howmany_dims
  863. complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: in
  864. real(C_FLOAT), dimension(*), intent(out) :: out
  865. integer(C_INT), value :: flags
  866. end function fftwf_plan_guru64_dft_c2r
  867. type(C_PTR) function fftwf_plan_guru64_split_dft_r2c(rank,dims,howmany_rank,howmany_dims,in,ro,io,flags) &
  868. bind(C, name='fftwf_plan_guru64_split_dft_r2c')
  869. import
  870. integer(C_INT), value :: rank
  871. type(fftwf_iodim64), dimension(*), intent(in) :: dims
  872. integer(C_INT), value :: howmany_rank
  873. type(fftwf_iodim64), dimension(*), intent(in) :: howmany_dims
  874. real(C_FLOAT), dimension(*), intent(out) :: in
  875. real(C_FLOAT), dimension(*), intent(out) :: ro
  876. real(C_FLOAT), dimension(*), intent(out) :: io
  877. integer(C_INT), value :: flags
  878. end function fftwf_plan_guru64_split_dft_r2c
  879. type(C_PTR) function fftwf_plan_guru64_split_dft_c2r(rank,dims,howmany_rank,howmany_dims,ri,ii,out,flags) &
  880. bind(C, name='fftwf_plan_guru64_split_dft_c2r')
  881. import
  882. integer(C_INT), value :: rank
  883. type(fftwf_iodim64), dimension(*), intent(in) :: dims
  884. integer(C_INT), value :: howmany_rank
  885. type(fftwf_iodim64), dimension(*), intent(in) :: howmany_dims
  886. real(C_FLOAT), dimension(*), intent(out) :: ri
  887. real(C_FLOAT), dimension(*), intent(out) :: ii
  888. real(C_FLOAT), dimension(*), intent(out) :: out
  889. integer(C_INT), value :: flags
  890. end function fftwf_plan_guru64_split_dft_c2r
  891. subroutine fftwf_execute_dft_r2c(p,in,out) bind(C, name='fftwf_execute_dft_r2c')
  892. import
  893. type(C_PTR), value :: p
  894. real(C_FLOAT), dimension(*), intent(inout) :: in
  895. complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: out
  896. end subroutine fftwf_execute_dft_r2c
  897. subroutine fftwf_execute_dft_c2r(p,in,out) bind(C, name='fftwf_execute_dft_c2r')
  898. import
  899. type(C_PTR), value :: p
  900. complex(C_FLOAT_COMPLEX), dimension(*), intent(inout) :: in
  901. real(C_FLOAT), dimension(*), intent(out) :: out
  902. end subroutine fftwf_execute_dft_c2r
  903. subroutine fftwf_execute_split_dft_r2c(p,in,ro,io) bind(C, name='fftwf_execute_split_dft_r2c')
  904. import
  905. type(C_PTR), value :: p
  906. real(C_FLOAT), dimension(*), intent(inout) :: in
  907. real(C_FLOAT), dimension(*), intent(out) :: ro
  908. real(C_FLOAT), dimension(*), intent(out) :: io
  909. end subroutine fftwf_execute_split_dft_r2c
  910. subroutine fftwf_execute_split_dft_c2r(p,ri,ii,out) bind(C, name='fftwf_execute_split_dft_c2r')
  911. import
  912. type(C_PTR), value :: p
  913. real(C_FLOAT), dimension(*), intent(inout) :: ri
  914. real(C_FLOAT), dimension(*), intent(inout) :: ii
  915. real(C_FLOAT), dimension(*), intent(out) :: out
  916. end subroutine fftwf_execute_split_dft_c2r
  917. type(C_PTR) function fftwf_plan_many_r2r(rank,n,howmany,in,inembed,istride,idist,out,onembed,ostride,odist,kind,flags) &
  918. bind(C, name='fftwf_plan_many_r2r')
  919. import
  920. integer(C_INT), value :: rank
  921. integer(C_INT), dimension(*), intent(in) :: n
  922. integer(C_INT), value :: howmany
  923. real(C_FLOAT), dimension(*), intent(out) :: in
  924. integer(C_INT), dimension(*), intent(in) :: inembed
  925. integer(C_INT), value :: istride
  926. integer(C_INT), value :: idist
  927. real(C_FLOAT), dimension(*), intent(out) :: out
  928. integer(C_INT), dimension(*), intent(in) :: onembed
  929. integer(C_INT), value :: ostride
  930. integer(C_INT), value :: odist
  931. integer(C_FFTW_R2R_KIND), dimension(*), intent(in) :: kind
  932. integer(C_INT), value :: flags
  933. end function fftwf_plan_many_r2r
  934. type(C_PTR) function fftwf_plan_r2r(rank,n,in,out,kind,flags) bind(C, name='fftwf_plan_r2r')
  935. import
  936. integer(C_INT), value :: rank
  937. integer(C_INT), dimension(*), intent(in) :: n
  938. real(C_FLOAT), dimension(*), intent(out) :: in
  939. real(C_FLOAT), dimension(*), intent(out) :: out
  940. integer(C_FFTW_R2R_KIND), dimension(*), intent(in) :: kind
  941. integer(C_INT), value :: flags
  942. end function fftwf_plan_r2r
  943. type(C_PTR) function fftwf_plan_r2r_1d(n,in,out,kind,flags) bind(C, name='fftwf_plan_r2r_1d')
  944. import
  945. integer(C_INT), value :: n
  946. real(C_FLOAT), dimension(*), intent(out) :: in
  947. real(C_FLOAT), dimension(*), intent(out) :: out
  948. integer(C_FFTW_R2R_KIND), value :: kind
  949. integer(C_INT), value :: flags
  950. end function fftwf_plan_r2r_1d
  951. type(C_PTR) function fftwf_plan_r2r_2d(n0,n1,in,out,kind0,kind1,flags) bind(C, name='fftwf_plan_r2r_2d')
  952. import
  953. integer(C_INT), value :: n0
  954. integer(C_INT), value :: n1
  955. real(C_FLOAT), dimension(*), intent(out) :: in
  956. real(C_FLOAT), dimension(*), intent(out) :: out
  957. integer(C_FFTW_R2R_KIND), value :: kind0
  958. integer(C_FFTW_R2R_KIND), value :: kind1
  959. integer(C_INT), value :: flags
  960. end function fftwf_plan_r2r_2d
  961. type(C_PTR) function fftwf_plan_r2r_3d(n0,n1,n2,in,out,kind0,kind1,kind2,flags) bind(C, name='fftwf_plan_r2r_3d')
  962. import
  963. integer(C_INT), value :: n0
  964. integer(C_INT), value :: n1
  965. integer(C_INT), value :: n2
  966. real(C_FLOAT), dimension(*), intent(out) :: in
  967. real(C_FLOAT), dimension(*), intent(out) :: out
  968. integer(C_FFTW_R2R_KIND), value :: kind0
  969. integer(C_FFTW_R2R_KIND), value :: kind1
  970. integer(C_FFTW_R2R_KIND), value :: kind2
  971. integer(C_INT), value :: flags
  972. end function fftwf_plan_r2r_3d
  973. type(C_PTR) function fftwf_plan_guru_r2r(rank,dims,howmany_rank,howmany_dims,in,out,kind,flags) &
  974. bind(C, name='fftwf_plan_guru_r2r')
  975. import
  976. integer(C_INT), value :: rank
  977. type(fftwf_iodim), dimension(*), intent(in) :: dims
  978. integer(C_INT), value :: howmany_rank
  979. type(fftwf_iodim), dimension(*), intent(in) :: howmany_dims
  980. real(C_FLOAT), dimension(*), intent(out) :: in
  981. real(C_FLOAT), dimension(*), intent(out) :: out
  982. integer(C_FFTW_R2R_KIND), dimension(*), intent(in) :: kind
  983. integer(C_INT), value :: flags
  984. end function fftwf_plan_guru_r2r
  985. type(C_PTR) function fftwf_plan_guru64_r2r(rank,dims,howmany_rank,howmany_dims,in,out,kind,flags) &
  986. bind(C, name='fftwf_plan_guru64_r2r')
  987. import
  988. integer(C_INT), value :: rank
  989. type(fftwf_iodim64), dimension(*), intent(in) :: dims
  990. integer(C_INT), value :: howmany_rank
  991. type(fftwf_iodim64), dimension(*), intent(in) :: howmany_dims
  992. real(C_FLOAT), dimension(*), intent(out) :: in
  993. real(C_FLOAT), dimension(*), intent(out) :: out
  994. integer(C_FFTW_R2R_KIND), dimension(*), intent(in) :: kind
  995. integer(C_INT), value :: flags
  996. end function fftwf_plan_guru64_r2r
  997. subroutine fftwf_execute_r2r(p,in,out) bind(C, name='fftwf_execute_r2r')
  998. import
  999. type(C_PTR), value :: p
  1000. real(C_FLOAT), dimension(*), intent(inout) :: in
  1001. real(C_FLOAT), dimension(*), intent(out) :: out
  1002. end subroutine fftwf_execute_r2r
  1003. subroutine fftwf_destroy_plan(p) bind(C, name='fftwf_destroy_plan')
  1004. import
  1005. type(C_PTR), value :: p
  1006. end subroutine fftwf_destroy_plan
  1007. subroutine fftwf_forget_wisdom() bind(C, name='fftwf_forget_wisdom')
  1008. import
  1009. end subroutine fftwf_forget_wisdom
  1010. subroutine fftwf_cleanup() bind(C, name='fftwf_cleanup')
  1011. import
  1012. end subroutine fftwf_cleanup
  1013. subroutine fftwf_set_timelimit(t) bind(C, name='fftwf_set_timelimit')
  1014. import
  1015. real(C_DOUBLE), value :: t
  1016. end subroutine fftwf_set_timelimit
  1017. subroutine fftwf_plan_with_nthreads(nthreads) bind(C, name='fftwf_plan_with_nthreads')
  1018. import
  1019. integer(C_INT), value :: nthreads
  1020. end subroutine fftwf_plan_with_nthreads
  1021. integer(C_INT) function fftwf_planner_nthreads() bind(C, name='fftwf_planner_nthreads')
  1022. import
  1023. end function fftwf_planner_nthreads
  1024. integer(C_INT) function fftwf_init_threads() bind(C, name='fftwf_init_threads')
  1025. import
  1026. end function fftwf_init_threads
  1027. subroutine fftwf_cleanup_threads() bind(C, name='fftwf_cleanup_threads')
  1028. import
  1029. end subroutine fftwf_cleanup_threads
  1030. ! Unable to generate Fortran interface for fftwf_threads_set_callback
  1031. subroutine fftwf_make_planner_thread_safe() bind(C, name='fftwf_make_planner_thread_safe')
  1032. import
  1033. end subroutine fftwf_make_planner_thread_safe
  1034. integer(C_INT) function fftwf_export_wisdom_to_filename(filename) bind(C, name='fftwf_export_wisdom_to_filename')
  1035. import
  1036. character(C_CHAR), dimension(*), intent(in) :: filename
  1037. end function fftwf_export_wisdom_to_filename
  1038. subroutine fftwf_export_wisdom_to_file(output_file) bind(C, name='fftwf_export_wisdom_to_file')
  1039. import
  1040. type(C_PTR), value :: output_file
  1041. end subroutine fftwf_export_wisdom_to_file
  1042. type(C_PTR) function fftwf_export_wisdom_to_string() bind(C, name='fftwf_export_wisdom_to_string')
  1043. import
  1044. end function fftwf_export_wisdom_to_string
  1045. subroutine fftwf_export_wisdom(write_char,data) bind(C, name='fftwf_export_wisdom')
  1046. import
  1047. type(C_FUNPTR), value :: write_char
  1048. type(C_PTR), value :: data
  1049. end subroutine fftwf_export_wisdom
  1050. integer(C_INT) function fftwf_import_system_wisdom() bind(C, name='fftwf_import_system_wisdom')
  1051. import
  1052. end function fftwf_import_system_wisdom
  1053. integer(C_INT) function fftwf_import_wisdom_from_filename(filename) bind(C, name='fftwf_import_wisdom_from_filename')
  1054. import
  1055. character(C_CHAR), dimension(*), intent(in) :: filename
  1056. end function fftwf_import_wisdom_from_filename
  1057. integer(C_INT) function fftwf_import_wisdom_from_file(input_file) bind(C, name='fftwf_import_wisdom_from_file')
  1058. import
  1059. type(C_PTR), value :: input_file
  1060. end function fftwf_import_wisdom_from_file
  1061. integer(C_INT) function fftwf_import_wisdom_from_string(input_string) bind(C, name='fftwf_import_wisdom_from_string')
  1062. import
  1063. character(C_CHAR), dimension(*), intent(in) :: input_string
  1064. end function fftwf_import_wisdom_from_string
  1065. integer(C_INT) function fftwf_import_wisdom(read_char,data) bind(C, name='fftwf_import_wisdom')
  1066. import
  1067. type(C_FUNPTR), value :: read_char
  1068. type(C_PTR), value :: data
  1069. end function fftwf_import_wisdom
  1070. subroutine fftwf_fprint_plan(p,output_file) bind(C, name='fftwf_fprint_plan')
  1071. import
  1072. type(C_PTR), value :: p
  1073. type(C_PTR), value :: output_file
  1074. end subroutine fftwf_fprint_plan
  1075. subroutine fftwf_print_plan(p) bind(C, name='fftwf_print_plan')
  1076. import
  1077. type(C_PTR), value :: p
  1078. end subroutine fftwf_print_plan
  1079. type(C_PTR) function fftwf_sprint_plan(p) bind(C, name='fftwf_sprint_plan')
  1080. import
  1081. type(C_PTR), value :: p
  1082. end function fftwf_sprint_plan
  1083. type(C_PTR) function fftwf_malloc(n) bind(C, name='fftwf_malloc')
  1084. import
  1085. integer(C_SIZE_T), value :: n
  1086. end function fftwf_malloc
  1087. type(C_PTR) function fftwf_alloc_real(n) bind(C, name='fftwf_alloc_real')
  1088. import
  1089. integer(C_SIZE_T), value :: n
  1090. end function fftwf_alloc_real
  1091. type(C_PTR) function fftwf_alloc_complex(n) bind(C, name='fftwf_alloc_complex')
  1092. import
  1093. integer(C_SIZE_T), value :: n
  1094. end function fftwf_alloc_complex
  1095. subroutine fftwf_free(p) bind(C, name='fftwf_free')
  1096. import
  1097. type(C_PTR), value :: p
  1098. end subroutine fftwf_free
  1099. subroutine fftwf_flops(p,add,mul,fmas) bind(C, name='fftwf_flops')
  1100. import
  1101. type(C_PTR), value :: p
  1102. real(C_DOUBLE), intent(out) :: add
  1103. real(C_DOUBLE), intent(out) :: mul
  1104. real(C_DOUBLE), intent(out) :: fmas
  1105. end subroutine fftwf_flops
  1106. real(C_DOUBLE) function fftwf_estimate_cost(p) bind(C, name='fftwf_estimate_cost')
  1107. import
  1108. type(C_PTR), value :: p
  1109. end function fftwf_estimate_cost
  1110. real(C_DOUBLE) function fftwf_cost(p) bind(C, name='fftwf_cost')
  1111. import
  1112. type(C_PTR), value :: p
  1113. end function fftwf_cost
  1114. integer(C_INT) function fftwf_alignment_of(p) bind(C, name='fftwf_alignment_of')
  1115. import
  1116. real(C_FLOAT), dimension(*), intent(out) :: p
  1117. end function fftwf_alignment_of
  1118. end interface