1 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
2 | ! |
---|
3 | ! FFTPACK 5.0 |
---|
4 | ! |
---|
5 | ! Authors: Paul N. Swarztrauber and Richard A. Valent |
---|
6 | ! |
---|
7 | ! $Id: costmf.f,v 1.2 2004/06/15 21:29:19 rodney Exp $ |
---|
8 | ! |
---|
9 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
10 | |
---|
11 | SUBROUTINE COSTMF (LOT, JUMP, N, INC, X, LENX, WSAVE, LENSAV, & |
---|
12 | & WORK, LENWRK, IER) |
---|
13 | INTEGER LOT, JUMP, N, INC, LENX, LENSAV, LENWRK, IER |
---|
14 | REAL X(INC,*), WSAVE(LENSAV), WORK(LENWRK) |
---|
15 | LOGICAL XERCON |
---|
16 | ! |
---|
17 | IER = 0 |
---|
18 | ! |
---|
19 | IF (LENX .LT. (LOT-1)*JUMP + INC*(N-1) + 1) THEN |
---|
20 | IER = 1 |
---|
21 | CALL XERFFT ('COSTMF', 6) |
---|
22 | GO TO 100 |
---|
23 | ELSEIF (LENSAV .LT. 2*N + INT(LOG(REAL(N))) +4) THEN |
---|
24 | IER = 2 |
---|
25 | CALL XERFFT ('COSTMF', 8) |
---|
26 | GO TO 100 |
---|
27 | ELSEIF (LENWRK .LT. LOT*(N+1)) THEN |
---|
28 | IER = 3 |
---|
29 | CALL XERFFT ('COSTMF', 10) |
---|
30 | GO TO 100 |
---|
31 | ELSEIF (.NOT. XERCON(INC,JUMP,N,LOT)) THEN |
---|
32 | IER = 4 |
---|
33 | CALL XERFFT ('COSTMF', -1) |
---|
34 | GO TO 100 |
---|
35 | ENDIF |
---|
36 | ! |
---|
37 | IW1 = LOT+LOT+1 |
---|
38 | CALL MCSTF1(LOT,JUMP,N,INC,X,WSAVE,WORK,WORK(IW1),IER1) |
---|
39 | IF (IER1 .NE. 0) THEN |
---|
40 | IER = 20 |
---|
41 | CALL XERFFT ('COSTMF',-5) |
---|
42 | ENDIF |
---|
43 | ! |
---|
44 | 100 CONTINUE |
---|
45 | RETURN |
---|
46 | END |
---|