1 subroutine r1f4kf ( ido, l1, cc, in1, ch, in2, wa1, wa2, wa3 )
3 !*****************************************************************************80
5 !! R1F4KF 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,ido,l1,4)
42 real ( kind = 4 ) ch(in2,ido,4,l1)
43 real ( kind = 4 ) hsqt2
44 integer ( kind = 4 ) i
45 integer ( kind = 4 ) ic
46 integer ( kind = 4 ) idp2
47 integer ( kind = 4 ) k
48 real ( kind = 4 ) wa1(ido)
49 real ( kind = 4 ) wa2(ido)
50 real ( kind = 4 ) wa3(ido)
52 hsqt2 = sqrt ( 2.0E+00 ) / 2.0E+00
55 ch(1,1,1,k) = ( cc(1,1,k,2) + cc(1,1,k,4) ) &
56 + ( cc(1,1,k,1) + cc(1,1,k,3) )
57 ch(1,ido,4,k) = ( cc(1,1,k,1) + cc(1,1,k,3) ) &
58 - ( cc(1,1,k,2) + cc(1,1,k,4) )
59 ch(1,ido,2,k) = cc(1,1,k,1) - cc(1,1,k,3)
60 ch(1,1,3,k) = cc(1,1,k,4) - cc(1,1,k,2)
74 ch(1,i-1,1,k) = ((wa1(i-2)*cc(1,i-1,k,2)+wa1(i-1)* &
75 cc(1,i,k,2))+(wa3(i-2)*cc(1,i-1,k,4)+wa3(i-1)* &
76 cc(1,i,k,4)))+(cc(1,i-1,k,1)+(wa2(i-2)*cc(1,i-1,k,3)+ &
77 wa2(i-1)*cc(1,i,k,3)))
78 ch(1,ic-1,4,k) = (cc(1,i-1,k,1)+(wa2(i-2)*cc(1,i-1,k,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