Skip to content

Commit 5863d78

Browse files
authored
Merge pull request #10 from jvdp1/myhash15
Update the description of testing procedures
2 parents 8ce29b2 + 8bb43ba commit 5863d78

File tree

2 files changed

+14
-18
lines changed

2 files changed

+14
-18
lines changed

doc/specs/stdlib_hash_procedures.md

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1623,7 +1623,7 @@ various hash functions. The other is a comparison of the outputs of
16231623
the Fortran hash functions, with the outputs of the C and C++ hash
16241624
procedures that are the inspiration for the Fortran hash functions.
16251625

1626-
In the `src/test/hash_functions` subdirectory, the Fortran Standard
1626+
In the `src/test/hash_functions_perf` subdirectory, the Fortran Standard
16271627
Library provides two performance test codes for
16281628
the hash functions of `stdlib_hash_32bit` and
16291629
`stdlib_hash_64bit`, `test_32_bit_hash_performance` and
@@ -1728,20 +1728,16 @@ severely impact the performance of `nmhash32`, `nmhash32x`,
17281728
`water_hash`, `pengy_hash`, and `spooky_hash` relative to
17291729
`fnv_1_hash` and `fnv_1a_hash`.
17301730

1731-
In the `src/test/hash_functions/validation` subdirectory, the Fortran
1732-
Standard Library implements three executables to test the validity of
1733-
the Fortran codes against the original C and C++ codes. The three
1734-
executables must be compiled manually using the makefile
1735-
`Makefile.validation`, and the compiler suite used must be
1736-
GCC's. The first executable, `generate_key_array` is
1737-
based on Fortran code, and generates a random sequence of 2048
1738-
integers of kind `INT8`, and stores that sequence in the binary file
1739-
`key_array.bin`. The second executable, `generate_hash_arrays`, reads
1740-
the values in `key_array.bin`, and, for each complicated hash
1741-
procedure generates a corresponding binary file containing 2049 hash
1742-
values generated from the values in `key_array.bin`. The third
1743-
executable, `hash_validity_test`, reads the binary files and for each
1744-
complicated hash procedure compares the contents of the binary file
1731+
In the `src/test/hash_functions` subdirectory, the Fortran
1732+
Standard Library contains codes to test the validity of
1733+
the Fortran codes against the original C and C++ codes. It consists of one
1734+
executable `test_hash_functions` that
1735+
1) generates a random sequence of 2048
1736+
integers of kind `int8`, and stores that sequence in the binary file
1737+
`key_array.bin`;
1738+
2) reads the values in `key_array.bin`, and, for each complicated C/C++-coded
1739+
hash procedure, generates a corresponding binary file containing 2049 hash
1740+
values generated from the values in `key_array.bin`., and
1741+
3) reads the binary files, and, for each complicated C/C++-coded hash procedure, compares the contents of the binary file
17451742
with the results of calculating hash values using the corresponding
1746-
Fortran hash procedure on the same keys. These executables must be run
1747-
manually in the same order.
1743+
Fortran hash procedure on the same keys.

src/tests/hash_functions/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
The validation directory contains code to validate the Fortran hash functions against the original C/C++ codes. It consists of one executable `test_hash_functions` that:
1+
The hash_functions directory contains code to validate the Fortran hash functions against the original C/C++ codes. It consists of one executable `test_hash_functions` that:
22

33
* creates a file containing 2048 random 8 bit integers using the subroutine
44
`generate_key_array`.

0 commit comments

Comments
 (0)