LCOV - code coverage report
Current view: top level - src/pw - ps_wavelet_fft3d.F (source / functions) Coverage Total Hit
Test: CP2K Regtests (git:71c3ab0) Lines: 88.8 % 1408 1251
Test Date: 2026-07-25 06:35:44 Functions: 100.0 % 3 3

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

Generated by: LCOV version 2.0-1