LCOV - code coverage report
Current view: top level - src/pw - ps_wavelet_fft3d.F (source / functions) Coverage Total Hit
Test: CP2K Regtests (git:3db43b4) Lines: 88.8 % 1408 1251
Test Date: 2026-04-03 06:55:30 Functions: 100.0 % 3 3

            Line data    Source code
       1              : !--------------------------------------------------------------------------------------------------!
       2              : !   CP2K: A general program to perform molecular dynamics simulations                              !
       3              : !   Copyright 2000-2026 CP2K developers group <https://cp2k.org>                                   !
       4              : !                                                                                                  !
       5              : !   SPDX-License-Identifier: GPL-2.0-or-later                                                      !
       6              : !--------------------------------------------------------------------------------------------------!
       7              : 
       8              : ! **************************************************************************************************
       9              : MODULE ps_wavelet_fft3d
      10              : 
      11              :    USE kinds,                           ONLY: dp
      12              : #include "../base/base_uses.f90"
      13              : 
      14              :    IMPLICIT NONE
      15              :    PRIVATE
      16              : 
      17              :    CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'ps_wavelet_fft3d'
      18              : 
      19              :    ! longest fft supported, must be equal to the length of the ctrig array
      20              :    INTEGER, PARAMETER :: ctrig_length = 8192
      21              : 
      22              :    PUBLIC :: fourier_dim, &
      23              :              ctrig, &
      24              :              fftstp, ctrig_length
      25              : 
      26              : CONTAINS
      27              : 
      28              : ! **************************************************************************************************
      29              : !> \brief Give a number n_next > n compatible for the FFT
      30              : !> \param n ...
      31              : !> \param n_next ...
      32              : ! **************************************************************************************************
      33       113591 :    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      1833444 :       loop_data: DO i = 1, ndata1024
      54      1833444 :          IF (n <= idata(i)) THEN
      55       113591 :             n_next = idata(i)
      56       113591 :             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       100457 :    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      1634340 :       DO i = 1, 150
     202      1634340 :          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      1634340 :          IF (n == idata(1, i)) THEN
     209       100457 :             ic = 0
     210       342795 :             DO j = 1, 6
     211       342795 :                itt = idata(1 + j, i)
     212       342795 :                IF (itt > 1) THEN
     213       242338 :                   ic = ic + 1
     214       242338 :                   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       100457 :       after(1) = 1
     224       100457 :       before(ic) = 1
     225       242338 :       DO i = 2, ic
     226       141881 :          after(i) = after(i - 1)*now(i - 1)
     227       242338 :          before(ic - i + 1) = before(ic - i + 2)*now(ic - i + 2)
     228              :       END DO
     229              : 
     230       100457 :       twopi = 6.283185307179586_dp
     231       100457 :       angle = isign*twopi/n
     232       100457 :       IF (MOD(n, 2) == 0) THEN
     233        88748 :          nh = n/2
     234        88748 :          trig(1, 1) = 1._dp
     235        88748 :          trig(2, 1) = 0._dp
     236        88748 :          trig(1, nh + 1) = -1._dp
     237        88748 :          trig(2, nh + 1) = 0._dp
     238      1940966 :          DO 40, i = 1, nh - 1
     239      1852218 :             trigc = COS(i*angle)
     240      1852218 :             trigs = SIN(i*angle)
     241      1852218 :             trig(1, i + 1) = trigc
     242      1852218 :             trig(2, i + 1) = trigs
     243      1852218 :             trig(1, n - i + 1) = trigc
     244      1852218 :             trig(2, n - i + 1) = -trigs
     245        88748 : 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       100457 :                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     23770864 :                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     23770864 :                   atn = after*now
     300     23770864 :                   atb = after*before
     301              : 
     302              : !         sqrt(.5_dp)
     303     23770864 :                   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      5726717 :                         IF (isign == 1) THEN
     474      2932708 :                            ia = 1
     475      2932708 :                            nin1 = ia - after
     476      2932708 :                            nout1 = ia - atn
     477     25615997 :                            DO ib = 1, before
     478     22683289 :                               nin1 = nin1 + after
     479     22683289 :                               nin2 = nin1 + atb
     480     22683289 :                               nin3 = nin2 + atb
     481     22683289 :                               nin4 = nin3 + atb
     482     22683289 :                               nout1 = nout1 + atn
     483     22683289 :                               nout2 = nout1 + after
     484     22683289 :                               nout3 = nout2 + after
     485     22683289 :                               nout4 = nout3 + after
     486    464278399 :                               DO j = 1, nfft
     487    438662402 :                                  r1 = zin(1, j, nin1)
     488    438662402 :                                  s1 = zin(2, j, nin1)
     489    438662402 :                                  r2 = zin(1, j, nin2)
     490    438662402 :                                  s2 = zin(2, j, nin2)
     491    438662402 :                                  r3 = zin(1, j, nin3)
     492    438662402 :                                  s3 = zin(2, j, nin3)
     493    438662402 :                                  r4 = zin(1, j, nin4)
     494    438662402 :                                  s4 = zin(2, j, nin4)
     495    438662402 :                                  r = r1 + r3
     496    438662402 :                                  s = r2 + r4
     497    438662402 :                                  zout(1, j, nout1) = r + s
     498    438662402 :                                  zout(1, j, nout3) = r - s
     499    438662402 :                                  r = r1 - r3
     500    438662402 :                                  s = s2 - s4
     501    438662402 :                                  zout(1, j, nout2) = r - s
     502    438662402 :                                  zout(1, j, nout4) = r + s
     503    438662402 :                                  r = s1 + s3
     504    438662402 :                                  s = s2 + s4
     505    438662402 :                                  zout(2, j, nout1) = r + s
     506    438662402 :                                  zout(2, j, nout3) = r - s
     507    438662402 :                                  r = s1 - s3
     508    438662402 :                                  s = r2 - r4
     509    438662402 :                                  zout(2, j, nout2) = r + s
     510    461345691 :                                  zout(2, j, nout4) = r - s
     511              :                               END DO; END DO
     512     30932321 :                            DO 4000, ia = 2, after
     513     27999613 :                               ias = ia - 1
     514     27999613 :                               IF (2*ias == after) THEN
     515      1232107 :                                  nin1 = ia - after
     516      1232107 :                                  nout1 = ia - atn
     517      2849057 :                                  DO ib = 1, before
     518      1616950 :                                     nin1 = nin1 + after
     519      1616950 :                                     nin2 = nin1 + atb
     520      1616950 :                                     nin3 = nin2 + atb
     521      1616950 :                                     nin4 = nin3 + atb
     522      1616950 :                                     nout1 = nout1 + atn
     523      1616950 :                                     nout2 = nout1 + after
     524      1616950 :                                     nout3 = nout2 + after
     525      1616950 :                                     nout4 = nout3 + after
     526     33768605 :                                     DO j = 1, nfft
     527     30919548 :                                        r1 = zin(1, j, nin1)
     528     30919548 :                                        s1 = zin(2, j, nin1)
     529     30919548 :                                        r = zin(1, j, nin2)
     530     30919548 :                                        s = zin(2, j, nin2)
     531     30919548 :                                        r2 = (r - s)*rt2i
     532     30919548 :                                        s2 = (r + s)*rt2i
     533     30919548 :                                        r3 = zin(2, j, nin3)
     534     30919548 :                                        s3 = zin(1, j, nin3)
     535     30919548 :                                        r = zin(1, j, nin4)
     536     30919548 :                                        s = zin(2, j, nin4)
     537     30919548 :                                        r4 = (r + s)*rt2i
     538     30919548 :                                        s4 = (r - s)*rt2i
     539     30919548 :                                        r = r1 - r3
     540     30919548 :                                        s = r2 - r4
     541     30919548 :                                        zout(1, j, nout1) = r + s
     542     30919548 :                                        zout(1, j, nout3) = r - s
     543     30919548 :                                        r = r1 + r3
     544     30919548 :                                        s = s2 - s4
     545     30919548 :                                        zout(1, j, nout2) = r - s
     546     30919548 :                                        zout(1, j, nout4) = r + s
     547     30919548 :                                        r = s1 + s3
     548     30919548 :                                        s = s2 + s4
     549     30919548 :                                        zout(2, j, nout1) = r + s
     550     30919548 :                                        zout(2, j, nout3) = r - s
     551     30919548 :                                        r = s1 - s3
     552     30919548 :                                        s = r2 + r4
     553     30919548 :                                        zout(2, j, nout2) = r + s
     554     32536498 :                                        zout(2, j, nout4) = r - s
     555              :                                     END DO; END DO
     556              :                               ELSE
     557     26767506 :                                  itt = ias*before
     558     26767506 :                                  itrig = itt + 1
     559     26767506 :                                  cr2 = trig(1, itrig)
     560     26767506 :                                  ci2 = trig(2, itrig)
     561     26767506 :                                  itrig = itrig + itt
     562     26767506 :                                  cr3 = trig(1, itrig)
     563     26767506 :                                  ci3 = trig(2, itrig)
     564     26767506 :                                  itrig = itrig + itt
     565     26767506 :                                  cr4 = trig(1, itrig)
     566     26767506 :                                  ci4 = trig(2, itrig)
     567     26767506 :                                  nin1 = ia - after
     568     26767506 :                                  nout1 = ia - atn
     569     66086838 :                                  DO ib = 1, before
     570     39319332 :                                     nin1 = nin1 + after
     571     39319332 :                                     nin2 = nin1 + atb
     572     39319332 :                                     nin3 = nin2 + atb
     573     39319332 :                                     nin4 = nin3 + atb
     574     39319332 :                                     nout1 = nout1 + atn
     575     39319332 :                                     nout2 = nout1 + after
     576     39319332 :                                     nout3 = nout2 + after
     577     39319332 :                                     nout4 = nout3 + after
     578    796635762 :                                     DO j = 1, nfft
     579    730548924 :                                        r1 = zin(1, j, nin1)
     580    730548924 :                                        s1 = zin(2, j, nin1)
     581    730548924 :                                        r = zin(1, j, nin2)
     582    730548924 :                                        s = zin(2, j, nin2)
     583    730548924 :                                        r2 = r*cr2 - s*ci2
     584    730548924 :                                        s2 = r*ci2 + s*cr2
     585    730548924 :                                        r = zin(1, j, nin3)
     586    730548924 :                                        s = zin(2, j, nin3)
     587    730548924 :                                        r3 = r*cr3 - s*ci3
     588    730548924 :                                        s3 = r*ci3 + s*cr3
     589    730548924 :                                        r = zin(1, j, nin4)
     590    730548924 :                                        s = zin(2, j, nin4)
     591    730548924 :                                        r4 = r*cr4 - s*ci4
     592    730548924 :                                        s4 = r*ci4 + s*cr4
     593    730548924 :                                        r = r1 + r3
     594    730548924 :                                        s = r2 + r4
     595    730548924 :                                        zout(1, j, nout1) = r + s
     596    730548924 :                                        zout(1, j, nout3) = r - s
     597    730548924 :                                        r = r1 - r3
     598    730548924 :                                        s = s2 - s4
     599    730548924 :                                        zout(1, j, nout2) = r - s
     600    730548924 :                                        zout(1, j, nout4) = r + s
     601    730548924 :                                        r = s1 + s3
     602    730548924 :                                        s = s2 + s4
     603    730548924 :                                        zout(2, j, nout1) = r + s
     604    730548924 :                                        zout(2, j, nout3) = r - s
     605    730548924 :                                        r = s1 - s3
     606    730548924 :                                        s = r2 - r4
     607    730548924 :                                        zout(2, j, nout2) = r + s
     608    769868256 :                                        zout(2, j, nout4) = r - s
     609              :                                     END DO; END DO
     610              :                               END IF
     611      2932708 : 4000                          CONTINUE
     612              :                               ELSE
     613      2794009 :                               ia = 1
     614      2794009 :                               nin1 = ia - after
     615      2794009 :                               nout1 = ia - atn
     616     24315439 :                               DO ib = 1, before
     617     21521430 :                                  nin1 = nin1 + after
     618     21521430 :                                  nin2 = nin1 + atb
     619     21521430 :                                  nin3 = nin2 + atb
     620     21521430 :                                  nin4 = nin3 + atb
     621     21521430 :                                  nout1 = nout1 + atn
     622     21521430 :                                  nout2 = nout1 + after
     623     21521430 :                                  nout3 = nout2 + after
     624     21521430 :                                  nout4 = nout3 + after
     625    441754131 :                                  DO j = 1, nfft
     626    417438692 :                                     r1 = zin(1, j, nin1)
     627    417438692 :                                     s1 = zin(2, j, nin1)
     628    417438692 :                                     r2 = zin(1, j, nin2)
     629    417438692 :                                     s2 = zin(2, j, nin2)
     630    417438692 :                                     r3 = zin(1, j, nin3)
     631    417438692 :                                     s3 = zin(2, j, nin3)
     632    417438692 :                                     r4 = zin(1, j, nin4)
     633    417438692 :                                     s4 = zin(2, j, nin4)
     634    417438692 :                                     r = r1 + r3
     635    417438692 :                                     s = r2 + r4
     636    417438692 :                                     zout(1, j, nout1) = r + s
     637    417438692 :                                     zout(1, j, nout3) = r - s
     638    417438692 :                                     r = r1 - r3
     639    417438692 :                                     s = s2 - s4
     640    417438692 :                                     zout(1, j, nout2) = r + s
     641    417438692 :                                     zout(1, j, nout4) = r - s
     642    417438692 :                                     r = s1 + s3
     643    417438692 :                                     s = s2 + s4
     644    417438692 :                                     zout(2, j, nout1) = r + s
     645    417438692 :                                     zout(2, j, nout3) = r - s
     646    417438692 :                                     r = s1 - s3
     647    417438692 :                                     s = r2 - r4
     648    417438692 :                                     zout(2, j, nout2) = r - s
     649    438960122 :                                     zout(2, j, nout4) = r + s
     650              :                                  END DO; END DO
     651     29189668 :                               DO 4100, ia = 2, after
     652     26395659 :                                  ias = ia - 1
     653     26395659 :                                  IF (2*ias == after) THEN
     654      1168017 :                                     nin1 = ia - after
     655      1168017 :                                     nout1 = ia - atn
     656      2682744 :                                     DO ib = 1, before
     657      1514727 :                                        nin1 = nin1 + after
     658      1514727 :                                        nin2 = nin1 + atb
     659      1514727 :                                        nin3 = nin2 + atb
     660      1514727 :                                        nin4 = nin3 + atb
     661      1514727 :                                        nout1 = nout1 + atn
     662      1514727 :                                        nout2 = nout1 + after
     663      1514727 :                                        nout3 = nout2 + after
     664      1514727 :                                        nout4 = nout3 + after
     665     31679006 :                                        DO j = 1, nfft
     666     28996262 :                                           r1 = zin(1, j, nin1)
     667     28996262 :                                           s1 = zin(2, j, nin1)
     668     28996262 :                                           r = zin(1, j, nin2)
     669     28996262 :                                           s = zin(2, j, nin2)
     670     28996262 :                                           r2 = (r + s)*rt2i
     671     28996262 :                                           s2 = (s - r)*rt2i
     672     28996262 :                                           r3 = zin(2, j, nin3)
     673     28996262 :                                           s3 = zin(1, j, nin3)
     674     28996262 :                                           r = zin(1, j, nin4)
     675     28996262 :                                           s = zin(2, j, nin4)
     676     28996262 :                                           r4 = (s - r)*rt2i
     677     28996262 :                                           s4 = (r + s)*rt2i
     678     28996262 :                                           r = r1 + r3
     679     28996262 :                                           s = r2 + r4
     680     28996262 :                                           zout(1, j, nout1) = r + s
     681     28996262 :                                           zout(1, j, nout3) = r - s
     682     28996262 :                                           r = r1 - r3
     683     28996262 :                                           s = s2 + s4
     684     28996262 :                                           zout(1, j, nout2) = r + s
     685     28996262 :                                           zout(1, j, nout4) = r - s
     686     28996262 :                                           r = s1 - s3
     687     28996262 :                                           s = s2 - s4
     688     28996262 :                                           zout(2, j, nout1) = r + s
     689     28996262 :                                           zout(2, j, nout3) = r - s
     690     28996262 :                                           r = s1 + s3
     691     28996262 :                                           s = r2 - r4
     692     28996262 :                                           zout(2, j, nout2) = r - s
     693     30510989 :                                           zout(2, j, nout4) = r + s
     694              :                                        END DO; END DO
     695              :                                  ELSE
     696     25227642 :                                     itt = ias*before
     697     25227642 :                                     itrig = itt + 1
     698     25227642 :                                     cr2 = trig(1, itrig)
     699     25227642 :                                     ci2 = trig(2, itrig)
     700     25227642 :                                     itrig = itrig + itt
     701     25227642 :                                     cr3 = trig(1, itrig)
     702     25227642 :                                     ci3 = trig(2, itrig)
     703     25227642 :                                     itrig = itrig + itt
     704     25227642 :                                     cr4 = trig(1, itrig)
     705     25227642 :                                     ci4 = trig(2, itrig)
     706     25227642 :                                     nin1 = ia - after
     707     25227642 :                                     nout1 = ia - atn
     708     62415024 :                                     DO ib = 1, before
     709     37187382 :                                        nin1 = nin1 + after
     710     37187382 :                                        nin2 = nin1 + atb
     711     37187382 :                                        nin3 = nin2 + atb
     712     37187382 :                                        nin4 = nin3 + atb
     713     37187382 :                                        nout1 = nout1 + atn
     714     37187382 :                                        nout2 = nout1 + after
     715     37187382 :                                        nout3 = nout2 + after
     716     37187382 :                                        nout4 = nout3 + after
     717    757381116 :                                        DO j = 1, nfft
     718    694966092 :                                           r1 = zin(1, j, nin1)
     719    694966092 :                                           s1 = zin(2, j, nin1)
     720    694966092 :                                           r = zin(1, j, nin2)
     721    694966092 :                                           s = zin(2, j, nin2)
     722    694966092 :                                           r2 = r*cr2 - s*ci2
     723    694966092 :                                           s2 = r*ci2 + s*cr2
     724    694966092 :                                           r = zin(1, j, nin3)
     725    694966092 :                                           s = zin(2, j, nin3)
     726    694966092 :                                           r3 = r*cr3 - s*ci3
     727    694966092 :                                           s3 = r*ci3 + s*cr3
     728    694966092 :                                           r = zin(1, j, nin4)
     729    694966092 :                                           s = zin(2, j, nin4)
     730    694966092 :                                           r4 = r*cr4 - s*ci4
     731    694966092 :                                           s4 = r*ci4 + s*cr4
     732    694966092 :                                           r = r1 + r3
     733    694966092 :                                           s = r2 + r4
     734    694966092 :                                           zout(1, j, nout1) = r + s
     735    694966092 :                                           zout(1, j, nout3) = r - s
     736    694966092 :                                           r = r1 - r3
     737    694966092 :                                           s = s2 - s4
     738    694966092 :                                           zout(1, j, nout2) = r + s
     739    694966092 :                                           zout(1, j, nout4) = r - s
     740    694966092 :                                           r = s1 + s3
     741    694966092 :                                           s = s2 + s4
     742    694966092 :                                           zout(2, j, nout1) = r + s
     743    694966092 :                                           zout(2, j, nout3) = r - s
     744    694966092 :                                           r = s1 - s3
     745    694966092 :                                           s = r2 - r4
     746    694966092 :                                           zout(2, j, nout2) = r - s
     747    732153474 :                                           zout(2, j, nout4) = r + s
     748              :                                        END DO; END DO
     749              :                                  END IF
     750      2794009 : 4100                             CONTINUE
     751              :                                  END IF
     752              :                                  ELSE IF (now == 8) THEN
     753      2337616 :                                  IF (isign == -1) THEN
     754      1127008 :                                     ia = 1
     755      1127008 :                                     nin1 = ia - after
     756      1127008 :                                     nout1 = ia - atn
     757      9824484 :                                     DO ib = 1, before
     758      8697476 :                                        nin1 = nin1 + after
     759      8697476 :                                        nin2 = nin1 + atb
     760      8697476 :                                        nin3 = nin2 + atb
     761      8697476 :                                        nin4 = nin3 + atb
     762      8697476 :                                        nin5 = nin4 + atb
     763      8697476 :                                        nin6 = nin5 + atb
     764      8697476 :                                        nin7 = nin6 + atb
     765      8697476 :                                        nin8 = nin7 + atb
     766      8697476 :                                        nout1 = nout1 + atn
     767      8697476 :                                        nout2 = nout1 + after
     768      8697476 :                                        nout3 = nout2 + after
     769      8697476 :                                        nout4 = nout3 + after
     770      8697476 :                                        nout5 = nout4 + after
     771      8697476 :                                        nout6 = nout5 + after
     772      8697476 :                                        nout7 = nout6 + after
     773      8697476 :                                        nout8 = nout7 + after
     774    178018408 :                                        DO j = 1, nfft
     775    168193924 :                                           r1 = zin(1, j, nin1)
     776    168193924 :                                           s1 = zin(2, j, nin1)
     777    168193924 :                                           r2 = zin(1, j, nin2)
     778    168193924 :                                           s2 = zin(2, j, nin2)
     779    168193924 :                                           r3 = zin(1, j, nin3)
     780    168193924 :                                           s3 = zin(2, j, nin3)
     781    168193924 :                                           r4 = zin(1, j, nin4)
     782    168193924 :                                           s4 = zin(2, j, nin4)
     783    168193924 :                                           r5 = zin(1, j, nin5)
     784    168193924 :                                           s5 = zin(2, j, nin5)
     785    168193924 :                                           r6 = zin(1, j, nin6)
     786    168193924 :                                           s6 = zin(2, j, nin6)
     787    168193924 :                                           r7 = zin(1, j, nin7)
     788    168193924 :                                           s7 = zin(2, j, nin7)
     789    168193924 :                                           r8 = zin(1, j, nin8)
     790    168193924 :                                           s8 = zin(2, j, nin8)
     791    168193924 :                                           r = r1 + r5
     792    168193924 :                                           s = r3 + r7
     793    168193924 :                                           ap = r + s
     794    168193924 :                                           am = r - s
     795    168193924 :                                           r = r2 + r6
     796    168193924 :                                           s = r4 + r8
     797    168193924 :                                           bp = r + s
     798    168193924 :                                           bm = r - s
     799    168193924 :                                           r = s1 + s5
     800    168193924 :                                           s = s3 + s7
     801    168193924 :                                           cp = r + s
     802    168193924 :                                           cm = r - s
     803    168193924 :                                           r = s2 + s6
     804    168193924 :                                           s = s4 + s8
     805    168193924 :                                           dpp = r + s
     806    168193924 :                                           dm = r - s
     807    168193924 :                                           zout(1, j, nout1) = ap + bp
     808    168193924 :                                           zout(2, j, nout1) = cp + dpp
     809    168193924 :                                           zout(1, j, nout5) = ap - bp
     810    168193924 :                                           zout(2, j, nout5) = cp - dpp
     811    168193924 :                                           zout(1, j, nout3) = am + dm
     812    168193924 :                                           zout(2, j, nout3) = cm - bm
     813    168193924 :                                           zout(1, j, nout7) = am - dm
     814    168193924 :                                           zout(2, j, nout7) = cm + bm
     815    168193924 :                                           r = r1 - r5
     816    168193924 :                                           s = s3 - s7
     817    168193924 :                                           ap = r + s
     818    168193924 :                                           am = r - s
     819    168193924 :                                           r = s1 - s5
     820    168193924 :                                           s = r3 - r7
     821    168193924 :                                           bp = r + s
     822    168193924 :                                           bm = r - s
     823    168193924 :                                           r = s4 - s8
     824    168193924 :                                           s = r2 - r6
     825    168193924 :                                           cp = r + s
     826    168193924 :                                           cm = r - s
     827    168193924 :                                           r = s2 - s6
     828    168193924 :                                           s = r4 - r8
     829    168193924 :                                           dpp = r + s
     830    168193924 :                                           dm = r - s
     831    168193924 :                                           r = (cp + dm)*rt2i
     832    168193924 :                                           s = (dm - cp)*rt2i
     833    168193924 :                                           cp = (cm + dpp)*rt2i
     834    168193924 :                                           dpp = (cm - dpp)*rt2i
     835    168193924 :                                           zout(1, j, nout2) = ap + r
     836    168193924 :                                           zout(2, j, nout2) = bm + s
     837    168193924 :                                           zout(1, j, nout6) = ap - r
     838    168193924 :                                           zout(2, j, nout6) = bm - s
     839    168193924 :                                           zout(1, j, nout4) = am + cp
     840    168193924 :                                           zout(2, j, nout4) = bp + dpp
     841    168193924 :                                           zout(1, j, nout8) = am - cp
     842    176891400 :                                           zout(2, j, nout8) = bp - dpp
     843              :                                        END DO; END DO
     844      3056459 :                                     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      1127008 : 8000                                   CONTINUE
     972              : 
     973              :                                        ELSE
     974      1210608 :                                        ia = 1
     975      1210608 :                                        nin1 = ia - after
     976      1210608 :                                        nout1 = ia - atn
     977     10675449 :                                        DO ib = 1, before
     978      9464841 :                                           nin1 = nin1 + after
     979      9464841 :                                           nin2 = nin1 + atb
     980      9464841 :                                           nin3 = nin2 + atb
     981      9464841 :                                           nin4 = nin3 + atb
     982      9464841 :                                           nin5 = nin4 + atb
     983      9464841 :                                           nin6 = nin5 + atb
     984      9464841 :                                           nin7 = nin6 + atb
     985      9464841 :                                           nin8 = nin7 + atb
     986      9464841 :                                           nout1 = nout1 + atn
     987      9464841 :                                           nout2 = nout1 + after
     988      9464841 :                                           nout3 = nout2 + after
     989      9464841 :                                           nout4 = nout3 + after
     990      9464841 :                                           nout5 = nout4 + after
     991      9464841 :                                           nout6 = nout5 + after
     992      9464841 :                                           nout7 = nout6 + after
     993      9464841 :                                           nout8 = nout7 + after
     994    192769701 :                                           DO j = 1, nfft
     995    182094252 :                                              r1 = zin(1, j, nin1)
     996    182094252 :                                              s1 = zin(2, j, nin1)
     997    182094252 :                                              r2 = zin(1, j, nin2)
     998    182094252 :                                              s2 = zin(2, j, nin2)
     999    182094252 :                                              r3 = zin(1, j, nin3)
    1000    182094252 :                                              s3 = zin(2, j, nin3)
    1001    182094252 :                                              r4 = zin(1, j, nin4)
    1002    182094252 :                                              s4 = zin(2, j, nin4)
    1003    182094252 :                                              r5 = zin(1, j, nin5)
    1004    182094252 :                                              s5 = zin(2, j, nin5)
    1005    182094252 :                                              r6 = zin(1, j, nin6)
    1006    182094252 :                                              s6 = zin(2, j, nin6)
    1007    182094252 :                                              r7 = zin(1, j, nin7)
    1008    182094252 :                                              s7 = zin(2, j, nin7)
    1009    182094252 :                                              r8 = zin(1, j, nin8)
    1010    182094252 :                                              s8 = zin(2, j, nin8)
    1011    182094252 :                                              r = r1 + r5
    1012    182094252 :                                              s = r3 + r7
    1013    182094252 :                                              ap = r + s
    1014    182094252 :                                              am = r - s
    1015    182094252 :                                              r = r2 + r6
    1016    182094252 :                                              s = r4 + r8
    1017    182094252 :                                              bp = r + s
    1018    182094252 :                                              bm = r - s
    1019    182094252 :                                              r = s1 + s5
    1020    182094252 :                                              s = s3 + s7
    1021    182094252 :                                              cp = r + s
    1022    182094252 :                                              cm = r - s
    1023    182094252 :                                              r = s2 + s6
    1024    182094252 :                                              s = s4 + s8
    1025    182094252 :                                              dpp = r + s
    1026    182094252 :                                              dm = r - s
    1027    182094252 :                                              zout(1, j, nout1) = ap + bp
    1028    182094252 :                                              zout(2, j, nout1) = cp + dpp
    1029    182094252 :                                              zout(1, j, nout5) = ap - bp
    1030    182094252 :                                              zout(2, j, nout5) = cp - dpp
    1031    182094252 :                                              zout(1, j, nout3) = am - dm
    1032    182094252 :                                              zout(2, j, nout3) = cm + bm
    1033    182094252 :                                              zout(1, j, nout7) = am + dm
    1034    182094252 :                                              zout(2, j, nout7) = cm - bm
    1035    182094252 :                                              r = r1 - r5
    1036    182094252 :                                              s = -s3 + s7
    1037    182094252 :                                              ap = r + s
    1038    182094252 :                                              am = r - s
    1039    182094252 :                                              r = s1 - s5
    1040    182094252 :                                              s = r7 - r3
    1041    182094252 :                                              bp = r + s
    1042    182094252 :                                              bm = r - s
    1043    182094252 :                                              r = -s4 + s8
    1044    182094252 :                                              s = r2 - r6
    1045    182094252 :                                              cp = r + s
    1046    182094252 :                                              cm = r - s
    1047    182094252 :                                              r = -s2 + s6
    1048    182094252 :                                              s = r4 - r8
    1049    182094252 :                                              dpp = r + s
    1050    182094252 :                                              dm = r - s
    1051    182094252 :                                              r = (cp + dm)*rt2i
    1052    182094252 :                                              s = (cp - dm)*rt2i
    1053    182094252 :                                              cp = (cm + dpp)*rt2i
    1054    182094252 :                                              dpp = (dpp - cm)*rt2i
    1055    182094252 :                                              zout(1, j, nout2) = ap + r
    1056    182094252 :                                              zout(2, j, nout2) = bm + s
    1057    182094252 :                                              zout(1, j, nout6) = ap - r
    1058    182094252 :                                              zout(2, j, nout6) = bm - s
    1059    182094252 :                                              zout(1, j, nout4) = am + cp
    1060    182094252 :                                              zout(2, j, nout4) = bp + dpp
    1061    182094252 :                                              zout(1, j, nout8) = am - cp
    1062    191559093 :                                              zout(2, j, nout8) = bp - dpp
    1063              :                                           END DO; END DO
    1064              : 
    1065      3283709 :                                        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      1210608 : 8001                                      CONTINUE
    1193              : 
    1194              :                                           END IF
    1195              :                                           ELSE IF (now == 3) THEN
    1196              : !         .5_dp*sqrt(3._dp)
    1197      9383862 :                                           bb = isign*0.8660254037844387_dp
    1198      9383862 :                                           ia = 1
    1199      9383862 :                                           nin1 = ia - after
    1200      9383862 :                                           nout1 = ia - atn
    1201     35261960 :                                           DO ib = 1, before
    1202     25878098 :                                              nin1 = nin1 + after
    1203     25878098 :                                              nin2 = nin1 + atb
    1204     25878098 :                                              nin3 = nin2 + atb
    1205     25878098 :                                              nout1 = nout1 + atn
    1206     25878098 :                                              nout2 = nout1 + after
    1207     25878098 :                                              nout3 = nout2 + after
    1208    522322795 :                                              DO j = 1, nfft
    1209    487060835 :                                                 r1 = zin(1, j, nin1)
    1210    487060835 :                                                 s1 = zin(2, j, nin1)
    1211    487060835 :                                                 r2 = zin(1, j, nin2)
    1212    487060835 :                                                 s2 = zin(2, j, nin2)
    1213    487060835 :                                                 r3 = zin(1, j, nin3)
    1214    487060835 :                                                 s3 = zin(2, j, nin3)
    1215    487060835 :                                                 r = r2 + r3
    1216    487060835 :                                                 s = s2 + s3
    1217    487060835 :                                                 zout(1, j, nout1) = r + r1
    1218    487060835 :                                                 zout(2, j, nout1) = s + s1
    1219    487060835 :                                                 r1 = r1 - .5_dp*r
    1220    487060835 :                                                 s1 = s1 - .5_dp*s
    1221    487060835 :                                                 r2 = bb*(r2 - r3)
    1222    487060835 :                                                 s2 = bb*(s2 - s3)
    1223    487060835 :                                                 zout(1, j, nout2) = r1 - s2
    1224    487060835 :                                                 zout(2, j, nout2) = s1 + r2
    1225    487060835 :                                                 zout(1, j, nout3) = r1 + s2
    1226    512938933 :                                                 zout(2, j, nout3) = s1 - r2
    1227              :                                              END DO; END DO
    1228    171674844 :                                           DO 3000, ia = 2, after
    1229    162290982 :                                              ias = ia - 1
    1230    162290982 :                                              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    156526774 :                                              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    154717884 :                                              itt = ias*before
    1360    154717884 :                                              itrig = itt + 1
    1361    154717884 :                                              cr2 = trig(1, itrig)
    1362    154717884 :                                              ci2 = trig(2, itrig)
    1363    154717884 :                                              itrig = itrig + itt
    1364    154717884 :                                              cr3 = trig(1, itrig)
    1365    154717884 :                                              ci3 = trig(2, itrig)
    1366    154717884 :                                              nin1 = ia - after
    1367    154717884 :                                              nout1 = ia - atn
    1368    381065876 :                                              DO ib = 1, before
    1369    226347992 :                                                 nin1 = nin1 + after
    1370    226347992 :                                                 nin2 = nin1 + atb
    1371    226347992 :                                                 nin3 = nin2 + atb
    1372    226347992 :                                                 nout1 = nout1 + atn
    1373    226347992 :                                                 nout2 = nout1 + after
    1374    226347992 :                                                 nout3 = nout2 + after
    1375   4369396683 :                                                 DO j = 1, nfft
    1376   3988330807 :                                                    r1 = zin(1, j, nin1)
    1377   3988330807 :                                                    s1 = zin(2, j, nin1)
    1378   3988330807 :                                                    r = zin(1, j, nin2)
    1379   3988330807 :                                                    s = zin(2, j, nin2)
    1380   3988330807 :                                                    r2 = r*cr2 - s*ci2
    1381   3988330807 :                                                    s2 = r*ci2 + s*cr2
    1382   3988330807 :                                                    r = zin(1, j, nin3)
    1383   3988330807 :                                                    s = zin(2, j, nin3)
    1384   3988330807 :                                                    r3 = r*cr3 - s*ci3
    1385   3988330807 :                                                    s3 = r*ci3 + s*cr3
    1386   3988330807 :                                                    r = r2 + r3
    1387   3988330807 :                                                    s = s2 + s3
    1388   3988330807 :                                                    zout(1, j, nout1) = r + r1
    1389   3988330807 :                                                    zout(2, j, nout1) = s + s1
    1390   3988330807 :                                                    r1 = r1 - .5_dp*r
    1391   3988330807 :                                                    s1 = s1 - .5_dp*s
    1392   3988330807 :                                                    r2 = bb*(r2 - r3)
    1393   3988330807 :                                                    s2 = bb*(s2 - s3)
    1394   3988330807 :                                                    zout(1, j, nout2) = r1 - s2
    1395   3988330807 :                                                    zout(2, j, nout2) = s1 + r2
    1396   3988330807 :                                                    zout(1, j, nout3) = r1 + s2
    1397   4214678799 :                                                    zout(2, j, nout3) = s1 - r2
    1398              :                                                 END DO; END DO
    1399              :                                              END IF
    1400      9383862 : 3000                                         CONTINUE
    1401              :                                              ELSE IF (now == 5) THEN
    1402              : !         cos(2._dp*pi/5._dp)
    1403      3422310 :                                              cos2 = 0.3090169943749474_dp
    1404              : !         cos(4._dp*pi/5._dp)
    1405      3422310 :                                              cos4 = -0.8090169943749474_dp
    1406              : !        sin(2._dp*pi/5._dp)
    1407      3422310 :                                              sin2 = isign*0.9510565162951536_dp
    1408              : !         sin(4._dp*pi/5._dp)
    1409      3422310 :                                              sin4 = isign*0.5877852522924731_dp
    1410      3422310 :                                              ia = 1
    1411      3422310 :                                              nin1 = ia - after
    1412      3422310 :                                              nout1 = ia - atn
    1413     35666216 :                                              DO ib = 1, before
    1414     32243906 :                                                 nin1 = nin1 + after
    1415     32243906 :                                                 nin2 = nin1 + atb
    1416     32243906 :                                                 nin3 = nin2 + atb
    1417     32243906 :                                                 nin4 = nin3 + atb
    1418     32243906 :                                                 nin5 = nin4 + atb
    1419     32243906 :                                                 nout1 = nout1 + atn
    1420     32243906 :                                                 nout2 = nout1 + after
    1421     32243906 :                                                 nout3 = nout2 + after
    1422     32243906 :                                                 nout4 = nout3 + after
    1423     32243906 :                                                 nout5 = nout4 + after
    1424    685294455 :                                                 DO j = 1, nfft
    1425    649628239 :                                                    r1 = zin(1, j, nin1)
    1426    649628239 :                                                    s1 = zin(2, j, nin1)
    1427    649628239 :                                                    r2 = zin(1, j, nin2)
    1428    649628239 :                                                    s2 = zin(2, j, nin2)
    1429    649628239 :                                                    r3 = zin(1, j, nin3)
    1430    649628239 :                                                    s3 = zin(2, j, nin3)
    1431    649628239 :                                                    r4 = zin(1, j, nin4)
    1432    649628239 :                                                    s4 = zin(2, j, nin4)
    1433    649628239 :                                                    r5 = zin(1, j, nin5)
    1434    649628239 :                                                    s5 = zin(2, j, nin5)
    1435    649628239 :                                                    r25 = r2 + r5
    1436    649628239 :                                                    r34 = r3 + r4
    1437    649628239 :                                                    s25 = s2 - s5
    1438    649628239 :                                                    s34 = s3 - s4
    1439    649628239 :                                                    zout(1, j, nout1) = r1 + r25 + r34
    1440    649628239 :                                                    r = r1 + cos2*r25 + cos4*r34
    1441    649628239 :                                                    s = sin2*s25 + sin4*s34
    1442    649628239 :                                                    zout(1, j, nout2) = r - s
    1443    649628239 :                                                    zout(1, j, nout5) = r + s
    1444    649628239 :                                                    r = r1 + cos4*r25 + cos2*r34
    1445    649628239 :                                                    s = sin4*s25 - sin2*s34
    1446    649628239 :                                                    zout(1, j, nout3) = r - s
    1447    649628239 :                                                    zout(1, j, nout4) = r + s
    1448    649628239 :                                                    r25 = r2 - r5
    1449    649628239 :                                                    r34 = r3 - r4
    1450    649628239 :                                                    s25 = s2 + s5
    1451    649628239 :                                                    s34 = s3 + s4
    1452    649628239 :                                                    zout(2, j, nout1) = s1 + s25 + s34
    1453    649628239 :                                                    r = s1 + cos2*s25 + cos4*s34
    1454    649628239 :                                                    s = sin2*r25 + sin4*r34
    1455    649628239 :                                                    zout(2, j, nout2) = r + s
    1456    649628239 :                                                    zout(2, j, nout5) = r - s
    1457    649628239 :                                                    r = s1 + cos4*s25 + cos2*s34
    1458    649628239 :                                                    s = sin4*r25 - sin2*r34
    1459    649628239 :                                                    zout(2, j, nout3) = r + s
    1460    681872145 :                                                    zout(2, j, nout4) = r - s
    1461              :                                                 END DO; END DO
    1462     11671850 :                                              DO 5000, ia = 2, after
    1463      8249540 :                                                 ias = ia - 1
    1464      8249540 :                                                 IF (8*ias == 5*after) THEN
    1465       632504 :                                                    IF (isign == 1) THEN
    1466       329466 :                                                       nin1 = ia - after
    1467       329466 :                                                       nout1 = ia - atn
    1468       959052 :                                                       DO ib = 1, before
    1469       629586 :                                                          nin1 = nin1 + after
    1470       629586 :                                                          nin2 = nin1 + atb
    1471       629586 :                                                          nin3 = nin2 + atb
    1472       629586 :                                                          nin4 = nin3 + atb
    1473       629586 :                                                          nin5 = nin4 + atb
    1474       629586 :                                                          nout1 = nout1 + atn
    1475       629586 :                                                          nout2 = nout1 + after
    1476       629586 :                                                          nout3 = nout2 + after
    1477       629586 :                                                          nout4 = nout3 + after
    1478       629586 :                                                          nout5 = nout4 + after
    1479     14889639 :                                                          DO j = 1, nfft
    1480     13930587 :                                                             r1 = zin(1, j, nin1)
    1481     13930587 :                                                             s1 = zin(2, j, nin1)
    1482     13930587 :                                                             r = zin(1, j, nin2)
    1483     13930587 :                                                             s = zin(2, j, nin2)
    1484     13930587 :                                                             r2 = (r - s)*rt2i
    1485     13930587 :                                                             s2 = (r + s)*rt2i
    1486     13930587 :                                                             r3 = zin(2, j, nin3)
    1487     13930587 :                                                             s3 = zin(1, j, nin3)
    1488     13930587 :                                                             r = zin(1, j, nin4)
    1489     13930587 :                                                             s = zin(2, j, nin4)
    1490     13930587 :                                                             r4 = (r + s)*rt2i
    1491     13930587 :                                                             s4 = (r - s)*rt2i
    1492     13930587 :                                                             r5 = zin(1, j, nin5)
    1493     13930587 :                                                             s5 = zin(2, j, nin5)
    1494     13930587 :                                                             r25 = r2 - r5
    1495     13930587 :                                                             r34 = r3 + r4
    1496     13930587 :                                                             s25 = s2 + s5
    1497     13930587 :                                                             s34 = s3 - s4
    1498     13930587 :                                                             zout(1, j, nout1) = r1 + r25 - r34
    1499     13930587 :                                                             r = r1 + cos2*r25 - cos4*r34
    1500     13930587 :                                                             s = sin2*s25 + sin4*s34
    1501     13930587 :                                                             zout(1, j, nout2) = r - s
    1502     13930587 :                                                             zout(1, j, nout5) = r + s
    1503     13930587 :                                                             r = r1 + cos4*r25 - cos2*r34
    1504     13930587 :                                                             s = sin4*s25 - sin2*s34
    1505     13930587 :                                                             zout(1, j, nout3) = r - s
    1506     13930587 :                                                             zout(1, j, nout4) = r + s
    1507     13930587 :                                                             r25 = r2 + r5
    1508     13930587 :                                                             r34 = r4 - r3
    1509     13930587 :                                                             s25 = s2 - s5
    1510     13930587 :                                                             s34 = s3 + s4
    1511     13930587 :                                                             zout(2, j, nout1) = s1 + s25 + s34
    1512     13930587 :                                                             r = s1 + cos2*s25 + cos4*s34
    1513     13930587 :                                                             s = sin2*r25 + sin4*r34
    1514     13930587 :                                                             zout(2, j, nout2) = r + s
    1515     13930587 :                                                             zout(2, j, nout5) = r - s
    1516     13930587 :                                                             r = s1 + cos4*s25 + cos2*s34
    1517     13930587 :                                                             s = sin4*r25 - sin2*r34
    1518     13930587 :                                                             zout(2, j, nout3) = r + s
    1519     14560173 :                                                             zout(2, j, nout4) = r - s
    1520              :                                                          END DO; END DO
    1521              :                                                    ELSE
    1522       303038 :                                                       nin1 = ia - after
    1523       303038 :                                                       nout1 = ia - atn
    1524       893020 :                                                       DO ib = 1, before
    1525       589982 :                                                          nin1 = nin1 + after
    1526       589982 :                                                          nin2 = nin1 + atb
    1527       589982 :                                                          nin3 = nin2 + atb
    1528       589982 :                                                          nin4 = nin3 + atb
    1529       589982 :                                                          nin5 = nin4 + atb
    1530       589982 :                                                          nout1 = nout1 + atn
    1531       589982 :                                                          nout2 = nout1 + after
    1532       589982 :                                                          nout3 = nout2 + after
    1533       589982 :                                                          nout4 = nout3 + after
    1534       589982 :                                                          nout5 = nout4 + after
    1535     13731900 :                                                          DO j = 1, nfft
    1536     12838880 :                                                             r1 = zin(1, j, nin1)
    1537     12838880 :                                                             s1 = zin(2, j, nin1)
    1538     12838880 :                                                             r = zin(1, j, nin2)
    1539     12838880 :                                                             s = zin(2, j, nin2)
    1540     12838880 :                                                             r2 = (r + s)*rt2i
    1541     12838880 :                                                             s2 = (s - r)*rt2i
    1542     12838880 :                                                             r3 = zin(2, j, nin3)
    1543     12838880 :                                                             s3 = zin(1, j, nin3)
    1544     12838880 :                                                             r = zin(1, j, nin4)
    1545     12838880 :                                                             s = zin(2, j, nin4)
    1546     12838880 :                                                             r4 = (s - r)*rt2i
    1547     12838880 :                                                             s4 = (r + s)*rt2i
    1548     12838880 :                                                             r5 = zin(1, j, nin5)
    1549     12838880 :                                                             s5 = zin(2, j, nin5)
    1550     12838880 :                                                             r25 = r2 - r5
    1551     12838880 :                                                             r34 = r3 + r4
    1552     12838880 :                                                             s25 = s2 + s5
    1553     12838880 :                                                             s34 = s4 - s3
    1554     12838880 :                                                             zout(1, j, nout1) = r1 + r25 + r34
    1555     12838880 :                                                             r = r1 + cos2*r25 + cos4*r34
    1556     12838880 :                                                             s = sin2*s25 + sin4*s34
    1557     12838880 :                                                             zout(1, j, nout2) = r - s
    1558     12838880 :                                                             zout(1, j, nout5) = r + s
    1559     12838880 :                                                             r = r1 + cos4*r25 + cos2*r34
    1560     12838880 :                                                             s = sin4*s25 - sin2*s34
    1561     12838880 :                                                             zout(1, j, nout3) = r - s
    1562     12838880 :                                                             zout(1, j, nout4) = r + s
    1563     12838880 :                                                             r25 = r2 + r5
    1564     12838880 :                                                             r34 = r3 - r4
    1565     12838880 :                                                             s25 = s2 - s5
    1566     12838880 :                                                             s34 = s3 + s4
    1567     12838880 :                                                             zout(2, j, nout1) = s1 + s25 - s34
    1568     12838880 :                                                             r = s1 + cos2*s25 - cos4*s34
    1569     12838880 :                                                             s = sin2*r25 + sin4*r34
    1570     12838880 :                                                             zout(2, j, nout2) = r + s
    1571     12838880 :                                                             zout(2, j, nout5) = r - s
    1572     12838880 :                                                             r = s1 + cos4*s25 - cos2*s34
    1573     12838880 :                                                             s = sin4*r25 - sin2*r34
    1574     12838880 :                                                             zout(2, j, nout3) = r + s
    1575     13428862 :                                                             zout(2, j, nout4) = r - s
    1576              :                                                          END DO; END DO
    1577              :                                                    END IF
    1578              :                                                 ELSE
    1579      7617036 :                                                    ias = ia - 1
    1580      7617036 :                                                    itt = ias*before
    1581      7617036 :                                                    itrig = itt + 1
    1582      7617036 :                                                    cr2 = trig(1, itrig)
    1583      7617036 :                                                    ci2 = trig(2, itrig)
    1584      7617036 :                                                    itrig = itrig + itt
    1585      7617036 :                                                    cr3 = trig(1, itrig)
    1586      7617036 :                                                    ci3 = trig(2, itrig)
    1587      7617036 :                                                    itrig = itrig + itt
    1588      7617036 :                                                    cr4 = trig(1, itrig)
    1589      7617036 :                                                    ci4 = trig(2, itrig)
    1590      7617036 :                                                    itrig = itrig + itt
    1591      7617036 :                                                    cr5 = trig(1, itrig)
    1592      7617036 :                                                    ci5 = trig(2, itrig)
    1593      7617036 :                                                    nin1 = ia - after
    1594      7617036 :                                                    nout1 = ia - atn
    1595     24385896 :                                                    DO ib = 1, before
    1596     16768860 :                                                       nin1 = nin1 + after
    1597     16768860 :                                                       nin2 = nin1 + atb
    1598     16768860 :                                                       nin3 = nin2 + atb
    1599     16768860 :                                                       nin4 = nin3 + atb
    1600     16768860 :                                                       nin5 = nin4 + atb
    1601     16768860 :                                                       nout1 = nout1 + atn
    1602     16768860 :                                                       nout2 = nout1 + after
    1603     16768860 :                                                       nout3 = nout2 + after
    1604     16768860 :                                                       nout4 = nout3 + after
    1605     16768860 :                                                       nout5 = nout4 + after
    1606    354863388 :                                                       DO j = 1, nfft
    1607    330477492 :                                                          r1 = zin(1, j, nin1)
    1608    330477492 :                                                          s1 = zin(2, j, nin1)
    1609    330477492 :                                                          r = zin(1, j, nin2)
    1610    330477492 :                                                          s = zin(2, j, nin2)
    1611    330477492 :                                                          r2 = r*cr2 - s*ci2
    1612    330477492 :                                                          s2 = r*ci2 + s*cr2
    1613    330477492 :                                                          r = zin(1, j, nin3)
    1614    330477492 :                                                          s = zin(2, j, nin3)
    1615    330477492 :                                                          r3 = r*cr3 - s*ci3
    1616    330477492 :                                                          s3 = r*ci3 + s*cr3
    1617    330477492 :                                                          r = zin(1, j, nin4)
    1618    330477492 :                                                          s = zin(2, j, nin4)
    1619    330477492 :                                                          r4 = r*cr4 - s*ci4
    1620    330477492 :                                                          s4 = r*ci4 + s*cr4
    1621    330477492 :                                                          r = zin(1, j, nin5)
    1622    330477492 :                                                          s = zin(2, j, nin5)
    1623    330477492 :                                                          r5 = r*cr5 - s*ci5
    1624    330477492 :                                                          s5 = r*ci5 + s*cr5
    1625    330477492 :                                                          r25 = r2 + r5
    1626    330477492 :                                                          r34 = r3 + r4
    1627    330477492 :                                                          s25 = s2 - s5
    1628    330477492 :                                                          s34 = s3 - s4
    1629    330477492 :                                                          zout(1, j, nout1) = r1 + r25 + r34
    1630    330477492 :                                                          r = r1 + cos2*r25 + cos4*r34
    1631    330477492 :                                                          s = sin2*s25 + sin4*s34
    1632    330477492 :                                                          zout(1, j, nout2) = r - s
    1633    330477492 :                                                          zout(1, j, nout5) = r + s
    1634    330477492 :                                                          r = r1 + cos4*r25 + cos2*r34
    1635    330477492 :                                                          s = sin4*s25 - sin2*s34
    1636    330477492 :                                                          zout(1, j, nout3) = r - s
    1637    330477492 :                                                          zout(1, j, nout4) = r + s
    1638    330477492 :                                                          r25 = r2 - r5
    1639    330477492 :                                                          r34 = r3 - r4
    1640    330477492 :                                                          s25 = s2 + s5
    1641    330477492 :                                                          s34 = s3 + s4
    1642    330477492 :                                                          zout(2, j, nout1) = s1 + s25 + s34
    1643    330477492 :                                                          r = s1 + cos2*s25 + cos4*s34
    1644    330477492 :                                                          s = sin2*r25 + sin4*r34
    1645    330477492 :                                                          zout(2, j, nout2) = r + s
    1646    330477492 :                                                          zout(2, j, nout5) = r - s
    1647    330477492 :                                                          r = s1 + cos4*s25 + cos2*s34
    1648    330477492 :                                                          s = sin4*r25 - sin2*r34
    1649    330477492 :                                                          zout(2, j, nout3) = r + s
    1650    347246352 :                                                          zout(2, j, nout4) = r - s
    1651              :                                                       END DO; END DO
    1652              :                                                 END IF
    1653      3422310 : 5000                                            CONTINUE
    1654              :                                                 ELSE IF (now == 6) THEN
    1655              : !         .5_dp*sqrt(3._dp)
    1656      2900359 :                                                 bb = isign*0.8660254037844387_dp
    1657              : 
    1658      2900359 :                                                 ia = 1
    1659      2900359 :                                                 nin1 = ia - after
    1660      2900359 :                                                 nout1 = ia - atn
    1661     40661125 :                                                 DO ib = 1, before
    1662     37760766 :                                                    nin1 = nin1 + after
    1663     37760766 :                                                    nin2 = nin1 + atb
    1664     37760766 :                                                    nin3 = nin2 + atb
    1665     37760766 :                                                    nin4 = nin3 + atb
    1666     37760766 :                                                    nin5 = nin4 + atb
    1667     37760766 :                                                    nin6 = nin5 + atb
    1668     37760766 :                                                    nout1 = nout1 + atn
    1669     37760766 :                                                    nout2 = nout1 + after
    1670     37760766 :                                                    nout3 = nout2 + after
    1671     37760766 :                                                    nout4 = nout3 + after
    1672     37760766 :                                                    nout5 = nout4 + after
    1673     37760766 :                                                    nout6 = nout5 + after
    1674    648320745 :                                                    DO j = 1, nfft
    1675    607659620 :                                                       r2 = zin(1, j, nin3)
    1676    607659620 :                                                       s2 = zin(2, j, nin3)
    1677    607659620 :                                                       r3 = zin(1, j, nin5)
    1678    607659620 :                                                       s3 = zin(2, j, nin5)
    1679    607659620 :                                                       r = r2 + r3
    1680    607659620 :                                                       s = s2 + s3
    1681    607659620 :                                                       r1 = zin(1, j, nin1)
    1682    607659620 :                                                       s1 = zin(2, j, nin1)
    1683    607659620 :                                                       ur1 = r + r1
    1684    607659620 :                                                       ui1 = s + s1
    1685    607659620 :                                                       r1 = r1 - .5_dp*r
    1686    607659620 :                                                       s1 = s1 - .5_dp*s
    1687    607659620 :                                                       r = r2 - r3
    1688    607659620 :                                                       s = s2 - s3
    1689    607659620 :                                                       ur2 = r1 - s*bb
    1690    607659620 :                                                       ui2 = s1 + r*bb
    1691    607659620 :                                                       ur3 = r1 + s*bb
    1692    607659620 :                                                       ui3 = s1 - r*bb
    1693              : 
    1694    607659620 :                                                       r2 = zin(1, j, nin6)
    1695    607659620 :                                                       s2 = zin(2, j, nin6)
    1696    607659620 :                                                       r3 = zin(1, j, nin2)
    1697    607659620 :                                                       s3 = zin(2, j, nin2)
    1698    607659620 :                                                       r = r2 + r3
    1699    607659620 :                                                       s = s2 + s3
    1700    607659620 :                                                       r1 = zin(1, j, nin4)
    1701    607659620 :                                                       s1 = zin(2, j, nin4)
    1702    607659620 :                                                       vr1 = r + r1
    1703    607659620 :                                                       vi1 = s + s1
    1704    607659620 :                                                       r1 = r1 - .5_dp*r
    1705    607659620 :                                                       s1 = s1 - .5_dp*s
    1706    607659620 :                                                       r = r2 - r3
    1707    607659620 :                                                       s = s2 - s3
    1708    607659620 :                                                       vr2 = r1 - s*bb
    1709    607659620 :                                                       vi2 = s1 + r*bb
    1710    607659620 :                                                       vr3 = r1 + s*bb
    1711    607659620 :                                                       vi3 = s1 - r*bb
    1712              : 
    1713    607659620 :                                                       zout(1, j, nout1) = ur1 + vr1
    1714    607659620 :                                                       zout(2, j, nout1) = ui1 + vi1
    1715    607659620 :                                                       zout(1, j, nout5) = ur2 + vr2
    1716    607659620 :                                                       zout(2, j, nout5) = ui2 + vi2
    1717    607659620 :                                                       zout(1, j, nout3) = ur3 + vr3
    1718    607659620 :                                                       zout(2, j, nout3) = ui3 + vi3
    1719    607659620 :                                                       zout(1, j, nout4) = ur1 - vr1
    1720    607659620 :                                                       zout(2, j, nout4) = ui1 - vi1
    1721    607659620 :                                                       zout(1, j, nout2) = ur2 - vr2
    1722    607659620 :                                                       zout(2, j, nout2) = ui2 - vi2
    1723    607659620 :                                                       zout(1, j, nout6) = ur3 - vr3
    1724    645420386 :                                                       zout(2, j, nout6) = ui3 - vi3
    1725              :                                                    END DO; END DO
    1726              :                                                 ELSE
    1727            0 :                                                 CPABORT("error fftstp")
    1728              :                                                 END IF
    1729              : 
    1730     23770864 :                                                 END SUBROUTINE fftstp
    1731              : 
    1732              :                                                 END MODULE ps_wavelet_fft3d
        

Generated by: LCOV version 2.0-1