1 subroutine z1f4kf ( ido, l1, na, cc, in1, ch, in2, wa )
3 !*****************************************************************************80
5 !! Z1F4KF 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(in1,l1,ido,4)
40 real ( kind = 8 ) ch(in2,l1,4,ido)
47 integer ( kind = 4 ) i
48 integer ( kind = 4 ) k
49 integer ( kind = 4 ) na
59 real ( kind = 8 ) wa(ido,3,2)
65 ti1 = cc(2,k,1,1)-cc(2,k,1,3)
66 ti2 = cc(2,k,1,1)+cc(2,k,1,3)
67 tr4 = cc(2,k,1,2)-cc(2,k,1,4)
68 ti3 = cc(2,k,1,2)+cc(2,k,1,4)
69 tr1 = cc(1,k,1,1)-cc(1,k,1,3)
70 tr2 = cc(1,k,1,1)+cc(1,k,1,3)
71 ti4 = cc(1,k,1,4)-cc(1,k,1,2)
72 tr3 = cc(1,k,1,2)+cc(1,k,1,4)
74 ch(1,k,1,1) = tr2 + tr3
75 ch(1,k,3,1) = tr2 - tr3
76 ch(2,k,1,1) = ti2 + ti3
77 ch(2,k,3,1) = ti2 - ti3
78 ch(1,k,2,1) = tr1 + tr4
79 ch(1,k,4,1) = tr1 - tr4
80 ch(2,k,2,1) = ti1 + ti4
81 ch(2,k,4,1) = ti1 - ti4
87 ti1 = cc(2,k,i,1)-cc(2,k,i,3)
88 ti2 = cc(2,k,i,1)+cc(2,k,i,3)
89 ti3 = cc(2,k,i,2)+cc(2,k,i,4)
90 tr4 = cc(2,k,i,2)-cc(2,k,i,4)
91 tr1 = cc(1,k,i,1)-cc(1,k,i,3)
92 tr2 = cc(1,k,i,1)+cc(1,k,i,3)
93 ti4 = cc(1,k,i,4)-cc(1,k,i,2)
94 tr3 = cc(1,k,i,2)+cc(1,k,i,4)
103 ch(1,k,2,i) = wa(i,1,1)*cr2+wa(i,1,2)*ci2
104 ch(2,k,2,i) = wa(i,1,1)*ci2-wa(i,1,2)*cr2
105 ch(1,k,3,i) = wa(i,2,1)*cr3+wa(i,2,2)*ci3
106 ch(2,k,3,i) = wa(i,2,1)*ci3-wa(i,2,2)*cr3
107 ch(1,k,4,i) = wa(i,3,1)*cr4+wa(i,3,2)*ci4
108 ch(2,k,4,i) = wa(i,3,1)*ci4-wa(i,3,2)*cr4
112 else if ( na == 1 ) then
114 sn = 1.0D+00 / real ( 4 * l1, kind = 8 )
117 ti1 = cc(2,k,1,1)-cc(2,k,1,3)
118 ti2 = cc(2,k,1,1)+cc(2,k,1,3)
119 tr4 = cc(2,k,1,2)-cc(2,k,1,4)
120 ti3 = cc(2,k,1,2)+cc(2,k,1,4)
121 tr1 = cc(1,k,1,1)-cc(1,k,1,3)
122 tr2 = cc(1,k,1,1)+cc(1,k,1,3)
123 ti4 = cc(1,k,1,4)-cc(1,k,1,2)
124 tr3 = cc(1,k,1,2)+cc(1,k,1,4)
125 ch(1,k,1,1) = sn*(tr2+tr3)
126 ch(1,k,3,1) = sn*(tr2-tr3)
127 ch(2,k,1,1) = sn*(ti2+ti3)
128 ch(2,k,3,1) = sn*(ti2-ti3)
129 ch(1,k,2,1) = sn*(tr1+tr4)
130 ch(1,k,4,1) = sn*(tr1-tr4)
131 ch(2,k,2,1) = sn*(ti1+ti4)
132 ch(2,k,4,1) = sn*(ti1-ti4)
137 sn = 1.0D+00 / real ( 4 * l1, kind = 8 )
140 ti1 = cc(2,k,1,1)-cc(2,k,1,3)
141 ti2 = cc(2,k,1,1)+cc(2,k,1,3)
142 tr4 = cc(2,k,1,2)-cc(2,k,1,4)
143 ti3 = cc(2,k,1,2)+cc(2,k,1,4)
144 tr1 = cc(1,k,1,1)-cc(1,k,1,3)
145 tr2 = cc(1,k,1,1)+cc(1,k,1,3)
146 ti4 = cc(1,k,1,4)-cc(1,k,1,2)
147 tr3 = cc(1,k,1,2)+cc(1,k,1,4)
148 cc(1,k,1,1) = sn*(tr2+tr3)
149 cc(1,k,1,3) = sn*(tr2-tr3)
150 cc(2,k,1,1) = sn*(ti2+ti3)
151 cc(2,k,1,3) = sn*(ti2-ti3)
152 cc(1,k,1,2) = sn*(tr1+tr4)
153 cc(1,k,1,4) = sn*(tr1-tr4)
154 cc(2,k,1,2) = sn*(ti1+ti4)
155 cc(2,k,1,4) = sn*(ti1-ti4)