PLaSK library
Loading...
Searching...
No Matches
cfft1f.c
Go to the documentation of this file.
1/* cfft1f.f -- translated by f2c (version 20100827).
2 You must link the resulting object file with libf2c:
3 on Microsoft Windows system, link with libf2c.lib;
4 on Linux or Unix systems, link with .../path/to/libf2c.a -lm
5 or, if you install libf2c.a in a standard place, with -lf2c -lm
6 -- in that order, at the end of the command line, as in
7 cc *.o -lf2c -lm
8 Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
9
10 http://www.netlib.org/f2c/libf2c.zip
11*/
12
13#include "f2c.h"
14
15/* Table of constant values */
16
17static integer c__4 = 4;
18static integer c__6 = 6;
19static integer c__8 = 8;
20
21/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
22/* * * */
23/* * copyright (c) 2011 by UCAR * */
24/* * * */
25/* * University Corporation for Atmospheric Research * */
26/* * * */
27/* * all rights reserved * */
28/* * * */
29/* * FFTPACK version 5.1 * */
30/* * * */
31/* * A Fortran Package of Fast Fourier * */
32/* * * */
33/* * Subroutines and Example Programs * */
34/* * * */
35/* * by * */
36/* * * */
37/* * Paul Swarztrauber and Dick Valent * */
38/* * * */
39/* * of * */
40/* * * */
41/* * the National Center for Atmospheric Research * */
42/* * * */
43/* * Boulder, Colorado (80307) U.S.A. * */
44/* * * */
45/* * which is sponsored by * */
46/* * * */
47/* * the National Science Foundation * */
48/* * * */
49/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
50
51/* Subroutine */ int cfft1f_(integer *n, integer *inc, doublecomplex *c__,
52 integer *lenc, doublereal *wsave, integer *lensav, doublereal *work,
53 integer *lenwrk, integer *ier)
54{
55 /* Builtin functions */
56 double log(doublereal);
57
58 /* Local variables */
59 integer iw1;
60 extern /* Subroutine */ int c1fm1f_(integer *, integer *, doublecomplex *,
62 char *, integer *, ftnlen);
63
64
65 /* Parameter adjustments */
66 --c__;
67 --wsave;
68 --work;
69
70 /* Function Body */
71 *ier = 0;
72
73 if (*lenc < *inc * (*n - 1) + 1) {
74 *ier = 1;
75 xerfft_("CFFT1F ", &c__4, (ftnlen)7);
76 } else if (*lensav < (*n << 1) + (integer) (log((doublereal) (*n)) / log(
77 2.)) + 4) {
78 *ier = 2;
79 xerfft_("CFFT1F ", &c__6, (ftnlen)7);
80 } else if (*lenwrk < *n << 1) {
81 *ier = 3;
82 xerfft_("CFFT1F ", &c__8, (ftnlen)7);
83 }
84
85 if (*n == 1) {
86 return 0;
87 }
88
89 iw1 = *n + *n + 1;
90 c1fm1f_(n, inc, &c__[1], &work[1], &wsave[1], &wsave[iw1], &wsave[iw1 + 1]
91 );
92 return 0;
93} /* cfft1f_ */
94