diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2019-08-24 17:57:51 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2019-08-24 17:57:51 +0200 |
| commit | 77ac9ce0a5c55d4f79f8fb8f7daa59ddb53cb507 (patch) | |
| tree | 93d4e30a207265af03394d347bfff76ba677f3ce /src/benchmarks/cfrac/pcvt.h | |
| parent | 971adefadb94e8780b1a73f08ed11d76c2ead8a2 (diff) | |
| download | allocbench-77ac9ce0a5c55d4f79f8fb8f7daa59ddb53cb507.tar.gz allocbench-77ac9ce0a5c55d4f79f8fb8f7daa59ddb53cb507.zip | |
add cfrac benchmark
Diffstat (limited to 'src/benchmarks/cfrac/pcvt.h')
| -rw-r--r-- | src/benchmarks/cfrac/pcvt.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/benchmarks/cfrac/pcvt.h b/src/benchmarks/cfrac/pcvt.h new file mode 100644 index 0000000..e2dd724 --- /dev/null +++ b/src/benchmarks/cfrac/pcvt.h @@ -0,0 +1,32 @@ +/* + * Machine dependent file used for conversion routines + * (e.g. atop, ptoa, itop, ptoi, etc) + */ + +/* + * For pXtop: (X = {i,u,l,ul,d}) + */ +#define INTSIZE 2 /* floor(log[Base](2*(MAXINT+1))) */ +#define LONGSIZE 2 /* floor(log[Base](2*(MAXLONG+1))) */ +#define DOUBLESIZE 129 /* double precision size = log[base](HUGE) */ + +/* + * For ptoX + */ +#define MAXINT (int) ((unsigned int) ~0 >> 1) +#define MAXLONG (long) ((unsigned long) ~0 >> 1) +#define MAXUNSIGNED (~ (unsigned int) 0) +#define MAXUNSIGNEDLONG (~ (unsigned long) 0L) + +#define MAXACC (~ (accumulator) 0) + +/* + * aBase - Ascii base (ptoa) + * There are aDigits Ascii digits per precision digit, pDigits. + * At least one of { aDigits, pDigits } <= (MAXINT / the maximum posit value). + */ +#define aDigits 525 /* aDigits/pDigits >~= log[aBase](Base) */ +#define pDigits 109 /* 525/109=4.8165>log[10](65536)=4.816479931 */ +#define aBase 10 /* string conversion base */ +#define aDigit 1000000000 /* must be power of aBase < MAXINT */ +#define aDigitLog 9 /* log[aBase] of aDigit */ |
