1 subroutine zmf5kf ( lot, ido, l1, na, cc, im1, in1, ch, im2, in2, wa )
3 !*****************************************************************************80
5 !! ZMF5KF 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,5)
40 real ( kind = 8 ) ch(2,in2,l1,5,ido)
41 real ( kind = 8 ) chold1
42 real ( kind = 8 ) chold2
59 integer ( kind = 4 ) i
60 integer ( kind = 4 ) im1
61 integer ( kind = 4 ) im2
62 integer ( kind = 4 ) k
63 integer ( kind = 4 ) lot
64 integer ( kind = 4 ) m1
65 integer ( kind = 4 ) m1d
66 integer ( kind = 4 ) m2
67 integer ( kind = 4 ) m2s
68 integer ( kind = 4 ) na
74 real ( kind = 8 ), parameter :: ti11 = -0.9510565162951536D+00
75 real ( kind = 8 ), parameter :: ti12 = -0.5877852522924731D+00
80 real ( kind = 8 ), parameter :: tr11 = 0.3090169943749474D+00
81 real ( kind = 8 ), parameter :: tr12 = -0.8090169943749474D+00
82 real ( kind = 8 ) wa(ido,4,2)
84 m1d = ( lot - 1 ) * im1 + 1
93 ti5 = cc(2,m1,k,1,2)-cc(2,m1,k,1,5)
94 ti2 = cc(2,m1,k,1,2)+cc(2,m1,k,1,5)
95 ti4 = cc(2,m1,k,1,3)-cc(2,m1,k,1,4)
96 ti3 = cc(2,m1,k,1,3)+cc(2,m1,k,1,4)
97 tr5 = cc(1,m1,k,1,2)-cc(1,m1,k,1,5)
98 tr2 = cc(1,m1,k,1,2)+cc(1,m1,k,1,5)
99 tr4 = cc(1,m1,k,1,3)-cc(1,m1,k,1,4)
100 tr3 = cc(1,m1,k,1,3)+cc(1,m1,k,1,4)
101 ch(1,m2,k,1,1) = cc(1,m1,k,1,1)+tr2+tr3
102 ch(2,m2,k,1,1) = cc(2,m1,k,1,1)+ti2+ti3
103 cr2 = cc(1,m1,k,1,1)+tr11*tr2+tr12*tr3
104 ci2 = cc(2,m1,k,1,1)+tr11*ti2+tr12*ti3
105 cr3 = cc(1,m1,k,1,1)+tr12*tr2+tr11*tr3
106 ci3 = cc(2,m1,k,1,1)+tr12*ti2+tr11*ti3
107 cr5 = ti11*tr5+ti12*tr4
108 ci5 = ti11*ti5+ti12*ti4
109 cr4 = ti12*tr5-ti11*tr4
110 ci4 = ti12*ti5-ti11*ti4
111 ch(1,m2,k,2,1) = cr2-ci5
112 ch(1,m2,k,5,1) = cr2+ci5
113 ch(2,m2,k,2,1) = ci2+cr5
114 ch(2,m2,k,3,1) = ci3+cr4
115 ch(1,m2,k,3,1) = cr3-ci4
116 ch(1,m2,k,4,1) = cr3+ci4
117 ch(2,m2,k,4,1) = ci3-cr4
118 ch(2,m2,k,5,1) = ci2-cr5
127 ti5 = cc(2,m1,k,i,2)-cc(2,m1,k,i,5)
128 ti2 = cc(2,m1,k,i,2)+cc(2,m1,k,i,5)
129 ti4 = cc(2,m1,k,i,3)-cc(2,m1,k,i,4)
130 ti3 = cc(2,m1,k,i,3)+cc(2,m1,k,i,4)
131 tr5 = cc(1,m1,k,i,2)-cc(1,m1,k,i,5)
132 tr2 = cc(1,m1,k,i,2)+cc(1,m1,k,i,5)
133 tr4 = cc(1,m1,k,i,3)-cc(1,m1,k,i,4)
134 tr3 = cc(1,m1,k,i,3)+cc(1,m1,k,i,4)
135 ch(1,m2,k,1,i) = cc(1,m1,k,i,1)+tr2+tr3
136 ch(2,m2,k,1,i) = cc(2,m1,k,i,1)+ti2+ti3
137 cr2 = cc(1,m1,k,i,1)+tr11*tr2+tr12*tr3
138 ci2 = cc(2,m1,k,i,1)+tr11*ti2+tr12*ti3
139 cr3 = cc(1,m1,k,i,1)+tr12*tr2+tr11*tr3
140 ci3 = cc(2,m1,k,i,1)+tr12*ti2+tr11*ti3
141 cr5 = ti11*tr5+ti12*tr4
142 ci5 = ti11*ti5+ti12*ti4
143 cr4 = ti12*tr5-ti11*tr4
144 ci4 = ti12*ti5-ti11*ti4
153 ch(1,m2,k,2,i) = wa(i,1,1)*dr2+wa(i,1,2)*di2
154 ch(2,m2,k,2,i) = wa(i,1,1)*di2-wa(i,1,2)*dr2
155 ch(1,m2,k,3,i) = wa(i,2,1)*dr3+wa(i,2,2)*di3
156 ch(2,m2,k,3,i) = wa(i,2,1)*di3-wa(i,2,2)*dr3
157 ch(1,m2,k,4,i) = wa(i,3,1)*dr4+wa(i,3,2)*di4
158 ch(2,m2,k,4,i) = wa(i,3,1)*di4-wa(i,3,2)*dr4
159 ch(1,m2,k,5,i) = wa(i,4,1)*dr5+wa(i,4,2)*di5
160 ch(2,m2,k,5,i) = wa(i,4,1)*di5-wa(i,4,2)*dr5
165 else if ( na == 1 ) then
167 sn = 1.0D+00 / real ( 5 * l1, kind = 8 )
173 ti5 = cc(2,m1,k,1,2)-cc(2,m1,k,1,5)
174 ti2 = cc(2,m1,k,1,2)+cc(2,m1,k,1,5)
175 ti4 = cc(2,m1,k,1,3)-cc(2,m1,k,1,4)
176 ti3 = cc(2,m1,k,1,3)+cc(2,m1,k,1,4)
177 tr5 = cc(1,m1,k,1,2)-cc(1,m1,k,1,5)
178 tr2 = cc(1,m1,k,1,2)+cc(1,m1,k,1,5)
179 tr4 = cc(1,m1,k,1,3)-cc(1,m1,k,1,4)
180 tr3 = cc(1,m1,k,1,3)+cc(1,m1,k,1,4)
181 ch(1,m2,k,1,1) = sn*(cc(1,m1,k,1,1)+tr2+tr3)
182 ch(2,m2,k,1,1) = sn*(cc(2,m1,k,1,1)+ti2+ti3)
183 cr2 = cc(1,m1,k,1,1)+tr11*tr2+tr12*tr3
184 ci2 = cc(2,m1,k,1,1)+tr11*ti2+tr12*ti3
185 cr3 = cc(1,m1,k,1,1)+tr12*tr2+tr11*tr3
186 ci3 = cc(2,m1,k,1,1)+tr12*ti2+tr11*ti3
187 cr5 = ti11*tr5+ti12*tr4
188 ci5 = ti11*ti5+ti12*ti4
189 cr4 = ti12*tr5-ti11*tr4
190 ci4 = ti12*ti5-ti11*ti4
191 ch(1,m2,k,2,1) = sn*(cr2-ci5)
192 ch(1,m2,k,5,1) = sn*(cr2+ci5)
193 ch(2,m2,k,2,1) = sn*(ci2+cr5)
194 ch(2,m2,k,3,1) = sn*(ci3+cr4)
195 ch(1,m2,k,3,1) = sn*(cr3-ci4)
196 ch(1,m2,k,4,1) = sn*(cr3+ci4)
197 ch(2,m2,k,4,1) = sn*(ci3-cr4)
198 ch(2,m2,k,5,1) = sn*(ci2-cr5)
204 sn = 1.0D+00 / real ( 5 * l1, kind = 8 )
209 ti5 = cc(2,m1,k,1,2) - cc(2,m1,k,1,5)
210 ti2 = cc(2,m1,k,1,2) + cc(2,m1,k,1,5)
211 ti4 = cc(2,m1,k,1,3) - cc(2,m1,k,1,4)
212 ti3 = cc(2,m1,k,1,3) + cc(2,m1,k,1,4)
213 tr5 = cc(1,m1,k,1,2) - cc(1,m1,k,1,5)
214 tr2 = cc(1,m1,k,1,2) + cc(1,m1,k,1,5)
215 tr4 = cc(1,m1,k,1,3) - cc(1,m1,k,1,4)
216 tr3 = cc(1,m1,k,1,3) + cc(1,m1,k,1,4)
218 chold1 = sn * ( cc(1,m1,k,1,1) + tr2 + tr3 )
219 chold2 = sn * ( cc(2,m1,k,1,1) + ti2 + ti3 )
221 cr2 = cc(1,m1,k,1,1) + tr11 * tr2 + tr12 * tr3
222 ci2 = cc(2,m1,k,1,1) + tr11 * ti2 + tr12 * ti3
223 cr3 = cc(1,m1,k,1,1) + tr12 * tr2 + tr11 * tr3
224 ci3 = cc(2,m1,k,1,1) + tr12 * ti2 + tr11 * ti3
226 cc(1,m1,k,1,1) = chold1
227 cc(2,m1,k,1,1) = chold2
229 cr5 = ti11 * tr5 + ti12 * tr4
230 ci5 = ti11 * ti5 + ti12 * ti4
231 cr4 = ti12 * tr5 - ti11 * tr4
232 ci4 = ti12 * ti5 - ti11 * ti4
234 cc(1,m1,k,1,2) = sn * ( cr2 - ci5 )
235 cc(1,m1,k,1,5) = sn * ( cr2 + ci5 )
236 cc(2,m1,k,1,2) = sn * ( ci2 + cr5 )
237 cc(2,m1,k,1,3) = sn * ( ci3 + cr4 )
238 cc(1,m1,k,1,3) = sn * ( cr3 - ci4 )
239 cc(1,m1,k,1,4) = sn * ( cr3 + ci4 )
240 cc(2,m1,k,1,4) = sn * ( ci3 - cr4 )
241 cc(2,m1,k,1,5) = sn * ( ci2 - cr5 )