1 subroutine c1f4kf ( ido, l1, na, cc, in1, ch, in2, wa )
3 !*****************************************************************************80
5 !! C1F4KF 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,l1,ido,4)
42 real ( kind = 4 ) ch(in2,l1,4,ido)
49 integer ( kind = 4 ) i
50 integer ( kind = 4 ) k
51 integer ( kind = 4 ) na
61 real ( kind = 4 ) wa(ido,3,2)
67 ti1 = cc(2,k,1,1)-cc(2,k,1,3)
68 ti2 = cc(2,k,1,1)+cc(2,k,1,3)
69 tr4 = cc(2,k,1,2)-cc(2,k,1,4)
70 ti3 = cc(2,k,1,2)+cc(2,k,1,4)
71 tr1 = cc(1,k,1,1)-cc(1,k,1,3)
72 tr2 = cc(1,k,1,1)+cc(1,k,1,3)
73 ti4 = cc(1,k,1,4)-cc(1,k,1,2)
74 tr3 = cc(1,k,1,2)+cc(1,k,1,4)
76 ch(1,k,1,1) = tr2 + tr3
77 ch(1,k,3,1) = tr2 - tr3
78 ch(2,k,1,1) = ti2 + ti3
79 ch(2,k,3,1) = ti2 - ti3
80 ch(1,k,2,1) = tr1 + tr4
81 ch(1,k,4,1) = tr1 - tr4
82 ch(2,k,2,1) = ti1 + ti4
83 ch(2,k,4,1) = ti1 - ti4
89 ti1 = cc(2,k,i,1)-cc(2,k,i,3)
90 ti2 = cc(2,k,i,1)+cc(2,k,i,3)
91 ti3 = cc(2,k,i,2)+cc(2,k,i,4)
92 tr4 = cc(2,k,i,2)-cc(2,k,i,4)
93 tr1 = cc(1,k,i,1)-cc(1,k,i,3)
94 tr2 = cc(1,k,i,1)+cc(1,k,i,3)
95 ti4 = cc(1,k,i,4)-cc(1,k,i,2)
96 tr3 = cc(1,k,i,2)+cc(1,k,i,4)
105 ch(1,k,2,i) = wa(i,1,1)*cr2+wa(i,1,2)*ci2
106 ch(2,k,2,i) = wa(i,1,1)*ci2-wa(i,1,2)*cr2
107 ch(1,k,3,i) = wa(i,2,1)*cr3+wa(i,2,2)*ci3
108 ch(2,k,3,i) = wa(i,2,1)*ci3-wa(i,2,2)*cr3
109 ch(1,k,4,i) = wa(i,3,1)*cr4+wa(i,3,2)*ci4
110 ch(2,k,4,i) = wa(i,3,1)*ci4-wa(i,3,2)*cr4
114 else if ( na == 1 ) then
116 sn = 1.0E+00 / real ( 4 * l1, kind = 4 )
119 ti1 = cc(2,k,1,1)-cc(2,k,1,3)
120 ti2 = cc(2,k,1,1)+cc(2,k,1,3)
121 tr4 = cc(2,k,1,2)-cc(2,k,1,4)
122 ti3 = cc(2,k,1,2)+cc(2,k,1,4)
123 tr1 = cc(1,k,1,1)-cc(1,k,1,3)
124 tr2 = cc(1,k,1,1)+cc(1,k,1,3)
125 ti4 = cc(1,k,1,4)-cc(1,k,1,2)
126 tr3 = cc(1,k,1,2)+cc(1,k,1,4)
127 ch(1,k,1,1) = sn*(tr2+tr3)
128 ch(1,k,3,1) = sn*(tr2-tr3)
129 ch(2,k,1,1) = sn*(ti2+ti3)
130 ch(2,k,3,1) = sn*(ti2-ti3)
131 ch(1,k,2,1) = sn*(tr1+tr4)
132 ch(1,k,4,1) = sn*(tr1-tr4)
133 ch(2,k,2,1) = sn*(ti1+ti4)
134 ch(2,k,4,1) = sn*(ti1-ti4)
139 sn = 1.0E+00 / real ( 4 * l1, kind = 4 )
142 ti1 = cc(2,k,1,1)-cc(2,k,1,3)
143 ti2 = cc(2,k,1,1)+cc(2,k,1,3)
144 tr4 = cc(2,k,1,2)-cc(2,k,1,4)
145 ti3 = cc(2,k,1,2)+cc(2,k,1,4)
146 tr1 = cc(1,k,1,1)-cc(1,k,1,3)
147 tr2 = cc(1,k,1,1)+cc(1,k,1,3)
148 ti4 = cc(1,k,1,4)-cc(1,k,1,2)
149 tr3 = cc(1,k,1,2)+cc(1,k,1,4)
150 cc(1,k,1,1) = sn*(tr2+tr3)
151 cc(1,k,1,3) = sn*(tr2-tr3)
152 cc(2,k,1,1) = sn*(ti2+ti3)
153 cc(2,k,1,3) = sn*(ti2-ti3)
154 cc(1,k,1,2) = sn*(tr1+tr4)
155 cc(1,k,1,4) = sn*(tr1-tr4)
156 cc(2,k,1,2) = sn*(ti1+ti4)
157 cc(2,k,1,4) = sn*(ti1-ti4)