PLaSK library
Loading...
Searching...
No Matches
xercon.c
Go to the documentation of this file.
1/* xercon.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/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
16/* * * */
17/* * copyright (c) 2011 by UCAR * */
18/* * * */
19/* * University Corporation for Atmospheric Research * */
20/* * * */
21/* * all rights reserved * */
22/* * * */
23/* * FFTPACK version 5.1 * */
24/* * * */
25/* * A Fortran Package of Fast Fourier * */
26/* * * */
27/* * Subroutines and Example Programs * */
28/* * * */
29/* * by * */
30/* * * */
31/* * Paul Swarztrauber and Dick Valent * */
32/* * * */
33/* * of * */
34/* * * */
35/* * the National Center for Atmospheric Research * */
36/* * * */
37/* * Boulder, Colorado (80307) U.S.A. * */
38/* * * */
39/* * which is sponsored by * */
40/* * * */
41/* * the National Science Foundation * */
42/* * * */
43/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
44
46{
47 /* System generated locals */
48 logical ret_val;
49
50 /* Local variables */
51 integer i__, j, lcm, jnew;
52
53
54/* Definition: positive integers INC, JUMP, N and LOT are consistent */
55/* ---------- */
56/* if I1*INC + J1*JUMP = I2*INC + J2*JUMP for I1,I2 < N and J1,J2 */
57/* < LOT implies I1=I2 and J1=J2. */
58
59/* For multiple FFTs to execute correctly, input parameters INC, */
60/* JUMP, N and LOT must be consistent ... otherwise at least one */
61/* array element mistakenly is transformed more than once. */
62
63/* XERCON = .TRUE. if and only if INC, JUMP, N and LOT are */
64/* consistent. */
65
66/* ------------------------------------------------------------------ */
67
68/* Compute I = greatest common divisor (INC, JUMP) */
69
70 i__ = *inc;
71 j = *jump;
72L10:
73 if (j != 0) {
74 jnew = i__ % j;
75 i__ = j;
76 j = jnew;
77 goto L10;
78 }
79
80/* Compute LCM = least common multiple (INC, JUMP) */
81
82 lcm = *inc * *jump / i__;
83
84/* Check consistency of INC, JUMP, N, LOT */
85
86 if (lcm <= (*n - 1) * *inc && lcm <= (*lot - 1) * *jump) {
87 ret_val = FALSE_;
88 } else {
89 ret_val = TRUE_;
90 }
91
92 return ret_val;
93} /* xercon_ */
94