Line data Source code
1 : !--------------------------------------------------------------------------------------------------!
2 : ! CP2K: A general program to perform molecular dynamics simulations !
3 : ! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
4 : ! !
5 : ! SPDX-License-Identifier: GPL-2.0-or-later !
6 : !--------------------------------------------------------------------------------------------------!
7 :
8 : ! **************************************************************************************************
9 : MODULE ps_wavelet_fft3d
10 :
11 : USE kinds, ONLY: dp
12 : #include "../base/base_uses.f90"
13 :
14 : IMPLICIT NONE
15 : PRIVATE
16 :
17 : CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'ps_wavelet_fft3d'
18 :
19 : ! longest fft supported, must be equal to the length of the ctrig array
20 : INTEGER, PARAMETER :: ctrig_length = 8192
21 :
22 : PUBLIC :: fourier_dim, &
23 : ctrig, &
24 : fftstp, ctrig_length
25 :
26 : CONTAINS
27 :
28 : ! **************************************************************************************************
29 : !> \brief Give a number n_next > n compatible for the FFT
30 : !> \param n ...
31 : !> \param n_next ...
32 : ! **************************************************************************************************
33 114595 : SUBROUTINE fourier_dim(n, n_next)
34 : INTEGER, INTENT(in) :: n
35 : INTEGER, INTENT(out) :: n_next
36 :
37 : INTEGER, PARAMETER :: ndata = 149, ndata1024 = 149
38 : INTEGER, DIMENSION(ndata), PARAMETER :: idata = [3, 4, 5, 6, 8, 9, 12, 15, 16, 18, 20, 24, 25&
39 : , 27, 30, 32, 36, 40, 45, 48, 54, 60, 64, 72, 75, 80, 81, 90, 96, 100, 108, 120, 125, 128,&
40 : 135, 144, 150, 160, 162, 180, 192, 200, 216, 225, 240, 243, 256, 270, 288, 300, 320, 324, &
41 : 360, 375, 384, 400, 405, 432, 450, 480, 486, 500, 512, 540, 576, 600, 625, 640, 648, 675, &
42 : 720, 729, 750, 768, 800, 810, 864, 900, 960, 972, 1000, 1024, 1080, 1125, 1152, 1200, 1215&
43 : , 1280, 1296, 1350, 1440, 1458, 1500, 1536, 1600, 1620, 1728, 1800, 1875, 1920, 1944, 2000&
44 : , 2025, 2048, 2160, 2250, 2304, 2400, 2430, 2500, 2560, 2592, 2700, 2880, 3000, 3072, 3125&
45 : , 3200, 3240, 3375, 3456, 3600, 3750, 3840, 3888, 4000, 4050, 4096, 4320, 4500, 4608, 4800&
46 : , 5000, 5120, 5184, 5400, 5625, 5760, 6000, 6144, 6400, 6480, 6750, 6912, 7200, 7500, 7680&
47 : , 8000, ctrig_length]
48 :
49 : INTEGER :: i
50 :
51 : !Multiple of 2,3,5
52 :
53 1856284 : loop_data: DO i = 1, ndata1024
54 1856284 : IF (n <= idata(i)) THEN
55 114595 : n_next = idata(i)
56 114595 : RETURN
57 : END IF
58 : END DO loop_data
59 0 : WRITE (unit=*, fmt=*) "fourier_dim: ", n, " is bigger than ", idata(ndata1024)
60 0 : CPABORT("")
61 : END SUBROUTINE fourier_dim
62 :
63 : ! Copyright (C) Stefan Goedecker, CEA Grenoble, 2002
64 : ! This file is distributed under the terms of the
65 : ! GNU General Public License, see http://www.gnu.org/copyleft/gpl.txt .
66 :
67 : ! --------------------------------------------------------------
68 : ! 3-dimensional complex-complex FFT routine:
69 : ! When compared to the best vendor implementations on RISC architectures
70 : ! it gives close to optimal performance (perhaps losing 20 percent in speed)
71 : ! and it is significantly faster than many not so good vendor implementations
72 : ! as well as other portable FFT's.
73 : ! On all vector machines tested so far (Cray, NEC, Fujitsu) is
74 : ! was significantly faster than the vendor routines
75 : ! The theoretical background is described in :
76 : ! 1) S. Goedecker: Rotating a three-dimensional array in optimal
77 : ! positions for vector processing: Case study for a three-dimensional Fast
78 : ! Fourier Transform, Comp. Phys. Commun. \underline{76}, 294 (1993)
79 : ! Citing of this reference is greatly appreciated if the routines are used
80 : ! for scientific work.
81 :
82 : ! Presumably good compiler flags:
83 : ! IBM, serial power 2: xlf -qarch=pwr2 -O2 -qmaxmem=-1
84 : ! with OpenMP: IBM: xlf_r -qfree -O4 -qarch=pwr3 -qtune=pwr3 -qsmp=omp -qmaxmem=-1 ;
85 : ! a.out
86 : ! DEC: f90 -O3 -arch ev67 -pipeline
87 : ! with OpenMP: DEC: f90 -O3 -arch ev67 -pipeline -omp -lelan ;
88 : ! prun -N1 -c4 a.out
89 :
90 : !-----------------------------------------------------------
91 :
92 : ! FFT PART -----------------------------------------------------------------
93 :
94 : ! **************************************************************************************************
95 : !> \brief ...
96 : !> \param n ...
97 : !> \param trig ...
98 : !> \param after ...
99 : !> \param before ...
100 : !> \param now ...
101 : !> \param isign ...
102 : !> \param ic ...
103 : ! **************************************************************************************************
104 101313 : SUBROUTINE ctrig(n, trig, after, before, now, isign, ic)
105 : ! Copyright (C) Stefan Goedecker, Lausanne, Switzerland, August 1, 1991
106 : ! Copyright (C) Stefan Goedecker, Cornell University, Ithaca, USA, 1994
107 : ! Copyright (C) Stefan Goedecker, MPI Stuttgart, Germany, 1999
108 : ! This file is distributed under the terms of the
109 : ! GNU General Public License, see http://www.gnu.org/copyleft/gpl.txt .
110 :
111 : ! Different factorizations affect the performance
112 : ! Factoring 64 as 4*4*4 might for example be faster on some machines than 8*8.
113 : INTEGER :: n
114 : REAL(KIND=dp) :: trig
115 : INTEGER :: after, before, now, isign, ic
116 :
117 : INTEGER :: i, itt, j, nh
118 : REAL(KIND=dp) :: angle, trigc, trigs, twopi
119 :
120 : DIMENSION now(7), after(7), before(7), trig(2, ctrig_length)
121 : INTEGER, DIMENSION(7, 149) :: idata
122 : ! The factor 6 is only allowed in the first place!
123 : DATA((idata(i, j), i=1, 7), j=1, 76)/ &
124 : 3, 3, 1, 1, 1, 1, 1, 4, 4, 1, 1, 1, 1, 1, &
125 : 5, 5, 1, 1, 1, 1, 1, 6, 6, 1, 1, 1, 1, 1, &
126 : 8, 8, 1, 1, 1, 1, 1, 9, 3, 3, 1, 1, 1, 1, &
127 : 12, 4, 3, 1, 1, 1, 1, 15, 5, 3, 1, 1, 1, 1, &
128 : 16, 4, 4, 1, 1, 1, 1, 18, 6, 3, 1, 1, 1, 1, &
129 : 20, 5, 4, 1, 1, 1, 1, 24, 8, 3, 1, 1, 1, 1, &
130 : 25, 5, 5, 1, 1, 1, 1, 27, 3, 3, 3, 1, 1, 1, &
131 : 30, 6, 5, 1, 1, 1, 1, 32, 8, 4, 1, 1, 1, 1, &
132 : 36, 4, 3, 3, 1, 1, 1, 40, 8, 5, 1, 1, 1, 1, &
133 : 45, 5, 3, 3, 1, 1, 1, 48, 4, 4, 3, 1, 1, 1, &
134 : 54, 6, 3, 3, 1, 1, 1, 60, 5, 4, 3, 1, 1, 1, &
135 : 64, 8, 8, 1, 1, 1, 1, 72, 8, 3, 3, 1, 1, 1, &
136 : 75, 5, 5, 3, 1, 1, 1, 80, 5, 4, 4, 1, 1, 1, &
137 : 81, 3, 3, 3, 3, 1, 1, 90, 6, 5, 3, 1, 1, 1, &
138 : 96, 8, 4, 3, 1, 1, 1, 100, 5, 5, 4, 1, 1, 1, &
139 : 108, 4, 3, 3, 3, 1, 1, 120, 8, 5, 3, 1, 1, 1, &
140 : 125, 5, 5, 5, 1, 1, 1, 128, 8, 4, 4, 1, 1, 1, &
141 : 135, 5, 3, 3, 3, 1, 1, 144, 6, 8, 3, 1, 1, 1, &
142 : 150, 6, 5, 5, 1, 1, 1, 160, 8, 5, 4, 1, 1, 1, &
143 : 162, 6, 3, 3, 3, 1, 1, 180, 5, 4, 3, 3, 1, 1, &
144 : 192, 6, 8, 4, 1, 1, 1, 200, 8, 5, 5, 1, 1, 1, &
145 : 216, 8, 3, 3, 3, 1, 1, 225, 5, 5, 3, 3, 1, 1, &
146 : 240, 6, 8, 5, 1, 1, 1, 243, 3, 3, 3, 3, 3, 1, &
147 : 256, 8, 8, 4, 1, 1, 1, 270, 6, 5, 3, 3, 1, 1, &
148 : 288, 8, 4, 3, 3, 1, 1, 300, 5, 5, 4, 3, 1, 1, &
149 : 320, 5, 4, 4, 4, 1, 1, 324, 4, 3, 3, 3, 3, 1, &
150 : 360, 8, 5, 3, 3, 1, 1, 375, 5, 5, 5, 3, 1, 1, &
151 : 384, 8, 4, 4, 3, 1, 1, 400, 5, 5, 4, 4, 1, 1, &
152 : 405, 5, 3, 3, 3, 3, 1, 432, 4, 4, 3, 3, 3, 1, &
153 : 450, 6, 5, 5, 3, 1, 1, 480, 8, 5, 4, 3, 1, 1, &
154 : 486, 6, 3, 3, 3, 3, 1, 500, 5, 5, 5, 4, 1, 1, &
155 : 512, 8, 8, 8, 1, 1, 1, 540, 5, 4, 3, 3, 3, 1, &
156 : 576, 4, 4, 4, 3, 3, 1, 600, 8, 5, 5, 3, 1, 1, &
157 : 625, 5, 5, 5, 5, 1, 1, 640, 8, 5, 4, 4, 1, 1, &
158 : 648, 8, 3, 3, 3, 3, 1, 675, 5, 5, 3, 3, 3, 1, &
159 : 720, 5, 4, 4, 3, 3, 1, 729, 3, 3, 3, 3, 3, 3, &
160 : 750, 6, 5, 5, 5, 1, 1, 768, 4, 4, 4, 4, 3, 1, &
161 : 800, 8, 5, 5, 4, 1, 1, 810, 6, 5, 3, 3, 3, 1/
162 : DATA((idata(i, j), i=1, 7), j=77, 149)/ &
163 : 864, 8, 4, 3, 3, 3, 1, 900, 5, 5, 4, 3, 3, 1, &
164 : 960, 5, 4, 4, 4, 3, 1, 972, 4, 3, 3, 3, 3, 3, &
165 : 1000, 8, 5, 5, 5, 1, 1, 1024, 4, 4, 4, 4, 4, 1, &
166 : 1080, 6, 5, 4, 3, 3, 1, 1125, 5, 5, 5, 3, 3, 1, &
167 : 1152, 6, 4, 4, 4, 3, 1, 1200, 6, 8, 5, 5, 1, 1, &
168 : 1215, 5, 3, 3, 3, 3, 3, 1280, 8, 8, 5, 4, 1, 1, &
169 : 1296, 6, 8, 3, 3, 3, 1, 1350, 6, 5, 5, 3, 3, 1, &
170 : 1440, 6, 5, 4, 4, 3, 1, 1458, 6, 3, 3, 3, 3, 3, &
171 : 1500, 5, 5, 5, 4, 3, 1, 1536, 6, 8, 8, 4, 1, 1, &
172 : 1600, 8, 8, 5, 5, 1, 1, 1620, 5, 4, 3, 3, 3, 3, &
173 : 1728, 6, 8, 4, 3, 3, 1, 1800, 6, 5, 5, 4, 3, 1, &
174 : 1875, 5, 5, 5, 5, 3, 1, 1920, 6, 5, 4, 4, 4, 1, &
175 : 1944, 6, 4, 3, 3, 3, 3, 2000, 5, 5, 5, 4, 4, 1, &
176 : 2025, 5, 5, 3, 3, 3, 3, 2048, 8, 4, 4, 4, 4, 1, &
177 : 2160, 6, 8, 5, 3, 3, 1, 2250, 6, 5, 5, 5, 3, 1, &
178 : 2304, 6, 8, 4, 4, 3, 1, 2400, 6, 5, 5, 4, 4, 1, &
179 : 2430, 6, 5, 3, 3, 3, 3, 2500, 5, 5, 5, 5, 4, 1, &
180 : 2560, 8, 5, 4, 4, 4, 1, 2592, 6, 4, 4, 3, 3, 3, &
181 : 2700, 5, 5, 4, 3, 3, 3, 2880, 6, 8, 5, 4, 3, 1, &
182 : 3000, 6, 5, 5, 5, 4, 1, 3072, 6, 8, 4, 4, 4, 1, &
183 : 3125, 5, 5, 5, 5, 5, 1, 3200, 8, 5, 5, 4, 4, 1, &
184 : 3240, 6, 5, 4, 3, 3, 3, 3375, 5, 5, 5, 3, 3, 3, &
185 : 3456, 6, 4, 4, 4, 3, 3, 3600, 6, 8, 5, 5, 3, 1, &
186 : 3750, 6, 5, 5, 5, 5, 1, 3840, 6, 8, 5, 4, 4, 1, &
187 : 3888, 6, 8, 3, 3, 3, 3, 4000, 8, 5, 5, 5, 4, 1, &
188 : 4050, 6, 5, 5, 3, 3, 3, 4096, 8, 8, 4, 4, 4, 1, &
189 : 4320, 6, 5, 4, 4, 3, 3, 4500, 5, 5, 5, 4, 3, 3, &
190 : 4608, 6, 8, 8, 4, 3, 1, 4800, 6, 8, 5, 5, 4, 1, &
191 : 5000, 8, 5, 5, 5, 5, 1, 5120, 8, 8, 5, 4, 4, 1, &
192 : 5184, 6, 8, 4, 3, 3, 3, 5400, 6, 5, 5, 4, 3, 3, &
193 : 5625, 5, 5, 5, 5, 3, 3, 5760, 6, 8, 8, 5, 3, 1, &
194 : 6000, 6, 8, 5, 5, 5, 1, 6144, 6, 8, 8, 4, 4, 1, &
195 : 6400, 8, 8, 5, 5, 4, 1, 6480, 6, 8, 5, 3, 3, 3, &
196 : 6750, 6, 5, 5, 5, 3, 3, 6912, 6, 8, 4, 4, 3, 3, &
197 : 7200, 6, 5, 5, 4, 4, 3, 7500, 5, 5, 5, 5, 4, 3, &
198 : 7680, 6, 8, 8, 5, 4, 1, 8000, 8, 8, 5, 5, 5, 1, &
199 : 8192, 8, 8, 8, 4, 4, 1/
200 :
201 1654376 : DO i = 1, 150
202 1654376 : IF (i == 150) THEN
203 0 : PRINT *, 'VALUE OF', n, 'NOT ALLOWED FOR FFT, ALLOWED VALUES ARE:'
204 : 37 FORMAT(15(i5))
205 0 : WRITE (*, 37) (idata(1, j), j=1, 149)
206 0 : CPABORT("")
207 : END IF
208 1654376 : IF (n == idata(1, i)) THEN
209 101313 : ic = 0
210 346047 : DO j = 1, 6
211 346047 : itt = idata(1 + j, i)
212 346047 : IF (itt > 1) THEN
213 244734 : ic = ic + 1
214 244734 : now(j) = idata(1 + j, i)
215 : ELSE
216 : EXIT
217 : END IF
218 : END DO
219 : EXIT
220 : END IF
221 : END DO
222 :
223 101313 : after(1) = 1
224 101313 : before(ic) = 1
225 244734 : DO i = 2, ic
226 143421 : after(i) = after(i - 1)*now(i - 1)
227 244734 : before(ic - i + 1) = before(ic - i + 2)*now(ic - i + 2)
228 : END DO
229 :
230 101313 : twopi = 6.283185307179586_dp
231 101313 : angle = isign*twopi/n
232 101313 : IF (MOD(n, 2) == 0) THEN
233 89604 : nh = n/2
234 89604 : trig(1, 1) = 1._dp
235 89604 : trig(2, 1) = 0._dp
236 89604 : trig(1, nh + 1) = -1._dp
237 89604 : trig(2, nh + 1) = 0._dp
238 1969198 : DO 40, i = 1, nh - 1
239 1879594 : trigc = COS(i*angle)
240 1879594 : trigs = SIN(i*angle)
241 1879594 : trig(1, i + 1) = trigc
242 1879594 : trig(2, i + 1) = trigs
243 1879594 : trig(1, n - i + 1) = trigc
244 1879594 : trig(2, n - i + 1) = -trigs
245 89604 : 40 CONTINUE
246 : ELSE
247 11709 : nh = (n - 1)/2
248 11709 : trig(1, 1) = 1._dp
249 11709 : trig(2, 1) = 0._dp
250 117090 : DO 20, i = 1, nh
251 105381 : trigc = COS(i*angle)
252 105381 : trigs = SIN(i*angle)
253 105381 : trig(1, i + 1) = trigc
254 105381 : trig(2, i + 1) = trigs
255 105381 : trig(1, n - i + 1) = trigc
256 105381 : trig(2, n - i + 1) = -trigs
257 11709 : 20 CONTINUE
258 : END IF
259 :
260 101313 : END SUBROUTINE ctrig
261 :
262 : !ccccccccccccccccccccccccccccccccccccccccccccccc
263 :
264 : ! **************************************************************************************************
265 : !> \brief ...
266 : !> \param mm ...
267 : !> \param nfft ...
268 : !> \param m ...
269 : !> \param nn ...
270 : !> \param n ...
271 : !> \param zin ...
272 : !> \param zout ...
273 : !> \param trig ...
274 : !> \param after ...
275 : !> \param now ...
276 : !> \param before ...
277 : !> \param isign ...
278 : ! **************************************************************************************************
279 23654073 : SUBROUTINE fftstp(mm, nfft, m, nn, n, zin, zout, trig, after, now, before, isign)
280 : ! Copyright (C) Stefan Goedecker, Cornell University, Ithaca, USA, 1994
281 : ! Copyright (C) Stefan Goedecker, MPI Stuttgart, Germany, 1995, 1999
282 : ! This file is distributed under the terms of the
283 : ! GNU General Public License, see http://www.gnu.org/copyleft/gpl.txt .
284 :
285 : INTEGER :: mm, nfft, m, nn, n
286 : REAL(KIND=dp) :: zin, zout, trig
287 : INTEGER :: after, now, before, isign
288 :
289 : INTEGER :: atb, atn, ia, ias, ib, itrig, itt, j, &
290 : nin1, nin2, nin3, nin4, nin5, nin6, &
291 : nin7, nin8, nout1, nout2, nout3, &
292 : nout4, nout5, nout6, nout7, nout8
293 : REAL(KIND=dp) :: am, ap, bb, bm, bp, ci2, ci3, ci4, ci5, ci6, ci7, ci8, cm, cos2, cos4, cp, &
294 : cr2, cr3, cr4, cr5, cr6, cr7, cr8, dm, dpp, r, r1, r2, r25, r3, r34, r4, r5, r6, r7, r8, &
295 : rt2i, s, s1, s2, s25, s3, s34, s4, s5, s6, s7, s8, sin2, sin4, ui1, ui2, ui3, ur1, ur2, &
296 : ur3, vi1, vi2, vi3, vr1, vr2, vr3
297 :
298 : DIMENSION trig(2, ctrig_length), zin(2, mm, m), zout(2, nn, n)
299 23654073 : atn = after*now
300 23654073 : atb = after*before
301 :
302 : ! sqrt(.5_dp)
303 23654073 : rt2i = 0.7071067811865475_dp
304 : IF (now == 2) THEN
305 0 : ia = 1
306 0 : nin1 = ia - after
307 0 : nout1 = ia - atn
308 0 : DO ib = 1, before
309 0 : nin1 = nin1 + after
310 0 : nin2 = nin1 + atb
311 0 : nout1 = nout1 + atn
312 0 : nout2 = nout1 + after
313 0 : DO j = 1, nfft
314 0 : r1 = zin(1, j, nin1)
315 0 : s1 = zin(2, j, nin1)
316 0 : r2 = zin(1, j, nin2)
317 0 : s2 = zin(2, j, nin2)
318 0 : zout(1, j, nout1) = r2 + r1
319 0 : zout(2, j, nout1) = s2 + s1
320 0 : zout(1, j, nout2) = r1 - r2
321 0 : zout(2, j, nout2) = s1 - s2
322 : END DO; END DO
323 0 : DO 2000, ia = 2, after
324 0 : ias = ia - 1
325 0 : IF (2*ias == after) THEN
326 0 : IF (isign == 1) THEN
327 0 : nin1 = ia - after
328 0 : nout1 = ia - atn
329 0 : DO ib = 1, before
330 0 : nin1 = nin1 + after
331 0 : nin2 = nin1 + atb
332 0 : nout1 = nout1 + atn
333 0 : nout2 = nout1 + after
334 0 : DO j = 1, nfft
335 0 : r1 = zin(1, j, nin1)
336 0 : s1 = zin(2, j, nin1)
337 0 : r2 = zin(2, j, nin2)
338 0 : s2 = zin(1, j, nin2)
339 0 : zout(1, j, nout1) = r1 - r2
340 0 : zout(2, j, nout1) = s2 + s1
341 0 : zout(1, j, nout2) = r2 + r1
342 0 : zout(2, j, nout2) = s1 - s2
343 : END DO; END DO
344 : ELSE
345 0 : nin1 = ia - after
346 0 : nout1 = ia - atn
347 0 : DO ib = 1, before
348 0 : nin1 = nin1 + after
349 0 : nin2 = nin1 + atb
350 0 : nout1 = nout1 + atn
351 0 : nout2 = nout1 + after
352 0 : DO j = 1, nfft
353 0 : r1 = zin(1, j, nin1)
354 0 : s1 = zin(2, j, nin1)
355 0 : r2 = zin(2, j, nin2)
356 0 : s2 = zin(1, j, nin2)
357 0 : zout(1, j, nout1) = r2 + r1
358 0 : zout(2, j, nout1) = s1 - s2
359 0 : zout(1, j, nout2) = r1 - r2
360 0 : zout(2, j, nout2) = s2 + s1
361 : END DO; END DO
362 : END IF
363 0 : ELSE IF (4*ias == after) THEN
364 0 : IF (isign == 1) THEN
365 0 : nin1 = ia - after
366 0 : nout1 = ia - atn
367 0 : DO ib = 1, before
368 0 : nin1 = nin1 + after
369 0 : nin2 = nin1 + atb
370 0 : nout1 = nout1 + atn
371 0 : nout2 = nout1 + after
372 0 : DO j = 1, nfft
373 0 : r1 = zin(1, j, nin1)
374 0 : s1 = zin(2, j, nin1)
375 0 : r = zin(1, j, nin2)
376 0 : s = zin(2, j, nin2)
377 0 : r2 = (r - s)*rt2i
378 0 : s2 = (r + s)*rt2i
379 0 : zout(1, j, nout1) = r2 + r1
380 0 : zout(2, j, nout1) = s2 + s1
381 0 : zout(1, j, nout2) = r1 - r2
382 0 : zout(2, j, nout2) = s1 - s2
383 : END DO; END DO
384 : ELSE
385 0 : nin1 = ia - after
386 0 : nout1 = ia - atn
387 0 : DO ib = 1, before
388 0 : nin1 = nin1 + after
389 0 : nin2 = nin1 + atb
390 0 : nout1 = nout1 + atn
391 0 : nout2 = nout1 + after
392 0 : DO j = 1, nfft
393 0 : r1 = zin(1, j, nin1)
394 0 : s1 = zin(2, j, nin1)
395 0 : r = zin(1, j, nin2)
396 0 : s = zin(2, j, nin2)
397 0 : r2 = (r + s)*rt2i
398 0 : s2 = (s - r)*rt2i
399 0 : zout(1, j, nout1) = r2 + r1
400 0 : zout(2, j, nout1) = s2 + s1
401 0 : zout(1, j, nout2) = r1 - r2
402 0 : zout(2, j, nout2) = s1 - s2
403 : END DO; END DO
404 : END IF
405 0 : ELSE IF (4*ias == 3*after) THEN
406 0 : IF (isign == 1) THEN
407 0 : nin1 = ia - after
408 0 : nout1 = ia - atn
409 0 : DO ib = 1, before
410 0 : nin1 = nin1 + after
411 0 : nin2 = nin1 + atb
412 0 : nout1 = nout1 + atn
413 0 : nout2 = nout1 + after
414 0 : DO j = 1, nfft
415 0 : r1 = zin(1, j, nin1)
416 0 : s1 = zin(2, j, nin1)
417 0 : r = zin(1, j, nin2)
418 0 : s = zin(2, j, nin2)
419 0 : r2 = (r + s)*rt2i
420 0 : s2 = (r - s)*rt2i
421 0 : zout(1, j, nout1) = r1 - r2
422 0 : zout(2, j, nout1) = s2 + s1
423 0 : zout(1, j, nout2) = r2 + r1
424 0 : zout(2, j, nout2) = s1 - s2
425 : END DO; END DO
426 : ELSE
427 0 : nin1 = ia - after
428 0 : nout1 = ia - atn
429 0 : DO ib = 1, before
430 0 : nin1 = nin1 + after
431 0 : nin2 = nin1 + atb
432 0 : nout1 = nout1 + atn
433 0 : nout2 = nout1 + after
434 0 : DO j = 1, nfft
435 0 : r1 = zin(1, j, nin1)
436 0 : s1 = zin(2, j, nin1)
437 0 : r = zin(1, j, nin2)
438 0 : s = zin(2, j, nin2)
439 0 : r2 = (s - r)*rt2i
440 0 : s2 = (r + s)*rt2i
441 0 : zout(1, j, nout1) = r2 + r1
442 0 : zout(2, j, nout1) = s1 - s2
443 0 : zout(1, j, nout2) = r1 - r2
444 0 : zout(2, j, nout2) = s2 + s1
445 : END DO; END DO
446 : END IF
447 : ELSE
448 0 : itrig = ias*before + 1
449 0 : cr2 = trig(1, itrig)
450 0 : ci2 = trig(2, itrig)
451 0 : nin1 = ia - after
452 0 : nout1 = ia - atn
453 0 : DO ib = 1, before
454 0 : nin1 = nin1 + after
455 0 : nin2 = nin1 + atb
456 0 : nout1 = nout1 + atn
457 0 : nout2 = nout1 + after
458 0 : DO j = 1, nfft
459 0 : r1 = zin(1, j, nin1)
460 0 : s1 = zin(2, j, nin1)
461 0 : r = zin(1, j, nin2)
462 0 : s = zin(2, j, nin2)
463 0 : r2 = r*cr2 - s*ci2
464 0 : s2 = r*ci2 + s*cr2
465 0 : zout(1, j, nout1) = r2 + r1
466 0 : zout(2, j, nout1) = s2 + s1
467 0 : zout(1, j, nout2) = r1 - r2
468 0 : zout(2, j, nout2) = s1 - s2
469 : END DO; END DO
470 : END IF
471 0 : 2000 CONTINUE
472 : ELSE IF (now == 4) THEN
473 5848719 : IF (isign == 1) THEN
474 2995070 : ia = 1
475 2995070 : nin1 = ia - after
476 2995070 : nout1 = ia - atn
477 25884952 : DO ib = 1, before
478 22889882 : nin1 = nin1 + after
479 22889882 : nin2 = nin1 + atb
480 22889882 : nin3 = nin2 + atb
481 22889882 : nin4 = nin3 + atb
482 22889882 : nout1 = nout1 + atn
483 22889882 : nout2 = nout1 + after
484 22889882 : nout3 = nout2 + after
485 22889882 : nout4 = nout3 + after
486 468671915 : DO j = 1, nfft
487 442786963 : r1 = zin(1, j, nin1)
488 442786963 : s1 = zin(2, j, nin1)
489 442786963 : r2 = zin(1, j, nin2)
490 442786963 : s2 = zin(2, j, nin2)
491 442786963 : r3 = zin(1, j, nin3)
492 442786963 : s3 = zin(2, j, nin3)
493 442786963 : r4 = zin(1, j, nin4)
494 442786963 : s4 = zin(2, j, nin4)
495 442786963 : r = r1 + r3
496 442786963 : s = r2 + r4
497 442786963 : zout(1, j, nout1) = r + s
498 442786963 : zout(1, j, nout3) = r - s
499 442786963 : r = r1 - r3
500 442786963 : s = s2 - s4
501 442786963 : zout(1, j, nout2) = r - s
502 442786963 : zout(1, j, nout4) = r + s
503 442786963 : r = s1 + s3
504 442786963 : s = s2 + s4
505 442786963 : zout(2, j, nout1) = r + s
506 442786963 : zout(2, j, nout3) = r - s
507 442786963 : r = s1 - s3
508 442786963 : s = r2 - r4
509 442786963 : zout(2, j, nout2) = r + s
510 465676845 : zout(2, j, nout4) = r - s
511 : END DO; END DO
512 31776685 : DO 4000, ia = 2, after
513 28781615 : ias = ia - 1
514 28781615 : IF (2*ias == after) THEN
515 1274177 : nin1 = ia - after
516 1274177 : nout1 = ia - atn
517 2976232 : DO ib = 1, before
518 1702055 : nin1 = nin1 + after
519 1702055 : nin2 = nin1 + atb
520 1702055 : nin3 = nin2 + atb
521 1702055 : nin4 = nin3 + atb
522 1702055 : nout1 = nout1 + atn
523 1702055 : nout2 = nout1 + after
524 1702055 : nout3 = nout2 + after
525 1702055 : nout4 = nout3 + after
526 35414917 : DO j = 1, nfft
527 32438685 : r1 = zin(1, j, nin1)
528 32438685 : s1 = zin(2, j, nin1)
529 32438685 : r = zin(1, j, nin2)
530 32438685 : s = zin(2, j, nin2)
531 32438685 : r2 = (r - s)*rt2i
532 32438685 : s2 = (r + s)*rt2i
533 32438685 : r3 = zin(2, j, nin3)
534 32438685 : s3 = zin(1, j, nin3)
535 32438685 : r = zin(1, j, nin4)
536 32438685 : s = zin(2, j, nin4)
537 32438685 : r4 = (r + s)*rt2i
538 32438685 : s4 = (r - s)*rt2i
539 32438685 : r = r1 - r3
540 32438685 : s = r2 - r4
541 32438685 : zout(1, j, nout1) = r + s
542 32438685 : zout(1, j, nout3) = r - s
543 32438685 : r = r1 + r3
544 32438685 : s = s2 - s4
545 32438685 : zout(1, j, nout2) = r - s
546 32438685 : zout(1, j, nout4) = r + s
547 32438685 : r = s1 + s3
548 32438685 : s = s2 + s4
549 32438685 : zout(2, j, nout1) = r + s
550 32438685 : zout(2, j, nout3) = r - s
551 32438685 : r = s1 - s3
552 32438685 : s = r2 + r4
553 32438685 : zout(2, j, nout2) = r + s
554 34140740 : zout(2, j, nout4) = r - s
555 : END DO; END DO
556 : ELSE
557 27507438 : itt = ias*before
558 27507438 : itrig = itt + 1
559 27507438 : cr2 = trig(1, itrig)
560 27507438 : ci2 = trig(2, itrig)
561 27507438 : itrig = itrig + itt
562 27507438 : cr3 = trig(1, itrig)
563 27507438 : ci3 = trig(2, itrig)
564 27507438 : itrig = itrig + itt
565 27507438 : cr4 = trig(1, itrig)
566 27507438 : ci4 = trig(2, itrig)
567 27507438 : nin1 = ia - after
568 27507438 : nout1 = ia - atn
569 67967616 : DO ib = 1, before
570 40460178 : nin1 = nin1 + after
571 40460178 : nin2 = nin1 + atb
572 40460178 : nin3 = nin2 + atb
573 40460178 : nin4 = nin3 + atb
574 40460178 : nout1 = nout1 + atn
575 40460178 : nout2 = nout1 + after
576 40460178 : nout3 = nout2 + after
577 40460178 : nout4 = nout3 + after
578 818983370 : DO j = 1, nfft
579 751015754 : r1 = zin(1, j, nin1)
580 751015754 : s1 = zin(2, j, nin1)
581 751015754 : r = zin(1, j, nin2)
582 751015754 : s = zin(2, j, nin2)
583 751015754 : r2 = r*cr2 - s*ci2
584 751015754 : s2 = r*ci2 + s*cr2
585 751015754 : r = zin(1, j, nin3)
586 751015754 : s = zin(2, j, nin3)
587 751015754 : r3 = r*cr3 - s*ci3
588 751015754 : s3 = r*ci3 + s*cr3
589 751015754 : r = zin(1, j, nin4)
590 751015754 : s = zin(2, j, nin4)
591 751015754 : r4 = r*cr4 - s*ci4
592 751015754 : s4 = r*ci4 + s*cr4
593 751015754 : r = r1 + r3
594 751015754 : s = r2 + r4
595 751015754 : zout(1, j, nout1) = r + s
596 751015754 : zout(1, j, nout3) = r - s
597 751015754 : r = r1 - r3
598 751015754 : s = s2 - s4
599 751015754 : zout(1, j, nout2) = r - s
600 751015754 : zout(1, j, nout4) = r + s
601 751015754 : r = s1 + s3
602 751015754 : s = s2 + s4
603 751015754 : zout(2, j, nout1) = r + s
604 751015754 : zout(2, j, nout3) = r - s
605 751015754 : r = s1 - s3
606 751015754 : s = r2 - r4
607 751015754 : zout(2, j, nout2) = r + s
608 791475932 : zout(2, j, nout4) = r - s
609 : END DO; END DO
610 : END IF
611 2995070 : 4000 CONTINUE
612 : ELSE
613 2853649 : ia = 1
614 2853649 : nin1 = ia - after
615 2853649 : nout1 = ia - atn
616 24572167 : DO ib = 1, before
617 21718518 : nin1 = nin1 + after
618 21718518 : nin2 = nin1 + atb
619 21718518 : nin3 = nin2 + atb
620 21718518 : nin4 = nin3 + atb
621 21718518 : nout1 = nout1 + atn
622 21718518 : nout2 = nout1 + after
623 21718518 : nout3 = nout2 + after
624 21718518 : nout4 = nout3 + after
625 445926390 : DO j = 1, nfft
626 421354223 : r1 = zin(1, j, nin1)
627 421354223 : s1 = zin(2, j, nin1)
628 421354223 : r2 = zin(1, j, nin2)
629 421354223 : s2 = zin(2, j, nin2)
630 421354223 : r3 = zin(1, j, nin3)
631 421354223 : s3 = zin(2, j, nin3)
632 421354223 : r4 = zin(1, j, nin4)
633 421354223 : s4 = zin(2, j, nin4)
634 421354223 : r = r1 + r3
635 421354223 : s = r2 + r4
636 421354223 : zout(1, j, nout1) = r + s
637 421354223 : zout(1, j, nout3) = r - s
638 421354223 : r = r1 - r3
639 421354223 : s = s2 - s4
640 421354223 : zout(1, j, nout2) = r + s
641 421354223 : zout(1, j, nout4) = r - s
642 421354223 : r = s1 + s3
643 421354223 : s = s2 + s4
644 421354223 : zout(2, j, nout1) = r + s
645 421354223 : zout(2, j, nout3) = r - s
646 421354223 : r = s1 - s3
647 421354223 : s = r2 - r4
648 421354223 : zout(2, j, nout2) = r - s
649 443072741 : zout(2, j, nout4) = r + s
650 : END DO; END DO
651 29992732 : DO 4100, ia = 2, after
652 27139083 : ias = ia - 1
653 27139083 : IF (2*ias == after) THEN
654 1207881 : nin1 = ia - after
655 1207881 : nout1 = ia - atn
656 2802432 : DO ib = 1, before
657 1594551 : nin1 = nin1 + after
658 1594551 : nin2 = nin1 + atb
659 1594551 : nin3 = nin2 + atb
660 1594551 : nin4 = nin3 + atb
661 1594551 : nout1 = nout1 + atn
662 1594551 : nout2 = nout1 + after
663 1594551 : nout3 = nout2 + after
664 1594551 : nout4 = nout3 + after
665 33225845 : DO j = 1, nfft
666 30423413 : r1 = zin(1, j, nin1)
667 30423413 : s1 = zin(2, j, nin1)
668 30423413 : r = zin(1, j, nin2)
669 30423413 : s = zin(2, j, nin2)
670 30423413 : r2 = (r + s)*rt2i
671 30423413 : s2 = (s - r)*rt2i
672 30423413 : r3 = zin(2, j, nin3)
673 30423413 : s3 = zin(1, j, nin3)
674 30423413 : r = zin(1, j, nin4)
675 30423413 : s = zin(2, j, nin4)
676 30423413 : r4 = (s - r)*rt2i
677 30423413 : s4 = (r + s)*rt2i
678 30423413 : r = r1 + r3
679 30423413 : s = r2 + r4
680 30423413 : zout(1, j, nout1) = r + s
681 30423413 : zout(1, j, nout3) = r - s
682 30423413 : r = r1 - r3
683 30423413 : s = s2 + s4
684 30423413 : zout(1, j, nout2) = r + s
685 30423413 : zout(1, j, nout4) = r - s
686 30423413 : r = s1 - s3
687 30423413 : s = s2 - s4
688 30423413 : zout(2, j, nout1) = r + s
689 30423413 : zout(2, j, nout3) = r - s
690 30423413 : r = s1 + s3
691 30423413 : s = r2 - r4
692 30423413 : zout(2, j, nout2) = r - s
693 32017964 : zout(2, j, nout4) = r + s
694 : END DO; END DO
695 : ELSE
696 25931202 : itt = ias*before
697 25931202 : itrig = itt + 1
698 25931202 : cr2 = trig(1, itrig)
699 25931202 : ci2 = trig(2, itrig)
700 25931202 : itrig = itrig + itt
701 25931202 : cr3 = trig(1, itrig)
702 25931202 : ci3 = trig(2, itrig)
703 25931202 : itrig = itrig + itt
704 25931202 : cr4 = trig(1, itrig)
705 25931202 : ci4 = trig(2, itrig)
706 25931202 : nin1 = ia - after
707 25931202 : nout1 = ia - atn
708 64203816 : DO ib = 1, before
709 38272614 : nin1 = nin1 + after
710 38272614 : nin2 = nin1 + atb
711 38272614 : nin3 = nin2 + atb
712 38272614 : nin4 = nin3 + atb
713 38272614 : nout1 = nout1 + atn
714 38272614 : nout2 = nout1 + after
715 38272614 : nout3 = nout2 + after
716 38272614 : nout4 = nout3 + after
717 778742034 : DO j = 1, nfft
718 714538218 : r1 = zin(1, j, nin1)
719 714538218 : s1 = zin(2, j, nin1)
720 714538218 : r = zin(1, j, nin2)
721 714538218 : s = zin(2, j, nin2)
722 714538218 : r2 = r*cr2 - s*ci2
723 714538218 : s2 = r*ci2 + s*cr2
724 714538218 : r = zin(1, j, nin3)
725 714538218 : s = zin(2, j, nin3)
726 714538218 : r3 = r*cr3 - s*ci3
727 714538218 : s3 = r*ci3 + s*cr3
728 714538218 : r = zin(1, j, nin4)
729 714538218 : s = zin(2, j, nin4)
730 714538218 : r4 = r*cr4 - s*ci4
731 714538218 : s4 = r*ci4 + s*cr4
732 714538218 : r = r1 + r3
733 714538218 : s = r2 + r4
734 714538218 : zout(1, j, nout1) = r + s
735 714538218 : zout(1, j, nout3) = r - s
736 714538218 : r = r1 - r3
737 714538218 : s = s2 - s4
738 714538218 : zout(1, j, nout2) = r + s
739 714538218 : zout(1, j, nout4) = r - s
740 714538218 : r = s1 + s3
741 714538218 : s = s2 + s4
742 714538218 : zout(2, j, nout1) = r + s
743 714538218 : zout(2, j, nout3) = r - s
744 714538218 : r = s1 - s3
745 714538218 : s = r2 - r4
746 714538218 : zout(2, j, nout2) = r - s
747 752810832 : zout(2, j, nout4) = r + s
748 : END DO; END DO
749 : END IF
750 2853649 : 4100 CONTINUE
751 : END IF
752 : ELSE IF (now == 8) THEN
753 2368701 : IF (isign == -1) THEN
754 1141536 : ia = 1
755 1141536 : nin1 = ia - after
756 1141536 : nout1 = ia - atn
757 10022314 : DO ib = 1, before
758 8880778 : nin1 = nin1 + after
759 8880778 : nin2 = nin1 + atb
760 8880778 : nin3 = nin2 + atb
761 8880778 : nin4 = nin3 + atb
762 8880778 : nin5 = nin4 + atb
763 8880778 : nin6 = nin5 + atb
764 8880778 : nin7 = nin6 + atb
765 8880778 : nin8 = nin7 + atb
766 8880778 : nout1 = nout1 + atn
767 8880778 : nout2 = nout1 + after
768 8880778 : nout3 = nout2 + after
769 8880778 : nout4 = nout3 + after
770 8880778 : nout5 = nout4 + after
771 8880778 : nout6 = nout5 + after
772 8880778 : nout7 = nout6 + after
773 8880778 : nout8 = nout7 + after
774 181583662 : DO j = 1, nfft
775 171561348 : r1 = zin(1, j, nin1)
776 171561348 : s1 = zin(2, j, nin1)
777 171561348 : r2 = zin(1, j, nin2)
778 171561348 : s2 = zin(2, j, nin2)
779 171561348 : r3 = zin(1, j, nin3)
780 171561348 : s3 = zin(2, j, nin3)
781 171561348 : r4 = zin(1, j, nin4)
782 171561348 : s4 = zin(2, j, nin4)
783 171561348 : r5 = zin(1, j, nin5)
784 171561348 : s5 = zin(2, j, nin5)
785 171561348 : r6 = zin(1, j, nin6)
786 171561348 : s6 = zin(2, j, nin6)
787 171561348 : r7 = zin(1, j, nin7)
788 171561348 : s7 = zin(2, j, nin7)
789 171561348 : r8 = zin(1, j, nin8)
790 171561348 : s8 = zin(2, j, nin8)
791 171561348 : r = r1 + r5
792 171561348 : s = r3 + r7
793 171561348 : ap = r + s
794 171561348 : am = r - s
795 171561348 : r = r2 + r6
796 171561348 : s = r4 + r8
797 171561348 : bp = r + s
798 171561348 : bm = r - s
799 171561348 : r = s1 + s5
800 171561348 : s = s3 + s7
801 171561348 : cp = r + s
802 171561348 : cm = r - s
803 171561348 : r = s2 + s6
804 171561348 : s = s4 + s8
805 171561348 : dpp = r + s
806 171561348 : dm = r - s
807 171561348 : zout(1, j, nout1) = ap + bp
808 171561348 : zout(2, j, nout1) = cp + dpp
809 171561348 : zout(1, j, nout5) = ap - bp
810 171561348 : zout(2, j, nout5) = cp - dpp
811 171561348 : zout(1, j, nout3) = am + dm
812 171561348 : zout(2, j, nout3) = cm - bm
813 171561348 : zout(1, j, nout7) = am - dm
814 171561348 : zout(2, j, nout7) = cm + bm
815 171561348 : r = r1 - r5
816 171561348 : s = s3 - s7
817 171561348 : ap = r + s
818 171561348 : am = r - s
819 171561348 : r = s1 - s5
820 171561348 : s = r3 - r7
821 171561348 : bp = r + s
822 171561348 : bm = r - s
823 171561348 : r = s4 - s8
824 171561348 : s = r2 - r6
825 171561348 : cp = r + s
826 171561348 : cm = r - s
827 171561348 : r = s2 - s6
828 171561348 : s = r4 - r8
829 171561348 : dpp = r + s
830 171561348 : dm = r - s
831 171561348 : r = (cp + dm)*rt2i
832 171561348 : s = (dm - cp)*rt2i
833 171561348 : cp = (cm + dpp)*rt2i
834 171561348 : dpp = (cm - dpp)*rt2i
835 171561348 : zout(1, j, nout2) = ap + r
836 171561348 : zout(2, j, nout2) = bm + s
837 171561348 : zout(1, j, nout6) = ap - r
838 171561348 : zout(2, j, nout6) = bm - s
839 171561348 : zout(1, j, nout4) = am + cp
840 171561348 : zout(2, j, nout4) = bp + dpp
841 171561348 : zout(1, j, nout8) = am - cp
842 180442126 : zout(2, j, nout8) = bp - dpp
843 : END DO; END DO
844 3078477 : DO 8000, ia = 2, after
845 1936941 : ias = ia - 1
846 1936941 : itt = ias*before
847 1936941 : itrig = itt + 1
848 1936941 : cr2 = trig(1, itrig)
849 1936941 : ci2 = trig(2, itrig)
850 1936941 : itrig = itrig + itt
851 1936941 : cr3 = trig(1, itrig)
852 1936941 : ci3 = trig(2, itrig)
853 1936941 : itrig = itrig + itt
854 1936941 : cr4 = trig(1, itrig)
855 1936941 : ci4 = trig(2, itrig)
856 1936941 : itrig = itrig + itt
857 1936941 : cr5 = trig(1, itrig)
858 1936941 : ci5 = trig(2, itrig)
859 1936941 : itrig = itrig + itt
860 1936941 : cr6 = trig(1, itrig)
861 1936941 : ci6 = trig(2, itrig)
862 1936941 : itrig = itrig + itt
863 1936941 : cr7 = trig(1, itrig)
864 1936941 : ci7 = trig(2, itrig)
865 1936941 : itrig = itrig + itt
866 1936941 : cr8 = trig(1, itrig)
867 1936941 : ci8 = trig(2, itrig)
868 1936941 : nin1 = ia - after
869 1936941 : nout1 = ia - atn
870 7219592 : DO ib = 1, before
871 5282651 : nin1 = nin1 + after
872 5282651 : nin2 = nin1 + atb
873 5282651 : nin3 = nin2 + atb
874 5282651 : nin4 = nin3 + atb
875 5282651 : nin5 = nin4 + atb
876 5282651 : nin6 = nin5 + atb
877 5282651 : nin7 = nin6 + atb
878 5282651 : nin8 = nin7 + atb
879 5282651 : nout1 = nout1 + atn
880 5282651 : nout2 = nout1 + after
881 5282651 : nout3 = nout2 + after
882 5282651 : nout4 = nout3 + after
883 5282651 : nout5 = nout4 + after
884 5282651 : nout6 = nout5 + after
885 5282651 : nout7 = nout6 + after
886 5282651 : nout8 = nout7 + after
887 76962144 : DO j = 1, nfft
888 69742552 : r1 = zin(1, j, nin1)
889 69742552 : s1 = zin(2, j, nin1)
890 69742552 : r = zin(1, j, nin2)
891 69742552 : s = zin(2, j, nin2)
892 69742552 : r2 = r*cr2 - s*ci2
893 69742552 : s2 = r*ci2 + s*cr2
894 69742552 : r = zin(1, j, nin3)
895 69742552 : s = zin(2, j, nin3)
896 69742552 : r3 = r*cr3 - s*ci3
897 69742552 : s3 = r*ci3 + s*cr3
898 69742552 : r = zin(1, j, nin4)
899 69742552 : s = zin(2, j, nin4)
900 69742552 : r4 = r*cr4 - s*ci4
901 69742552 : s4 = r*ci4 + s*cr4
902 69742552 : r = zin(1, j, nin5)
903 69742552 : s = zin(2, j, nin5)
904 69742552 : r5 = r*cr5 - s*ci5
905 69742552 : s5 = r*ci5 + s*cr5
906 69742552 : r = zin(1, j, nin6)
907 69742552 : s = zin(2, j, nin6)
908 69742552 : r6 = r*cr6 - s*ci6
909 69742552 : s6 = r*ci6 + s*cr6
910 69742552 : r = zin(1, j, nin7)
911 69742552 : s = zin(2, j, nin7)
912 69742552 : r7 = r*cr7 - s*ci7
913 69742552 : s7 = r*ci7 + s*cr7
914 69742552 : r = zin(1, j, nin8)
915 69742552 : s = zin(2, j, nin8)
916 69742552 : r8 = r*cr8 - s*ci8
917 69742552 : s8 = r*ci8 + s*cr8
918 69742552 : r = r1 + r5
919 69742552 : s = r3 + r7
920 69742552 : ap = r + s
921 69742552 : am = r - s
922 69742552 : r = r2 + r6
923 69742552 : s = r4 + r8
924 69742552 : bp = r + s
925 69742552 : bm = r - s
926 69742552 : r = s1 + s5
927 69742552 : s = s3 + s7
928 69742552 : cp = r + s
929 69742552 : cm = r - s
930 69742552 : r = s2 + s6
931 69742552 : s = s4 + s8
932 69742552 : dpp = r + s
933 69742552 : dm = r - s
934 69742552 : zout(1, j, nout1) = ap + bp
935 69742552 : zout(2, j, nout1) = cp + dpp
936 69742552 : zout(1, j, nout5) = ap - bp
937 69742552 : zout(2, j, nout5) = cp - dpp
938 69742552 : zout(1, j, nout3) = am + dm
939 69742552 : zout(2, j, nout3) = cm - bm
940 69742552 : zout(1, j, nout7) = am - dm
941 69742552 : zout(2, j, nout7) = cm + bm
942 69742552 : r = r1 - r5
943 69742552 : s = s3 - s7
944 69742552 : ap = r + s
945 69742552 : am = r - s
946 69742552 : r = s1 - s5
947 69742552 : s = r3 - r7
948 69742552 : bp = r + s
949 69742552 : bm = r - s
950 69742552 : r = s4 - s8
951 69742552 : s = r2 - r6
952 69742552 : cp = r + s
953 69742552 : cm = r - s
954 69742552 : r = s2 - s6
955 69742552 : s = r4 - r8
956 69742552 : dpp = r + s
957 69742552 : dm = r - s
958 69742552 : r = (cp + dm)*rt2i
959 69742552 : s = (dm - cp)*rt2i
960 69742552 : cp = (cm + dpp)*rt2i
961 69742552 : dpp = (cm - dpp)*rt2i
962 69742552 : zout(1, j, nout2) = ap + r
963 69742552 : zout(2, j, nout2) = bm + s
964 69742552 : zout(1, j, nout6) = ap - r
965 69742552 : zout(2, j, nout6) = bm - s
966 69742552 : zout(1, j, nout4) = am + cp
967 69742552 : zout(2, j, nout4) = bp + dpp
968 69742552 : zout(1, j, nout8) = am - cp
969 75025203 : zout(2, j, nout8) = bp - dpp
970 : END DO; END DO
971 1141536 : 8000 CONTINUE
972 :
973 : ELSE
974 1227165 : ia = 1
975 1227165 : nin1 = ia - after
976 1227165 : nout1 = ia - atn
977 10894236 : DO ib = 1, before
978 9667071 : nin1 = nin1 + after
979 9667071 : nin2 = nin1 + atb
980 9667071 : nin3 = nin2 + atb
981 9667071 : nin4 = nin3 + atb
982 9667071 : nin5 = nin4 + atb
983 9667071 : nin6 = nin5 + atb
984 9667071 : nin7 = nin6 + atb
985 9667071 : nin8 = nin7 + atb
986 9667071 : nout1 = nout1 + atn
987 9667071 : nout2 = nout1 + after
988 9667071 : nout3 = nout2 + after
989 9667071 : nout4 = nout3 + after
990 9667071 : nout5 = nout4 + after
991 9667071 : nout6 = nout5 + after
992 9667071 : nout7 = nout6 + after
993 9667071 : nout8 = nout7 + after
994 196736088 : DO j = 1, nfft
995 185841852 : r1 = zin(1, j, nin1)
996 185841852 : s1 = zin(2, j, nin1)
997 185841852 : r2 = zin(1, j, nin2)
998 185841852 : s2 = zin(2, j, nin2)
999 185841852 : r3 = zin(1, j, nin3)
1000 185841852 : s3 = zin(2, j, nin3)
1001 185841852 : r4 = zin(1, j, nin4)
1002 185841852 : s4 = zin(2, j, nin4)
1003 185841852 : r5 = zin(1, j, nin5)
1004 185841852 : s5 = zin(2, j, nin5)
1005 185841852 : r6 = zin(1, j, nin6)
1006 185841852 : s6 = zin(2, j, nin6)
1007 185841852 : r7 = zin(1, j, nin7)
1008 185841852 : s7 = zin(2, j, nin7)
1009 185841852 : r8 = zin(1, j, nin8)
1010 185841852 : s8 = zin(2, j, nin8)
1011 185841852 : r = r1 + r5
1012 185841852 : s = r3 + r7
1013 185841852 : ap = r + s
1014 185841852 : am = r - s
1015 185841852 : r = r2 + r6
1016 185841852 : s = r4 + r8
1017 185841852 : bp = r + s
1018 185841852 : bm = r - s
1019 185841852 : r = s1 + s5
1020 185841852 : s = s3 + s7
1021 185841852 : cp = r + s
1022 185841852 : cm = r - s
1023 185841852 : r = s2 + s6
1024 185841852 : s = s4 + s8
1025 185841852 : dpp = r + s
1026 185841852 : dm = r - s
1027 185841852 : zout(1, j, nout1) = ap + bp
1028 185841852 : zout(2, j, nout1) = cp + dpp
1029 185841852 : zout(1, j, nout5) = ap - bp
1030 185841852 : zout(2, j, nout5) = cp - dpp
1031 185841852 : zout(1, j, nout3) = am - dm
1032 185841852 : zout(2, j, nout3) = cm + bm
1033 185841852 : zout(1, j, nout7) = am + dm
1034 185841852 : zout(2, j, nout7) = cm - bm
1035 185841852 : r = r1 - r5
1036 185841852 : s = -s3 + s7
1037 185841852 : ap = r + s
1038 185841852 : am = r - s
1039 185841852 : r = s1 - s5
1040 185841852 : s = r7 - r3
1041 185841852 : bp = r + s
1042 185841852 : bm = r - s
1043 185841852 : r = -s4 + s8
1044 185841852 : s = r2 - r6
1045 185841852 : cp = r + s
1046 185841852 : cm = r - s
1047 185841852 : r = -s2 + s6
1048 185841852 : s = r4 - r8
1049 185841852 : dpp = r + s
1050 185841852 : dm = r - s
1051 185841852 : r = (cp + dm)*rt2i
1052 185841852 : s = (cp - dm)*rt2i
1053 185841852 : cp = (cm + dpp)*rt2i
1054 185841852 : dpp = (dpp - cm)*rt2i
1055 185841852 : zout(1, j, nout2) = ap + r
1056 185841852 : zout(2, j, nout2) = bm + s
1057 185841852 : zout(1, j, nout6) = ap - r
1058 185841852 : zout(2, j, nout6) = bm - s
1059 185841852 : zout(1, j, nout4) = am + cp
1060 185841852 : zout(2, j, nout4) = bp + dpp
1061 185841852 : zout(1, j, nout8) = am - cp
1062 195508923 : zout(2, j, nout8) = bp - dpp
1063 : END DO; END DO
1064 :
1065 3311340 : DO 8001, ia = 2, after
1066 2084175 : ias = ia - 1
1067 2084175 : itt = ias*before
1068 2084175 : itrig = itt + 1
1069 2084175 : cr2 = trig(1, itrig)
1070 2084175 : ci2 = trig(2, itrig)
1071 2084175 : itrig = itrig + itt
1072 2084175 : cr3 = trig(1, itrig)
1073 2084175 : ci3 = trig(2, itrig)
1074 2084175 : itrig = itrig + itt
1075 2084175 : cr4 = trig(1, itrig)
1076 2084175 : ci4 = trig(2, itrig)
1077 2084175 : itrig = itrig + itt
1078 2084175 : cr5 = trig(1, itrig)
1079 2084175 : ci5 = trig(2, itrig)
1080 2084175 : itrig = itrig + itt
1081 2084175 : cr6 = trig(1, itrig)
1082 2084175 : ci6 = trig(2, itrig)
1083 2084175 : itrig = itrig + itt
1084 2084175 : cr7 = trig(1, itrig)
1085 2084175 : ci7 = trig(2, itrig)
1086 2084175 : itrig = itrig + itt
1087 2084175 : cr8 = trig(1, itrig)
1088 2084175 : ci8 = trig(2, itrig)
1089 2084175 : nin1 = ia - after
1090 2084175 : nout1 = ia - atn
1091 7802141 : DO ib = 1, before
1092 5717966 : nin1 = nin1 + after
1093 5717966 : nin2 = nin1 + atb
1094 5717966 : nin3 = nin2 + atb
1095 5717966 : nin4 = nin3 + atb
1096 5717966 : nin5 = nin4 + atb
1097 5717966 : nin6 = nin5 + atb
1098 5717966 : nin7 = nin6 + atb
1099 5717966 : nin8 = nin7 + atb
1100 5717966 : nout1 = nout1 + atn
1101 5717966 : nout2 = nout1 + after
1102 5717966 : nout3 = nout2 + after
1103 5717966 : nout4 = nout3 + after
1104 5717966 : nout5 = nout4 + after
1105 5717966 : nout6 = nout5 + after
1106 5717966 : nout7 = nout6 + after
1107 5717966 : nout8 = nout7 + after
1108 82591520 : DO j = 1, nfft
1109 74789379 : r1 = zin(1, j, nin1)
1110 74789379 : s1 = zin(2, j, nin1)
1111 74789379 : r = zin(1, j, nin2)
1112 74789379 : s = zin(2, j, nin2)
1113 74789379 : r2 = r*cr2 - s*ci2
1114 74789379 : s2 = r*ci2 + s*cr2
1115 74789379 : r = zin(1, j, nin3)
1116 74789379 : s = zin(2, j, nin3)
1117 74789379 : r3 = r*cr3 - s*ci3
1118 74789379 : s3 = r*ci3 + s*cr3
1119 74789379 : r = zin(1, j, nin4)
1120 74789379 : s = zin(2, j, nin4)
1121 74789379 : r4 = r*cr4 - s*ci4
1122 74789379 : s4 = r*ci4 + s*cr4
1123 74789379 : r = zin(1, j, nin5)
1124 74789379 : s = zin(2, j, nin5)
1125 74789379 : r5 = r*cr5 - s*ci5
1126 74789379 : s5 = r*ci5 + s*cr5
1127 74789379 : r = zin(1, j, nin6)
1128 74789379 : s = zin(2, j, nin6)
1129 74789379 : r6 = r*cr6 - s*ci6
1130 74789379 : s6 = r*ci6 + s*cr6
1131 74789379 : r = zin(1, j, nin7)
1132 74789379 : s = zin(2, j, nin7)
1133 74789379 : r7 = r*cr7 - s*ci7
1134 74789379 : s7 = r*ci7 + s*cr7
1135 74789379 : r = zin(1, j, nin8)
1136 74789379 : s = zin(2, j, nin8)
1137 74789379 : r8 = r*cr8 - s*ci8
1138 74789379 : s8 = r*ci8 + s*cr8
1139 74789379 : r = r1 + r5
1140 74789379 : s = r3 + r7
1141 74789379 : ap = r + s
1142 74789379 : am = r - s
1143 74789379 : r = r2 + r6
1144 74789379 : s = r4 + r8
1145 74789379 : bp = r + s
1146 74789379 : bm = r - s
1147 74789379 : r = s1 + s5
1148 74789379 : s = s3 + s7
1149 74789379 : cp = r + s
1150 74789379 : cm = r - s
1151 74789379 : r = s2 + s6
1152 74789379 : s = s4 + s8
1153 74789379 : dpp = r + s
1154 74789379 : dm = r - s
1155 74789379 : zout(1, j, nout1) = ap + bp
1156 74789379 : zout(2, j, nout1) = cp + dpp
1157 74789379 : zout(1, j, nout5) = ap - bp
1158 74789379 : zout(2, j, nout5) = cp - dpp
1159 74789379 : zout(1, j, nout3) = am - dm
1160 74789379 : zout(2, j, nout3) = cm + bm
1161 74789379 : zout(1, j, nout7) = am + dm
1162 74789379 : zout(2, j, nout7) = cm - bm
1163 74789379 : r = r1 - r5
1164 74789379 : s = -s3 + s7
1165 74789379 : ap = r + s
1166 74789379 : am = r - s
1167 74789379 : r = s1 - s5
1168 74789379 : s = r7 - r3
1169 74789379 : bp = r + s
1170 74789379 : bm = r - s
1171 74789379 : r = -s4 + s8
1172 74789379 : s = r2 - r6
1173 74789379 : cp = r + s
1174 74789379 : cm = r - s
1175 74789379 : r = -s2 + s6
1176 74789379 : s = r4 - r8
1177 74789379 : dpp = r + s
1178 74789379 : dm = r - s
1179 74789379 : r = (cp + dm)*rt2i
1180 74789379 : s = (cp - dm)*rt2i
1181 74789379 : cp = (cm + dpp)*rt2i
1182 74789379 : dpp = (dpp - cm)*rt2i
1183 74789379 : zout(1, j, nout2) = ap + r
1184 74789379 : zout(2, j, nout2) = bm + s
1185 74789379 : zout(1, j, nout6) = ap - r
1186 74789379 : zout(2, j, nout6) = bm - s
1187 74789379 : zout(1, j, nout4) = am + cp
1188 74789379 : zout(2, j, nout4) = bp + dpp
1189 74789379 : zout(1, j, nout8) = am - cp
1190 80507345 : zout(2, j, nout8) = bp - dpp
1191 : END DO; END DO
1192 1227165 : 8001 CONTINUE
1193 :
1194 : END IF
1195 : ELSE IF (now == 3) THEN
1196 : ! .5_dp*sqrt(3._dp)
1197 9100558 : bb = isign*0.8660254037844387_dp
1198 9100558 : ia = 1
1199 9100558 : nin1 = ia - after
1200 9100558 : nout1 = ia - atn
1201 33495528 : DO ib = 1, before
1202 24394970 : nin1 = nin1 + after
1203 24394970 : nin2 = nin1 + atb
1204 24394970 : nin3 = nin2 + atb
1205 24394970 : nout1 = nout1 + atn
1206 24394970 : nout2 = nout1 + after
1207 24394970 : nout3 = nout2 + after
1208 504822755 : DO j = 1, nfft
1209 471327227 : r1 = zin(1, j, nin1)
1210 471327227 : s1 = zin(2, j, nin1)
1211 471327227 : r2 = zin(1, j, nin2)
1212 471327227 : s2 = zin(2, j, nin2)
1213 471327227 : r3 = zin(1, j, nin3)
1214 471327227 : s3 = zin(2, j, nin3)
1215 471327227 : r = r2 + r3
1216 471327227 : s = s2 + s3
1217 471327227 : zout(1, j, nout1) = r + r1
1218 471327227 : zout(2, j, nout1) = s + s1
1219 471327227 : r1 = r1 - .5_dp*r
1220 471327227 : s1 = s1 - .5_dp*s
1221 471327227 : r2 = bb*(r2 - r3)
1222 471327227 : s2 = bb*(s2 - s3)
1223 471327227 : zout(1, j, nout2) = r1 - s2
1224 471327227 : zout(2, j, nout2) = s1 + r2
1225 471327227 : zout(1, j, nout3) = r1 + s2
1226 495722197 : zout(2, j, nout3) = s1 - r2
1227 : END DO; END DO
1228 163880832 : DO 3000, ia = 2, after
1229 154780274 : ias = ia - 1
1230 154780274 : IF (4*ias == 3*after) THEN
1231 5774018 : IF (isign == 1) THEN
1232 2962765 : nin1 = ia - after
1233 2962765 : nout1 = ia - atn
1234 12274706 : DO ib = 1, before
1235 9311941 : nin1 = nin1 + after
1236 9311941 : nin2 = nin1 + atb
1237 9311941 : nin3 = nin2 + atb
1238 9311941 : nout1 = nout1 + atn
1239 9311941 : nout2 = nout1 + after
1240 9311941 : nout3 = nout2 + after
1241 190007510 : DO j = 1, nfft
1242 177732804 : r1 = zin(1, j, nin1)
1243 177732804 : s1 = zin(2, j, nin1)
1244 177732804 : r2 = zin(2, j, nin2)
1245 177732804 : s2 = zin(1, j, nin2)
1246 177732804 : r3 = zin(1, j, nin3)
1247 177732804 : s3 = zin(2, j, nin3)
1248 177732804 : r = r3 + r2
1249 177732804 : s = s2 - s3
1250 177732804 : zout(1, j, nout1) = r1 - r
1251 177732804 : zout(2, j, nout1) = s + s1
1252 177732804 : r1 = r1 + .5_dp*r
1253 177732804 : s1 = s1 - .5_dp*s
1254 177732804 : r2 = bb*(r2 - r3)
1255 177732804 : s2 = bb*(s2 + s3)
1256 177732804 : zout(1, j, nout2) = r1 - s2
1257 177732804 : zout(2, j, nout2) = s1 - r2
1258 177732804 : zout(1, j, nout3) = r1 + s2
1259 187044745 : zout(2, j, nout3) = s1 + r2
1260 : END DO; END DO
1261 : ELSE
1262 2811253 : nin1 = ia - after
1263 2811253 : nout1 = ia - atn
1264 11633550 : DO ib = 1, before
1265 8822297 : nin1 = nin1 + after
1266 8822297 : nin2 = nin1 + atb
1267 8822297 : nin3 = nin2 + atb
1268 8822297 : nout1 = nout1 + atn
1269 8822297 : nout2 = nout1 + after
1270 8822297 : nout3 = nout2 + after
1271 180720903 : DO j = 1, nfft
1272 169087353 : r1 = zin(1, j, nin1)
1273 169087353 : s1 = zin(2, j, nin1)
1274 169087353 : r2 = zin(2, j, nin2)
1275 169087353 : s2 = zin(1, j, nin2)
1276 169087353 : r3 = zin(1, j, nin3)
1277 169087353 : s3 = zin(2, j, nin3)
1278 169087353 : r = r2 - r3
1279 169087353 : s = s2 + s3
1280 169087353 : zout(1, j, nout1) = r + r1
1281 169087353 : zout(2, j, nout1) = s1 - s
1282 169087353 : r1 = r1 - .5_dp*r
1283 169087353 : s1 = s1 + .5_dp*s
1284 169087353 : r2 = bb*(r2 + r3)
1285 169087353 : s2 = bb*(s2 - s3)
1286 169087353 : zout(1, j, nout2) = r1 + s2
1287 169087353 : zout(2, j, nout2) = s1 + r2
1288 169087353 : zout(1, j, nout3) = r1 - s2
1289 177909650 : zout(2, j, nout3) = s1 - r2
1290 : END DO; END DO
1291 : END IF
1292 149006256 : ELSE IF (8*ias == 3*after) THEN
1293 1818700 : IF (isign == 1) THEN
1294 932786 : nin1 = ia - after
1295 932786 : nout1 = ia - atn
1296 2258274 : DO ib = 1, before
1297 1325488 : nin1 = nin1 + after
1298 1325488 : nin2 = nin1 + atb
1299 1325488 : nin3 = nin2 + atb
1300 1325488 : nout1 = nout1 + atn
1301 1325488 : nout2 = nout1 + after
1302 1325488 : nout3 = nout2 + after
1303 28592260 : DO j = 1, nfft
1304 26333986 : r1 = zin(1, j, nin1)
1305 26333986 : s1 = zin(2, j, nin1)
1306 26333986 : r = zin(1, j, nin2)
1307 26333986 : s = zin(2, j, nin2)
1308 26333986 : r2 = (r - s)*rt2i
1309 26333986 : s2 = (r + s)*rt2i
1310 26333986 : r3 = zin(2, j, nin3)
1311 26333986 : s3 = zin(1, j, nin3)
1312 26333986 : r = r2 - r3
1313 26333986 : s = s2 + s3
1314 26333986 : zout(1, j, nout1) = r + r1
1315 26333986 : zout(2, j, nout1) = s + s1
1316 26333986 : r1 = r1 - .5_dp*r
1317 26333986 : s1 = s1 - .5_dp*s
1318 26333986 : r2 = bb*(r2 + r3)
1319 26333986 : s2 = bb*(s2 - s3)
1320 26333986 : zout(1, j, nout2) = r1 - s2
1321 26333986 : zout(2, j, nout2) = s1 + r2
1322 26333986 : zout(1, j, nout3) = r1 + s2
1323 27659474 : zout(2, j, nout3) = s1 - r2
1324 : END DO; END DO
1325 : ELSE
1326 885914 : nin1 = ia - after
1327 885914 : nout1 = ia - atn
1328 2142318 : DO ib = 1, before
1329 1256404 : nin1 = nin1 + after
1330 1256404 : nin2 = nin1 + atb
1331 1256404 : nin3 = nin2 + atb
1332 1256404 : nout1 = nout1 + atn
1333 1256404 : nout2 = nout1 + after
1334 1256404 : nout3 = nout2 + after
1335 27010701 : DO j = 1, nfft
1336 24868383 : r1 = zin(1, j, nin1)
1337 24868383 : s1 = zin(2, j, nin1)
1338 24868383 : r = zin(1, j, nin2)
1339 24868383 : s = zin(2, j, nin2)
1340 24868383 : r2 = (r + s)*rt2i
1341 24868383 : s2 = (s - r)*rt2i
1342 24868383 : r3 = zin(2, j, nin3)
1343 24868383 : s3 = zin(1, j, nin3)
1344 24868383 : r = r2 + r3
1345 24868383 : s = s2 - s3
1346 24868383 : zout(1, j, nout1) = r + r1
1347 24868383 : zout(2, j, nout1) = s + s1
1348 24868383 : r1 = r1 - .5_dp*r
1349 24868383 : s1 = s1 - .5_dp*s
1350 24868383 : r2 = bb*(r2 - r3)
1351 24868383 : s2 = bb*(s2 + s3)
1352 24868383 : zout(1, j, nout2) = r1 - s2
1353 24868383 : zout(2, j, nout2) = s1 + r2
1354 24868383 : zout(1, j, nout3) = r1 + s2
1355 26124787 : zout(2, j, nout3) = s1 - r2
1356 : END DO; END DO
1357 : END IF
1358 : ELSE
1359 147187556 : itt = ias*before
1360 147187556 : itrig = itt + 1
1361 147187556 : cr2 = trig(1, itrig)
1362 147187556 : ci2 = trig(2, itrig)
1363 147187556 : itrig = itrig + itt
1364 147187556 : cr3 = trig(1, itrig)
1365 147187556 : ci3 = trig(2, itrig)
1366 147187556 : nin1 = ia - after
1367 147187556 : nout1 = ia - atn
1368 357041188 : DO ib = 1, before
1369 209853632 : nin1 = nin1 + after
1370 209853632 : nin2 = nin1 + atb
1371 209853632 : nin3 = nin2 + atb
1372 209853632 : nout1 = nout1 + atn
1373 209853632 : nout2 = nout1 + after
1374 209853632 : nout3 = nout2 + after
1375 4171143875 : DO j = 1, nfft
1376 3814102687 : r1 = zin(1, j, nin1)
1377 3814102687 : s1 = zin(2, j, nin1)
1378 3814102687 : r = zin(1, j, nin2)
1379 3814102687 : s = zin(2, j, nin2)
1380 3814102687 : r2 = r*cr2 - s*ci2
1381 3814102687 : s2 = r*ci2 + s*cr2
1382 3814102687 : r = zin(1, j, nin3)
1383 3814102687 : s = zin(2, j, nin3)
1384 3814102687 : r3 = r*cr3 - s*ci3
1385 3814102687 : s3 = r*ci3 + s*cr3
1386 3814102687 : r = r2 + r3
1387 3814102687 : s = s2 + s3
1388 3814102687 : zout(1, j, nout1) = r + r1
1389 3814102687 : zout(2, j, nout1) = s + s1
1390 3814102687 : r1 = r1 - .5_dp*r
1391 3814102687 : s1 = s1 - .5_dp*s
1392 3814102687 : r2 = bb*(r2 - r3)
1393 3814102687 : s2 = bb*(s2 - s3)
1394 3814102687 : zout(1, j, nout2) = r1 - s2
1395 3814102687 : zout(2, j, nout2) = s1 + r2
1396 3814102687 : zout(1, j, nout3) = r1 + s2
1397 4023956319 : zout(2, j, nout3) = s1 - r2
1398 : END DO; END DO
1399 : END IF
1400 9100558 : 3000 CONTINUE
1401 : ELSE IF (now == 5) THEN
1402 : ! cos(2._dp*pi/5._dp)
1403 3499552 : cos2 = 0.3090169943749474_dp
1404 : ! cos(4._dp*pi/5._dp)
1405 3499552 : cos4 = -0.8090169943749474_dp
1406 : ! sin(2._dp*pi/5._dp)
1407 3499552 : sin2 = isign*0.9510565162951536_dp
1408 : ! sin(4._dp*pi/5._dp)
1409 3499552 : sin4 = isign*0.5877852522924731_dp
1410 3499552 : ia = 1
1411 3499552 : nin1 = ia - after
1412 3499552 : nout1 = ia - atn
1413 36358458 : DO ib = 1, before
1414 32858906 : nin1 = nin1 + after
1415 32858906 : nin2 = nin1 + atb
1416 32858906 : nin3 = nin2 + atb
1417 32858906 : nin4 = nin3 + atb
1418 32858906 : nin5 = nin4 + atb
1419 32858906 : nout1 = nout1 + atn
1420 32858906 : nout2 = nout1 + after
1421 32858906 : nout3 = nout2 + after
1422 32858906 : nout4 = nout3 + after
1423 32858906 : nout5 = nout4 + after
1424 697995075 : DO j = 1, nfft
1425 661636617 : r1 = zin(1, j, nin1)
1426 661636617 : s1 = zin(2, j, nin1)
1427 661636617 : r2 = zin(1, j, nin2)
1428 661636617 : s2 = zin(2, j, nin2)
1429 661636617 : r3 = zin(1, j, nin3)
1430 661636617 : s3 = zin(2, j, nin3)
1431 661636617 : r4 = zin(1, j, nin4)
1432 661636617 : s4 = zin(2, j, nin4)
1433 661636617 : r5 = zin(1, j, nin5)
1434 661636617 : s5 = zin(2, j, nin5)
1435 661636617 : r25 = r2 + r5
1436 661636617 : r34 = r3 + r4
1437 661636617 : s25 = s2 - s5
1438 661636617 : s34 = s3 - s4
1439 661636617 : zout(1, j, nout1) = r1 + r25 + r34
1440 661636617 : r = r1 + cos2*r25 + cos4*r34
1441 661636617 : s = sin2*s25 + sin4*s34
1442 661636617 : zout(1, j, nout2) = r - s
1443 661636617 : zout(1, j, nout5) = r + s
1444 661636617 : r = r1 + cos4*r25 + cos2*r34
1445 661636617 : s = sin4*s25 - sin2*s34
1446 661636617 : zout(1, j, nout3) = r - s
1447 661636617 : zout(1, j, nout4) = r + s
1448 661636617 : r25 = r2 - r5
1449 661636617 : r34 = r3 - r4
1450 661636617 : s25 = s2 + s5
1451 661636617 : s34 = s3 + s4
1452 661636617 : zout(2, j, nout1) = s1 + s25 + s34
1453 661636617 : r = s1 + cos2*s25 + cos4*s34
1454 661636617 : s = sin2*r25 + sin4*r34
1455 661636617 : zout(2, j, nout2) = r + s
1456 661636617 : zout(2, j, nout5) = r - s
1457 661636617 : r = s1 + cos4*s25 + cos2*s34
1458 661636617 : s = sin4*r25 - sin2*r34
1459 661636617 : zout(2, j, nout3) = r + s
1460 694495523 : zout(2, j, nout4) = r - s
1461 : END DO; END DO
1462 11994092 : DO 5000, ia = 2, after
1463 8494540 : ias = ia - 1
1464 8494540 : IF (8*ias == 5*after) THEN
1465 637544 : IF (isign == 1) THEN
1466 332066 : nin1 = ia - after
1467 332066 : nout1 = ia - atn
1468 964252 : DO ib = 1, before
1469 632186 : nin1 = nin1 + after
1470 632186 : nin2 = nin1 + atb
1471 632186 : nin3 = nin2 + atb
1472 632186 : nin4 = nin3 + atb
1473 632186 : nin5 = nin4 + atb
1474 632186 : nout1 = nout1 + atn
1475 632186 : nout2 = nout1 + after
1476 632186 : nout3 = nout2 + after
1477 632186 : nout4 = nout3 + after
1478 632186 : nout5 = nout4 + after
1479 14998839 : DO j = 1, nfft
1480 14034587 : r1 = zin(1, j, nin1)
1481 14034587 : s1 = zin(2, j, nin1)
1482 14034587 : r = zin(1, j, nin2)
1483 14034587 : s = zin(2, j, nin2)
1484 14034587 : r2 = (r - s)*rt2i
1485 14034587 : s2 = (r + s)*rt2i
1486 14034587 : r3 = zin(2, j, nin3)
1487 14034587 : s3 = zin(1, j, nin3)
1488 14034587 : r = zin(1, j, nin4)
1489 14034587 : s = zin(2, j, nin4)
1490 14034587 : r4 = (r + s)*rt2i
1491 14034587 : s4 = (r - s)*rt2i
1492 14034587 : r5 = zin(1, j, nin5)
1493 14034587 : s5 = zin(2, j, nin5)
1494 14034587 : r25 = r2 - r5
1495 14034587 : r34 = r3 + r4
1496 14034587 : s25 = s2 + s5
1497 14034587 : s34 = s3 - s4
1498 14034587 : zout(1, j, nout1) = r1 + r25 - r34
1499 14034587 : r = r1 + cos2*r25 - cos4*r34
1500 14034587 : s = sin2*s25 + sin4*s34
1501 14034587 : zout(1, j, nout2) = r - s
1502 14034587 : zout(1, j, nout5) = r + s
1503 14034587 : r = r1 + cos4*r25 - cos2*r34
1504 14034587 : s = sin4*s25 - sin2*s34
1505 14034587 : zout(1, j, nout3) = r - s
1506 14034587 : zout(1, j, nout4) = r + s
1507 14034587 : r25 = r2 + r5
1508 14034587 : r34 = r4 - r3
1509 14034587 : s25 = s2 - s5
1510 14034587 : s34 = s3 + s4
1511 14034587 : zout(2, j, nout1) = s1 + s25 + s34
1512 14034587 : r = s1 + cos2*s25 + cos4*s34
1513 14034587 : s = sin2*r25 + sin4*r34
1514 14034587 : zout(2, j, nout2) = r + s
1515 14034587 : zout(2, j, nout5) = r - s
1516 14034587 : r = s1 + cos4*s25 + cos2*s34
1517 14034587 : s = sin4*r25 - sin2*r34
1518 14034587 : zout(2, j, nout3) = r + s
1519 14666773 : zout(2, j, nout4) = r - s
1520 : END DO; END DO
1521 : ELSE
1522 305478 : nin1 = ia - after
1523 305478 : nout1 = ia - atn
1524 897900 : DO ib = 1, before
1525 592422 : nin1 = nin1 + after
1526 592422 : nin2 = nin1 + atb
1527 592422 : nin3 = nin2 + atb
1528 592422 : nin4 = nin3 + atb
1529 592422 : nin5 = nin4 + atb
1530 592422 : nout1 = nout1 + atn
1531 592422 : nout2 = nout1 + after
1532 592422 : nout3 = nout2 + after
1533 592422 : nout4 = nout3 + after
1534 592422 : nout5 = nout4 + after
1535 13834380 : DO j = 1, nfft
1536 12936480 : r1 = zin(1, j, nin1)
1537 12936480 : s1 = zin(2, j, nin1)
1538 12936480 : r = zin(1, j, nin2)
1539 12936480 : s = zin(2, j, nin2)
1540 12936480 : r2 = (r + s)*rt2i
1541 12936480 : s2 = (s - r)*rt2i
1542 12936480 : r3 = zin(2, j, nin3)
1543 12936480 : s3 = zin(1, j, nin3)
1544 12936480 : r = zin(1, j, nin4)
1545 12936480 : s = zin(2, j, nin4)
1546 12936480 : r4 = (s - r)*rt2i
1547 12936480 : s4 = (r + s)*rt2i
1548 12936480 : r5 = zin(1, j, nin5)
1549 12936480 : s5 = zin(2, j, nin5)
1550 12936480 : r25 = r2 - r5
1551 12936480 : r34 = r3 + r4
1552 12936480 : s25 = s2 + s5
1553 12936480 : s34 = s4 - s3
1554 12936480 : zout(1, j, nout1) = r1 + r25 + r34
1555 12936480 : r = r1 + cos2*r25 + cos4*r34
1556 12936480 : s = sin2*s25 + sin4*s34
1557 12936480 : zout(1, j, nout2) = r - s
1558 12936480 : zout(1, j, nout5) = r + s
1559 12936480 : r = r1 + cos4*r25 + cos2*r34
1560 12936480 : s = sin4*s25 - sin2*s34
1561 12936480 : zout(1, j, nout3) = r - s
1562 12936480 : zout(1, j, nout4) = r + s
1563 12936480 : r25 = r2 + r5
1564 12936480 : r34 = r3 - r4
1565 12936480 : s25 = s2 - s5
1566 12936480 : s34 = s3 + s4
1567 12936480 : zout(2, j, nout1) = s1 + s25 - s34
1568 12936480 : r = s1 + cos2*s25 - cos4*s34
1569 12936480 : s = sin2*r25 + sin4*r34
1570 12936480 : zout(2, j, nout2) = r + s
1571 12936480 : zout(2, j, nout5) = r - s
1572 12936480 : r = s1 + cos4*s25 - cos2*s34
1573 12936480 : s = sin4*r25 - sin2*r34
1574 12936480 : zout(2, j, nout3) = r + s
1575 13528902 : zout(2, j, nout4) = r - s
1576 : END DO; END DO
1577 : END IF
1578 : ELSE
1579 7856996 : ias = ia - 1
1580 7856996 : itt = ias*before
1581 7856996 : itrig = itt + 1
1582 7856996 : cr2 = trig(1, itrig)
1583 7856996 : ci2 = trig(2, itrig)
1584 7856996 : itrig = itrig + itt
1585 7856996 : cr3 = trig(1, itrig)
1586 7856996 : ci3 = trig(2, itrig)
1587 7856996 : itrig = itrig + itt
1588 7856996 : cr4 = trig(1, itrig)
1589 7856996 : ci4 = trig(2, itrig)
1590 7856996 : itrig = itrig + itt
1591 7856996 : cr5 = trig(1, itrig)
1592 7856996 : ci5 = trig(2, itrig)
1593 7856996 : nin1 = ia - after
1594 7856996 : nout1 = ia - atn
1595 25285256 : DO ib = 1, before
1596 17428260 : nin1 = nin1 + after
1597 17428260 : nin2 = nin1 + atb
1598 17428260 : nin3 = nin2 + atb
1599 17428260 : nin4 = nin3 + atb
1600 17428260 : nin5 = nin4 + atb
1601 17428260 : nout1 = nout1 + atn
1602 17428260 : nout2 = nout1 + after
1603 17428260 : nout3 = nout2 + after
1604 17428260 : nout4 = nout3 + after
1605 17428260 : nout5 = nout4 + after
1606 367590158 : DO j = 1, nfft
1607 342304902 : r1 = zin(1, j, nin1)
1608 342304902 : s1 = zin(2, j, nin1)
1609 342304902 : r = zin(1, j, nin2)
1610 342304902 : s = zin(2, j, nin2)
1611 342304902 : r2 = r*cr2 - s*ci2
1612 342304902 : s2 = r*ci2 + s*cr2
1613 342304902 : r = zin(1, j, nin3)
1614 342304902 : s = zin(2, j, nin3)
1615 342304902 : r3 = r*cr3 - s*ci3
1616 342304902 : s3 = r*ci3 + s*cr3
1617 342304902 : r = zin(1, j, nin4)
1618 342304902 : s = zin(2, j, nin4)
1619 342304902 : r4 = r*cr4 - s*ci4
1620 342304902 : s4 = r*ci4 + s*cr4
1621 342304902 : r = zin(1, j, nin5)
1622 342304902 : s = zin(2, j, nin5)
1623 342304902 : r5 = r*cr5 - s*ci5
1624 342304902 : s5 = r*ci5 + s*cr5
1625 342304902 : r25 = r2 + r5
1626 342304902 : r34 = r3 + r4
1627 342304902 : s25 = s2 - s5
1628 342304902 : s34 = s3 - s4
1629 342304902 : zout(1, j, nout1) = r1 + r25 + r34
1630 342304902 : r = r1 + cos2*r25 + cos4*r34
1631 342304902 : s = sin2*s25 + sin4*s34
1632 342304902 : zout(1, j, nout2) = r - s
1633 342304902 : zout(1, j, nout5) = r + s
1634 342304902 : r = r1 + cos4*r25 + cos2*r34
1635 342304902 : s = sin4*s25 - sin2*s34
1636 342304902 : zout(1, j, nout3) = r - s
1637 342304902 : zout(1, j, nout4) = r + s
1638 342304902 : r25 = r2 - r5
1639 342304902 : r34 = r3 - r4
1640 342304902 : s25 = s2 + s5
1641 342304902 : s34 = s3 + s4
1642 342304902 : zout(2, j, nout1) = s1 + s25 + s34
1643 342304902 : r = s1 + cos2*s25 + cos4*s34
1644 342304902 : s = sin2*r25 + sin4*r34
1645 342304902 : zout(2, j, nout2) = r + s
1646 342304902 : zout(2, j, nout5) = r - s
1647 342304902 : r = s1 + cos4*s25 + cos2*s34
1648 342304902 : s = sin4*r25 - sin2*r34
1649 342304902 : zout(2, j, nout3) = r + s
1650 359733162 : zout(2, j, nout4) = r - s
1651 : END DO; END DO
1652 : END IF
1653 3499552 : 5000 CONTINUE
1654 : ELSE IF (now == 6) THEN
1655 : ! .5_dp*sqrt(3._dp)
1656 2836543 : bb = isign*0.8660254037844387_dp
1657 :
1658 2836543 : ia = 1
1659 2836543 : nin1 = ia - after
1660 2836543 : nout1 = ia - atn
1661 38050945 : DO ib = 1, before
1662 35214402 : nin1 = nin1 + after
1663 35214402 : nin2 = nin1 + atb
1664 35214402 : nin3 = nin2 + atb
1665 35214402 : nin4 = nin3 + atb
1666 35214402 : nin5 = nin4 + atb
1667 35214402 : nin6 = nin5 + atb
1668 35214402 : nout1 = nout1 + atn
1669 35214402 : nout2 = nout1 + after
1670 35214402 : nout3 = nout2 + after
1671 35214402 : nout4 = nout3 + after
1672 35214402 : nout5 = nout4 + after
1673 35214402 : nout6 = nout5 + after
1674 622050795 : DO j = 1, nfft
1675 583999850 : r2 = zin(1, j, nin3)
1676 583999850 : s2 = zin(2, j, nin3)
1677 583999850 : r3 = zin(1, j, nin5)
1678 583999850 : s3 = zin(2, j, nin5)
1679 583999850 : r = r2 + r3
1680 583999850 : s = s2 + s3
1681 583999850 : r1 = zin(1, j, nin1)
1682 583999850 : s1 = zin(2, j, nin1)
1683 583999850 : ur1 = r + r1
1684 583999850 : ui1 = s + s1
1685 583999850 : r1 = r1 - .5_dp*r
1686 583999850 : s1 = s1 - .5_dp*s
1687 583999850 : r = r2 - r3
1688 583999850 : s = s2 - s3
1689 583999850 : ur2 = r1 - s*bb
1690 583999850 : ui2 = s1 + r*bb
1691 583999850 : ur3 = r1 + s*bb
1692 583999850 : ui3 = s1 - r*bb
1693 :
1694 583999850 : r2 = zin(1, j, nin6)
1695 583999850 : s2 = zin(2, j, nin6)
1696 583999850 : r3 = zin(1, j, nin2)
1697 583999850 : s3 = zin(2, j, nin2)
1698 583999850 : r = r2 + r3
1699 583999850 : s = s2 + s3
1700 583999850 : r1 = zin(1, j, nin4)
1701 583999850 : s1 = zin(2, j, nin4)
1702 583999850 : vr1 = r + r1
1703 583999850 : vi1 = s + s1
1704 583999850 : r1 = r1 - .5_dp*r
1705 583999850 : s1 = s1 - .5_dp*s
1706 583999850 : r = r2 - r3
1707 583999850 : s = s2 - s3
1708 583999850 : vr2 = r1 - s*bb
1709 583999850 : vi2 = s1 + r*bb
1710 583999850 : vr3 = r1 + s*bb
1711 583999850 : vi3 = s1 - r*bb
1712 :
1713 583999850 : zout(1, j, nout1) = ur1 + vr1
1714 583999850 : zout(2, j, nout1) = ui1 + vi1
1715 583999850 : zout(1, j, nout5) = ur2 + vr2
1716 583999850 : zout(2, j, nout5) = ui2 + vi2
1717 583999850 : zout(1, j, nout3) = ur3 + vr3
1718 583999850 : zout(2, j, nout3) = ui3 + vi3
1719 583999850 : zout(1, j, nout4) = ur1 - vr1
1720 583999850 : zout(2, j, nout4) = ui1 - vi1
1721 583999850 : zout(1, j, nout2) = ur2 - vr2
1722 583999850 : zout(2, j, nout2) = ui2 - vi2
1723 583999850 : zout(1, j, nout6) = ur3 - vr3
1724 619214252 : zout(2, j, nout6) = ui3 - vi3
1725 : END DO; END DO
1726 : ELSE
1727 0 : CPABORT("error fftstp")
1728 : END IF
1729 :
1730 23654073 : END SUBROUTINE fftstp
1731 :
1732 : END MODULE ps_wavelet_fft3d
|