From 80cd42f1762b6060e096c48082ab9d069c61bce2 Mon Sep 17 00:00:00 2001 From: "Brian \"DragonLord\" Wong" Date: Thu, 2 Oct 2014 19:41:57 -0400 Subject: [PATCH] Update .gitignore and README.md .gitignore has been changed to avoid including output generated by HI64, which is stored in data* directories. README.md has been updated to clarify what data types can be used and to add that unsigned types are allowed for ISIZE. --- .gitignore | 4 +++- README.md | 19 ++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index adb36c8..6ca7162 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -*.exe \ No newline at end of file +*.exe +data/* +data*/* diff --git a/README.md b/README.md index c8cf94f..c7ce35d 100644 --- a/README.md +++ b/README.md @@ -45,11 +45,14 @@ GCC) to generate non-working code, so they should not be used. In this document, we will assume a recent version of GCC. Settings for HI64 are defined at build time, through a combination of compiler -options and macros defined in `hint.h`. The following macros are set through the -compiler command line: +options and macros defined in `hint.h`. The following macros specify data types +to be used internally and are set through the compiler command line. Primitive +data types, as well as types provided by the C header file (such as +`uint32_t` and `int64t`), can be used. These macros include: - `DSIZE`: The data type to use for the underlying computations. Both - floating-point and integral types may be used, as long as they are signed. + floating-point and integral types may be used, as long as they are signed + (e.g `long` is a valid data type for DSIZE, while `unsigned long` is not). Larger types such as `double` and `int64_t` permit higher-quality results allowing for longer computation but may lower maximum QUIPS. Smaller data types such as `float` and `int32_t` tend to be faster but their lower @@ -57,10 +60,12 @@ compiler command line: in QUIPS as the precision of the variables is exhausted. (Due to a limitation in the timing code, 32-bit and smaller data types may not work.) - `ISIZE`: The data type to use for the index of the `rect` array. An integral - data type is required. At least one half the bits of effective precision of - `DSIZE` is needed to attain the full precision available from `DSIZE`. For - example, a `DSIZE` of `double` has 53 bits of effective precision (the length - of the mantissa), so `int32_t` is sufficiently long to fully utilize this + data type is required. On most systems, `ISIZE` may be signed or unsigned; + an unsigned type is preferred where possible as array indexes are always + positive. At least one half the bits of effective precision of `DSIZE` is + needed to attain the full precision available from `DSIZE`. For example, a + `DSIZE` of `double` has 53 bits of effective precision (the length of the + mantissa), so an `ISIZE` of `uint32_t` is sufficiently long to utilize this precision. An example build command would look like this: