fftw3.f03 53 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254
  1. !*******************************************************************************
  2. ! Copyright (c) 2003, 2007-11 Matteo Frigo
  3. ! Copyright (c) 2003, 2007-11 Massachusetts Institute of Technology
  4. !
  5. ! This program is distributed with permission
  6. !
  7. !*******************************************************************************
  8. ! Generated automatically by FFTW generator. DO NOT EDIT!
  9. integer, parameter :: C_FFTW_R2R_KIND = C_INT32_T
  10. integer(C_INT), parameter :: FFTW_R2HC = 0
  11. integer(C_INT), parameter :: FFTW_HC2R = 1
  12. integer(C_INT), parameter :: FFTW_DHT = 2
  13. integer(C_INT), parameter :: FFTW_REDFT00 = 3
  14. integer(C_INT), parameter :: FFTW_REDFT01 = 4
  15. integer(C_INT), parameter :: FFTW_REDFT10 = 5
  16. integer(C_INT), parameter :: FFTW_REDFT11 = 6
  17. integer(C_INT), parameter :: FFTW_RODFT00 = 7
  18. integer(C_INT), parameter :: FFTW_RODFT01 = 8
  19. integer(C_INT), parameter :: FFTW_RODFT10 = 9
  20. integer(C_INT), parameter :: FFTW_RODFT11 = 10
  21. integer(C_INT), parameter :: FFTW_FORWARD = -1
  22. integer(C_INT), parameter :: FFTW_BACKWARD = +1
  23. integer(C_INT), parameter :: FFTW_MEASURE = 0
  24. integer(C_INT), parameter :: FFTW_DESTROY_INPUT = 1
  25. integer(C_INT), parameter :: FFTW_UNALIGNED = 2
  26. integer(C_INT), parameter :: FFTW_CONSERVE_MEMORY = 4
  27. integer(C_INT), parameter :: FFTW_EXHAUSTIVE = 8
  28. integer(C_INT), parameter :: FFTW_PRESERVE_INPUT = 16
  29. integer(C_INT), parameter :: FFTW_PATIENT = 32
  30. integer(C_INT), parameter :: FFTW_ESTIMATE = 64
  31. integer(C_INT), parameter :: FFTW_WISDOM_ONLY = 2097152
  32. integer(C_INT), parameter :: FFTW_ESTIMATE_PATIENT = 128
  33. integer(C_INT), parameter :: FFTW_BELIEVE_PCOST = 256
  34. integer(C_INT), parameter :: FFTW_NO_DFT_R2HC = 512
  35. integer(C_INT), parameter :: FFTW_NO_NONTHREADED = 1024
  36. integer(C_INT), parameter :: FFTW_NO_BUFFERING = 2048
  37. integer(C_INT), parameter :: FFTW_NO_INDIRECT_OP = 4096
  38. integer(C_INT), parameter :: FFTW_ALLOW_LARGE_GENERIC = 8192
  39. integer(C_INT), parameter :: FFTW_NO_RANK_SPLITS = 16384
  40. integer(C_INT), parameter :: FFTW_NO_VRANK_SPLITS = 32768
  41. integer(C_INT), parameter :: FFTW_NO_VRECURSE = 65536
  42. integer(C_INT), parameter :: FFTW_NO_SIMD = 131072
  43. integer(C_INT), parameter :: FFTW_NO_SLOW = 262144
  44. integer(C_INT), parameter :: FFTW_NO_FIXED_RADIX_LARGE_N = 524288
  45. integer(C_INT), parameter :: FFTW_ALLOW_PRUNING = 1048576
  46. type, bind(C) :: fftw_iodim
  47. integer(C_INT) n, is, os
  48. end type fftw_iodim
  49. type, bind(C) :: fftw_iodim64
  50. integer(C_INTPTR_T) n, is, os
  51. end type fftw_iodim64
  52. interface
  53. type(C_PTR) function fftw_plan_dft(rank,n,in,out,sign,flags) bind(C, name='fftw_plan_dft')
  54. import
  55. integer(C_INT), value :: rank
  56. integer(C_INT), dimension(*), intent(in) :: n
  57. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in
  58. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out
  59. integer(C_INT), value :: sign
  60. integer(C_INT), value :: flags
  61. end function fftw_plan_dft
  62. type(C_PTR) function fftw_plan_dft_1d(n,in,out,sign,flags) bind(C, name='fftw_plan_dft_1d')
  63. import
  64. integer(C_INT), value :: n
  65. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in
  66. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out
  67. integer(C_INT), value :: sign
  68. integer(C_INT), value :: flags
  69. end function fftw_plan_dft_1d
  70. type(C_PTR) function fftw_plan_dft_2d(n0,n1,in,out,sign,flags) bind(C, name='fftw_plan_dft_2d')
  71. import
  72. integer(C_INT), value :: n0
  73. integer(C_INT), value :: n1
  74. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in
  75. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out
  76. integer(C_INT), value :: sign
  77. integer(C_INT), value :: flags
  78. end function fftw_plan_dft_2d
  79. type(C_PTR) function fftw_plan_dft_3d(n0,n1,n2,in,out,sign,flags) bind(C, name='fftw_plan_dft_3d')
  80. import
  81. integer(C_INT), value :: n0
  82. integer(C_INT), value :: n1
  83. integer(C_INT), value :: n2
  84. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in
  85. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out
  86. integer(C_INT), value :: sign
  87. integer(C_INT), value :: flags
  88. end function fftw_plan_dft_3d
  89. type(C_PTR) function fftw_plan_many_dft(rank,n,howmany,in,inembed,istride,idist,out,onembed,ostride,odist,sign,flags) &
  90. bind(C, name='fftw_plan_many_dft')
  91. import
  92. integer(C_INT), value :: rank
  93. integer(C_INT), dimension(*), intent(in) :: n
  94. integer(C_INT), value :: howmany
  95. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in
  96. integer(C_INT), dimension(*), intent(in) :: inembed
  97. integer(C_INT), value :: istride
  98. integer(C_INT), value :: idist
  99. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out
  100. integer(C_INT), dimension(*), intent(in) :: onembed
  101. integer(C_INT), value :: ostride
  102. integer(C_INT), value :: odist
  103. integer(C_INT), value :: sign
  104. integer(C_INT), value :: flags
  105. end function fftw_plan_many_dft
  106. type(C_PTR) function fftw_plan_guru_dft(rank,dims,howmany_rank,howmany_dims,in,out,sign,flags) &
  107. bind(C, name='fftw_plan_guru_dft')
  108. import
  109. integer(C_INT), value :: rank
  110. type(fftw_iodim), dimension(*), intent(in) :: dims
  111. integer(C_INT), value :: howmany_rank
  112. type(fftw_iodim), dimension(*), intent(in) :: howmany_dims
  113. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in
  114. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out
  115. integer(C_INT), value :: sign
  116. integer(C_INT), value :: flags
  117. end function fftw_plan_guru_dft
  118. type(C_PTR) function fftw_plan_guru_split_dft(rank,dims,howmany_rank,howmany_dims,ri,ii,ro,io,flags) &
  119. bind(C, name='fftw_plan_guru_split_dft')
  120. import
  121. integer(C_INT), value :: rank
  122. type(fftw_iodim), dimension(*), intent(in) :: dims
  123. integer(C_INT), value :: howmany_rank
  124. type(fftw_iodim), dimension(*), intent(in) :: howmany_dims
  125. real(C_DOUBLE), dimension(*), intent(out) :: ri
  126. real(C_DOUBLE), dimension(*), intent(out) :: ii
  127. real(C_DOUBLE), dimension(*), intent(out) :: ro
  128. real(C_DOUBLE), dimension(*), intent(out) :: io
  129. integer(C_INT), value :: flags
  130. end function fftw_plan_guru_split_dft
  131. type(C_PTR) function fftw_plan_guru64_dft(rank,dims,howmany_rank,howmany_dims,in,out,sign,flags) &
  132. bind(C, name='fftw_plan_guru64_dft')
  133. import
  134. integer(C_INT), value :: rank
  135. type(fftw_iodim64), dimension(*), intent(in) :: dims
  136. integer(C_INT), value :: howmany_rank
  137. type(fftw_iodim64), dimension(*), intent(in) :: howmany_dims
  138. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in
  139. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out
  140. integer(C_INT), value :: sign
  141. integer(C_INT), value :: flags
  142. end function fftw_plan_guru64_dft
  143. type(C_PTR) function fftw_plan_guru64_split_dft(rank,dims,howmany_rank,howmany_dims,ri,ii,ro,io,flags) &
  144. bind(C, name='fftw_plan_guru64_split_dft')
  145. import
  146. integer(C_INT), value :: rank
  147. type(fftw_iodim64), dimension(*), intent(in) :: dims
  148. integer(C_INT), value :: howmany_rank
  149. type(fftw_iodim64), dimension(*), intent(in) :: howmany_dims
  150. real(C_DOUBLE), dimension(*), intent(out) :: ri
  151. real(C_DOUBLE), dimension(*), intent(out) :: ii
  152. real(C_DOUBLE), dimension(*), intent(out) :: ro
  153. real(C_DOUBLE), dimension(*), intent(out) :: io
  154. integer(C_INT), value :: flags
  155. end function fftw_plan_guru64_split_dft
  156. subroutine fftw_execute_dft(p,in,out) bind(C, name='fftw_execute_dft')
  157. import
  158. type(C_PTR), value :: p
  159. complex(C_DOUBLE_COMPLEX), dimension(*), intent(inout) :: in
  160. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out
  161. end subroutine fftw_execute_dft
  162. subroutine fftw_execute_split_dft(p,ri,ii,ro,io) bind(C, name='fftw_execute_split_dft')
  163. import
  164. type(C_PTR), value :: p
  165. real(C_DOUBLE), dimension(*), intent(inout) :: ri
  166. real(C_DOUBLE), dimension(*), intent(inout) :: ii
  167. real(C_DOUBLE), dimension(*), intent(out) :: ro
  168. real(C_DOUBLE), dimension(*), intent(out) :: io
  169. end subroutine fftw_execute_split_dft
  170. type(C_PTR) function fftw_plan_many_dft_r2c(rank,n,howmany,in,inembed,istride,idist,out,onembed,ostride,odist,flags) &
  171. bind(C, name='fftw_plan_many_dft_r2c')
  172. import
  173. integer(C_INT), value :: rank
  174. integer(C_INT), dimension(*), intent(in) :: n
  175. integer(C_INT), value :: howmany
  176. real(C_DOUBLE), dimension(*), intent(out) :: in
  177. integer(C_INT), dimension(*), intent(in) :: inembed
  178. integer(C_INT), value :: istride
  179. integer(C_INT), value :: idist
  180. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out
  181. integer(C_INT), dimension(*), intent(in) :: onembed
  182. integer(C_INT), value :: ostride
  183. integer(C_INT), value :: odist
  184. integer(C_INT), value :: flags
  185. end function fftw_plan_many_dft_r2c
  186. type(C_PTR) function fftw_plan_dft_r2c(rank,n,in,out,flags) bind(C, name='fftw_plan_dft_r2c')
  187. import
  188. integer(C_INT), value :: rank
  189. integer(C_INT), dimension(*), intent(in) :: 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
  194. type(C_PTR) function fftw_plan_dft_r2c_1d(n,in,out,flags) bind(C, name='fftw_plan_dft_r2c_1d')
  195. import
  196. integer(C_INT), value :: n
  197. real(C_DOUBLE), dimension(*), intent(out) :: in
  198. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out
  199. integer(C_INT), value :: flags
  200. end function fftw_plan_dft_r2c_1d
  201. type(C_PTR) function fftw_plan_dft_r2c_2d(n0,n1,in,out,flags) bind(C, name='fftw_plan_dft_r2c_2d')
  202. import
  203. integer(C_INT), value :: n0
  204. integer(C_INT), value :: n1
  205. real(C_DOUBLE), dimension(*), intent(out) :: in
  206. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out
  207. integer(C_INT), value :: flags
  208. end function fftw_plan_dft_r2c_2d
  209. type(C_PTR) function fftw_plan_dft_r2c_3d(n0,n1,n2,in,out,flags) bind(C, name='fftw_plan_dft_r2c_3d')
  210. import
  211. integer(C_INT), value :: n0
  212. integer(C_INT), value :: n1
  213. integer(C_INT), value :: n2
  214. real(C_DOUBLE), dimension(*), intent(out) :: in
  215. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out
  216. integer(C_INT), value :: flags
  217. end function fftw_plan_dft_r2c_3d
  218. type(C_PTR) function fftw_plan_many_dft_c2r(rank,n,howmany,in,inembed,istride,idist,out,onembed,ostride,odist,flags) &
  219. bind(C, name='fftw_plan_many_dft_c2r')
  220. import
  221. integer(C_INT), value :: rank
  222. integer(C_INT), dimension(*), intent(in) :: n
  223. integer(C_INT), value :: howmany
  224. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in
  225. integer(C_INT), dimension(*), intent(in) :: inembed
  226. integer(C_INT), value :: istride
  227. integer(C_INT), value :: idist
  228. real(C_DOUBLE), dimension(*), intent(out) :: out
  229. integer(C_INT), dimension(*), intent(in) :: onembed
  230. integer(C_INT), value :: ostride
  231. integer(C_INT), value :: odist
  232. integer(C_INT), value :: flags
  233. end function fftw_plan_many_dft_c2r
  234. type(C_PTR) function fftw_plan_dft_c2r(rank,n,in,out,flags) bind(C, name='fftw_plan_dft_c2r')
  235. import
  236. integer(C_INT), value :: rank
  237. integer(C_INT), dimension(*), intent(in) :: 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
  242. type(C_PTR) function fftw_plan_dft_c2r_1d(n,in,out,flags) bind(C, name='fftw_plan_dft_c2r_1d')
  243. import
  244. integer(C_INT), value :: n
  245. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in
  246. real(C_DOUBLE), dimension(*), intent(out) :: out
  247. integer(C_INT), value :: flags
  248. end function fftw_plan_dft_c2r_1d
  249. type(C_PTR) function fftw_plan_dft_c2r_2d(n0,n1,in,out,flags) bind(C, name='fftw_plan_dft_c2r_2d')
  250. import
  251. integer(C_INT), value :: n0
  252. integer(C_INT), value :: n1
  253. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in
  254. real(C_DOUBLE), dimension(*), intent(out) :: out
  255. integer(C_INT), value :: flags
  256. end function fftw_plan_dft_c2r_2d
  257. type(C_PTR) function fftw_plan_dft_c2r_3d(n0,n1,n2,in,out,flags) bind(C, name='fftw_plan_dft_c2r_3d')
  258. import
  259. integer(C_INT), value :: n0
  260. integer(C_INT), value :: n1
  261. integer(C_INT), value :: n2
  262. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in
  263. real(C_DOUBLE), dimension(*), intent(out) :: out
  264. integer(C_INT), value :: flags
  265. end function fftw_plan_dft_c2r_3d
  266. type(C_PTR) function fftw_plan_guru_dft_r2c(rank,dims,howmany_rank,howmany_dims,in,out,flags) &
  267. bind(C, name='fftw_plan_guru_dft_r2c')
  268. import
  269. integer(C_INT), value :: rank
  270. type(fftw_iodim), dimension(*), intent(in) :: dims
  271. integer(C_INT), value :: howmany_rank
  272. type(fftw_iodim), dimension(*), intent(in) :: howmany_dims
  273. real(C_DOUBLE), dimension(*), intent(out) :: in
  274. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out
  275. integer(C_INT), value :: flags
  276. end function fftw_plan_guru_dft_r2c
  277. type(C_PTR) function fftw_plan_guru_dft_c2r(rank,dims,howmany_rank,howmany_dims,in,out,flags) &
  278. bind(C, name='fftw_plan_guru_dft_c2r')
  279. import
  280. integer(C_INT), value :: rank
  281. type(fftw_iodim), dimension(*), intent(in) :: dims
  282. integer(C_INT), value :: howmany_rank
  283. type(fftw_iodim), dimension(*), intent(in) :: howmany_dims
  284. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in
  285. real(C_DOUBLE), dimension(*), intent(out) :: out
  286. integer(C_INT), value :: flags
  287. end function fftw_plan_guru_dft_c2r
  288. type(C_PTR) function fftw_plan_guru_split_dft_r2c(rank,dims,howmany_rank,howmany_dims,in,ro,io,flags) &
  289. bind(C, name='fftw_plan_guru_split_dft_r2c')
  290. import
  291. integer(C_INT), value :: rank
  292. type(fftw_iodim), dimension(*), intent(in) :: dims
  293. integer(C_INT), value :: howmany_rank
  294. type(fftw_iodim), dimension(*), intent(in) :: howmany_dims
  295. real(C_DOUBLE), dimension(*), intent(out) :: in
  296. real(C_DOUBLE), dimension(*), intent(out) :: ro
  297. real(C_DOUBLE), dimension(*), intent(out) :: io
  298. integer(C_INT), value :: flags
  299. end function fftw_plan_guru_split_dft_r2c
  300. type(C_PTR) function fftw_plan_guru_split_dft_c2r(rank,dims,howmany_rank,howmany_dims,ri,ii,out,flags) &
  301. bind(C, name='fftw_plan_guru_split_dft_c2r')
  302. import
  303. integer(C_INT), value :: rank
  304. type(fftw_iodim), dimension(*), intent(in) :: dims
  305. integer(C_INT), value :: howmany_rank
  306. type(fftw_iodim), dimension(*), intent(in) :: howmany_dims
  307. real(C_DOUBLE), dimension(*), intent(out) :: ri
  308. real(C_DOUBLE), dimension(*), intent(out) :: ii
  309. real(C_DOUBLE), dimension(*), intent(out) :: out
  310. integer(C_INT), value :: flags
  311. end function fftw_plan_guru_split_dft_c2r
  312. type(C_PTR) function fftw_plan_guru64_dft_r2c(rank,dims,howmany_rank,howmany_dims,in,out,flags) &
  313. bind(C, name='fftw_plan_guru64_dft_r2c')
  314. import
  315. integer(C_INT), value :: rank
  316. type(fftw_iodim64), dimension(*), intent(in) :: dims
  317. integer(C_INT), value :: howmany_rank
  318. type(fftw_iodim64), dimension(*), intent(in) :: howmany_dims
  319. real(C_DOUBLE), dimension(*), intent(out) :: in
  320. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out
  321. integer(C_INT), value :: flags
  322. end function fftw_plan_guru64_dft_r2c
  323. type(C_PTR) function fftw_plan_guru64_dft_c2r(rank,dims,howmany_rank,howmany_dims,in,out,flags) &
  324. bind(C, name='fftw_plan_guru64_dft_c2r')
  325. import
  326. integer(C_INT), value :: rank
  327. type(fftw_iodim64), dimension(*), intent(in) :: dims
  328. integer(C_INT), value :: howmany_rank
  329. type(fftw_iodim64), dimension(*), intent(in) :: howmany_dims
  330. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in
  331. real(C_DOUBLE), dimension(*), intent(out) :: out
  332. integer(C_INT), value :: flags
  333. end function fftw_plan_guru64_dft_c2r
  334. type(C_PTR) function fftw_plan_guru64_split_dft_r2c(rank,dims,howmany_rank,howmany_dims,in,ro,io,flags) &
  335. bind(C, name='fftw_plan_guru64_split_dft_r2c')
  336. import
  337. integer(C_INT), value :: rank
  338. type(fftw_iodim64), dimension(*), intent(in) :: dims
  339. integer(C_INT), value :: howmany_rank
  340. type(fftw_iodim64), dimension(*), intent(in) :: howmany_dims
  341. real(C_DOUBLE), dimension(*), intent(out) :: in
  342. real(C_DOUBLE), dimension(*), intent(out) :: ro
  343. real(C_DOUBLE), dimension(*), intent(out) :: io
  344. integer(C_INT), value :: flags
  345. end function fftw_plan_guru64_split_dft_r2c
  346. type(C_PTR) function fftw_plan_guru64_split_dft_c2r(rank,dims,howmany_rank,howmany_dims,ri,ii,out,flags) &
  347. bind(C, name='fftw_plan_guru64_split_dft_c2r')
  348. import
  349. integer(C_INT), value :: rank
  350. type(fftw_iodim64), dimension(*), intent(in) :: dims
  351. integer(C_INT), value :: howmany_rank
  352. type(fftw_iodim64), dimension(*), intent(in) :: howmany_dims
  353. real(C_DOUBLE), dimension(*), intent(out) :: ri
  354. real(C_DOUBLE), dimension(*), intent(out) :: ii
  355. real(C_DOUBLE), dimension(*), intent(out) :: out
  356. integer(C_INT), value :: flags
  357. end function fftw_plan_guru64_split_dft_c2r
  358. subroutine fftw_execute_dft_r2c(p,in,out) bind(C, name='fftw_execute_dft_r2c')
  359. import
  360. type(C_PTR), value :: p
  361. real(C_DOUBLE), dimension(*), intent(inout) :: in
  362. complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out
  363. end subroutine fftw_execute_dft_r2c
  364. subroutine fftw_execute_dft_c2r(p,in,out) bind(C, name='fftw_execute_dft_c2r')
  365. import
  366. type(C_PTR), value :: p
  367. complex(C_DOUBLE_COMPLEX), dimension(*), intent(inout) :: in
  368. real(C_DOUBLE), dimension(*), intent(out) :: out
  369. end subroutine fftw_execute_dft_c2r
  370. subroutine fftw_execute_split_dft_r2c(p,in,ro,io) bind(C, name='fftw_execute_split_dft_r2c')
  371. import
  372. type(C_PTR), value :: p
  373. real(C_DOUBLE), dimension(*), intent(inout) :: in
  374. real(C_DOUBLE), dimension(*), intent(out) :: ro
  375. real(C_DOUBLE), dimension(*), intent(out) :: io
  376. end subroutine fftw_execute_split_dft_r2c
  377. subroutine fftw_execute_split_dft_c2r(p,ri,ii,out) bind(C, name='fftw_execute_split_dft_c2r')
  378. import
  379. type(C_PTR), value :: p
  380. real(C_DOUBLE), dimension(*), intent(inout) :: ri
  381. real(C_DOUBLE), dimension(*), intent(inout) :: ii
  382. real(C_DOUBLE), dimension(*), intent(out) :: out
  383. end subroutine fftw_execute_split_dft_c2r
  384. type(C_PTR) function fftw_plan_many_r2r(rank,n,howmany,in,inembed,istride,idist,out,onembed,ostride,odist,kind,flags) &
  385. bind(C, name='fftw_plan_many_r2r')
  386. import
  387. integer(C_INT), value :: rank
  388. integer(C_INT), dimension(*), intent(in) :: n
  389. integer(C_INT), value :: howmany
  390. real(C_DOUBLE), dimension(*), intent(out) :: in
  391. integer(C_INT), dimension(*), intent(in) :: inembed
  392. integer(C_INT), value :: istride
  393. integer(C_INT), value :: idist
  394. real(C_DOUBLE), dimension(*), intent(out) :: out
  395. integer(C_INT), dimension(*), intent(in) :: onembed
  396. integer(C_INT), value :: ostride
  397. integer(C_INT), value :: odist
  398. integer(C_FFTW_R2R_KIND), dimension(*), intent(in) :: kind
  399. integer(C_INT), value :: flags
  400. end function fftw_plan_many_r2r
  401. type(C_PTR) function fftw_plan_r2r(rank,n,in,out,kind,flags) bind(C, name='fftw_plan_r2r')
  402. import
  403. integer(C_INT), value :: rank
  404. integer(C_INT), dimension(*), intent(in) :: n
  405. real(C_DOUBLE), dimension(*), intent(out) :: in
  406. real(C_DOUBLE), dimension(*), intent(out) :: out
  407. integer(C_FFTW_R2R_KIND), dimension(*), intent(in) :: kind
  408. integer(C_INT), value :: flags
  409. end function fftw_plan_r2r
  410. type(C_PTR) function fftw_plan_r2r_1d(n,in,out,kind,flags) bind(C, name='fftw_plan_r2r_1d')
  411. import
  412. integer(C_INT), value :: n
  413. real(C_DOUBLE), dimension(*), intent(out) :: in
  414. real(C_DOUBLE), dimension(*), intent(out) :: out
  415. integer(C_FFTW_R2R_KIND), value :: kind
  416. integer(C_INT), value :: flags
  417. end function fftw_plan_r2r_1d
  418. type(C_PTR) function fftw_plan_r2r_2d(n0,n1,in,out,kind0,kind1,flags) bind(C, name='fftw_plan_r2r_2d')
  419. import
  420. integer(C_INT), value :: n0
  421. integer(C_INT), value :: n1
  422. real(C_DOUBLE), dimension(*), intent(out) :: in
  423. real(C_DOUBLE), dimension(*), intent(out) :: out
  424. integer(C_FFTW_R2R_KIND), value :: kind0
  425. integer(C_FFTW_R2R_KIND), value :: kind1
  426. integer(C_INT), value :: flags
  427. end function fftw_plan_r2r_2d
  428. type(C_PTR) function fftw_plan_r2r_3d(n0,n1,n2,in,out,kind0,kind1,kind2,flags) bind(C, name='fftw_plan_r2r_3d')
  429. import
  430. integer(C_INT), value :: n0
  431. integer(C_INT), value :: n1
  432. integer(C_INT), value :: n2
  433. real(C_DOUBLE), dimension(*), intent(out) :: in
  434. real(C_DOUBLE), dimension(*), intent(out) :: out
  435. integer(C_FFTW_R2R_KIND), value :: kind0
  436. integer(C_FFTW_R2R_KIND), value :: kind1
  437. integer(C_FFTW_R2R_KIND), value :: kind2
  438. integer(C_INT), value :: flags
  439. end function fftw_plan_r2r_3d
  440. type(C_PTR) function fftw_plan_guru_r2r(rank,dims,howmany_rank,howmany_dims,in,out,kind,flags) &
  441. bind(C, name='fftw_plan_guru_r2r')
  442. import
  443. integer(C_INT), value :: rank
  444. type(fftw_iodim), dimension(*), intent(in) :: dims
  445. integer(C_INT), value :: howmany_rank
  446. type(fftw_iodim), dimension(*), intent(in) :: howmany_dims
  447. real(C_DOUBLE), dimension(*), intent(out) :: in
  448. real(C_DOUBLE), dimension(*), intent(out) :: out
  449. integer(C_FFTW_R2R_KIND), dimension(*), intent(in) :: kind
  450. integer(C_INT), value :: flags
  451. end function fftw_plan_guru_r2r
  452. type(C_PTR) function fftw_plan_guru64_r2r(rank,dims,howmany_rank,howmany_dims,in,out,kind,flags) &
  453. bind(C, name='fftw_plan_guru64_r2r')
  454. import
  455. integer(C_INT), value :: rank
  456. type(fftw_iodim64), dimension(*), intent(in) :: dims
  457. integer(C_INT), value :: howmany_rank
  458. type(fftw_iodim64), dimension(*), intent(in) :: howmany_dims
  459. real(C_DOUBLE), dimension(*), intent(out) :: in
  460. real(C_DOUBLE), dimension(*), intent(out) :: out
  461. integer(C_FFTW_R2R_KIND), dimension(*), intent(in) :: kind
  462. integer(C_INT), value :: flags
  463. end function fftw_plan_guru64_r2r
  464. subroutine fftw_execute_r2r(p,in,out) bind(C, name='fftw_execute_r2r')
  465. import
  466. type(C_PTR), value :: p
  467. real(C_DOUBLE), dimension(*), intent(inout) :: in
  468. real(C_DOUBLE), dimension(*), intent(out) :: out
  469. end subroutine fftw_execute_r2r
  470. subroutine fftw_destroy_plan(p) bind(C, name='fftw_destroy_plan')
  471. import
  472. type(C_PTR), value :: p
  473. end subroutine fftw_destroy_plan
  474. subroutine fftw_forget_wisdom() bind(C, name='fftw_forget_wisdom')
  475. import
  476. end subroutine fftw_forget_wisdom
  477. subroutine fftw_cleanup() bind(C, name='fftw_cleanup')
  478. import
  479. end subroutine fftw_cleanup
  480. subroutine fftw_set_timelimit(t) bind(C, name='fftw_set_timelimit')
  481. import
  482. real(C_DOUBLE), value :: t
  483. end subroutine fftw_set_timelimit
  484. subroutine fftw_plan_with_nthreads(nthreads) bind(C, name='fftw_plan_with_nthreads')
  485. import
  486. integer(C_INT), value :: nthreads
  487. end subroutine fftw_plan_with_nthreads
  488. integer(C_INT) function fftw_init_threads() bind(C, name='fftw_init_threads')
  489. import
  490. end function fftw_init_threads
  491. subroutine fftw_cleanup_threads() bind(C, name='fftw_cleanup_threads')
  492. import
  493. end subroutine fftw_cleanup_threads
  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_init_threads() bind(C, name='fftwf_init_threads')
  1022. import
  1023. end function fftwf_init_threads
  1024. subroutine fftwf_cleanup_threads() bind(C, name='fftwf_cleanup_threads')
  1025. import
  1026. end subroutine fftwf_cleanup_threads
  1027. integer(C_INT) function fftwf_export_wisdom_to_filename(filename) bind(C, name='fftwf_export_wisdom_to_filename')
  1028. import
  1029. character(C_CHAR), dimension(*), intent(in) :: filename
  1030. end function fftwf_export_wisdom_to_filename
  1031. subroutine fftwf_export_wisdom_to_file(output_file) bind(C, name='fftwf_export_wisdom_to_file')
  1032. import
  1033. type(C_PTR), value :: output_file
  1034. end subroutine fftwf_export_wisdom_to_file
  1035. type(C_PTR) function fftwf_export_wisdom_to_string() bind(C, name='fftwf_export_wisdom_to_string')
  1036. import
  1037. end function fftwf_export_wisdom_to_string
  1038. subroutine fftwf_export_wisdom(write_char,data) bind(C, name='fftwf_export_wisdom')
  1039. import
  1040. type(C_FUNPTR), value :: write_char
  1041. type(C_PTR), value :: data
  1042. end subroutine fftwf_export_wisdom
  1043. integer(C_INT) function fftwf_import_system_wisdom() bind(C, name='fftwf_import_system_wisdom')
  1044. import
  1045. end function fftwf_import_system_wisdom
  1046. integer(C_INT) function fftwf_import_wisdom_from_filename(filename) bind(C, name='fftwf_import_wisdom_from_filename')
  1047. import
  1048. character(C_CHAR), dimension(*), intent(in) :: filename
  1049. end function fftwf_import_wisdom_from_filename
  1050. integer(C_INT) function fftwf_import_wisdom_from_file(input_file) bind(C, name='fftwf_import_wisdom_from_file')
  1051. import
  1052. type(C_PTR), value :: input_file
  1053. end function fftwf_import_wisdom_from_file
  1054. integer(C_INT) function fftwf_import_wisdom_from_string(input_string) bind(C, name='fftwf_import_wisdom_from_string')
  1055. import
  1056. character(C_CHAR), dimension(*), intent(in) :: input_string
  1057. end function fftwf_import_wisdom_from_string
  1058. integer(C_INT) function fftwf_import_wisdom(read_char,data) bind(C, name='fftwf_import_wisdom')
  1059. import
  1060. type(C_FUNPTR), value :: read_char
  1061. type(C_PTR), value :: data
  1062. end function fftwf_import_wisdom
  1063. subroutine fftwf_fprint_plan(p,output_file) bind(C, name='fftwf_fprint_plan')
  1064. import
  1065. type(C_PTR), value :: p
  1066. type(C_PTR), value :: output_file
  1067. end subroutine fftwf_fprint_plan
  1068. subroutine fftwf_print_plan(p) bind(C, name='fftwf_print_plan')
  1069. import
  1070. type(C_PTR), value :: p
  1071. end subroutine fftwf_print_plan
  1072. type(C_PTR) function fftwf_sprint_plan(p) bind(C, name='fftwf_sprint_plan')
  1073. import
  1074. type(C_PTR), value :: p
  1075. end function fftwf_sprint_plan
  1076. type(C_PTR) function fftwf_malloc(n) bind(C, name='fftwf_malloc')
  1077. import
  1078. integer(C_SIZE_T), value :: n
  1079. end function fftwf_malloc
  1080. type(C_PTR) function fftwf_alloc_real(n) bind(C, name='fftwf_alloc_real')
  1081. import
  1082. integer(C_SIZE_T), value :: n
  1083. end function fftwf_alloc_real
  1084. type(C_PTR) function fftwf_alloc_complex(n) bind(C, name='fftwf_alloc_complex')
  1085. import
  1086. integer(C_SIZE_T), value :: n
  1087. end function fftwf_alloc_complex
  1088. subroutine fftwf_free(p) bind(C, name='fftwf_free')
  1089. import
  1090. type(C_PTR), value :: p
  1091. end subroutine fftwf_free
  1092. subroutine fftwf_flops(p,add,mul,fmas) bind(C, name='fftwf_flops')
  1093. import
  1094. type(C_PTR), value :: p
  1095. real(C_DOUBLE), intent(out) :: add
  1096. real(C_DOUBLE), intent(out) :: mul
  1097. real(C_DOUBLE), intent(out) :: fmas
  1098. end subroutine fftwf_flops
  1099. real(C_DOUBLE) function fftwf_estimate_cost(p) bind(C, name='fftwf_estimate_cost')
  1100. import
  1101. type(C_PTR), value :: p
  1102. end function fftwf_estimate_cost
  1103. real(C_DOUBLE) function fftwf_cost(p) bind(C, name='fftwf_cost')
  1104. import
  1105. type(C_PTR), value :: p
  1106. end function fftwf_cost
  1107. integer(C_INT) function fftwf_alignment_of(p) bind(C, name='fftwf_alignment_of')
  1108. import
  1109. real(C_FLOAT), dimension(*), intent(out) :: p
  1110. end function fftwf_alignment_of
  1111. end interface