cfft1b.f 958 Bytes
Newer Older
rtoy's avatar
rtoy committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
C
C   FFTPACK 5.0 
C
C   Authors:  Paul N. Swarztrauber and Richard A. Valent
C
C   $Id$
C
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC

      SUBROUTINE CFFT1B (N, INC, C, LENC, WSAVE, LENSAV,
     1                  WORK, LENWRK, IER)
      INTEGER  N, INC, LENC, LENSAV, LENWRK, IER
      COMPLEX       C(LENC)
      REAL     WSAVE(LENSAV)     ,WORK(LENWRK)
C
      IER = 0
C
      IF (LENC .LT. INC*(N-1) + 1) THEN
        IER = 1
Raymond Toy's avatar
Raymond Toy committed
21
22
        CALL XERFFT ('CFFT1B ', 4)
      ELSEIF (LENSAV .LT. 2*N + INT(LOG(REAL(N))/LOG(2.)) + 4) THEN
rtoy's avatar
rtoy committed
23
        IER = 2
Raymond Toy's avatar
Raymond Toy committed
24
        CALL XERFFT ('CFFT1B ', 6)
rtoy's avatar
rtoy committed
25
26
      ELSEIF (LENWRK .LT. 2*N) THEN
        IER = 3
Raymond Toy's avatar
Raymond Toy committed
27
        CALL XERFFT ('CFFT1B ', 8)
rtoy's avatar
rtoy committed
28
29
30
31
32
33
34
35
36
      ENDIF
C
      IF (N .EQ. 1) RETURN
C
      IW1 = N+N+1
      CALL C1FM1B (N,INC,C,WORK,WSAVE,WSAVE(IW1),
     1                           WSAVE(IW1+1))
      RETURN
      END