1 subroutine zmf4kf ( lot, ido, l1, na, cc, im1, in1, ch, im2, in2, wa )
3 !*****************************************************************************80
5 !! ZMF4KF 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,4)
40 real ( kind = 8 ) ch(2,in2,l1,4,ido)
47 integer ( kind = 4 ) i
48 integer ( kind = 4 ) im1
49 integer ( kind = 4 ) im2
50 integer ( kind = 4 ) k
51 integer ( kind = 4 ) lot
52 integer ( kind = 4 ) m1
53 integer ( kind = 4 ) m1d
54 integer ( kind = 4 ) m2
55 integer ( kind = 4 ) m2s
56 integer ( kind = 4 ) na
66 real ( kind = 8 ) wa(ido,3,2)
68 m1d = ( lot - 1 ) * im1 + 1
77 ti1 = cc(2,m1,k,1,1)-cc(2,m1,k,1,3)
78 ti2 = cc(2,m1,k,1,1)+cc(2,m1,k,1,3)
79 tr4 = cc(2,m1,k,1,2)-cc(2,m1,k,1,4)
80 ti3 = cc(2,m1,k,1,2)+cc(2,m1,k,1,4)
81 tr1 = cc(1,m1,k,1,1)-cc(1,m1,k,1,3)
82 tr2 = cc(1,m1,k,1,1)+cc(1,m1,k,1,3)
83 ti4 = cc(1,m1,k,1,4)-cc(1,m1,k,1,2)
84 tr3 = cc(1,m1,k,1,2)+cc(1,m1,k,1,4)
85 ch(1,m2,k,1,1) = tr2+tr3
86 ch(1,m2,k,3,1) = tr2-tr3
87 ch(2,m2,k,1,1) = ti2+ti3
88 ch(2,m2,k,3,1) = ti2-ti3
89 ch(1,m2,k,2,1) = tr1+tr4
90 ch(1,m2,k,4,1) = tr1-tr4
91 ch(2,m2,k,2,1) = ti1+ti4
92 ch(2,m2,k,4,1) = ti1-ti4
101 ti1 = cc(2,m1,k,i,1)-cc(2,m1,k,i,3)
102 ti2 = cc(2,m1,k,i,1)+cc(2,m1,k,i,3)
103 ti3 = cc(2,m1,k,i,2)+cc(2,m1,k,i,4)
104 tr4 = cc(2,m1,k,i,2)-cc(2,m1,k,i,4)
105 tr1 = cc(1,m1,k,i,1)-cc(1,m1,k,i,3)
106 tr2 = cc(1,m1,k,i,1)+cc(1,m1,k,i,3)
107 ti4 = cc(1,m1,k,i,4)-cc(1,m1,k,i,2)
108 tr3 = cc(1,m1,k,i,2)+cc(1,m1,k,i,4)
109 ch(1,m2,k,1,i) = tr2+tr3
111 ch(2,m2,k,1,i) = ti2+ti3
117 ch(1,m2,k,2,i) = wa(i,1,1)*cr2+wa(i,1,2)*ci2
118 ch(2,m2,k,2,i) = wa(i,1,1)*ci2-wa(i,1,2)*cr2
119 ch(1,m2,k,3,i) = wa(i,2,1)*cr3+wa(i,2,2)*ci3
120 ch(2,m2,k,3,i) = wa(i,2,1)*ci3-wa(i,2,2)*cr3
121 ch(1,m2,k,4,i) = wa(i,3,1)*cr4+wa(i,3,2)*ci4
122 ch(2,m2,k,4,i) = wa(i,3,1)*ci4-wa(i,3,2)*cr4
127 else if ( na == 1 ) then
129 sn = 1.0D+00 / real ( 4 * l1, kind = 8 )
135 ti1 = cc(2,m1,k,1,1)-cc(2,m1,k,1,3)
136 ti2 = cc(2,m1,k,1,1)+cc(2,m1,k,1,3)
137 tr4 = cc(2,m1,k,1,2)-cc(2,m1,k,1,4)
138 ti3 = cc(2,m1,k,1,2)+cc(2,m1,k,1,4)
139 tr1 = cc(1,m1,k,1,1)-cc(1,m1,k,1,3)
140 tr2 = cc(1,m1,k,1,1)+cc(1,m1,k,1,3)
141 ti4 = cc(1,m1,k,1,4)-cc(1,m1,k,1,2)
142 tr3 = cc(1,m1,k,1,2)+cc(1,m1,k,1,4)
143 ch(1,m2,k,1,1) = sn*(tr2+tr3)
144 ch(1,m2,k,3,1) = sn*(tr2-tr3)
145 ch(2,m2,k,1,1) = sn*(ti2+ti3)
146 ch(2,m2,k,3,1) = sn*(ti2-ti3)
147 ch(1,m2,k,2,1) = sn*(tr1+tr4)
148 ch(1,m2,k,4,1) = sn*(tr1-tr4)
149 ch(2,m2,k,2,1) = sn*(ti1+ti4)
150 ch(2,m2,k,4,1) = sn*(ti1-ti4)
156 sn = 1.0D+00 / real ( 4 * l1, kind = 8 )
160 ti1 = cc(2,m1,k,1,1)-cc(2,m1,k,1,3)
161 ti2 = cc(2,m1,k,1,1)+cc(2,m1,k,1,3)
162 tr4 = cc(2,m1,k,1,2)-cc(2,m1,k,1,4)
163 ti3 = cc(2,m1,k,1,2)+cc(2,m1,k,1,4)
164 tr1 = cc(1,m1,k,1,1)-cc(1,m1,k,1,3)
165 tr2 = cc(1,m1,k,1,1)+cc(1,m1,k,1,3)
166 ti4 = cc(1,m1,k,1,4)-cc(1,m1,k,1,2)
167 tr3 = cc(1,m1,k,1,2)+cc(1,m1,k,1,4)
168 cc(1,m1,k,1,1) = sn*(tr2+tr3)
169 cc(1,m1,k,1,3) = sn*(tr2-tr3)
170 cc(2,m1,k,1,1) = sn*(ti2+ti3)
171 cc(2,m1,k,1,3) = sn*(ti2-ti3)
172 cc(1,m1,k,1,2) = sn*(tr1+tr4)
173 cc(1,m1,k,1,4) = sn*(tr1-tr4)
174 cc(2,m1,k,1,2) = sn*(ti1+ti4)
175 cc(2,m1,k,1,4) = sn*(ti1-ti4)