1 !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
4 ! Copyright (C) 1995-2004, Scientific Computing Division,
5 ! University Corporation for Atmospheric Research
6 ! Licensed under the GNU General Public License (GPL)
8 ! Authors: Paul N. Swarztrauber and Richard A. Valent
10 ! $Id: xercon.f,v 1.2 2004/06/15 21:29:20 rodney Exp $
12 !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
14 LOGICAL FUNCTION XERCON (INC,JUMP,N,LOT)
15 INTEGER INC, JUMP, N, LOT
16 INTEGER I, J, JNEW, LCM
18 ! Definition: positive integers INC, JUMP, N and LOT are consistent
20 ! if I1*INC + J1*JUMP = I2*INC + J2*JUMP for I1,I2 < N and J1,J2
21 ! < LOT implies I1=I2 and J1=J2.
23 ! For multiple FFTs to execute correctly, input parameters INC,
24 ! JUMP, N and LOT must be consistent ... otherwise at least one
25 ! array element mistakenly is transformed more than once.
27 ! XERCON = .TRUE. if and only if INC, JUMP, N and LOT are
30 ! ------------------------------------------------------------------
32 ! Compute I = greatest common divisor (INC, JUMP)
44 ! Compute LCM = least common multiple (INC, JUMP)
48 ! Check consistency of INC, JUMP, N, LOT
50 IF (LCM .LE. (N-1)*INC .AND. LCM .LE. (LOT-1)*JUMP) THEN