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

Last change on this file since 4180 was 4180, checked in by scharf, 22 months ago

removed comments in 'Former revisions' section that are older than 01.01.2019

  • Property svn:keywords set to Id
File size: 4.8 KB
Line 
1!> @file cuda_fft_interfaces.f90
2!--------------------------------------------------------------------------------!
3! This file is part of PALM.
4!
5! PALM is free software: you can redistribute it and/or modify it under the terms
6! of the GNU General Public License as published by the Free Software Foundation,
7! either version 3 of the License, or (at your option) any later version.
8!
9! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
10! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
11! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
12!
13! You should have received a copy of the GNU General Public License along with
14! PALM. If not, see <http://www.gnu.org/licenses/>.
15!
16! Copyright 1997-2019 Leibniz Universitaet Hannover
17!--------------------------------------------------------------------------------!
18!
19! Current revisions:
20! -----------------
21!
22!
23! Former revisions:
24! -----------------
25! $Id: cuda_fft_interfaces.f90 4180 2019-08-21 14:37:54Z scharf $
26! Initial revision ( OpenACC port for SPEC )
27!
28!
29! Description:
30! ------------
31!> FORTRAN interfaces for the CUDA fft
32!> Routines for the fft along x and y (forward/backward) using the CUDA fft
33!--------------------------------------------------------------------------------!
34 MODULE cuda_fft_interfaces
35 
36
37#if defined ( __cuda_fft )
38
39    USE kinds
40
41    INTEGER(iwp) ::  CUFFT_FORWARD = -1   !<
42    INTEGER(iwp) ::  CUFFT_INVERSE =  1   !<
43    INTEGER(iwp) ::  CUFFT_R2C = Z'2a'    !< Real to Complex (interleaved)
44    INTEGER(iwp) ::  CUFFT_C2R = Z'2c'    !< Complex (interleaved) to Real
45    INTEGER(iwp) ::  CUFFT_C2C = Z'29'    !< Complex to Complex, interleaved
46    INTEGER(iwp) ::  CUFFT_D2Z = Z'6a'    !< Double to Double-Complex
47    INTEGER(iwp) ::  CUFFT_Z2D = Z'6c'    !< Double-Complex to Double
48    INTEGER(iwp) ::  CUFFT_Z2Z = Z'69'    !< Double-Complex to Double-Complex
49
50    PUBLIC
51
52
53!
54!-- cufftPlan1d( cufftHandle *plan, int nx, cufftType type, int batch )
55    INTERFACE CUFFTPLAN1D
56
57!------------------------------------------------------------------------------!
58! Description:
59! ------------
60!> @todo Missing subroutine description.
61!------------------------------------------------------------------------------!
62       SUBROUTINE CUFFTPLAN1D( plan, nx, type, batch ) bind( C, name='cufftPlan1d' )
63
64          USE ISO_C_BINDING
65
66          INTEGER(C_INT)        ::  plan   !<
67          INTEGER(C_INT), value ::  batch  !<
68          INTEGER(C_INT), value ::  nx     !<
69          INTEGER(C_INT), value ::  type   !<
70       END SUBROUTINE CUFFTPLAN1D
71
72    END INTERFACE CUFFTPLAN1D
73
74!
75!-- cufftDestroy( cufftHandle plan )  !!! remove later if not really needed !!!
76    INTERFACE CUFFTDESTROY
77
78!------------------------------------------------------------------------------!
79! Description:
80! ------------
81!> @todo Missing subroutine description.
82!------------------------------------------------------------------------------!
83       SUBROUTINE CUFFTDESTROY( plan ) bind( C, name='cufftDestroy' )
84
85          USE ISO_C_BINDING
86
87          INTEGER(C_INT), VALUE ::  plan
88
89       END SUBROUTINE CUFFTDESTROY
90
91    END INTERFACE CUFFTDESTROY
92
93
94    INTERFACE CUFFTEXECZ2D
95
96!------------------------------------------------------------------------------!
97! Description:
98! ------------
99!> @todo Missing subroutine description.
100!------------------------------------------------------------------------------!
101       SUBROUTINE CUFFTEXECZ2D( plan, idata, odata ) bind( C, name='cufftExecZ2D' )
102
103          USE ISO_C_BINDING
104          USE kinds
105
106          INTEGER(C_INT), VALUE ::  plan          !<
107          COMPLEX(dp), DEVICE   ::  idata(:,:,:)  !<
108          REAL(dp), DEVICE      ::  odata(:,:,:)  !<
109
110       END SUBROUTINE CUFFTEXECZ2D
111
112    END INTERFACE CUFFTEXECZ2D
113
114
115    INTERFACE CUFFTEXECD2Z
116
117!------------------------------------------------------------------------------!
118! Description:
119! ------------
120!> @todo Missing subroutine description.
121!------------------------------------------------------------------------------!
122       SUBROUTINE CUFFTEXECD2Z( plan, idata, odata ) bind( C, name='cufftExecD2Z' )
123
124          USE ISO_C_BINDING
125         
126          USE kinds
127
128          INTEGER(C_INT), VALUE ::  plan          !<
129          REAL(dp), DEVICE      ::  idata(:,:,:)  !<
130          COMPLEX(dp), DEVICE   ::  odata(:,:,:)  !<
131
132       END SUBROUTINE CUFFTEXECD2Z
133
134    END INTERFACE CUFFTEXECD2Z
135
136#else
137
138    INTERFACE CUFFTdummy
139
140!------------------------------------------------------------------------------!
141! Description:
142! ------------
143!> Dummy interface to avoid compiler warnings in case of no bublic objects
144!> declared.
145!------------------------------------------------------------------------------!
146       SUBROUTINE CUFFTdummy( dummy )
147       
148          USE kinds
149
150          REAL(wp) ::  dummy  !<
151
152       END SUBROUTINE CUFFTdummy
153
154    END INTERFACE CUFFTdummy
155
156#endif
157
158 END MODULE cuda_fft_interfaces
Note: See TracBrowser for help on using the repository browser.