LCOV - code coverage report
Current view: top level - src/pw - ps_wavelet_fft3d.F (source / functions) Coverage Total Hit
Test: CP2K Regtests (git:936074a) Lines: 88.8 % 1408 1251
Test Date: 2025-12-04 06:27:48 Functions: 100.0 % 3 3

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

Generated by: LCOV version 2.0-1