Skip to content
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

Revised Hash functions incorporating changes in the main Stdlib repository. #573

Merged
merged 126 commits into from
Dec 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
f1490bc
Added hash function performace comparison and validation codes.
wclodius2 Nov 21, 2021
8cd2f2e
Added hash function codes
wclodius2 Nov 21, 2021
2b0a9ec
Add files to test hash function performance
wclodius2 Nov 21, 2021
b004215
Modified to have no-range-check
wclodius2 Nov 21, 2021
98e22dd
Modified to have no-range-checks
wclodius2 Nov 21, 2021
d778671
Added hash modules to the compile list
wclodius2 Nov 21, 2021
461543a
Added hash_functions to the test directories
wclodius2 Nov 21, 2021
29a5297
Added stdlib_hash_functions.md
wclodius2 Nov 21, 2021
165f4ff
Removed two F90 files
wclodius2 Nov 22, 2021
5c22bb2
Added three source code files
wclodius2 Nov 22, 2021
1cf7bcd
Modified Makefile.validation
wclodius2 Nov 22, 2021
cf76cc1
Added documentations
wclodius2 Nov 22, 2021
f35875b
Fixes to various files
wclodius2 Nov 22, 2021
1661cff
Change s compile flag
wclodius2 Nov 22, 2021
542741d
Changed brackets on TOC
wclodius2 Nov 23, 2021
1769bb7
Changes in response to Gareth's comments
wclodius2 Nov 26, 2021
e62abdf
More changes from Gareth
wclodius2 Nov 27, 2021
96ed2e7
Renamed stdlib_hash_functions.md
wclodius2 Nov 27, 2021
87869ad
Deleted file
wclodius2 Nov 27, 2021
d449bd0
Update doc/specs/stdlib_hash_functions.md
wclodius2 Nov 28, 2021
874d1c4
Changes suggested by Jermie Vandenplas
wclodius2 Nov 28, 2021
1588f93
Merge branch 'master' of https://github.com/fortran-lang/stdlib into …
wclodius2 Nov 28, 2021
2993b17
Merge branch 'hash_functions2' of github.com:wclodius2/stdlib into ha…
wclodius2 Nov 29, 2021
89390c4
More changes inspired by Jeremie's comments
wclodius2 Nov 29, 2021
40512f3
Renamed files
wclodius2 Nov 30, 2021
c6930b6
Renamed file
wclodius2 Nov 30, 2021
d78dcf2
Changed CMakeLists.txt and Makefile.manual
wclodius2 Nov 30, 2021
c08c2ab
Updated module name
wclodius2 Nov 30, 2021
7438b72
Updated module references
wclodius2 Nov 30, 2021
3047dcc
Changed module references
wclodius2 Nov 30, 2021
c4d8d28
Fixed typo
wclodius2 Dec 2, 2021
0b429a4
Changed function attribute
wclodius2 Dec 2, 2021
3863d1c
Merge branch 'master' of https://github.com/fortran-lang/stdlib into …
wclodius2 Dec 3, 2021
9b6ce56
Fixed typos
wclodius2 Dec 3, 2021
f05df9c
Fixed duplicate "the"'s
wclodius2 Dec 3, 2021
04b8201
mv validation to hash_functions_test and add Makefile-manual
jvdp1 Dec 3, 2021
c60277d
add hash_functions_test to Makefile.manual
jvdp1 Dec 3, 2021
44854ec
add testdrive program
jvdp1 Dec 3, 2021
b02ee07
modify generate_key
jvdp1 Dec 3, 2021
03fef48
add cmakefiles
jvdp1 Dec 3, 2021
300bfa7
update CMakeLists.txt
jvdp1 Dec 3, 2021
662597e
add generate_key into test_hash_functions
jvdp1 Dec 3, 2021
773afa7
fix issues
jvdp1 Dec 3, 2021
ece5b03
comment hash_function test
jvdp1 Dec 3, 2021
f57248a
Changed procedures to elemental
wclodius2 Dec 4, 2021
b5af572
Removed Murmur hash references and added elemental attribute
wclodius2 Dec 4, 2021
1c3a707
Fixed typo
wclodius2 Dec 4, 2021
044136c
integrate all in test_hash_functions.f90
jvdp1 Dec 4, 2021
e021826
mod Makefile.manual
jvdp1 Dec 4, 2021
0059b2e
update Makefile.manual
jvdp1 Dec 4, 2021
bccd963
:Merge branch 'myhash3' into myhash2
jvdp1 Dec 4, 2021
5bd3cb4
Update src/tests/hash_functions/generate_hash_arrays.cpp
jvdp1 Dec 4, 2021
e44ef8f
add name to subroutines
jvdp1 Dec 10, 2021
6e2852c
update CMakefile for running test_hash_functions
jvdp1 Dec 11, 2021
389074b
add test hash_functions_perf
jvdp1 Dec 11, 2021
e513820
add option for compile language
jvdp1 Dec 11, 2021
498f467
update CI.yml
jvdp1 Dec 11, 2021
5ae8857
add g++ in CI
jvdp1 Dec 11, 2021
edeabfb
test
jvdp1 Dec 11, 2021
ac22757
test
jvdp1 Dec 11, 2021
e854563
Merge branch 'myhash4' into myhash2
jvdp1 Dec 11, 2021
26138a2
add fortran linker for cmake (instead of using a cxx linker)
jvdp1 Dec 12, 2021
404bd65
remove unused variable
jvdp1 Dec 12, 2021
216318b
remove parameter transfer
jvdp1 Dec 12, 2021
f872518
Merge branch 'myhash7' into myhash2
jvdp1 Dec 12, 2021
608074f
update Makefile
jvdp1 Dec 12, 2021
f9168e9
mv languages C and CXX to test CMakeLists.txt
jvdp1 Dec 15, 2021
c99130a
Merge branch 'myhash8' into myhash2
jvdp1 Dec 15, 2021
82fde8c
remove the file generate_key_array and hash_validity_test + update RE…
jvdp1 Dec 16, 2021
64d0b94
update fpm-deployment.sh
jvdp1 Dec 16, 2021
e969709
Merge branch 'myhash10' into myhash2
jvdp1 Dec 16, 2021
412b917
update makefile
jvdp1 Dec 16, 2021
caec042
Update makefile
jvdp1 Dec 16, 2021
9d32d06
Update Makefile.manual
jvdp1 Dec 16, 2021
570abf9
Merge pull request #6 from jvdp1/myhash2
wclodius2 Dec 16, 2021
fd6e20b
Update doc/specs/stdlib_hash_procedures.md
jvdp1 Dec 16, 2021
09d1fc1
Update doc/specs/stdlib_hash_procedures.md
jvdp1 Dec 16, 2021
dae5560
Update doc/specs/stdlib_hash_procedures.md
jvdp1 Dec 16, 2021
6015656
Merge branch 'master' into hash_functions2
jvdp1 Dec 16, 2021
651adee
Update doc/specs/stdlib_hash_procedures.md
jvdp1 Dec 16, 2021
19a1feb
Update doc/specs/stdlib_hash_procedures.md
jvdp1 Dec 16, 2021
15e868e
Update doc/specs/stdlib_hash_procedures.md
jvdp1 Dec 16, 2021
b2d9e0e
Also install Intel C/C++ compilers on OSX
awvwgk Dec 16, 2021
da5bcd2
Update Intel from 2021.1 to 2021.4
awvwgk Dec 16, 2021
f693892
Don't use __builtin_rotateleft32 for Intel on OSX
awvwgk Dec 16, 2021
79ba01b
Merge branch 'master' of https://github.com/fortran-lang/stdlib into …
wclodius2 Dec 17, 2021
bda3cb9
KAdded hyphens
wclodius2 Dec 18, 2021
b063a78
KChanged "believed to be"
wclodius2 Dec 18, 2021
9e72b87
Changed spelling of big and little endian
wclodius2 Dec 18, 2021
cbda836
Changed "Rank" to "rank"
wclodius2 Dec 18, 2021
fb3c9e2
Added comment to makefile
wclodius2 Dec 18, 2021
3dd170e
Changed CMakeLists.txt
jvdp1 Dec 18, 2021
bef9b98
add ford links for 32 bit
jvdp1 Dec 18, 2021
5b14d0c
resolve some issues in specs 64 bit
jvdp1 Dec 18, 2021
1a8a5e3
add some ford links 64 bit
jvdp1 Dec 18, 2021
6d5d6f1
format examples
jvdp1 Dec 18, 2021
37b83c8
Merge pull request #8 from jvdp1/myhash13
wclodius2 Dec 18, 2021
5035b14
Update Makefile.manual
wclodius2 Dec 19, 2021
5e94b74
Renamed filed
wclodius2 Dec 19, 2021
58a0a1e
Renamed file
wclodius2 Dec 19, 2021
da366e8
Unpdated to new module names
wclodius2 Dec 19, 2021
4f8633a
Updated module names
wclodius2 Dec 19, 2021
dd088ca
Fixed typo
wclodius2 Dec 19, 2021
f15d42d
Updated module names
wclodius2 Dec 19, 2021
f790241
Fixed misspelling
wclodius2 Dec 19, 2021
15da01f
stdlib_hash_procedures.md
jvdp1 Dec 19, 2021
95acdca
stdlib_hash_32bit
jvdp1 Dec 19, 2021
2f4d48e
stdlib_hash_64bit
jvdp1 Dec 19, 2021
5ac5591
Update doc/specs/stdlib_hash_procedures.md
jvdp1 Dec 19, 2021
8bb43ba
update the description of testing
jvdp1 Dec 19, 2021
8ce29b2
Update doc/specs/stdlib_hash_procedures.md
wclodius2 Dec 19, 2021
5863d78
Merge pull request #10 from jvdp1/myhash15
wclodius2 Dec 19, 2021
3d29b92
Update doc/specs/stdlib_hash_procedures.md
jvdp1 Dec 19, 2021
ebcf239
Update doc/specs/stdlib_hash_procedures.md
jvdp1 Dec 19, 2021
d7217a6
Merge remote-tracking branch 'wclodius2/hash_functions2' into myhash14
jvdp1 Dec 19, 2021
95fcc8f
Merge pull request #9 from jvdp1/myhash14
wclodius2 Dec 20, 2021
ae18abc
Merge branch 'hash_functions2' of github.com:wclodius2/stdlib into ha…
wclodius2 Dec 20, 2021
a7944b1
Merge branch 'master' of https://github.com/fortran-lang/stdlib into …
wclodius2 Dec 20, 2021
a144d69
rename hash submodule files
jvdp1 Dec 21, 2021
bcc0cc2
update CMakeLists.txt
jvdp1 Dec 21, 2021
cf3b60b
update Makefile.manual
jvdp1 Dec 21, 2021
1a1b005
change specs
jvdp1 Dec 21, 2021
ae194d5
Merge pull request #11 from jvdp1/myhash16
wclodius2 Dec 21, 2021
c82ec64
Updated CHANGELOG.md
wclodius2 Dec 22, 2021
28f2d6f
Added public procedures in CHANGELOG.md
jvdp1 Dec 22, 2021
f0629ae
Merge branch 'master' into hash_functions2
jvdp1 Dec 22, 2021
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
19 changes: 13 additions & 6 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jobs:
build: make
env:
FC: gfortran-${{ matrix.gcc_v }}
CC: gcc-${{ matrix.gcc_v }}
CXX: g++-${{ matrix.gcc_v }}
GCC_V: ${{ matrix.gcc_v }}
BUILD_DIR: ${{ matrix.build == 'cmake' && 'build' || '.' }}

