Skip to content

Update the description of testing procedures #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 13 additions & 17 deletions doc/specs/stdlib_hash_procedures.md
Original file line number Diff line number Diff line change
Expand Up @@ -1624,7 +1624,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 @@ -1729,20 +1729,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