source: palm/trunk/SOURCE/cuda_fft_interfaces.f90 @ 1108

Last change on this file since 1108 was 1107, checked in by raasch, 12 years ago

last commit documented

  • Property svn:keywords set to Id
File size: 3.2 KB
Line 
1 MODULE cuda_fft_interfaces
2
3!--------------------------------------------------------------------------------!
4! This file is part of PALM.
5!
6! PALM is free software: you can redistribute it and/or modify it under the terms
7! of the GNU General Public License as published by the Free Software Foundation,
8! either version 3 of the License, or (at your option) any later version.
9!
10! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
11! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
13!
14! You should have received a copy of the GNU General Public License along with
15! PALM. If not, see <http://www.gnu.org/licenses/>.
16!
17! Copyright 1997-2012  Leibniz University Hannover
18!--------------------------------------------------------------------------------!
19!
20! Current revisions:
21! -----------------
22!
23!
24! Former revisions:
25! -----------------
26! $Id: cuda_fft_interfaces.f90 1107 2013-03-04 06:23:14Z raasch $
27!
28! 1106 2013-03-04 05:31:38Z raasch
29! Initial revision
30!
31! Description:
32! ------------
33! FORTRAN interfaces for the CUDA fft
34! Routines for the fft along x and y (forward/backward) using the CUDA fft
35!--------------------------------------------------------------------------------!
36
37#if defined ( __cuda_fft )
38
39    INTEGER :: CUFFT_FORWARD = -1,  &
40               CUFFT_INVERSE =  1,  &
41               CUFFT_R2C = Z'2a',   &    ! Real to Complex (interleaved)
42               CUFFT_C2R = Z'2c',   &    ! Complex (interleaved) to Real
43               CUFFT_C2C = Z'29',   &    ! Complex to Complex, interleaved
44               CUFFT_D2Z = Z'6a',   &    ! Double to Double-Complex
45               CUFFT_Z2D = Z'6c',   &    ! Double-Complex to Double
46               CUFFT_Z2Z = Z'69'         ! Double-Complex to Double-Complex
47
48    PUBLIC
49
50
51!
52!-- cufftPlan1d( cufftHandle *plan, int nx, cufftType type, int batch )
53    INTERFACE CUFFTPLAN1D
54
55       SUBROUTINE CUFFTPLAN1D( plan, nx, type, batch ) bind( C, name='cufftPlan1d' )
56
57          USE ISO_C_BINDING
58
59          INTEGER(C_INT) ::  plan
60          INTEGER(C_INT), value ::  batch, nx, type
61
62       END SUBROUTINE CUFFTPLAN1D
63
64    END INTERFACE CUFFTPLAN1D
65
66!
67!-- cufftDestroy( cufftHandle plan )  !!! remove later if not really needed !!!
68    INTERFACE CUFFTDESTROY
69
70       SUBROUTINE CUFFTDESTROY( plan ) bind( C, name='cufftDestroy' )
71
72          USE ISO_C_BINDING
73
74          INTEGER(C_INT), value ::  plan
75
76       END SUBROUTINE CUFFTDESTROY
77
78    END INTERFACE CUFFTDESTROY
79
80
81    INTERFACE CUFFTEXECZ2D
82
83       SUBROUTINE CUFFTEXECZ2D( plan, idata, odata ) bind( C, name='cufftExecZ2D' )
84
85          USE ISO_C_BINDING
86          USE precision_kind
87
88          INTEGER(C_INT), value ::  plan
89          COMPLEX(dpk), device  ::  idata(*)
90          REAL(dpk), device     ::  odata(*)
91
92       END SUBROUTINE CUFFTEXECZ2D
93
94    END INTERFACE CUFFTEXECZ2D
95
96
97    INTERFACE CUFFTEXECD2Z
98
99       SUBROUTINE CUFFTEXECD2Z( plan, idata, odata ) bind( C, name='cufftExecD2Z' )
100
101          USE ISO_C_BINDING
102          USE precision_kind
103
104          INTEGER(C_INT), value ::  plan
105          REAL(dpk), device     ::  idata(*)
106          COMPLEX(dpk), device  ::  odata(*)
107
108       END SUBROUTINE CUFFTEXECD2Z
109
110    END INTERFACE CUFFTEXECD2Z
111
112#endif
113 END MODULE cuda_fft_interfaces
Note: See TracBrowser for help on using the repository browser.