Expand All @@ -46,17 +48,18 @@ jobs:
- name: Install fypp
run: pip install --upgrade fypp

- name: Install GFortran Linux
- name: Install GCC compilers Linux
if: contains( matrix.os, 'ubuntu')
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install -y gcc-${GCC_V} gfortran-${GCC_V}
sudo apt-get install -y gcc-${GCC_V} g++-${GCC_V} gfortran-${GCC_V}
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_V} 100 \
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \
--slave /usr/bin/g++ g++ /usr/bin/g++-${GCC_V} \
--slave /usr/bin/gcov gcov /usr/bin/gcov-${GCC_V}

- name: Install GFortran macOS
- name: Install GCC compilers macOS
if: contains( matrix.os, 'macos')
run: |
brew install gcc@${GCC_V} || brew upgrade gcc@${GCC_V} || true
Expand Down Expand Up @@ -108,12 +111,15 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest]
fc: [ifort]
cc: [icc]
cxx: [icpc]
env:
MACOS_HPCKIT_URL: >-
https://registrationcenter-download.intel.com/akdlm/irc_nas/17398/m_HPCKit_p_2021.1.0.2681_offline.dmg
MACOS_FORTRAN_COMPONENTS: >-
intel.oneapi.mac.ifort-compiler
https://registrationcenter-download.intel.com/akdlm/irc_nas/18242/m_HPCKit_p_2021.4.0.3389_offline.dmg
MACOS_FORTRAN_COMPONENTS: all
FC: ${{ matrix.fc }}
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}

