Skip to content

Commit ae194d5

Browse files
authored
Merge pull request fortran-lang#11 from jvdp1/myhash16
Myhash16
2 parents a7944b1 + 1a1b005 commit ae194d5

11 files changed

+40
-40
lines changed

doc/specs/stdlib_hash_procedures.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,8 @@ Landon Curt Noll, and Kiem-Phong Vo;
361361
the *nmhash32* and *nmhash32x* of James Z. M. Gao;
362362
and the *waterhash* of Tommy Ettinger.
363363
The detailed implementation of each algorithm is handled in a separate
364-
submodule: `stdlib_32_bit_fnv_hashes`,
365-
`stdlib_32_bit_nmhashes`, and `stdlib_32_bit_water_hashes`,
364+
submodule: `stdlib_hash_32bit_fnv`,
365+
`stdlib_hash_32bit_nm`, and `stdlib_hash_32bit_water`,
366366
respectively. The `nmhash32`, `nmhash32x`, and `waterhash` algorithms
367367
require seeds. The submodules provide separate seed generators
368368
for each algorithm.
@@ -381,8 +381,8 @@ Landon Curt Noll, and Kiem-Phong Vo;
381381
the *pengyhash* of Alberto Fajardo;
382382
and the *SpookyHash* of Bob Jenkins.
383383
The detailed implementation of each algorithm is handled in a separate
384-
submodule: `stdlib_64_bit_fnv_hashes`,
385-
`stdlib_64_bit_pengy_hashes`, and `stdlib_64_bit_spooky_hashes`,
384+
submodule: `stdlib_hash_64bit_fnv`,
385+
`stdlib_hash_64bit_pengy`, and `stdlib_hash_64bit_spooky`,
386386
respectively.
387387
The `pengyhash`, and `Spooky Hash` algorithms
388388
require seeds. The submodules provide separate seed generators
@@ -394,7 +394,7 @@ generating seeds for `universal_mult_hash`.
394394
All assume a two's complement sign bit, and no out of
395395
range checks.
396396

