1 subroutine mradf4 ( m, ido, l1, cc, im1, in1, ch, im2, in2, wa1, wa2, wa3 )
3 !*****************************************************************************80
5 !! MRADF4 is an FFTPACK5 auxiliary routine.
8 ! Copyright (C) 1995-2004, Scientific Computing Division,
9 ! University Corporation for Atmospheric Research
23 ! Vectorizing the Fast Fourier Transforms,
24 ! in Parallel Computations,
25 ! edited by G. Rodrigue,
26 ! Academic Press, 1982.
29 ! Fast Fourier Transform Algorithms for Vector Computers,
30 ! Parallel Computing, pages 45-63, 1984.
36 integer ( kind = 4 ) ido
37 integer ( kind = 4 ) in1
38 integer ( kind = 4 ) in2
39 integer ( kind = 4 ) l1
41 real ( kind = 4 ) cc(in1,ido,l1,4)
42 real ( kind = 4 ) ch(in2,ido,4,l1)
43 real ( kind = 4 ) hsqt2
44 integer ( kind = 4 ) i
45 integer ( kind = 4 ) ic
46 integer ( kind = 4 ) idp2
47 integer ( kind = 4 ) im1
48 integer ( kind = 4 ) im2
49 integer ( kind = 4 ) k
50 integer ( kind = 4 ) m
51 integer ( kind = 4 ) m1
52 integer ( kind = 4 ) m1d
53 integer ( kind = 4 ) m2
54 integer ( kind = 4 ) m2s
55 real ( kind = 4 ) wa1(ido)
56 real ( kind = 4 ) wa2(ido)
57 real ( kind = 4 ) wa3(ido)
59 hsqt2 = sqrt ( 2.0E+00 ) / 2.0E+00
60 m1d = ( m - 1 ) * im1 + 1
67 ch(m2,1,1,k) = ( cc(m1,1,k,2) + cc(m1,1,k,4) ) &
68 + ( cc(m1,1,k,1) + cc(m1,1,k,3) )
69 ch(m2,ido,4,k) = ( cc(m1,1,k,1) + cc(m1,1,k,3) ) &
70 -( cc(m1,1,k,2) + cc(m1,1,k,4) )
71 ch(m2,ido,2,k) = cc(m1,1,k,1) - cc(m1,1,k,3)
72 ch(m2,1,3,k) = cc(m1,1,k,4) - cc(m1,1,k,2)
90 ch(m2,i-1,1,k) = ((wa1(i-2)*cc(m1,i-1,k,2) + wa1(i-1)* &
91 cc(m1,i,k,2))+(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m1,i,k,4)-wa3(i-1)* &
114 ch(m2,i,3,k) = ((wa3(i-2)*cc(m1,i-1,k,4) + wa3(i-1)* &
115 cc(m1,i,k,4))-(wa1(i-2)*cc(m1,i-1,k,2) + wa1(i-1)* &
116 cc(m1,i,k,2)))+(cc(m1,i,k,1)-(wa2(i-2)*cc(m1,i,k,3)- &
117 wa2(i-1)*cc(m1,i-1,k,3)))
118 ch(m2,ic,2,k) = ((wa3(i-2)*cc(m1,i-1,k,4) + wa3(i-1)* &
119 cc(m1,i,k,4))-(wa1(i-2)*cc(m1,i-1,k,2) + wa1(i-1)* &
120 cc(m1,i,k,2)))-(cc(m1,i,k,1)-(wa2(i-2)*cc(m1,i,k,3)- &
121 wa2(i-1)*cc(m1,i-1,k,3)))
126 if ( mod ( ido, 2 ) == 1 ) then
136 ch(m2,ido,1,k) = cc(m1,ido,k,1) &
137 + ( hsqt2 * ( cc(m1,ido,k,2) - cc(m1,ido,k,4) ) )
138 ch(m2,ido,3,k) = cc(m1,ido,k,1) &
139 - ( hsqt2 * ( cc(m1,ido,k,2) - cc(m1,ido,k,4) ) )
140 ch(m2,1,2,k) = -cc(m1,ido,k,3) &
141 + ( -hsqt2 * ( cc(m1,ido,k,2) + cc(m1,ido,k,4) ) )
142 ch(m2,1,4,k) = cc(m1,ido,k,3) &
143 + ( -hsqt2 * ( cc(m1,ido,k,2) + cc(m1,ido,k,4) ) )