Changeset 4559 for palm/trunk/SOURCE/cuda_fft_interfaces.f90
- Timestamp:
- Jun 11, 2020 8:51:48 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/cuda_fft_interfaces.f90
r4360 r4559 1 1 !> @file cuda_fft_interfaces.f90 2 !-------------------------------------------------------------------------------- !3 ! This file is part of PALM.2 !--------------------------------------------------------------------------------------------------! 3 ! This file is part of the PALM model system. 4 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.5 ! PALM is free software: you can redistribute it and/or modify it under the terms of the GNU General 6 ! Public License as published by the Free Software Foundation, either version 3 of the License, or 7 ! (at your option) any later version. 8 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 FOR11 ! A PARTICULAR PURPOSE. See the GNU GeneralPublic License for more details.9 ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the 10 ! implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 11 ! Public License for more details. 12 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/>.13 ! You should have received a copy of the GNU General Public License along with PALM. If not, see 14 ! <http://www.gnu.org/licenses/>. 15 15 ! 16 16 ! Copyright 1997-2020 Leibniz Universitaet Hannover 17 !-------------------------------------------------------------------------------- !17 !--------------------------------------------------------------------------------------------------! 18 18 ! 19 19 ! Current revisions: … … 24 24 ! ----------------- 25 25 ! $Id$ 26 ! file re-formatted to follow the PALM coding standard 27 ! 28 ! 4360 2020-01-07 11:25:50Z suehring 26 29 ! Corrected "Former revisions" section 27 ! 30 ! 28 31 ! 3655 2019-01-07 16:51:22Z knoop 29 32 ! 1683 2015-10-07 23:57:51Z knoop … … 34 37 !> FORTRAN interfaces for the CUDA fft 35 38 !> Routines for the fft along x and y (forward/backward) using the CUDA fft 36 !-------------------------------------------------------------------------------- !39 !--------------------------------------------------------------------------------------------------! 37 40 MODULE cuda_fft_interfaces 38 41 39 42 40 43 #if defined ( __cuda_fft ) … … 42 45 USE kinds 43 46 47 INTEGER(iwp) :: CUFFT_C2C = Z'29' !< Complex to Complex, interleaved 48 INTEGER(iwp) :: CUFFT_C2R = Z'2c' !< Complex (interleaved) to Real 49 INTEGER(iwp) :: CUFFT_D2Z = Z'6a' !< Double to Double-Complex 44 50 INTEGER(iwp) :: CUFFT_FORWARD = -1 !< 45 51 INTEGER(iwp) :: CUFFT_INVERSE = 1 !< 46 52 INTEGER(iwp) :: CUFFT_R2C = Z'2a' !< Real to Complex (interleaved) 47 INTEGER(iwp) :: CUFFT_C2R = Z'2c' !< Complex (interleaved) to Real48 INTEGER(iwp) :: CUFFT_C2C = Z'29' !< Complex to Complex, interleaved49 INTEGER(iwp) :: CUFFT_D2Z = Z'6a' !< Double to Double-Complex50 53 INTEGER(iwp) :: CUFFT_Z2D = Z'6c' !< Double-Complex to Double 51 54 INTEGER(iwp) :: CUFFT_Z2Z = Z'69' !< Double-Complex to Double-Complex … … 58 61 INTERFACE CUFFTPLAN1D 59 62 60 !------------------------------------------------------------------------------ !63 !--------------------------------------------------------------------------------------------------! 61 64 ! Description: 62 65 ! ------------ 63 66 !> @todo Missing subroutine description. 64 !------------------------------------------------------------------------------ !65 SUBROUTINE CUFFTPLAN1D( plan, nx, type, batch ) bind( C, name='cufftPlan1d' )67 !--------------------------------------------------------------------------------------------------! 68 SUBROUTINE CUFFTPLAN1D( plan, nx, type, batch ) BIND( C, name='cufftPlan1d' ) 66 69 67 70 USE ISO_C_BINDING 68 71 69 INTEGER(C_INT) :: plan !< 70 INTEGER(C_INT), value :: batch !<71 INTEGER(C_INT), value :: nx !<72 INTEGER(C_INT), value :: type !<72 INTEGER(C_INT) :: plan !< 73 INTEGER(C_INT), VALUE :: batch !< 74 INTEGER(C_INT), VALUE :: nx !< 75 INTEGER(C_INT), VALUE :: type !< 73 76 END SUBROUTINE CUFFTPLAN1D 74 77 … … 79 82 INTERFACE CUFFTDESTROY 80 83 81 !------------------------------------------------------------------------------ !84 !--------------------------------------------------------------------------------------------------! 82 85 ! Description: 83 86 ! ------------ 84 87 !> @todo Missing subroutine description. 85 !------------------------------------------------------------------------------ !86 SUBROUTINE CUFFTDESTROY( plan ) bind( C, name='cufftDestroy' )88 !--------------------------------------------------------------------------------------------------! 89 SUBROUTINE CUFFTDESTROY( plan ) BIND( C, name='cufftDestroy' ) 87 90 88 91 USE ISO_C_BINDING … … 97 100 INTERFACE CUFFTEXECZ2D 98 101 99 !------------------------------------------------------------------------------ !102 !--------------------------------------------------------------------------------------------------! 100 103 ! Description: 101 104 ! ------------ 102 105 !> @todo Missing subroutine description. 103 !------------------------------------------------------------------------------ !104 SUBROUTINE CUFFTEXECZ2D( plan, idata, odata ) bind( C, name='cufftExecZ2D' )106 !--------------------------------------------------------------------------------------------------! 107 SUBROUTINE CUFFTEXECZ2D( plan, idata, odata ) BIND( C, name='cufftExecZ2D' ) 105 108 106 109 USE ISO_C_BINDING 107 110 USE kinds 108 111 112 COMPLEX(dp), DEVICE :: idata(:,:,:) !< 113 109 114 INTEGER(C_INT), VALUE :: plan !< 110 COMPLEX(dp), DEVICE :: idata(:,:,:) !< 115 111 116 REAL(dp), DEVICE :: odata(:,:,:) !< 112 117 … … 118 123 INTERFACE CUFFTEXECD2Z 119 124 120 !------------------------------------------------------------------------------ !125 !--------------------------------------------------------------------------------------------------! 121 126 ! Description: 122 127 ! ------------ 123 128 !> @todo Missing subroutine description. 124 !------------------------------------------------------------------------------ !129 !--------------------------------------------------------------------------------------------------! 125 130 SUBROUTINE CUFFTEXECD2Z( plan, idata, odata ) bind( C, name='cufftExecD2Z' ) 126 131 127 132 USE ISO_C_BINDING 128 133 129 134 USE kinds 130 135 136 COMPLEX(dp), DEVICE :: odata(:,:,:) !< 137 131 138 INTEGER(C_INT), VALUE :: plan !< 139 132 140 REAL(dp), DEVICE :: idata(:,:,:) !< 133 COMPLEX(dp), DEVICE :: odata(:,:,:) !<134 141 135 142 END SUBROUTINE CUFFTEXECD2Z … … 141 148 INTERFACE CUFFTdummy 142 149 143 !------------------------------------------------------------------------------ !150 !--------------------------------------------------------------------------------------------------! 144 151 ! Description: 145 152 ! ------------ 146 !> Dummy interface to avoid compiler warnings in case of no bublic objects 147 !> declared. 148 !------------------------------------------------------------------------------! 153 !> Dummy interface to avoid compiler warnings in case of no bublic objects declared. 154 !--------------------------------------------------------------------------------------------------! 149 155 SUBROUTINE CUFFTdummy( dummy ) 150 156 151 157 USE kinds 152 158
Note: See TracChangeset
for help on using the changeset viewer.