397-
The `stdlib_32_bit_fnv_hashes` and `stdlib_64_bits_fnv_hashes`
397+
The `stdlib_hash_32bit_fnv` and `stdlib_hash_64bit_fnv`
398398
submodules each provide implementations of the FNV-1 and FNV-1A
399399
algorithms in the form of two separate overloaded functions: `FNV_1`
400400
and `FNV_1A`.
@@ -417,7 +417,7 @@ giving a performance boost where the hashing is intermittent.
417417
[SMHasher discussion](https://github.com/rurban/smhasher/README.md)
418418
and [S. Richter, V. Alvarez, and J. Dittrich. 2015. A Seven-Dimensional Analysis of Hashing Methods and its Implications on Query Processing, Proceedings of the VLDB Endowment, Vol. 9, No. 3.](https://bigdata.uni-saarland.de/publications/p249-richter.pdf) [https://doi.org/10.14778/2850583.2850585](https://doi.org/10.14778/2850583.2850585).
419419

420-
The `stdlib_32_bit_nmhashes` submodule provides implementations
420+
The `stdlib_hash_32bit_nm` submodule provides implementations
421421
of James Z.M. Gao's `nmhash32` and `nmhash32x` algorithms,
422422
version 0.2,
423423
in the form of the overloaded functions, `nmhash32` and `nmhash32x`.
@@ -434,7 +434,7 @@ seeds, but slower on long seeds, but our limited testing so far shows
434434
`nmhash32x` to be significantly faster on short seeds and slightly
435435
faster on long seeds.
436436

437-
The `stdlib_32_bit_water_hashes` submodule provides implementations
437+
The `stdlib_hash_32bit_water` submodule provides implementations
438438
of Tommy Ettinger's `waterhash` algorithm in the form of the overloaded
439439
function, `water_hash`. Water Hash has not been tested by Reini Urban,
440440
but Tommy Ettinger has tested it with Urban's SMHasher and presents
@@ -443,14 +443,14 @@ testing hasn't found any bad seeds for the algorithm. To provide
443443
randomly generated seeds for the hash function the submodule also
444444
defines the subroutine `new_water_hash_seed`.
445445

446-
The `stdlib_64_bit_pengy_hashes` submodule provides implementations of
446+
The `stdlib_hash_64bit_pengy` submodule provides implementations of
447447
Alberto Fajardo's `pengyhash` in the form of the overloaded function,
448448
`pengy_hash`. Reini Urban's testing shows that PengyHash passes all
449449
the tests and has no bad seeds. To provide randomly generated seeds
450450
for the hash function the submodule also defines the subroutine
451451
`new_pengy_hash_seed`.
452452

453-
The `stdlib_64_bit_spooky_hashes` submodule provides implementations
453+
The `stdlib_hash_64bit_spooky` submodule provides implementations
454454
of Bob Jenkins' SpookyHash in the form of the overloaded function,
455455
`spooky_hash`. Future implementations may provide the SpookyHash
456456
incremental hashing procedures.

src/CMakeLists.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
# Create a list of the files to be preprocessed
44
set(fppFiles
5-
stdlib_32_bit_fnv_hashes.fypp
6-
stdlib_32_bit_nmhashes.fypp
7-
stdlib_32_bit_water_hashes.fypp
8-
stdlib_64_bit_fnv_hashes.fypp
9-
stdlib_64_bit_pengy_hashes.fypp
10-
stdlib_64_bit_spookyv2_hashes.fypp
115
stdlib_ascii.fypp
126
stdlib_bitsets.fypp
137
stdlib_bitsets_64.fypp
148
stdlib_bitsets_large.fypp
159
stdlib_hash_32bit.fypp
10+
stdlib_hash_32bit_fnv.fypp
11+
stdlib_hash_32bit_nm.fypp
12+
stdlib_hash_32bit_water.fypp
1613
stdlib_hash_64bit.fypp
14+
stdlib_hash_64bit_fnv.fypp
15+
stdlib_hash_64bit_pengy.fypp
16+
stdlib_hash_64bit_spookyv2.fypp
1717
stdlib_io.fypp
1818
stdlib_io_npy.fypp
1919
stdlib_io_npy_load.fypp

src/Makefile.manual

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
SRCFYPP = \
2-
stdlib_32_bit_fnv_hashes.fypp \
3-
stdlib_32_bit_nmhashes.fypp \
4-
stdlib_32_bit_water_hashes.fypp \
5-
stdlib_64_bit_fnv_hashes.fypp \
6-
stdlib_64_bit_pengy_hashes.fypp \
7-
stdlib_64_bit_spookyv2_hashes.fypp \
2+
stdlib_hash_32bit_fnv.fypp \
3+
stdlib_hash_32bit_nm.fypp \
4+
stdlib_hash_32bit_water.fypp \
5+
stdlib_hash_64bit_fnv.fypp \
6+
stdlib_hash_64bit_pengy.fypp \
7+
stdlib_hash_64bit_spookyv2.fypp \
88
stdlib_ascii.fypp \
99
stdlib_bitsets_64.fypp \
1010
stdlib_bitsets_large.fypp \
@@ -90,21 +90,21 @@ $(SRCGEN): %.f90: %.fypp common.fypp
9090

9191
# Fortran module dependencies
9292
f18estop.o: stdlib_error.o
93-
stdlib_32_bit_fnv_hashes.o: \
93+
stdlib_hash_32bit_fnv.o: \
9494
stdlib_hash_32bit.o
9595
stdlib_hash_32bit.o: \
9696
stdlib_kinds.o
97-
stdlib_32_bit_nmhashes.o: \
97+
stdlib_hash_32bit_nm.o: \
9898
stdlib_hash_32bit.o
99-
stdlib_32_bit_water_hashes.o: \
99+
stdlib_hash_32bit_water.o: \
100100
stdlib_hash_32bit.o
101-
stdlib_64_bit_fnv_hashes.o: \
101+
stdlib_hash_64bit_fnv.o: \
102102
stdlib_hash_64bit.o
103103
stdlib_hash_64bit.o: \
104104
stdlib_kinds.o
105-
stdlib_64_bit_pengy_hashes.o: \
105+
stdlib_hash_64bit_pengy.o: \
106106
stdlib_hash_64bit.o
107-
stdlib_64_bit_spookyv2_hashes.o: \
107+
stdlib_hash_64bit_spookyv2.o: \
108108
stdlib_hash_64bit.o
109109
stdlib_ascii.o: stdlib_kinds.o
110110
stdlib_bitsets.o: stdlib_kinds.o \

src/stdlib_hash_32bit.fypp

100755100644
File mode changed.

src/stdlib_32_bit_fnv_hashes.fypp src/stdlib_hash_32bit_fnv.fypp

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
!#! Integer kinds to be considered during templating
1111
#:set INT_KINDS = ["int16", "int32", "int64"]
1212

13-
submodule(stdlib_hash_32bit) stdlib_32_bit_fnv_hashes
13+
submodule(stdlib_hash_32bit) stdlib_hash_32bit_fnv
1414
!! An implementation of the FNV hashes 1 and 1a of Glenn Fowler, Landon Curt
1515
!! Noll, and Kiem-Phong-Vo,
1616
!! https://en.wikipedia.org/wiki/Fowler–Noll–Vo_hash_function
@@ -123,4 +123,4 @@ contains
123123

124124
end function character_fnv_1a
125125

126-
end submodule stdlib_32_bit_fnv_hashes
126+
end submodule stdlib_hash_32bit_fnv

src/stdlib_32_bit_nmhashes.fypp src/stdlib_hash_32bit_nm.fypp

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
#! Integer kinds to be considered during templating
4545
#:set INT_KINDS = ["int16", "int32", "int64"]
4646

47-
submodule(stdlib_hash_32bit) stdlib_32_bit_nmhashes
47+
submodule(stdlib_hash_32bit) stdlib_hash_32bit_nm
4848

4949
implicit none
5050

@@ -803,4 +803,4 @@ contains
803803

804804
end subroutine new_nmhash32x_seed
805805

806-
end submodule stdlib_32_bit_nmhashes
806+
end submodule stdlib_hash_32bit_nm

src/stdlib_32_bit_water_hashes.fypp src/stdlib_hash_32bit_water.fypp

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
!! For more information, please refer to <http://unlicense.org>
3838
!!
3939
!! `WATER_HASH` is distributed as part of the `stdlib_32_bit_hash_functions.f90`
40-
!! module and its `stdlib_32_bit_water_hashes.f90` submodule with the Fortran
40+
!! module and its `stdlib_hash_32bit_water.f90` submodule with the Fortran
4141
!! Standard Library at URL: https://github.com/fortran-lang/stdlib.
4242
!! The Fortran Standard Library, including this code, is distributed under the
4343
!! MIT License as described in the `LICENSE` file distributed with the library.
@@ -74,7 +74,7 @@
7474
#! Integer kinds to be considered during templating
7575
#:set INT_KINDS = ["int16", "int32", "int64"]
7676

77-
submodule(stdlib_hash_32bit) stdlib_32_bit_water_hashes
77+
submodule(stdlib_hash_32bit) stdlib_hash_32bit_water
7878
implicit none
7979

8080
contains
@@ -280,4 +280,4 @@ contains
280280

281281
end subroutine new_water_hash_seed
282282

283-
end submodule stdlib_32_bit_water_hashes
283+
end submodule stdlib_hash_32bit_water

src/stdlib_hash_64bit.fypp

100755100644
File mode changed.

src/stdlib_64_bit_fnv_hashes.fypp src/stdlib_hash_64bit_fnv.fypp

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#! Integer kinds to be considered during templating
1313
#:set INT_KINDS = ["int16", "int32", "int64"]
1414

15-
submodule(stdlib_hash_64bit) stdlib_64_bit_fnv_hashes
15+
submodule(stdlib_hash_64bit) stdlib_hash_64bit_fnv
1616
! An implementation of the FNV hashes 1 and 1a of Glenn Fowler, Landon Curt
1717
! Noll, and Kiem-Phong-Vo,
1818
! https://en.wikipedia.org/wiki/Fowler–Noll–Vo_hash_function
@@ -122,4 +122,4 @@ contains
122122

123123
end function character_fnv_1a
124124

125-
end submodule stdlib_64_bit_fnv_hashes
125+
end submodule stdlib_hash_64bit_fnv

src/stdlib_64_bit_pengy_hashes.fypp src/stdlib_hash_64bit_pengy.fypp

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
#! Integer kinds to be considered during templating
4141
#:set INT_KINDS = ["int16", "int32", "int64"]
4242

43-
submodule(stdlib_hash_64bit) stdlib_64_bit_pengy_hashes
43+
submodule(stdlib_hash_64bit) stdlib_hash_64bit_pengy
4444

4545
implicit none
4646

@@ -146,4 +146,4 @@ contains
146146

147147
end subroutine new_pengy_hash_seed
148148

149-
end submodule stdlib_64_bit_pengy_hashes
149+
end submodule stdlib_hash_64bit_pengy

src/stdlib_64_bit_spookyv2_hashes.fypp src/stdlib_hash_64bit_spookyv2.fypp

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#! Integer kinds to be considered during templating
1414
#:set INT_KINDS = ["int16", "int32", "int64"]
1515

16-
submodule(stdlib_hash_64bit) stdlib_64_bit_spookyv2_hashes
16+
submodule(stdlib_hash_64bit) stdlib_hash_64bit_spookyv2
1717

1818
! I have tried to make this portable while retaining efficiency. I assume
1919
! processors with two's complement integers from 8, 16, 32, and 64 bits.
@@ -712,4 +712,4 @@ contains
712712
end subroutine new_spooky_hash_seed
713713

714714

715-
end submodule stdlib_64_bit_spookyv2_hashes
715+
end submodule stdlib_hash_64bit_spookyv2

0 commit comments

Comments
 (0)