home *** CD-ROM | disk | FTP | other *** search
- /*
- * This file is part of the Livermore Loops transliteration into C.
- * Copyright (C) 1991 by Martin Fouts
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
- #include "types.h"
-
- Void valid(vx,map,l,bl,x,bu,n)
- Float vx[], x[], bl, bu;
- Int map[], *l, n;
- {
- Int k, m;
-
- m= 0;
- for (k = 0; k < n; k++) {
- if ((x[k] < bl) || (x[k] > bu)) {
- /*printf("k = %d, bl = %f, bu = %f, x[k] = %f\n", k, bl, bu, x[k]);*/
- continue;
- }
-
- map[m] = k;
- vx[m] = x[k];
- m++;
- }
- *l = m;
- return;
- }
-