Configuring RLNSTOOL
The following can or should be defined in rlnstool.h before running RLNSTOOL:
- RLNSPATH
- Path to directory where RLNS subdirectory will be created. This subdirectory will be numeric, as the concatentation of 2-digit hexadecimal moduli. (For example, the moduli 4, 3, 5 and 7 used in the paper will create a subdirectory 04030507.) By rerunning RLNStool with different rlnstool.h, different such subdirectories can be created.
- BASE
- Real value of the base of the logarithm. If omitted, BASE is 2.0
- ZSCALE
- Real value of the scale for the logarithm. If omitted, ZSCALE is 1.0. In theory, BASE with 2.0 and ZSCALE of, say 16.0, is equivalent to BASE of sqrt(sqrt(sqrt(sqrt(2.0)))) with ZSCALE of 1.0, but there is a bug at the moment that prevents this from working.
- MAXMODULI
- How many moduli are used. Required.
- MODULUS0
- First relatively prime integer modulus (also corresponds to least significant digit of MRNS). Required.
- MODULUS1
- Next relatively prime integer modulus. Required.
- MODULUSn
- Additional moduli required, up to number specified. The final modulus is the one used for the most significant digit of the MRNS, and is the one discarded for the novel table lookup. This final modulus must be odd for the novel algorithm to work.
An example rlnstool.h is available to generate the files for the moduli 4, 3, 5 and 7 used in the paper .
This is slightly different than the example in the paper , as this file uses
ZSCALE with a BASE of 2.0.
To test the files generated by this specific rlnstool.h , two files (specific to the moduli 4, 3, 5 and 7) are provided to test
one-hot-encoded ( tst1rlns.v ) and binary-encoded moduli ( tst2rlns.v ).