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/pconst.c | |
| parent | 971adefadb94e8780b1a73f08ed11d76c2ead8a2 (diff) | |
| download | allocbench-77ac9ce0a5c55d4f79f8fb8f7daa59ddb53cb507.tar.gz allocbench-77ac9ce0a5c55d4f79f8fb8f7daa59ddb53cb507.zip | |
add cfrac benchmark
Diffstat (limited to 'src/benchmarks/cfrac/pconst.c')
| -rw-r--r-- | src/benchmarks/cfrac/pconst.c | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/benchmarks/cfrac/pconst.c b/src/benchmarks/cfrac/pconst.c new file mode 100644 index 0000000..89b63a7 --- /dev/null +++ b/src/benchmarks/cfrac/pconst.c @@ -0,0 +1,46 @@ +#include "pdefs.h" + +static precisionType pzeroConst = { +#ifndef BWGC + (short) 1, /* refcount (read/write!) */ +#endif + (posit) 1, /* size */ + (posit) 1, /* digitcount */ + (boolean) 0, /* sign */ + { (digit) 0 } /* value */ +}; + +static precisionType poneConst = { +#ifndef BWGC + (short) 1, /* refcount (read/write!) */ +#endif + (posit) 1, /* size */ + (posit) 1, /* digitcount */ + (boolean) 0, /* sign */ + { (digit) 1 } /* value */ +}; + +static precisionType ptwoConst = { +#ifndef BWGC + (short) 1, /* refcount (read/write!) */ +#endif + (posit) 1, /* size */ + (posit) 1, /* digitcount */ + (boolean) 0, /* sign */ + { (digit) 2 } /* value */ +}; + +static precisionType p_oneConst = { +#ifndef BWGC + (short) 1, /* refcount (read/write!) */ +#endif + (posit) 1, /* size */ + (posit) 1, /* digitcount */ + (boolean) 1, /* sign */ + { (digit) 1 } /* value */ +}; + +precision pzero = &pzeroConst; /* zero */ +precision pone = &poneConst; /* one */ +precision ptwo = &ptwoConst; /* two */ +precision p_one = &p_oneConst; /* negative one */ |
