home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume21 / cloops / part01 / sizes.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-07-25  |  1.5 KB  |  66 lines

  1. /*
  2.  * This file is part of the Livermore Loops transliteration into C.
  3.  * Copyright (C) 1991 by Martin Fouts
  4.  *
  5.  * This program is free software; you can redistribute it and/or modify
  6.  * it under the terms of the GNU General Public License as published by
  7.  * the Free Software Foundation; either version 1, or (at your option)
  8.  * any later version.
  9.  *
  10.  * This program is distributed in the hope that it will be useful,
  11.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.  * GNU General Public License for more details.
  14.  *
  15.  * You should have received a copy of the GNU General Public License
  16.  * along with this program; if not, write to the Free Software
  17.  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  */
  19.  
  20. #include <stdio.h>
  21. #include "types.h"
  22. #include "externs.h"
  23.  
  24. #define STOP { \
  25.   fprintf(stdout,"Fatal Overstore\nData Loss.  Test = %d %d %d\n", i, n, lp); \
  26.   exit(1); \
  27.   /*NOTREACHED*/ \
  28.   }
  29.  
  30. Void sizes(i)
  31. Int i;
  32. {
  33.  
  34.   if( (i<0) || (i>24) )     STOP
  35.   if( (n<0) || (n>1001))      STOP
  36.   if( (lp<0) || (lp> 30000)) STOP
  37.  
  38.   if( kr == 1 )  ispan[i]= isp2[i];
  39.   if( kr== 2 )  ispan[i]= isp3[i];
  40.   n = ispan[i];
  41. /*
  42.   lp= ipass[i];
  43.   lp= 1000;
  44.   lp= 10000;
  45.   lp= 1;
  46.   lp= 100;
  47. */
  48.   lp = in_lp;
  49.  
  50.   if( (n<0) || (n>1001))     STOP
  51.   if( (lp<0) || (lp>10000)) STOP
  52.   n1  = 1001;
  53.   n2  = 101;
  54.   n13 = 64;
  55.   n13h= 32;
  56.   n213= 96;
  57.   n813= 512;
  58.   n16 = 75;
  59.   n416= 300;
  60.   n21 = 25;
  61.   nt1= 17*1001 +13*101 +2*300;
  62.   nt2= 4*512 + 3*25*101 +121*101 +3*64*64;
  63.  
  64.   return;
  65. }
  66.