steps:
- name: Checkout code
Expand Down Expand Up @@ -151,6 +157,7 @@ jobs:
if: contains(matrix.os, 'ubuntu')
run: |
sudo apt-get install intel-oneapi-compiler-fortran
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic

- name: Install Intel oneAPI compiler (OSX)
if: contains(matrix.os, 'macos') && steps.cache-install.outputs.cache-hit != 'true'
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

Features available from the latest git source

- new module `stdlib_hash_32bit`
[#573](https://github.com/fortran-lang/stdlib/pull/573)
- new procedures: `fibonacci_hash`, `fnv_1_hash`,
`fnv_1a_hash`, `new_nmhash32_seed`, `new_nmhash32x_seed`,
`new_water_hash_seed`, `nmhash32`, `nmhash32x`, `odd_random_integer`,
`universal_mult_hash`, and `water_hash`
- new module `stdlib_hash_64bit`
[#573](https://github.com/fortran-lang/stdlib/pull/573)
- new procedures: `fibonacci_hash`, `fnv_1_hash`, `fnv_1a_hash`,
`new_pengy_hash_seed`, `new_spooky_hash_seed`,
`odd_random_integer`, `pengy_hash`, `spooky_hash`, `spookyhash_128`, and
`universal_mult_hash`
- new module `stdlib_array`
[#603](https://github.com/fortran-lang/stdlib/pull/603)
- new procedures `trueloc`, `falseloc`
Expand Down
9 changes: 5 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
endif()
add_compile_options(-fimplicit-none)
add_compile_options(-ffree-line-length-132)
add_compile_options(-fno-range-check) # Needed for gfortran 9 and
# earlier for hash functions
add_compile_options(-Wall)
add_compile_options(-Wextra)
add_compile_options(-Wimplicit-procedure)
Expand All @@ -40,12 +42,11 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
add_compile_options(-std=f2018)
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^Intel")
if(WIN32)
add_compile_options(/warn:declarations,general,usage,interfaces,unused)
add_compile_options(/stand:f18)
set(fortran_flags /stand:f18 /warn:declarations,general,usage,interfaces,unused)
else()
add_compile_options(-warn declarations,general,usage,interfaces,unused)
add_compile_options(-stand f18)
set(fortran_flags -stand f18 -warn declarations,general,usage,interfaces,unused)
endif()
add_compile_options("$<$<COMPILE_LANGUAGE:Fortran>:${fortran_flags}>")
endif()

# --- compiler feature checks
Expand Down
3 changes: 2 additions & 1 deletion Makefile.manual
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Fortran stdlib Makefile

FC ?= gfortran
FFLAGS ?= -Wall -Wextra -Wimplicit-interface -fPIC -g -fcheck=all
# -fno-range-check needed for hash functions for gfortran-9
FFLAGS ?= -Wall -Wextra -Wimplicit-interface -fPIC -g -fcheck=all -fno-range-check
ADD_FYPPFLAGS ?=

VERSION := $(subst ., ,$(file < VERSION))
Expand Down
1 change: 1 addition & 0 deletions ci/fpm-deployment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ include=(
prune=(
"$destdir/test/test_always_fail.f90"
"$destdir/test/test_always_skip.f90"
"$destdir/test/test_hash_functions.f90"
"$destdir/src/common.f90"
"$destdir/src/f18estop.f90"
)
Expand Down
2 changes: 2 additions & 0 deletions doc/specs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ This is and index/directory of the specifications (specs) for each new module/fe
- [ascii](./stdlib_ascii.html) - Procedures for handling ASCII characters
- [bitsets](./stdlib_bitsets.html) - Bitset data types and procedures
- [error](./stdlib_error.html) - Catching and handling errors
- [hash\_procedures](./stdlib_hash_procedures.html) - Hashing integer
vectors or character strings
- [IO](./stdlib_io.html) - Input/output helper & convenience
- [kinds](./stdlib_kinds.html) - Kind parameters
- [linalg](./stdlib_linalg.html) - Linear Algebra
Expand Down
Loading