LCOV - code coverage report
Current view: top level - src/pw - ps_wavelet_fft3d.F (source / functions) Hit Total Coverage
Test: CP2K Regtests (git:9843133) Lines: 1251 1408 88.8 %
Date: 2024-05-10 06:53:45 Functions: 3 3 100.0 %

          Line data    Source code
       1             : !--------------------------------------------------------------------------------------------------!
       2             : !   CP2K: A general program to perform molecular dynamics simulations                              !
       3             : !   Copyright 2000-2024 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      104437 :    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, &
      39             :          25, 27, 30, 32, 36, 40, 45, 48, 54, 60, 64, 72, 75, 80, 81, 90, 96, 100, 108, 120, 125, &
      40             :          128, 135, 144, 150, 160, 162, 180, 192, 200, 216, 225, 240, 243, 256, 270, 288, 300, 320, &
      41             :          324, 360, 375, 384, 400, 405, 432, 450, 480, 486, 500, 512, 540, 576, 600, 625, 640, 648, &
      42             :          675, 720, 729, 750, 768, 800, 810, 864, 900, 960, 972, 1000, 1024, 1080, 1125, 1152, 1200,&
      43             :          1215, 1280, 1296, 1350, 1440, 1458, 1500, 1536, 1600, 1620, 1728, 1800, 1875, 1920, 1944, &
      44             :          2000, 2025, 2048, 2160, 2250, 2304, 2400, 2430, 2500, 2560, 2592, 2700, 2880, 3000, 3072, &
      45             :          3125, 3200, 3240, 3375, 3456, 3600, 3750, 3840, 3888, 4000, 4050, 4096, 4320, 4500, 4608, &
      46             :          4800, 5000, 5120, 5184, 5400, 5625, 5760, 6000, 6144, 6400, 6480, 6750, 6912, 7200, 7500, &
      47             :          7680, 8000, ctrig_length/)
      48             : 
      49             :       INTEGER                                            :: i
      50             : 
      51             : !Multiple of 2,3,5
      52             : 
      53     1671612 :       loop_data: DO i = 1, ndata1024
      54     1671612 :          IF (n <= idata(i)) THEN
      55      104437 :             n_next = idata(i)
      56      104437 :             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       91637 :    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     1478548 :       DO i = 1, 150
     202     1478548 :          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     1478548 :          IF (n .EQ. idata(1, i)) THEN
     209       91637 :             ic = 0
     210      313243 :             DO j = 1, 6
     211      313243 :                itt = idata(1 + j, i)
     212      313243 :                IF (itt .GT. 1) THEN
     213      221606 :                   ic = ic + 1
     214      221606 :                   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       91637 :       after(1) = 1
     224       91637 :       before(ic) = 1
     225      221606 :       DO i = 2, ic
     226      129969 :          after(i) = after(i - 1)*now(i - 1)
     227      221606 :          before(ic - i + 1) = before(ic - i + 2)*now(ic - i + 2)
     228             :       END DO
     229             : 
     230       91637 :       twopi = 6.283185307179586_dp
     231       91637 :       angle = isign*twopi/n
     232       91637 :       IF (MOD(n, 2) .EQ. 0) THEN
     233       81026 :          nh = n/2
     234       81026 :          trig(1, 1) = 1._dp
     235       81026 :          trig(2, 1) = 0._dp
     236       81026 :          trig(1, nh + 1) = -1._dp
     237       81026 :          trig(2, nh + 1) = 0._dp
     238     1753414 :          DO 40, i = 1, nh - 1
     239     1672388 :             trigc = COS(i*angle)
     240     1672388 :             trigs = SIN(i*angle)
     241     1672388 :             trig(1, i + 1) = trigc
     242     1672388 :             trig(2, i + 1) = trigs
     243     1672388 :             trig(1, n - i + 1) = trigc
     244     1672388 :             trig(2, n - i + 1) = -trigs
     245       81026 : 40          CONTINUE
     246             :             ELSE
     247       10611 :             nh = (n - 1)/2
     248       10611 :             trig(1, 1) = 1._dp
     249       10611 :             trig(2, 1) = 0._dp
     250      102816 :             DO 20, i = 1, nh
     251       92205 :                trigc = COS(i*angle)
     252       92205 :                trigs = SIN(i*angle)
     253       92205 :                trig(1, i + 1) = trigc
     254       92205 :                trig(2, i + 1) = trigs
     255       92205 :                trig(1, n - i + 1) = trigc
     256       92205 :                trig(2, n - i + 1) = -trigs
     257       10611 : 20             CONTINUE
     258             :                END IF
     259             : 
     260       91637 :                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    21418742 :                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    21418742 :                   atn = after*now
     300    21418742 :                   atb = after*before
     301             : 
     302             : !         sqrt(.5_dp)
     303    21418742 :                   rt2i = 0.7071067811865475_dp
     304             :                   IF (now .EQ. 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 .EQ. after) THEN
     326           0 :                            IF (isign .EQ. 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 .EQ. after) THEN
     364           0 :                            IF (isign .EQ. 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 .EQ. 3*after) THEN
     406           0 :                            IF (isign .EQ. 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 .EQ. 4) THEN
     473     4654496 :                         IF (isign .EQ. 1) THEN
     474     2392012 :                            ia = 1
     475     2392012 :                            nin1 = ia - after
     476     2392012 :                            nout1 = ia - atn
     477    23150635 :                            DO ib = 1, before
     478    20758623 :                               nin1 = nin1 + after
     479    20758623 :                               nin2 = nin1 + atb
     480    20758623 :                               nin3 = nin2 + atb
     481    20758623 :                               nin4 = nin3 + atb
     482    20758623 :                               nout1 = nout1 + atn
     483    20758623 :                               nout2 = nout1 + after
     484    20758623 :                               nout3 = nout2 + after
     485    20758623 :                               nout4 = nout3 + after
     486   424946167 :                               DO j = 1, nfft
     487   401795532 :                                  r1 = zin(1, j, nin1)
     488   401795532 :                                  s1 = zin(2, j, nin1)
     489   401795532 :                                  r2 = zin(1, j, nin2)
     490   401795532 :                                  s2 = zin(2, j, nin2)
     491   401795532 :                                  r3 = zin(1, j, nin3)
     492   401795532 :                                  s3 = zin(2, j, nin3)
     493   401795532 :                                  r4 = zin(1, j, nin4)
     494   401795532 :                                  s4 = zin(2, j, nin4)
     495   401795532 :                                  r = r1 + r3
     496   401795532 :                                  s = r2 + r4
     497   401795532 :                                  zout(1, j, nout1) = r + s
     498   401795532 :                                  zout(1, j, nout3) = r - s
     499   401795532 :                                  r = r1 - r3
     500   401795532 :                                  s = s2 - s4
     501   401795532 :                                  zout(1, j, nout2) = r - s
     502   401795532 :                                  zout(1, j, nout4) = r + s
     503   401795532 :                                  r = s1 + s3
     504   401795532 :                                  s = s2 + s4
     505   401795532 :                                  zout(2, j, nout1) = r + s
     506   401795532 :                                  zout(2, j, nout3) = r - s
     507   401795532 :                                  r = s1 - s3
     508   401795532 :                                  s = r2 - r4
     509   401795532 :                                  zout(2, j, nout2) = r + s
     510   422554155 :                                  zout(2, j, nout4) = r - s
     511             :                               END DO; END DO
     512    25787644 :                            DO 4000, ia = 2, after
     513    23395632 :                               ias = ia - 1
     514    23395632 :                               IF (2*ias .EQ. after) THEN
     515      957072 :                                  nin1 = ia - after
     516      957072 :                                  nout1 = ia - atn
     517     2203095 :                                  DO ib = 1, before
     518     1246023 :                                     nin1 = nin1 + after
     519     1246023 :                                     nin2 = nin1 + atb
     520     1246023 :                                     nin3 = nin2 + atb
     521     1246023 :                                     nin4 = nin3 + atb
     522     1246023 :                                     nout1 = nout1 + atn
     523     1246023 :                                     nout2 = nout1 + after
     524     1246023 :                                     nout3 = nout2 + after
     525     1246023 :                                     nout4 = nout3 + after
     526    25963285 :                                     DO j = 1, nfft
     527    23760190 :                                        r1 = zin(1, j, nin1)
     528    23760190 :                                        s1 = zin(2, j, nin1)
     529    23760190 :                                        r = zin(1, j, nin2)
     530    23760190 :                                        s = zin(2, j, nin2)
     531    23760190 :                                        r2 = (r - s)*rt2i
     532    23760190 :                                        s2 = (r + s)*rt2i
     533    23760190 :                                        r3 = zin(2, j, nin3)
     534    23760190 :                                        s3 = zin(1, j, nin3)
     535    23760190 :                                        r = zin(1, j, nin4)
     536    23760190 :                                        s = zin(2, j, nin4)
     537    23760190 :                                        r4 = (r + s)*rt2i
     538    23760190 :                                        s4 = (r - s)*rt2i
     539    23760190 :                                        r = r1 - r3
     540    23760190 :                                        s = r2 - r4
     541    23760190 :                                        zout(1, j, nout1) = r + s
     542    23760190 :                                        zout(1, j, nout3) = r - s
     543    23760190 :                                        r = r1 + r3
     544    23760190 :                                        s = s2 - s4
     545    23760190 :                                        zout(1, j, nout2) = r - s
     546    23760190 :                                        zout(1, j, nout4) = r + s
     547    23760190 :                                        r = s1 + s3
     548    23760190 :                                        s = s2 + s4
     549    23760190 :                                        zout(2, j, nout1) = r + s
     550    23760190 :                                        zout(2, j, nout3) = r - s
     551    23760190 :                                        r = s1 - s3
     552    23760190 :                                        s = r2 + r4
     553    23760190 :                                        zout(2, j, nout2) = r + s
     554    25006213 :                                        zout(2, j, nout4) = r - s
     555             :                                     END DO; END DO
     556             :                               ELSE
     557    22438560 :                                  itt = ias*before
     558    22438560 :                                  itrig = itt + 1
     559    22438560 :                                  cr2 = trig(1, itrig)
     560    22438560 :                                  ci2 = trig(2, itrig)
     561    22438560 :                                  itrig = itrig + itt
     562    22438560 :                                  cr3 = trig(1, itrig)
     563    22438560 :                                  ci3 = trig(2, itrig)
     564    22438560 :                                  itrig = itrig + itt
     565    22438560 :                                  cr4 = trig(1, itrig)
     566    22438560 :                                  ci4 = trig(2, itrig)
     567    22438560 :                                  nin1 = ia - after
     568    22438560 :                                  nout1 = ia - atn
     569    53874882 :                                  DO ib = 1, before
     570    31436322 :                                     nin1 = nin1 + after
     571    31436322 :                                     nin2 = nin1 + atb
     572    31436322 :                                     nin3 = nin2 + atb
     573    31436322 :                                     nin4 = nin3 + atb
     574    31436322 :                                     nout1 = nout1 + atn
     575    31436322 :                                     nout2 = nout1 + after
     576    31436322 :                                     nout3 = nout2 + after
     577    31436322 :                                     nout4 = nout3 + after
     578   606416238 :                                     DO j = 1, nfft
     579   552541356 :                                        r1 = zin(1, j, nin1)
     580   552541356 :                                        s1 = zin(2, j, nin1)
     581   552541356 :                                        r = zin(1, j, nin2)
     582   552541356 :                                        s = zin(2, j, nin2)
     583   552541356 :                                        r2 = r*cr2 - s*ci2
     584   552541356 :                                        s2 = r*ci2 + s*cr2
     585   552541356 :                                        r = zin(1, j, nin3)
     586   552541356 :                                        s = zin(2, j, nin3)
     587   552541356 :                                        r3 = r*cr3 - s*ci3
     588   552541356 :                                        s3 = r*ci3 + s*cr3
     589   552541356 :                                        r = zin(1, j, nin4)
     590   552541356 :                                        s = zin(2, j, nin4)
     591   552541356 :                                        r4 = r*cr4 - s*ci4
     592   552541356 :                                        s4 = r*ci4 + s*cr4
     593   552541356 :                                        r = r1 + r3
     594   552541356 :                                        s = r2 + r4
     595   552541356 :                                        zout(1, j, nout1) = r + s
     596   552541356 :                                        zout(1, j, nout3) = r - s
     597   552541356 :                                        r = r1 - r3
     598   552541356 :                                        s = s2 - s4
     599   552541356 :                                        zout(1, j, nout2) = r - s
     600   552541356 :                                        zout(1, j, nout4) = r + s
     601   552541356 :                                        r = s1 + s3
     602   552541356 :                                        s = s2 + s4
     603   552541356 :                                        zout(2, j, nout1) = r + s
     604   552541356 :                                        zout(2, j, nout3) = r - s
     605   552541356 :                                        r = s1 - s3
     606   552541356 :                                        s = r2 - r4
     607   552541356 :                                        zout(2, j, nout2) = r + s
     608   583977678 :                                        zout(2, j, nout4) = r - s
     609             :                                     END DO; END DO
     610             :                               END IF
     611     2392012 : 4000                          CONTINUE
     612             :                               ELSE
     613     2262484 :                               ia = 1
     614     2262484 :                               nin1 = ia - after
     615     2262484 :                               nout1 = ia - atn
     616    21915715 :                               DO ib = 1, before
     617    19653231 :                                  nin1 = nin1 + after
     618    19653231 :                                  nin2 = nin1 + atb
     619    19653231 :                                  nin3 = nin2 + atb
     620    19653231 :                                  nin4 = nin3 + atb
     621    19653231 :                                  nout1 = nout1 + atn
     622    19653231 :                                  nout2 = nout1 + after
     623    19653231 :                                  nout3 = nout2 + after
     624    19653231 :                                  nout4 = nout3 + after
     625   403550459 :                                  DO j = 1, nfft
     626   381634744 :                                     r1 = zin(1, j, nin1)
     627   381634744 :                                     s1 = zin(2, j, nin1)
     628   381634744 :                                     r2 = zin(1, j, nin2)
     629   381634744 :                                     s2 = zin(2, j, nin2)
     630   381634744 :                                     r3 = zin(1, j, nin3)
     631   381634744 :                                     s3 = zin(2, j, nin3)
     632   381634744 :                                     r4 = zin(1, j, nin4)
     633   381634744 :                                     s4 = zin(2, j, nin4)
     634   381634744 :                                     r = r1 + r3
     635   381634744 :                                     s = r2 + r4
     636   381634744 :                                     zout(1, j, nout1) = r + s
     637   381634744 :                                     zout(1, j, nout3) = r - s
     638   381634744 :                                     r = r1 - r3
     639   381634744 :                                     s = s2 - s4
     640   381634744 :                                     zout(1, j, nout2) = r + s
     641   381634744 :                                     zout(1, j, nout4) = r - s
     642   381634744 :                                     r = s1 + s3
     643   381634744 :                                     s = s2 + s4
     644   381634744 :                                     zout(2, j, nout1) = r + s
     645   381634744 :                                     zout(2, j, nout3) = r - s
     646   381634744 :                                     r = s1 - s3
     647   381634744 :                                     s = r2 - r4
     648   381634744 :                                     zout(2, j, nout2) = r - s
     649   401287975 :                                     zout(2, j, nout4) = r + s
     650             :                                  END DO; END DO
     651    23815531 :                               DO 4100, ia = 2, after
     652    21553047 :                                  ias = ia - 1
     653    21553047 :                                  IF (2*ias .EQ. after) THEN
     654      893205 :                                     nin1 = ia - after
     655      893205 :                                     nout1 = ia - atn
     656     2034540 :                                     DO ib = 1, before
     657     1141335 :                                        nin1 = nin1 + after
     658     1141335 :                                        nin2 = nin1 + atb
     659     1141335 :                                        nin3 = nin2 + atb
     660     1141335 :                                        nin4 = nin3 + atb
     661     1141335 :                                        nout1 = nout1 + atn
     662     1141335 :                                        nout2 = nout1 + after
     663     1141335 :                                        nout3 = nout2 + after
     664     1141335 :                                        nout4 = nout3 + after
     665    23892604 :                                        DO j = 1, nfft
     666    21858064 :                                           r1 = zin(1, j, nin1)
     667    21858064 :                                           s1 = zin(2, j, nin1)
     668    21858064 :                                           r = zin(1, j, nin2)
     669    21858064 :                                           s = zin(2, j, nin2)
     670    21858064 :                                           r2 = (r + s)*rt2i
     671    21858064 :                                           s2 = (s - r)*rt2i
     672    21858064 :                                           r3 = zin(2, j, nin3)
     673    21858064 :                                           s3 = zin(1, j, nin3)
     674    21858064 :                                           r = zin(1, j, nin4)
     675    21858064 :                                           s = zin(2, j, nin4)
     676    21858064 :                                           r4 = (s - r)*rt2i
     677    21858064 :                                           s4 = (r + s)*rt2i
     678    21858064 :                                           r = r1 + r3
     679    21858064 :                                           s = r2 + r4
     680    21858064 :                                           zout(1, j, nout1) = r + s
     681    21858064 :                                           zout(1, j, nout3) = r - s
     682    21858064 :                                           r = r1 - r3
     683    21858064 :                                           s = s2 + s4
     684    21858064 :                                           zout(1, j, nout2) = r + s
     685    21858064 :                                           zout(1, j, nout4) = r - s
     686    21858064 :                                           r = s1 - s3
     687    21858064 :                                           s = s2 - s4
     688    21858064 :                                           zout(2, j, nout1) = r + s
     689    21858064 :                                           zout(2, j, nout3) = r - s
     690    21858064 :                                           r = s1 + s3
     691    21858064 :                                           s = r2 - r4
     692    21858064 :                                           zout(2, j, nout2) = r - s
     693    22999399 :                                           zout(2, j, nout4) = r + s
     694             :                                        END DO; END DO
     695             :                                  ELSE
     696    20659842 :                                     itt = ias*before
     697    20659842 :                                     itrig = itt + 1
     698    20659842 :                                     cr2 = trig(1, itrig)
     699    20659842 :                                     ci2 = trig(2, itrig)
     700    20659842 :                                     itrig = itrig + itt
     701    20659842 :                                     cr3 = trig(1, itrig)
     702    20659842 :                                     ci3 = trig(2, itrig)
     703    20659842 :                                     itrig = itrig + itt
     704    20659842 :                                     cr4 = trig(1, itrig)
     705    20659842 :                                     ci4 = trig(2, itrig)
     706    20659842 :                                     nin1 = ia - after
     707    20659842 :                                     nout1 = ia - atn
     708    49808808 :                                     DO ib = 1, before
     709    29148966 :                                        nin1 = nin1 + after
     710    29148966 :                                        nin2 = nin1 + atb
     711    29148966 :                                        nin3 = nin2 + atb
     712    29148966 :                                        nin4 = nin3 + atb
     713    29148966 :                                        nout1 = nout1 + atn
     714    29148966 :                                        nout2 = nout1 + after
     715    29148966 :                                        nout3 = nout2 + after
     716    29148966 :                                        nout4 = nout3 + after
     717   568425672 :                                        DO j = 1, nfft
     718   518616864 :                                           r1 = zin(1, j, nin1)
     719   518616864 :                                           s1 = zin(2, j, nin1)
     720   518616864 :                                           r = zin(1, j, nin2)
     721   518616864 :                                           s = zin(2, j, nin2)
     722   518616864 :                                           r2 = r*cr2 - s*ci2
     723   518616864 :                                           s2 = r*ci2 + s*cr2
     724   518616864 :                                           r = zin(1, j, nin3)
     725   518616864 :                                           s = zin(2, j, nin3)
     726   518616864 :                                           r3 = r*cr3 - s*ci3
     727   518616864 :                                           s3 = r*ci3 + s*cr3
     728   518616864 :                                           r = zin(1, j, nin4)
     729   518616864 :                                           s = zin(2, j, nin4)
     730   518616864 :                                           r4 = r*cr4 - s*ci4
     731   518616864 :                                           s4 = r*ci4 + s*cr4
     732   518616864 :                                           r = r1 + r3
     733   518616864 :                                           s = r2 + r4
     734   518616864 :                                           zout(1, j, nout1) = r + s
     735   518616864 :                                           zout(1, j, nout3) = r - s
     736   518616864 :                                           r = r1 - r3
     737   518616864 :                                           s = s2 - s4
     738   518616864 :                                           zout(1, j, nout2) = r + s
     739   518616864 :                                           zout(1, j, nout4) = r - s
     740   518616864 :                                           r = s1 + s3
     741   518616864 :                                           s = s2 + s4
     742   518616864 :                                           zout(2, j, nout1) = r + s
     743   518616864 :                                           zout(2, j, nout3) = r - s
     744   518616864 :                                           r = s1 - s3
     745   518616864 :                                           s = r2 - r4
     746   518616864 :                                           zout(2, j, nout2) = r - s
     747   547765830 :                                           zout(2, j, nout4) = r + s
     748             :                                        END DO; END DO
     749             :                                  END IF
     750     2262484 : 4100                             CONTINUE
     751             :                                  END IF
     752             :                                  ELSE IF (now .EQ. 8) THEN
     753     2370925 :                                  IF (isign .EQ. -1) THEN
     754     1138842 :                                     ia = 1
     755     1138842 :                                     nin1 = ia - after
     756     1138842 :                                     nout1 = ia - atn
     757    10281368 :                                     DO ib = 1, before
     758     9142526 :                                        nin1 = nin1 + after
     759     9142526 :                                        nin2 = nin1 + atb
     760     9142526 :                                        nin3 = nin2 + atb
     761     9142526 :                                        nin4 = nin3 + atb
     762     9142526 :                                        nin5 = nin4 + atb
     763     9142526 :                                        nin6 = nin5 + atb
     764     9142526 :                                        nin7 = nin6 + atb
     765     9142526 :                                        nin8 = nin7 + atb
     766     9142526 :                                        nout1 = nout1 + atn
     767     9142526 :                                        nout2 = nout1 + after
     768     9142526 :                                        nout3 = nout2 + after
     769     9142526 :                                        nout4 = nout3 + after
     770     9142526 :                                        nout5 = nout4 + after
     771     9142526 :                                        nout6 = nout5 + after
     772     9142526 :                                        nout7 = nout6 + after
     773     9142526 :                                        nout8 = nout7 + after
     774   170670092 :                                        DO j = 1, nfft
     775   160388724 :                                           r1 = zin(1, j, nin1)
     776   160388724 :                                           s1 = zin(2, j, nin1)
     777   160388724 :                                           r2 = zin(1, j, nin2)
     778   160388724 :                                           s2 = zin(2, j, nin2)
     779   160388724 :                                           r3 = zin(1, j, nin3)
     780   160388724 :                                           s3 = zin(2, j, nin3)
     781   160388724 :                                           r4 = zin(1, j, nin4)
     782   160388724 :                                           s4 = zin(2, j, nin4)
     783   160388724 :                                           r5 = zin(1, j, nin5)
     784   160388724 :                                           s5 = zin(2, j, nin5)
     785   160388724 :                                           r6 = zin(1, j, nin6)
     786   160388724 :                                           s6 = zin(2, j, nin6)
     787   160388724 :                                           r7 = zin(1, j, nin7)
     788   160388724 :                                           s7 = zin(2, j, nin7)
     789   160388724 :                                           r8 = zin(1, j, nin8)
     790   160388724 :                                           s8 = zin(2, j, nin8)
     791   160388724 :                                           r = r1 + r5
     792   160388724 :                                           s = r3 + r7
     793   160388724 :                                           ap = r + s
     794   160388724 :                                           am = r - s
     795   160388724 :                                           r = r2 + r6
     796   160388724 :                                           s = r4 + r8
     797   160388724 :                                           bp = r + s
     798   160388724 :                                           bm = r - s
     799   160388724 :                                           r = s1 + s5
     800   160388724 :                                           s = s3 + s7
     801   160388724 :                                           cp = r + s
     802   160388724 :                                           cm = r - s
     803   160388724 :                                           r = s2 + s6
     804   160388724 :                                           s = s4 + s8
     805   160388724 :                                           dpp = r + s
     806   160388724 :                                           dm = r - s
     807   160388724 :                                           zout(1, j, nout1) = ap + bp
     808   160388724 :                                           zout(2, j, nout1) = cp + dpp
     809   160388724 :                                           zout(1, j, nout5) = ap - bp
     810   160388724 :                                           zout(2, j, nout5) = cp - dpp
     811   160388724 :                                           zout(1, j, nout3) = am + dm
     812   160388724 :                                           zout(2, j, nout3) = cm - bm
     813   160388724 :                                           zout(1, j, nout7) = am - dm
     814   160388724 :                                           zout(2, j, nout7) = cm + bm
     815   160388724 :                                           r = r1 - r5
     816   160388724 :                                           s = s3 - s7
     817   160388724 :                                           ap = r + s
     818   160388724 :                                           am = r - s
     819   160388724 :                                           r = s1 - s5
     820   160388724 :                                           s = r3 - r7
     821   160388724 :                                           bp = r + s
     822   160388724 :                                           bm = r - s
     823   160388724 :                                           r = s4 - s8
     824   160388724 :                                           s = r2 - r6
     825   160388724 :                                           cp = r + s
     826   160388724 :                                           cm = r - s
     827   160388724 :                                           r = s2 - s6
     828   160388724 :                                           s = r4 - r8
     829   160388724 :                                           dpp = r + s
     830   160388724 :                                           dm = r - s
     831   160388724 :                                           r = (cp + dm)*rt2i
     832   160388724 :                                           s = (dm - cp)*rt2i
     833   160388724 :                                           cp = (cm + dpp)*rt2i
     834   160388724 :                                           dpp = (cm - dpp)*rt2i
     835   160388724 :                                           zout(1, j, nout2) = ap + r
     836   160388724 :                                           zout(2, j, nout2) = bm + s
     837   160388724 :                                           zout(1, j, nout6) = ap - r
     838   160388724 :                                           zout(2, j, nout6) = bm - s
     839   160388724 :                                           zout(1, j, nout4) = am + cp
     840   160388724 :                                           zout(2, j, nout4) = bp + dpp
     841   160388724 :                                           zout(1, j, nout8) = am - cp
     842   169531250 :                                           zout(2, j, nout8) = bp - dpp
     843             :                                        END DO; END DO
     844     3403291 :                                     DO 8000, ia = 2, after
     845     2264449 :                                        ias = ia - 1
     846     2264449 :                                        itt = ias*before
     847     2264449 :                                        itrig = itt + 1
     848     2264449 :                                        cr2 = trig(1, itrig)
     849     2264449 :                                        ci2 = trig(2, itrig)
     850     2264449 :                                        itrig = itrig + itt
     851     2264449 :                                        cr3 = trig(1, itrig)
     852     2264449 :                                        ci3 = trig(2, itrig)
     853     2264449 :                                        itrig = itrig + itt
     854     2264449 :                                        cr4 = trig(1, itrig)
     855     2264449 :                                        ci4 = trig(2, itrig)
     856     2264449 :                                        itrig = itrig + itt
     857     2264449 :                                        cr5 = trig(1, itrig)
     858     2264449 :                                        ci5 = trig(2, itrig)
     859     2264449 :                                        itrig = itrig + itt
     860     2264449 :                                        cr6 = trig(1, itrig)
     861     2264449 :                                        ci6 = trig(2, itrig)
     862     2264449 :                                        itrig = itrig + itt
     863     2264449 :                                        cr7 = trig(1, itrig)
     864     2264449 :                                        ci7 = trig(2, itrig)
     865     2264449 :                                        itrig = itrig + itt
     866     2264449 :                                        cr8 = trig(1, itrig)
     867     2264449 :                                        ci8 = trig(2, itrig)
     868     2264449 :                                        nin1 = ia - after
     869     2264449 :                                        nout1 = ia - atn
     870     8897068 :                                        DO ib = 1, before
     871     6632619 :                                           nin1 = nin1 + after
     872     6632619 :                                           nin2 = nin1 + atb
     873     6632619 :                                           nin3 = nin2 + atb
     874     6632619 :                                           nin4 = nin3 + atb
     875     6632619 :                                           nin5 = nin4 + atb
     876     6632619 :                                           nin6 = nin5 + atb
     877     6632619 :                                           nin7 = nin6 + atb
     878     6632619 :                                           nin8 = nin7 + atb
     879     6632619 :                                           nout1 = nout1 + atn
     880     6632619 :                                           nout2 = nout1 + after
     881     6632619 :                                           nout3 = nout2 + after
     882     6632619 :                                           nout4 = nout3 + after
     883     6632619 :                                           nout5 = nout4 + after
     884     6632619 :                                           nout6 = nout5 + after
     885     6632619 :                                           nout7 = nout6 + after
     886     6632619 :                                           nout8 = nout7 + after
     887    90258676 :                                           DO j = 1, nfft
     888    81361608 :                                              r1 = zin(1, j, nin1)
     889    81361608 :                                              s1 = zin(2, j, nin1)
     890    81361608 :                                              r = zin(1, j, nin2)
     891    81361608 :                                              s = zin(2, j, nin2)
     892    81361608 :                                              r2 = r*cr2 - s*ci2
     893    81361608 :                                              s2 = r*ci2 + s*cr2
     894    81361608 :                                              r = zin(1, j, nin3)
     895    81361608 :                                              s = zin(2, j, nin3)
     896    81361608 :                                              r3 = r*cr3 - s*ci3
     897    81361608 :                                              s3 = r*ci3 + s*cr3
     898    81361608 :                                              r = zin(1, j, nin4)
     899    81361608 :                                              s = zin(2, j, nin4)
     900    81361608 :                                              r4 = r*cr4 - s*ci4
     901    81361608 :                                              s4 = r*ci4 + s*cr4
     902    81361608 :                                              r = zin(1, j, nin5)
     903    81361608 :                                              s = zin(2, j, nin5)
     904    81361608 :                                              r5 = r*cr5 - s*ci5
     905    81361608 :                                              s5 = r*ci5 + s*cr5
     906    81361608 :                                              r = zin(1, j, nin6)
     907    81361608 :                                              s = zin(2, j, nin6)
     908    81361608 :                                              r6 = r*cr6 - s*ci6
     909    81361608 :                                              s6 = r*ci6 + s*cr6
     910    81361608 :                                              r = zin(1, j, nin7)
     911    81361608 :                                              s = zin(2, j, nin7)
     912    81361608 :                                              r7 = r*cr7 - s*ci7
     913    81361608 :                                              s7 = r*ci7 + s*cr7
     914    81361608 :                                              r = zin(1, j, nin8)
     915    81361608 :                                              s = zin(2, j, nin8)
     916    81361608 :                                              r8 = r*cr8 - s*ci8
     917    81361608 :                                              s8 = r*ci8 + s*cr8
     918    81361608 :                                              r = r1 + r5
     919    81361608 :                                              s = r3 + r7
     920    81361608 :                                              ap = r + s
     921    81361608 :                                              am = r - s
     922    81361608 :                                              r = r2 + r6
     923    81361608 :                                              s = r4 + r8
     924    81361608 :                                              bp = r + s
     925    81361608 :                                              bm = r - s
     926    81361608 :                                              r = s1 + s5
     927    81361608 :                                              s = s3 + s7
     928    81361608 :                                              cp = r + s
     929    81361608 :                                              cm = r - s
     930    81361608 :                                              r = s2 + s6
     931    81361608 :                                              s = s4 + s8
     932    81361608 :                                              dpp = r + s
     933    81361608 :                                              dm = r - s
     934    81361608 :                                              zout(1, j, nout1) = ap + bp
     935    81361608 :                                              zout(2, j, nout1) = cp + dpp
     936    81361608 :                                              zout(1, j, nout5) = ap - bp
     937    81361608 :                                              zout(2, j, nout5) = cp - dpp
     938    81361608 :                                              zout(1, j, nout3) = am + dm
     939    81361608 :                                              zout(2, j, nout3) = cm - bm
     940    81361608 :                                              zout(1, j, nout7) = am - dm
     941    81361608 :                                              zout(2, j, nout7) = cm + bm
     942    81361608 :                                              r = r1 - r5
     943    81361608 :                                              s = s3 - s7
     944    81361608 :                                              ap = r + s
     945    81361608 :                                              am = r - s
     946    81361608 :                                              r = s1 - s5
     947    81361608 :                                              s = r3 - r7
     948    81361608 :                                              bp = r + s
     949    81361608 :                                              bm = r - s
     950    81361608 :                                              r = s4 - s8
     951    81361608 :                                              s = r2 - r6
     952    81361608 :                                              cp = r + s
     953    81361608 :                                              cm = r - s
     954    81361608 :                                              r = s2 - s6
     955    81361608 :                                              s = r4 - r8
     956    81361608 :                                              dpp = r + s
     957    81361608 :                                              dm = r - s
     958    81361608 :                                              r = (cp + dm)*rt2i
     959    81361608 :                                              s = (dm - cp)*rt2i
     960    81361608 :                                              cp = (cm + dpp)*rt2i
     961    81361608 :                                              dpp = (cm - dpp)*rt2i
     962    81361608 :                                              zout(1, j, nout2) = ap + r
     963    81361608 :                                              zout(2, j, nout2) = bm + s
     964    81361608 :                                              zout(1, j, nout6) = ap - r
     965    81361608 :                                              zout(2, j, nout6) = bm - s
     966    81361608 :                                              zout(1, j, nout4) = am + cp
     967    81361608 :                                              zout(2, j, nout4) = bp + dpp
     968    81361608 :                                              zout(1, j, nout8) = am - cp
     969    87994227 :                                              zout(2, j, nout8) = bp - dpp
     970             :                                           END DO; END DO
     971     1138842 : 8000                                   CONTINUE
     972             : 
     973             :                                        ELSE
     974     1232083 :                                        ia = 1
     975     1232083 :                                        nin1 = ia - after
     976     1232083 :                                        nout1 = ia - atn
     977    11367763 :                                        DO ib = 1, before
     978    10135680 :                                           nin1 = nin1 + after
     979    10135680 :                                           nin2 = nin1 + atb
     980    10135680 :                                           nin3 = nin2 + atb
     981    10135680 :                                           nin4 = nin3 + atb
     982    10135680 :                                           nin5 = nin4 + atb
     983    10135680 :                                           nin6 = nin5 + atb
     984    10135680 :                                           nin7 = nin6 + atb
     985    10135680 :                                           nin8 = nin7 + atb
     986    10135680 :                                           nout1 = nout1 + atn
     987    10135680 :                                           nout2 = nout1 + after
     988    10135680 :                                           nout3 = nout2 + after
     989    10135680 :                                           nout4 = nout3 + after
     990    10135680 :                                           nout5 = nout4 + after
     991    10135680 :                                           nout6 = nout5 + after
     992    10135680 :                                           nout7 = nout6 + after
     993    10135680 :                                           nout8 = nout7 + after
     994   186656682 :                                           DO j = 1, nfft
     995   175288919 :                                              r1 = zin(1, j, nin1)
     996   175288919 :                                              s1 = zin(2, j, nin1)
     997   175288919 :                                              r2 = zin(1, j, nin2)
     998   175288919 :                                              s2 = zin(2, j, nin2)
     999   175288919 :                                              r3 = zin(1, j, nin3)
    1000   175288919 :                                              s3 = zin(2, j, nin3)
    1001   175288919 :                                              r4 = zin(1, j, nin4)
    1002   175288919 :                                              s4 = zin(2, j, nin4)
    1003   175288919 :                                              r5 = zin(1, j, nin5)
    1004   175288919 :                                              s5 = zin(2, j, nin5)
    1005   175288919 :                                              r6 = zin(1, j, nin6)
    1006   175288919 :                                              s6 = zin(2, j, nin6)
    1007   175288919 :                                              r7 = zin(1, j, nin7)
    1008   175288919 :                                              s7 = zin(2, j, nin7)
    1009   175288919 :                                              r8 = zin(1, j, nin8)
    1010   175288919 :                                              s8 = zin(2, j, nin8)
    1011   175288919 :                                              r = r1 + r5
    1012   175288919 :                                              s = r3 + r7
    1013   175288919 :                                              ap = r + s
    1014   175288919 :                                              am = r - s
    1015   175288919 :                                              r = r2 + r6
    1016   175288919 :                                              s = r4 + r8
    1017   175288919 :                                              bp = r + s
    1018   175288919 :                                              bm = r - s
    1019   175288919 :                                              r = s1 + s5
    1020   175288919 :                                              s = s3 + s7
    1021   175288919 :                                              cp = r + s
    1022   175288919 :                                              cm = r - s
    1023   175288919 :                                              r = s2 + s6
    1024   175288919 :                                              s = s4 + s8
    1025   175288919 :                                              dpp = r + s
    1026   175288919 :                                              dm = r - s
    1027   175288919 :                                              zout(1, j, nout1) = ap + bp
    1028   175288919 :                                              zout(2, j, nout1) = cp + dpp
    1029   175288919 :                                              zout(1, j, nout5) = ap - bp
    1030   175288919 :                                              zout(2, j, nout5) = cp - dpp
    1031   175288919 :                                              zout(1, j, nout3) = am - dm
    1032   175288919 :                                              zout(2, j, nout3) = cm + bm
    1033   175288919 :                                              zout(1, j, nout7) = am + dm
    1034   175288919 :                                              zout(2, j, nout7) = cm - bm
    1035   175288919 :                                              r = r1 - r5
    1036   175288919 :                                              s = -s3 + s7
    1037   175288919 :                                              ap = r + s
    1038   175288919 :                                              am = r - s
    1039   175288919 :                                              r = s1 - s5
    1040   175288919 :                                              s = r7 - r3
    1041   175288919 :                                              bp = r + s
    1042   175288919 :                                              bm = r - s
    1043   175288919 :                                              r = -s4 + s8
    1044   175288919 :                                              s = r2 - r6
    1045   175288919 :                                              cp = r + s
    1046   175288919 :                                              cm = r - s
    1047   175288919 :                                              r = -s2 + s6
    1048   175288919 :                                              s = r4 - r8
    1049   175288919 :                                              dpp = r + s
    1050   175288919 :                                              dm = r - s
    1051   175288919 :                                              r = (cp + dm)*rt2i
    1052   175288919 :                                              s = (cp - dm)*rt2i
    1053   175288919 :                                              cp = (cm + dpp)*rt2i
    1054   175288919 :                                              dpp = (dpp - cm)*rt2i
    1055   175288919 :                                              zout(1, j, nout2) = ap + r
    1056   175288919 :                                              zout(2, j, nout2) = bm + s
    1057   175288919 :                                              zout(1, j, nout6) = ap - r
    1058   175288919 :                                              zout(2, j, nout6) = bm - s
    1059   175288919 :                                              zout(1, j, nout4) = am + cp
    1060   175288919 :                                              zout(2, j, nout4) = bp + dpp
    1061   175288919 :                                              zout(1, j, nout8) = am - cp
    1062   185424599 :                                              zout(2, j, nout8) = bp - dpp
    1063             :                                           END DO; END DO
    1064             : 
    1065     3686860 :                                        DO 8001, ia = 2, after
    1066     2454777 :                                           ias = ia - 1
    1067     2454777 :                                           itt = ias*before
    1068     2454777 :                                           itrig = itt + 1
    1069     2454777 :                                           cr2 = trig(1, itrig)
    1070     2454777 :                                           ci2 = trig(2, itrig)
    1071     2454777 :                                           itrig = itrig + itt
    1072     2454777 :                                           cr3 = trig(1, itrig)
    1073     2454777 :                                           ci3 = trig(2, itrig)
    1074     2454777 :                                           itrig = itrig + itt
    1075     2454777 :                                           cr4 = trig(1, itrig)
    1076     2454777 :                                           ci4 = trig(2, itrig)
    1077     2454777 :                                           itrig = itrig + itt
    1078     2454777 :                                           cr5 = trig(1, itrig)
    1079     2454777 :                                           ci5 = trig(2, itrig)
    1080     2454777 :                                           itrig = itrig + itt
    1081     2454777 :                                           cr6 = trig(1, itrig)
    1082     2454777 :                                           ci6 = trig(2, itrig)
    1083     2454777 :                                           itrig = itrig + itt
    1084     2454777 :                                           cr7 = trig(1, itrig)
    1085     2454777 :                                           ci7 = trig(2, itrig)
    1086     2454777 :                                           itrig = itrig + itt
    1087     2454777 :                                           cr8 = trig(1, itrig)
    1088     2454777 :                                           ci8 = trig(2, itrig)
    1089     2454777 :                                           nin1 = ia - after
    1090     2454777 :                                           nout1 = ia - atn
    1091     9735776 :                                           DO ib = 1, before
    1092     7280999 :                                              nin1 = nin1 + after
    1093     7280999 :                                              nin2 = nin1 + atb
    1094     7280999 :                                              nin3 = nin2 + atb
    1095     7280999 :                                              nin4 = nin3 + atb
    1096     7280999 :                                              nin5 = nin4 + atb
    1097     7280999 :                                              nin6 = nin5 + atb
    1098     7280999 :                                              nin7 = nin6 + atb
    1099     7280999 :                                              nin8 = nin7 + atb
    1100     7280999 :                                              nout1 = nout1 + atn
    1101     7280999 :                                              nout2 = nout1 + after
    1102     7280999 :                                              nout3 = nout2 + after
    1103     7280999 :                                              nout4 = nout3 + after
    1104     7280999 :                                              nout5 = nout4 + after
    1105     7280999 :                                              nout6 = nout5 + after
    1106     7280999 :                                              nout7 = nout6 + after
    1107     7280999 :                                              nout8 = nout7 + after
    1108    97629422 :                                              DO j = 1, nfft
    1109    87893646 :                                                 r1 = zin(1, j, nin1)
    1110    87893646 :                                                 s1 = zin(2, j, nin1)
    1111    87893646 :                                                 r = zin(1, j, nin2)
    1112    87893646 :                                                 s = zin(2, j, nin2)
    1113    87893646 :                                                 r2 = r*cr2 - s*ci2
    1114    87893646 :                                                 s2 = r*ci2 + s*cr2
    1115    87893646 :                                                 r = zin(1, j, nin3)
    1116    87893646 :                                                 s = zin(2, j, nin3)
    1117    87893646 :                                                 r3 = r*cr3 - s*ci3
    1118    87893646 :                                                 s3 = r*ci3 + s*cr3
    1119    87893646 :                                                 r = zin(1, j, nin4)
    1120    87893646 :                                                 s = zin(2, j, nin4)
    1121    87893646 :                                                 r4 = r*cr4 - s*ci4
    1122    87893646 :                                                 s4 = r*ci4 + s*cr4
    1123    87893646 :                                                 r = zin(1, j, nin5)
    1124    87893646 :                                                 s = zin(2, j, nin5)
    1125    87893646 :                                                 r5 = r*cr5 - s*ci5
    1126    87893646 :                                                 s5 = r*ci5 + s*cr5
    1127    87893646 :                                                 r = zin(1, j, nin6)
    1128    87893646 :                                                 s = zin(2, j, nin6)
    1129    87893646 :                                                 r6 = r*cr6 - s*ci6
    1130    87893646 :                                                 s6 = r*ci6 + s*cr6
    1131    87893646 :                                                 r = zin(1, j, nin7)
    1132    87893646 :                                                 s = zin(2, j, nin7)
    1133    87893646 :                                                 r7 = r*cr7 - s*ci7
    1134    87893646 :                                                 s7 = r*ci7 + s*cr7
    1135    87893646 :                                                 r = zin(1, j, nin8)
    1136    87893646 :                                                 s = zin(2, j, nin8)
    1137    87893646 :                                                 r8 = r*cr8 - s*ci8
    1138    87893646 :                                                 s8 = r*ci8 + s*cr8
    1139    87893646 :                                                 r = r1 + r5
    1140    87893646 :                                                 s = r3 + r7
    1141    87893646 :                                                 ap = r + s
    1142    87893646 :                                                 am = r - s
    1143    87893646 :                                                 r = r2 + r6
    1144    87893646 :                                                 s = r4 + r8
    1145    87893646 :                                                 bp = r + s
    1146    87893646 :                                                 bm = r - s
    1147    87893646 :                                                 r = s1 + s5
    1148    87893646 :                                                 s = s3 + s7
    1149    87893646 :                                                 cp = r + s
    1150    87893646 :                                                 cm = r - s
    1151    87893646 :                                                 r = s2 + s6
    1152    87893646 :                                                 s = s4 + s8
    1153    87893646 :                                                 dpp = r + s
    1154    87893646 :                                                 dm = r - s
    1155    87893646 :                                                 zout(1, j, nout1) = ap + bp
    1156    87893646 :                                                 zout(2, j, nout1) = cp + dpp
    1157    87893646 :                                                 zout(1, j, nout5) = ap - bp
    1158    87893646 :                                                 zout(2, j, nout5) = cp - dpp
    1159    87893646 :                                                 zout(1, j, nout3) = am - dm
    1160    87893646 :                                                 zout(2, j, nout3) = cm + bm
    1161    87893646 :                                                 zout(1, j, nout7) = am + dm
    1162    87893646 :                                                 zout(2, j, nout7) = cm - bm
    1163    87893646 :                                                 r = r1 - r5
    1164    87893646 :                                                 s = -s3 + s7
    1165    87893646 :                                                 ap = r + s
    1166    87893646 :                                                 am = r - s
    1167    87893646 :                                                 r = s1 - s5
    1168    87893646 :                                                 s = r7 - r3
    1169    87893646 :                                                 bp = r + s
    1170    87893646 :                                                 bm = r - s
    1171    87893646 :                                                 r = -s4 + s8
    1172    87893646 :                                                 s = r2 - r6
    1173    87893646 :                                                 cp = r + s
    1174    87893646 :                                                 cm = r - s
    1175    87893646 :                                                 r = -s2 + s6
    1176    87893646 :                                                 s = r4 - r8
    1177    87893646 :                                                 dpp = r + s
    1178    87893646 :                                                 dm = r - s
    1179    87893646 :                                                 r = (cp + dm)*rt2i
    1180    87893646 :                                                 s = (cp - dm)*rt2i
    1181    87893646 :                                                 cp = (cm + dpp)*rt2i
    1182    87893646 :                                                 dpp = (dpp - cm)*rt2i
    1183    87893646 :                                                 zout(1, j, nout2) = ap + r
    1184    87893646 :                                                 zout(2, j, nout2) = bm + s
    1185    87893646 :                                                 zout(1, j, nout6) = ap - r
    1186    87893646 :                                                 zout(2, j, nout6) = bm - s
    1187    87893646 :                                                 zout(1, j, nout4) = am + cp
    1188    87893646 :                                                 zout(2, j, nout4) = bp + dpp
    1189    87893646 :                                                 zout(1, j, nout8) = am - cp
    1190    95174645 :                                                 zout(2, j, nout8) = bp - dpp
    1191             :                                              END DO; END DO
    1192     1232083 : 8001                                      CONTINUE
    1193             : 
    1194             :                                           END IF
    1195             :                                           ELSE IF (now .EQ. 3) THEN
    1196             : !         .5_dp*sqrt(3._dp)
    1197     8822080 :                                           bb = isign*0.8660254037844387_dp
    1198     8822080 :                                           ia = 1
    1199     8822080 :                                           nin1 = ia - after
    1200     8822080 :                                           nout1 = ia - atn
    1201    32127054 :                                           DO ib = 1, before
    1202    23304974 :                                              nin1 = nin1 + after
    1203    23304974 :                                              nin2 = nin1 + atb
    1204    23304974 :                                              nin3 = nin2 + atb
    1205    23304974 :                                              nout1 = nout1 + atn
    1206    23304974 :                                              nout2 = nout1 + after
    1207    23304974 :                                              nout3 = nout2 + after
    1208   486041226 :                                              DO j = 1, nfft
    1209   453914172 :                                                 r1 = zin(1, j, nin1)
    1210   453914172 :                                                 s1 = zin(2, j, nin1)
    1211   453914172 :                                                 r2 = zin(1, j, nin2)
    1212   453914172 :                                                 s2 = zin(2, j, nin2)
    1213   453914172 :                                                 r3 = zin(1, j, nin3)
    1214   453914172 :                                                 s3 = zin(2, j, nin3)
    1215   453914172 :                                                 r = r2 + r3
    1216   453914172 :                                                 s = s2 + s3
    1217   453914172 :                                                 zout(1, j, nout1) = r + r1
    1218   453914172 :                                                 zout(2, j, nout1) = s + s1
    1219   453914172 :                                                 r1 = r1 - .5_dp*r
    1220   453914172 :                                                 s1 = s1 - .5_dp*s
    1221   453914172 :                                                 r2 = bb*(r2 - r3)
    1222   453914172 :                                                 s2 = bb*(s2 - s3)
    1223   453914172 :                                                 zout(1, j, nout2) = r1 - s2
    1224   453914172 :                                                 zout(2, j, nout2) = s1 + r2
    1225   453914172 :                                                 zout(1, j, nout3) = r1 + s2
    1226   477219146 :                                                 zout(2, j, nout3) = s1 - r2
    1227             :                                              END DO; END DO
    1228   161239138 :                                           DO 3000, ia = 2, after
    1229   152417058 :                                              ias = ia - 1
    1230   152417058 :                                              IF (4*ias .EQ. 3*after) THEN
    1231     5748155 :                                              IF (isign .EQ. 1) THEN
    1232     2952637 :                                                 nin1 = ia - after
    1233     2952637 :                                                 nout1 = ia - atn
    1234    12048744 :                                                 DO ib = 1, before
    1235     9096107 :                                                    nin1 = nin1 + after
    1236     9096107 :                                                    nin2 = nin1 + atb
    1237     9096107 :                                                    nin3 = nin2 + atb
    1238     9096107 :                                                    nout1 = nout1 + atn
    1239     9096107 :                                                    nout2 = nout1 + after
    1240     9096107 :                                                    nout3 = nout2 + after
    1241   185912668 :                                                    DO j = 1, nfft
    1242   173863924 :                                                       r1 = zin(1, j, nin1)
    1243   173863924 :                                                       s1 = zin(2, j, nin1)
    1244   173863924 :                                                       r2 = zin(2, j, nin2)
    1245   173863924 :                                                       s2 = zin(1, j, nin2)
    1246   173863924 :                                                       r3 = zin(1, j, nin3)
    1247   173863924 :                                                       s3 = zin(2, j, nin3)
    1248   173863924 :                                                       r = r3 + r2
    1249   173863924 :                                                       s = s2 - s3
    1250   173863924 :                                                       zout(1, j, nout1) = r1 - r
    1251   173863924 :                                                       zout(2, j, nout1) = s + s1
    1252   173863924 :                                                       r1 = r1 + .5_dp*r
    1253   173863924 :                                                       s1 = s1 - .5_dp*s
    1254   173863924 :                                                       r2 = bb*(r2 - r3)
    1255   173863924 :                                                       s2 = bb*(s2 + s3)
    1256   173863924 :                                                       zout(1, j, nout2) = r1 - s2
    1257   173863924 :                                                       zout(2, j, nout2) = s1 - r2
    1258   173863924 :                                                       zout(1, j, nout3) = r1 + s2
    1259   182960031 :                                                       zout(2, j, nout3) = s1 + r2
    1260             :                                                    END DO; END DO
    1261             :                                              ELSE
    1262     2795518 :                                                 nin1 = ia - after
    1263     2795518 :                                                 nout1 = ia - atn
    1264    11402190 :                                                 DO ib = 1, before
    1265     8606672 :                                                    nin1 = nin1 + after
    1266     8606672 :                                                    nin2 = nin1 + atb
    1267     8606672 :                                                    nin3 = nin2 + atb
    1268     8606672 :                                                    nout1 = nout1 + atn
    1269     8606672 :                                                    nout2 = nout1 + after
    1270     8606672 :                                                    nout3 = nout2 + after
    1271   176557398 :                                                    DO j = 1, nfft
    1272   165155208 :                                                       r1 = zin(1, j, nin1)
    1273   165155208 :                                                       s1 = zin(2, j, nin1)
    1274   165155208 :                                                       r2 = zin(2, j, nin2)
    1275   165155208 :                                                       s2 = zin(1, j, nin2)
    1276   165155208 :                                                       r3 = zin(1, j, nin3)
    1277   165155208 :                                                       s3 = zin(2, j, nin3)
    1278   165155208 :                                                       r = r2 - r3
    1279   165155208 :                                                       s = s2 + s3
    1280   165155208 :                                                       zout(1, j, nout1) = r + r1
    1281   165155208 :                                                       zout(2, j, nout1) = s1 - s
    1282   165155208 :                                                       r1 = r1 - .5_dp*r
    1283   165155208 :                                                       s1 = s1 + .5_dp*s
    1284   165155208 :                                                       r2 = bb*(r2 + r3)
    1285   165155208 :                                                       s2 = bb*(s2 - s3)
    1286   165155208 :                                                       zout(1, j, nout2) = r1 + s2
    1287   165155208 :                                                       zout(2, j, nout2) = s1 + r2
    1288   165155208 :                                                       zout(1, j, nout3) = r1 - s2
    1289   173761880 :                                                       zout(2, j, nout3) = s1 - r2
    1290             :                                                    END DO; END DO
    1291             :                                              END IF
    1292   146668903 :                                              ELSE IF (8*ias .EQ. 3*after) THEN
    1293     1923847 :                                              IF (isign .EQ. 1) THEN
    1294      989813 :                                                 nin1 = ia - after
    1295      989813 :                                                 nout1 = ia - atn
    1296     2390472 :                                                 DO ib = 1, before
    1297     1400659 :                                                    nin1 = nin1 + after
    1298     1400659 :                                                    nin2 = nin1 + atb
    1299     1400659 :                                                    nin3 = nin2 + atb
    1300     1400659 :                                                    nout1 = nout1 + atn
    1301     1400659 :                                                    nout2 = nout1 + after
    1302     1400659 :                                                    nout3 = nout2 + after
    1303    30069358 :                                                    DO j = 1, nfft
    1304    27678886 :                                                       r1 = zin(1, j, nin1)
    1305    27678886 :                                                       s1 = zin(2, j, nin1)
    1306    27678886 :                                                       r = zin(1, j, nin2)
    1307    27678886 :                                                       s = zin(2, j, nin2)
    1308    27678886 :                                                       r2 = (r - s)*rt2i
    1309    27678886 :                                                       s2 = (r + s)*rt2i
    1310    27678886 :                                                       r3 = zin(2, j, nin3)
    1311    27678886 :                                                       s3 = zin(1, j, nin3)
    1312    27678886 :                                                       r = r2 - r3
    1313    27678886 :                                                       s = s2 + s3
    1314    27678886 :                                                       zout(1, j, nout1) = r + r1
    1315    27678886 :                                                       zout(2, j, nout1) = s + s1
    1316    27678886 :                                                       r1 = r1 - .5_dp*r
    1317    27678886 :                                                       s1 = s1 - .5_dp*s
    1318    27678886 :                                                       r2 = bb*(r2 + r3)
    1319    27678886 :                                                       s2 = bb*(s2 - s3)
    1320    27678886 :                                                       zout(1, j, nout2) = r1 - s2
    1321    27678886 :                                                       zout(2, j, nout2) = s1 + r2
    1322    27678886 :                                                       zout(1, j, nout3) = r1 + s2
    1323    29079545 :                                                       zout(2, j, nout3) = s1 - r2
    1324             :                                                    END DO; END DO
    1325             :                                              ELSE
    1326      934034 :                                                 nin1 = ia - after
    1327      934034 :                                                 nout1 = ia - atn
    1328     2251518 :                                                 DO ib = 1, before
    1329     1317484 :                                                    nin1 = nin1 + after
    1330     1317484 :                                                    nin2 = nin1 + atb
    1331     1317484 :                                                    nin3 = nin2 + atb
    1332     1317484 :                                                    nout1 = nout1 + atn
    1333     1317484 :                                                    nout2 = nout1 + after
    1334     1317484 :                                                    nout3 = nout2 + after
    1335    28168446 :                                                    DO j = 1, nfft
    1336    25916928 :                                                       r1 = zin(1, j, nin1)
    1337    25916928 :                                                       s1 = zin(2, j, nin1)
    1338    25916928 :                                                       r = zin(1, j, nin2)
    1339    25916928 :                                                       s = zin(2, j, nin2)
    1340    25916928 :                                                       r2 = (r + s)*rt2i
    1341    25916928 :                                                       s2 = (s - r)*rt2i
    1342    25916928 :                                                       r3 = zin(2, j, nin3)
    1343    25916928 :                                                       s3 = zin(1, j, nin3)
    1344    25916928 :                                                       r = r2 + r3
    1345    25916928 :                                                       s = s2 - s3
    1346    25916928 :                                                       zout(1, j, nout1) = r + r1
    1347    25916928 :                                                       zout(2, j, nout1) = s + s1
    1348    25916928 :                                                       r1 = r1 - .5_dp*r
    1349    25916928 :                                                       s1 = s1 - .5_dp*s
    1350    25916928 :                                                       r2 = bb*(r2 - r3)
    1351    25916928 :                                                       s2 = bb*(s2 + s3)
    1352    25916928 :                                                       zout(1, j, nout2) = r1 - s2
    1353    25916928 :                                                       zout(2, j, nout2) = s1 + r2
    1354    25916928 :                                                       zout(1, j, nout3) = r1 + s2
    1355    27234412 :                                                       zout(2, j, nout3) = s1 - r2
    1356             :                                                    END DO; END DO
    1357             :                                              END IF
    1358             :                                              ELSE
    1359   144745056 :                                              itt = ias*before
    1360   144745056 :                                              itrig = itt + 1
    1361   144745056 :                                              cr2 = trig(1, itrig)
    1362   144745056 :                                              ci2 = trig(2, itrig)
    1363   144745056 :                                              itrig = itrig + itt
    1364   144745056 :                                              cr3 = trig(1, itrig)
    1365   144745056 :                                              ci3 = trig(2, itrig)
    1366   144745056 :                                              nin1 = ia - after
    1367   144745056 :                                              nout1 = ia - atn
    1368   347838562 :                                              DO ib = 1, before
    1369   203093506 :                                                 nin1 = nin1 + after
    1370   203093506 :                                                 nin2 = nin1 + atb
    1371   203093506 :                                                 nin3 = nin2 + atb
    1372   203093506 :                                                 nout1 = nout1 + atn
    1373   203093506 :                                                 nout2 = nout1 + after
    1374   203093506 :                                                 nout3 = nout2 + after
    1375  4053435144 :                                                 DO j = 1, nfft
    1376  3705596582 :                                                    r1 = zin(1, j, nin1)
    1377  3705596582 :                                                    s1 = zin(2, j, nin1)
    1378  3705596582 :                                                    r = zin(1, j, nin2)
    1379  3705596582 :                                                    s = zin(2, j, nin2)
    1380  3705596582 :                                                    r2 = r*cr2 - s*ci2
    1381  3705596582 :                                                    s2 = r*ci2 + s*cr2
    1382  3705596582 :                                                    r = zin(1, j, nin3)
    1383  3705596582 :                                                    s = zin(2, j, nin3)
    1384  3705596582 :                                                    r3 = r*cr3 - s*ci3
    1385  3705596582 :                                                    s3 = r*ci3 + s*cr3
    1386  3705596582 :                                                    r = r2 + r3
    1387  3705596582 :                                                    s = s2 + s3
    1388  3705596582 :                                                    zout(1, j, nout1) = r + r1
    1389  3705596582 :                                                    zout(2, j, nout1) = s + s1
    1390  3705596582 :                                                    r1 = r1 - .5_dp*r
    1391  3705596582 :                                                    s1 = s1 - .5_dp*s
    1392  3705596582 :                                                    r2 = bb*(r2 - r3)
    1393  3705596582 :                                                    s2 = bb*(s2 - s3)
    1394  3705596582 :                                                    zout(1, j, nout2) = r1 - s2
    1395  3705596582 :                                                    zout(2, j, nout2) = s1 + r2
    1396  3705596582 :                                                    zout(1, j, nout3) = r1 + s2
    1397  3908690088 :                                                    zout(2, j, nout3) = s1 - r2
    1398             :                                                 END DO; END DO
    1399             :                                              END IF
    1400     8822080 : 3000                                         CONTINUE
    1401             :                                              ELSE IF (now .EQ. 5) THEN
    1402             : !         cos(2._dp*pi/5._dp)
    1403     2814988 :                                              cos2 = 0.3090169943749474_dp
    1404             : !         cos(4._dp*pi/5._dp)
    1405     2814988 :                                              cos4 = -0.8090169943749474_dp
    1406             : !        sin(2._dp*pi/5._dp)
    1407     2814988 :                                              sin2 = isign*0.9510565162951536_dp
    1408             : !         sin(4._dp*pi/5._dp)
    1409     2814988 :                                              sin4 = isign*0.5877852522924731_dp
    1410     2814988 :                                              ia = 1
    1411     2814988 :                                              nin1 = ia - after
    1412     2814988 :                                              nout1 = ia - atn
    1413    27105290 :                                              DO ib = 1, before
    1414    24290302 :                                                 nin1 = nin1 + after
    1415    24290302 :                                                 nin2 = nin1 + atb
    1416    24290302 :                                                 nin3 = nin2 + atb
    1417    24290302 :                                                 nin4 = nin3 + atb
    1418    24290302 :                                                 nin5 = nin4 + atb
    1419    24290302 :                                                 nout1 = nout1 + atn
    1420    24290302 :                                                 nout2 = nout1 + after
    1421    24290302 :                                                 nout3 = nout2 + after
    1422    24290302 :                                                 nout4 = nout3 + after
    1423    24290302 :                                                 nout5 = nout4 + after
    1424   514899983 :                                                 DO j = 1, nfft
    1425   487794693 :                                                    r1 = zin(1, j, nin1)
    1426   487794693 :                                                    s1 = zin(2, j, nin1)
    1427   487794693 :                                                    r2 = zin(1, j, nin2)
    1428   487794693 :                                                    s2 = zin(2, j, nin2)
    1429   487794693 :                                                    r3 = zin(1, j, nin3)
    1430   487794693 :                                                    s3 = zin(2, j, nin3)
    1431   487794693 :                                                    r4 = zin(1, j, nin4)
    1432   487794693 :                                                    s4 = zin(2, j, nin4)
    1433   487794693 :                                                    r5 = zin(1, j, nin5)
    1434   487794693 :                                                    s5 = zin(2, j, nin5)
    1435   487794693 :                                                    r25 = r2 + r5
    1436   487794693 :                                                    r34 = r3 + r4
    1437   487794693 :                                                    s25 = s2 - s5
    1438   487794693 :                                                    s34 = s3 - s4
    1439   487794693 :                                                    zout(1, j, nout1) = r1 + r25 + r34
    1440   487794693 :                                                    r = r1 + cos2*r25 + cos4*r34
    1441   487794693 :                                                    s = sin2*s25 + sin4*s34
    1442   487794693 :                                                    zout(1, j, nout2) = r - s
    1443   487794693 :                                                    zout(1, j, nout5) = r + s
    1444   487794693 :                                                    r = r1 + cos4*r25 + cos2*r34
    1445   487794693 :                                                    s = sin4*s25 - sin2*s34
    1446   487794693 :                                                    zout(1, j, nout3) = r - s
    1447   487794693 :                                                    zout(1, j, nout4) = r + s
    1448   487794693 :                                                    r25 = r2 - r5
    1449   487794693 :                                                    r34 = r3 - r4
    1450   487794693 :                                                    s25 = s2 + s5
    1451   487794693 :                                                    s34 = s3 + s4
    1452   487794693 :                                                    zout(2, j, nout1) = s1 + s25 + s34
    1453   487794693 :                                                    r = s1 + cos2*s25 + cos4*s34
    1454   487794693 :                                                    s = sin2*r25 + sin4*r34
    1455   487794693 :                                                    zout(2, j, nout2) = r + s
    1456   487794693 :                                                    zout(2, j, nout5) = r - s
    1457   487794693 :                                                    r = s1 + cos4*s25 + cos2*s34
    1458   487794693 :                                                    s = sin4*r25 - sin2*r34
    1459   487794693 :                                                    zout(2, j, nout3) = r + s
    1460   512084995 :                                                    zout(2, j, nout4) = r - s
    1461             :                                                 END DO; END DO
    1462    10455708 :                                              DO 5000, ia = 2, after
    1463     7640720 :                                                 ias = ia - 1
    1464     7640720 :                                                 IF (8*ias .EQ. 5*after) THEN
    1465      549784 :                                                    IF (isign .EQ. 1) THEN
    1466      285466 :                                                       nin1 = ia - after
    1467      285466 :                                                       nout1 = ia - atn
    1468      871052 :                                                       DO ib = 1, before
    1469      585586 :                                                          nin1 = nin1 + after
    1470      585586 :                                                          nin2 = nin1 + atb
    1471      585586 :                                                          nin3 = nin2 + atb
    1472      585586 :                                                          nin4 = nin3 + atb
    1473      585586 :                                                          nin5 = nin4 + atb
    1474      585586 :                                                          nout1 = nout1 + atn
    1475      585586 :                                                          nout2 = nout1 + after
    1476      585586 :                                                          nout3 = nout2 + after
    1477      585586 :                                                          nout4 = nout3 + after
    1478      585586 :                                                          nout5 = nout4 + after
    1479    13041639 :                                                          DO j = 1, nfft
    1480    12170587 :                                                             r1 = zin(1, j, nin1)
    1481    12170587 :                                                             s1 = zin(2, j, nin1)
    1482    12170587 :                                                             r = zin(1, j, nin2)
    1483    12170587 :                                                             s = zin(2, j, nin2)
    1484    12170587 :                                                             r2 = (r - s)*rt2i
    1485    12170587 :                                                             s2 = (r + s)*rt2i
    1486    12170587 :                                                             r3 = zin(2, j, nin3)
    1487    12170587 :                                                             s3 = zin(1, j, nin3)
    1488    12170587 :                                                             r = zin(1, j, nin4)
    1489    12170587 :                                                             s = zin(2, j, nin4)
    1490    12170587 :                                                             r4 = (r + s)*rt2i
    1491    12170587 :                                                             s4 = (r - s)*rt2i
    1492    12170587 :                                                             r5 = zin(1, j, nin5)
    1493    12170587 :                                                             s5 = zin(2, j, nin5)
    1494    12170587 :                                                             r25 = r2 - r5
    1495    12170587 :                                                             r34 = r3 + r4
    1496    12170587 :                                                             s25 = s2 + s5
    1497    12170587 :                                                             s34 = s3 - s4
    1498    12170587 :                                                             zout(1, j, nout1) = r1 + r25 - r34
    1499    12170587 :                                                             r = r1 + cos2*r25 - cos4*r34
    1500    12170587 :                                                             s = sin2*s25 + sin4*s34
    1501    12170587 :                                                             zout(1, j, nout2) = r - s
    1502    12170587 :                                                             zout(1, j, nout5) = r + s
    1503    12170587 :                                                             r = r1 + cos4*r25 - cos2*r34
    1504    12170587 :                                                             s = sin4*s25 - sin2*s34
    1505    12170587 :                                                             zout(1, j, nout3) = r - s
    1506    12170587 :                                                             zout(1, j, nout4) = r + s
    1507    12170587 :                                                             r25 = r2 + r5
    1508    12170587 :                                                             r34 = r4 - r3
    1509    12170587 :                                                             s25 = s2 - s5
    1510    12170587 :                                                             s34 = s3 + s4
    1511    12170587 :                                                             zout(2, j, nout1) = s1 + s25 + s34
    1512    12170587 :                                                             r = s1 + cos2*s25 + cos4*s34
    1513    12170587 :                                                             s = sin2*r25 + sin4*r34
    1514    12170587 :                                                             zout(2, j, nout2) = r + s
    1515    12170587 :                                                             zout(2, j, nout5) = r - s
    1516    12170587 :                                                             r = s1 + cos4*s25 + cos2*s34
    1517    12170587 :                                                             s = sin4*r25 - sin2*r34
    1518    12170587 :                                                             zout(2, j, nout3) = r + s
    1519    12756173 :                                                             zout(2, j, nout4) = r - s
    1520             :                                                          END DO; END DO
    1521             :                                                    ELSE
    1522      264318 :                                                       nin1 = ia - after
    1523      264318 :                                                       nout1 = ia - atn
    1524      815580 :                                                       DO ib = 1, before
    1525      551262 :                                                          nin1 = nin1 + after
    1526      551262 :                                                          nin2 = nin1 + atb
    1527      551262 :                                                          nin3 = nin2 + atb
    1528      551262 :                                                          nin4 = nin3 + atb
    1529      551262 :                                                          nin5 = nin4 + atb
    1530      551262 :                                                          nout1 = nout1 + atn
    1531      551262 :                                                          nout2 = nout1 + after
    1532      551262 :                                                          nout3 = nout2 + after
    1533      551262 :                                                          nout4 = nout3 + after
    1534      551262 :                                                          nout5 = nout4 + after
    1535    12105660 :                                                          DO j = 1, nfft
    1536    11290080 :                                                             r1 = zin(1, j, nin1)
    1537    11290080 :                                                             s1 = zin(2, j, nin1)
    1538    11290080 :                                                             r = zin(1, j, nin2)
    1539    11290080 :                                                             s = zin(2, j, nin2)
    1540    11290080 :                                                             r2 = (r + s)*rt2i
    1541    11290080 :                                                             s2 = (s - r)*rt2i
    1542    11290080 :                                                             r3 = zin(2, j, nin3)
    1543    11290080 :                                                             s3 = zin(1, j, nin3)
    1544    11290080 :                                                             r = zin(1, j, nin4)
    1545    11290080 :                                                             s = zin(2, j, nin4)
    1546    11290080 :                                                             r4 = (s - r)*rt2i
    1547    11290080 :                                                             s4 = (r + s)*rt2i
    1548    11290080 :                                                             r5 = zin(1, j, nin5)
    1549    11290080 :                                                             s5 = zin(2, j, nin5)
    1550    11290080 :                                                             r25 = r2 - r5
    1551    11290080 :                                                             r34 = r3 + r4
    1552    11290080 :                                                             s25 = s2 + s5
    1553    11290080 :                                                             s34 = s4 - s3
    1554    11290080 :                                                             zout(1, j, nout1) = r1 + r25 + r34
    1555    11290080 :                                                             r = r1 + cos2*r25 + cos4*r34
    1556    11290080 :                                                             s = sin2*s25 + sin4*s34
    1557    11290080 :                                                             zout(1, j, nout2) = r - s
    1558    11290080 :                                                             zout(1, j, nout5) = r + s
    1559    11290080 :                                                             r = r1 + cos4*r25 + cos2*r34
    1560    11290080 :                                                             s = sin4*s25 - sin2*s34
    1561    11290080 :                                                             zout(1, j, nout3) = r - s
    1562    11290080 :                                                             zout(1, j, nout4) = r + s
    1563    11290080 :                                                             r25 = r2 + r5
    1564    11290080 :                                                             r34 = r3 - r4
    1565    11290080 :                                                             s25 = s2 - s5
    1566    11290080 :                                                             s34 = s3 + s4
    1567    11290080 :                                                             zout(2, j, nout1) = s1 + s25 - s34
    1568    11290080 :                                                             r = s1 + cos2*s25 - cos4*s34
    1569    11290080 :                                                             s = sin2*r25 + sin4*r34
    1570    11290080 :                                                             zout(2, j, nout2) = r + s
    1571    11290080 :                                                             zout(2, j, nout5) = r - s
    1572    11290080 :                                                             r = s1 + cos4*s25 - cos2*s34
    1573    11290080 :                                                             s = sin4*r25 - sin2*r34
    1574    11290080 :                                                             zout(2, j, nout3) = r + s
    1575    11841342 :                                                             zout(2, j, nout4) = r - s
    1576             :                                                          END DO; END DO
    1577             :                                                    END IF
    1578             :                                                 ELSE
    1579     7090936 :                                                    ias = ia - 1
    1580     7090936 :                                                    itt = ias*before
    1581     7090936 :                                                    itrig = itt + 1
    1582     7090936 :                                                    cr2 = trig(1, itrig)
    1583     7090936 :                                                    ci2 = trig(2, itrig)
    1584     7090936 :                                                    itrig = itrig + itt
    1585     7090936 :                                                    cr3 = trig(1, itrig)
    1586     7090936 :                                                    ci3 = trig(2, itrig)
    1587     7090936 :                                                    itrig = itrig + itt
    1588     7090936 :                                                    cr4 = trig(1, itrig)
    1589     7090936 :                                                    ci4 = trig(2, itrig)
    1590     7090936 :                                                    itrig = itrig + itt
    1591     7090936 :                                                    cr5 = trig(1, itrig)
    1592     7090936 :                                                    ci5 = trig(2, itrig)
    1593     7090936 :                                                    nin1 = ia - after
    1594     7090936 :                                                    nout1 = ia - atn
    1595    23501536 :                                                    DO ib = 1, before
    1596    16410600 :                                                       nin1 = nin1 + after
    1597    16410600 :                                                       nin2 = nin1 + atb
    1598    16410600 :                                                       nin3 = nin2 + atb
    1599    16410600 :                                                       nin4 = nin3 + atb
    1600    16410600 :                                                       nin5 = nin4 + atb
    1601    16410600 :                                                       nout1 = nout1 + atn
    1602    16410600 :                                                       nout2 = nout1 + after
    1603    16410600 :                                                       nout3 = nout2 + after
    1604    16410600 :                                                       nout4 = nout3 + after
    1605    16410600 :                                                       nout5 = nout4 + after
    1606   335173138 :                                                       DO j = 1, nfft
    1607   311671602 :                                                          r1 = zin(1, j, nin1)
    1608   311671602 :                                                          s1 = zin(2, j, nin1)
    1609   311671602 :                                                          r = zin(1, j, nin2)
    1610   311671602 :                                                          s = zin(2, j, nin2)
    1611   311671602 :                                                          r2 = r*cr2 - s*ci2
    1612   311671602 :                                                          s2 = r*ci2 + s*cr2
    1613   311671602 :                                                          r = zin(1, j, nin3)
    1614   311671602 :                                                          s = zin(2, j, nin3)
    1615   311671602 :                                                          r3 = r*cr3 - s*ci3
    1616   311671602 :                                                          s3 = r*ci3 + s*cr3
    1617   311671602 :                                                          r = zin(1, j, nin4)
    1618   311671602 :                                                          s = zin(2, j, nin4)
    1619   311671602 :                                                          r4 = r*cr4 - s*ci4
    1620   311671602 :                                                          s4 = r*ci4 + s*cr4
    1621   311671602 :                                                          r = zin(1, j, nin5)
    1622   311671602 :                                                          s = zin(2, j, nin5)
    1623   311671602 :                                                          r5 = r*cr5 - s*ci5
    1624   311671602 :                                                          s5 = r*ci5 + s*cr5
    1625   311671602 :                                                          r25 = r2 + r5
    1626   311671602 :                                                          r34 = r3 + r4
    1627   311671602 :                                                          s25 = s2 - s5
    1628   311671602 :                                                          s34 = s3 - s4
    1629   311671602 :                                                          zout(1, j, nout1) = r1 + r25 + r34
    1630   311671602 :                                                          r = r1 + cos2*r25 + cos4*r34
    1631   311671602 :                                                          s = sin2*s25 + sin4*s34
    1632   311671602 :                                                          zout(1, j, nout2) = r - s
    1633   311671602 :                                                          zout(1, j, nout5) = r + s
    1634   311671602 :                                                          r = r1 + cos4*r25 + cos2*r34
    1635   311671602 :                                                          s = sin4*s25 - sin2*s34
    1636   311671602 :                                                          zout(1, j, nout3) = r - s
    1637   311671602 :                                                          zout(1, j, nout4) = r + s
    1638   311671602 :                                                          r25 = r2 - r5
    1639   311671602 :                                                          r34 = r3 - r4
    1640   311671602 :                                                          s25 = s2 + s5
    1641   311671602 :                                                          s34 = s3 + s4
    1642   311671602 :                                                          zout(2, j, nout1) = s1 + s25 + s34
    1643   311671602 :                                                          r = s1 + cos2*s25 + cos4*s34
    1644   311671602 :                                                          s = sin2*r25 + sin4*r34
    1645   311671602 :                                                          zout(2, j, nout2) = r + s
    1646   311671602 :                                                          zout(2, j, nout5) = r - s
    1647   311671602 :                                                          r = s1 + cos4*s25 + cos2*s34
    1648   311671602 :                                                          s = sin4*r25 - sin2*r34
    1649   311671602 :                                                          zout(2, j, nout3) = r + s
    1650   328082202 :                                                          zout(2, j, nout4) = r - s
    1651             :                                                       END DO; END DO
    1652             :                                                 END IF
    1653     2814988 : 5000                                            CONTINUE
    1654             :                                                 ELSE IF (now .EQ. 6) THEN
    1655             : !         .5_dp*sqrt(3._dp)
    1656     2756253 :                                                 bb = isign*0.8660254037844387_dp
    1657             : 
    1658     2756253 :                                                 ia = 1
    1659     2756253 :                                                 nin1 = ia - after
    1660     2756253 :                                                 nout1 = ia - atn
    1661    38070012 :                                                 DO ib = 1, before
    1662    35313759 :                                                    nin1 = nin1 + after
    1663    35313759 :                                                    nin2 = nin1 + atb
    1664    35313759 :                                                    nin3 = nin2 + atb
    1665    35313759 :                                                    nin4 = nin3 + atb
    1666    35313759 :                                                    nin5 = nin4 + atb
    1667    35313759 :                                                    nin6 = nin5 + atb
    1668    35313759 :                                                    nout1 = nout1 + atn
    1669    35313759 :                                                    nout2 = nout1 + after
    1670    35313759 :                                                    nout3 = nout2 + after
    1671    35313759 :                                                    nout4 = nout3 + after
    1672    35313759 :                                                    nout5 = nout4 + after
    1673    35313759 :                                                    nout6 = nout5 + after
    1674   618507428 :                                                    DO j = 1, nfft
    1675   580437416 :                                                       r2 = zin(1, j, nin3)
    1676   580437416 :                                                       s2 = zin(2, j, nin3)
    1677   580437416 :                                                       r3 = zin(1, j, nin5)
    1678   580437416 :                                                       s3 = zin(2, j, nin5)
    1679   580437416 :                                                       r = r2 + r3
    1680   580437416 :                                                       s = s2 + s3
    1681   580437416 :                                                       r1 = zin(1, j, nin1)
    1682   580437416 :                                                       s1 = zin(2, j, nin1)
    1683   580437416 :                                                       ur1 = r + r1
    1684   580437416 :                                                       ui1 = s + s1
    1685   580437416 :                                                       r1 = r1 - .5_dp*r
    1686   580437416 :                                                       s1 = s1 - .5_dp*s
    1687   580437416 :                                                       r = r2 - r3
    1688   580437416 :                                                       s = s2 - s3
    1689   580437416 :                                                       ur2 = r1 - s*bb
    1690   580437416 :                                                       ui2 = s1 + r*bb
    1691   580437416 :                                                       ur3 = r1 + s*bb
    1692   580437416 :                                                       ui3 = s1 - r*bb
    1693             : 
    1694   580437416 :                                                       r2 = zin(1, j, nin6)
    1695   580437416 :                                                       s2 = zin(2, j, nin6)
    1696   580437416 :                                                       r3 = zin(1, j, nin2)
    1697   580437416 :                                                       s3 = zin(2, j, nin2)
    1698   580437416 :                                                       r = r2 + r3
    1699   580437416 :                                                       s = s2 + s3
    1700   580437416 :                                                       r1 = zin(1, j, nin4)
    1701   580437416 :                                                       s1 = zin(2, j, nin4)
    1702   580437416 :                                                       vr1 = r + r1
    1703   580437416 :                                                       vi1 = s + s1
    1704   580437416 :                                                       r1 = r1 - .5_dp*r
    1705   580437416 :                                                       s1 = s1 - .5_dp*s
    1706   580437416 :                                                       r = r2 - r3
    1707   580437416 :                                                       s = s2 - s3
    1708   580437416 :                                                       vr2 = r1 - s*bb
    1709   580437416 :                                                       vi2 = s1 + r*bb
    1710   580437416 :                                                       vr3 = r1 + s*bb
    1711   580437416 :                                                       vi3 = s1 - r*bb
    1712             : 
    1713   580437416 :                                                       zout(1, j, nout1) = ur1 + vr1
    1714   580437416 :                                                       zout(2, j, nout1) = ui1 + vi1
    1715   580437416 :                                                       zout(1, j, nout5) = ur2 + vr2
    1716   580437416 :                                                       zout(2, j, nout5) = ui2 + vi2
    1717   580437416 :                                                       zout(1, j, nout3) = ur3 + vr3
    1718   580437416 :                                                       zout(2, j, nout3) = ui3 + vi3
    1719   580437416 :                                                       zout(1, j, nout4) = ur1 - vr1
    1720   580437416 :                                                       zout(2, j, nout4) = ui1 - vi1
    1721   580437416 :                                                       zout(1, j, nout2) = ur2 - vr2
    1722   580437416 :                                                       zout(2, j, nout2) = ui2 - vi2
    1723   580437416 :                                                       zout(1, j, nout6) = ur3 - vr3
    1724   615751175 :                                                       zout(2, j, nout6) = ui3 - vi3
    1725             :                                                    END DO; END DO
    1726             :                                                 ELSE
    1727           0 :                                                 CPABORT("error fftstp")
    1728             :                                                 END IF
    1729             : 
    1730    21418742 :                                                 END SUBROUTINE fftstp
    1731             : 
    1732             :                                                 END MODULE ps_wavelet_fft3d

Generated by: LCOV version 1.15