1 subroutine zmf2kf ( lot, ido, l1, na, cc, im1, in1, ch, im2, in2, wa )
3 !*****************************************************************************80
5 !! ZMF2KF is an FFTPACK5 auxiliary routine.
15 ! Original complex single precision by Paul Swarztrauber, Richard Valent.
16 ! Complex double precision version by John Burkardt.
21 ! Vectorizing the Fast Fourier Transforms,
22 ! in Parallel Computations,
23 ! edited by G. Rodrigue,
24 ! Academic Press, 1982.
27 ! Fast Fourier Transform Algorithms for Vector Computers,
28 ! Parallel Computing, pages 45-63, 1984.
34 integer ( kind = 4 ) ido
35 integer ( kind = 4 ) in1
36 integer ( kind = 4 ) in2
37 integer ( kind = 4 ) l1
39 real ( kind = 8 ) cc(2,in1,l1,ido,2)
40 real ( kind = 8 ) ch(2,in2,l1,2,ido)
41 real ( kind = 8 ) chold1
42 real ( kind = 8 ) chold2
43 integer ( kind = 4 ) i
44 integer ( kind = 4 ) im1
45 integer ( kind = 4 ) im2
46 integer ( kind = 4 ) k
47 integer ( kind = 4 ) lid
48 integer ( kind = 4 ) lot
49 integer ( kind = 4 ) m1
50 integer ( kind = 4 ) m1d
51 integer ( kind = 4 ) m2
52 integer ( kind = 4 ) m2s
53 integer ( kind = 4 ) n
54 integer ( kind = 4 ) na
58 real ( kind = 8 ) wa(ido,1,2)
60 m1d = ( lot - 1 ) * im1 + 1
69 ch(1,m2,k,1,1) = cc(1,m1,k,1,1)+cc(1,m1,k,1,2)
70 ch(1,m2,k,2,1) = cc(1,m1,k,1,1)-cc(1,m1,k,1,2)
71 ch(2,m2,k,1,1) = cc(2,m1,k,1,1)+cc(2,m1,k,1,2)
72 ch(2,m2,k,2,1) = cc(2,m1,k,1,1)-cc(2,m1,k,1,2)
81 ch(1,m2,k,1,i) = cc(1,m1,k,i,1)+cc(1,m1,k,i,2)
82 tr2 = cc(1,m1,k,i,1)-cc(1,m1,k,i,2)
83 ch(2,m2,k,1,i) = cc(2,m1,k,i,1)+cc(2,m1,k,i,2)
84 ti2 = cc(2,m1,k,i,1)-cc(2,m1,k,i,2)
85 ch(2,m2,k,2,i) = wa(i,1,1)*ti2-wa(i,1,2)*tr2
86 ch(1,m2,k,2,i) = wa(i,1,1)*tr2+wa(i,1,2)*ti2
91 else if ( na == 1 ) then
93 sn = 1.0D+00 / real ( 2 * l1, kind = 8 )
99 ch(1,m2,k,1,1) = sn * ( cc(1,m1,k,1,1) + cc(1,m1,k,1,2) )
100 ch(1,m2,k,2,1) = sn * ( cc(1,m1,k,1,1) - cc(1,m1,k,1,2) )
101 ch(2,m2,k,1,1) = sn * ( cc(2,m1,k,1,1) + cc(2,m1,k,1,2) )
102 ch(2,m2,k,2,1) = sn * ( cc(2,m1,k,1,1) - cc(2,m1,k,1,2) )
108 sn = 1.0D+00 / real ( 2 * l1, kind = 8 )
113 chold1 = sn * ( cc(1,m1,k,1,1) + cc(1,m1,k,1,2) )
114 cc(1,m1,k,1,2) = sn * ( cc(1,m1,k,1,1) - cc(1,m1,k,1,2) )
115 cc(1,m1,k,1,1) = chold1
117 chold2 = sn * ( cc(2,m1,k,1,1) + cc(2,m1,k,1,2) )
118 cc(2,m1,k,1,2) = sn * ( cc(2,m1,k,1,1) - cc(2,m1,k,1,2) )
119 cc(2,m1,k,1,1) = chold2