Skip to content

Commit

Permalink
Merge pull request #10 from jvdp1/myhash15
Browse files Browse the repository at this point in the history
Update the description of testing procedures
  • Loading branch information
wclodius2 authored Dec 19, 2021
2 parents 8ce29b2 + 8bb43ba commit 5863d78
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 18 deletions.
30 changes: 13 additions & 17 deletions doc/specs/stdlib_hash_procedures.md
Original file line number Diff line number Diff line change
Expand Up @@ -1623,7 +1623,7 @@ various hash functions. The other is a comparison of the outputs of
the Fortran hash functions, with the outputs of the C and C++ hash
procedures that are the inspiration for the Fortran hash functions.

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

In the `src/test/hash_functions/validation` subdirectory, the Fortran
Standard Library implements three executables to test the validity of
the Fortran codes against the original C and C++ codes. The three
executables must be compiled manually using the makefile
`Makefile.validation`, and the compiler suite used must be
GCC's. The first executable, `generate_key_array` is
based on Fortran code, and generates a random sequence of 2048
integers of kind `INT8`, and stores that sequence in the binary file
`key_array.bin`. The second executable, `generate_hash_arrays`, reads
the values in `key_array.bin`, and, for each complicated hash
procedure generates a corresponding binary file containing 2049 hash
values generated from the values in `key_array.bin`. The third
executable, `hash_validity_test`, reads the binary files and for each
complicated hash procedure compares the contents of the binary file
In the `src/test/hash_functions` subdirectory, the Fortran
Standard Library contains codes to test the validity of
the Fortran codes against the original C and C++ codes. It consists of one
executable `test_hash_functions` that
1) generates a random sequence of 2048
integers of kind `int8`, and stores that sequence in the binary file
`key_array.bin`;
2) reads the values in `key_array.bin`, and, for each complicated C/C++-coded
hash procedure, generates a corresponding binary file containing 2049 hash
values generated from the values in `key_array.bin`., and
3) reads the binary files, and, for each complicated C/C++-coded hash procedure, compares the contents of the binary file
with the results of calculating hash values using the corresponding
Fortran hash procedure on the same keys. These executables must be run
manually in the same order.
Fortran hash procedure on the same keys.
2 changes: 1 addition & 1 deletion src/tests/hash_functions/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
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:
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:

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

0 comments on commit 5863d78

Please sign in to comment.