CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C C File Name: bench11.h C C Functional Description: The header file bench11.h defines C macros common to the various subroutines in the bench11 C multiple precision arithmetic benchmark. C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC c CVS Info c $Date: 2005/01/10 21:56:20 $ c $Revision: 1.2 $ c $RCSfile: bench11.h,v $ c $Name: rel_5 $ c INTEGER VERBOSE, DEBUG, MYPE, NPES COMMON VERBOSE, DEBUG, MYPE, NPES c c Define various structures for each machine c #ifdef _CRAYMPP # include "craympp.h" #else # ifdef CRAY # include "cray.h" # else # ifdef __alpha # include "decalpha.h" # endif # endif #endif c c Define the header for MP integers N c N(MPALLOC) = number of words allocated for limbs of N c N(MPSIZE) = number of words actually used c N(MPPTR) = GMP's pointer to the data, here the next word in the array c N(MPDATA) = the first word of data, lowest-order limb of N c c on DEC alpha GMP's header uses int = 32 bits for alloc, size c so they must share word 1 c c MP-INT Header Length #ifdef GMP # if INT32 # define MPHL 2 # define MPALLOC 1 # define MPPTR 2 # define MPDATA 3 # define GMP32 1 # else # define MPHL 3 # define MPALLOC 1 # define MPSIZE 2 # define MPPTR 3 # define MPDATA 4 # define GMP32 0 # endif #else # define MPHL 2 # define MPALLOC 1 # define MPSIZE 2 # define MPDATA 3 # define GMP32 0 #endif c MPLONG CARRYBIT, BITMASK, BITMASK32, MLTWO c c The MLTWO silliness is to get around those machines on which c the INTEGER data type has no more than BITSPERWORD bits #ifdef GMP PARAMETER (MLTWO = 2) PARAMETER (BITMASK32 = (MLTWO**32 - 1)) PARAMETER (BITMASK = BITMASK32 + ISHFT(BITMASK32,32)) #else PARAMETER (MLTWO = 2) PARAMETER (BITMASK = (MLTWO**BITSPERWORD - 1)) PARAMETER (BITMASK32 = (MLTWO**32 - 1)) PARAMETER (CARRYBIT = (MLTWO**BITSPERWORD)) #endif c c Maximum values for various parameters c INTEGER MAXMATSIZE, MAXNUMSIZE, MAXDECIMALDIG INTEGER MAXBITSIZE, MAXWDS, MAXMODSIZE c c The size of the largest matrix accepted by the program PARAMETER (MAXMATSIZE = 640) c c The size (number of limbs or digit words) plus MPHL = header-length c of the largest multiple precision number accepted by the program c 32 / 64 BITSPERWORD c Up to 128 bits (M3: 128) - 8 / 4 limbs c Up to 544/576 bits (M8: 514) - 17 / 9 limbs c Up to 1024 bits (M10: 999) - 32 / 16 limbs PARAMETER (MAXBITSIZE = 1024) c c The size (number of limbs or digit words) plus MPHL = header-length c of the largest multiple precision number accepted by the program PARAMETER (MAXWDS = (MAXBITSIZE+BITSPERWORD-1)/BITSPERWORD) PARAMETER (MAXNUMSIZE = MAXWDS + MPHL) c GMP may need extra words to read max modulus PARAMETER (MAXMODSIZE = MAXNUMSIZE + 2) c c The number of decimal digits in the largest multiple c precision number accepted by the program PARAMETER (MAXDECIMALDIG = MAXBITSIZE/3)