Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9f1aa24

Browse files
Merge pull request #573 from wclodius2/hash_functions2
Revised Hash functions incorporating changes in the main Stdlib repository.
2 parents 30f5321 + f0629ae commit 9f1aa24

39 files changed

+8013
-11
lines changed

‎.github/workflows/CI.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131
build: make
3232
env:
3333
FC: gfortran-${{ matrix.gcc_v }}
34+
CC: gcc-${{ matrix.gcc_v }}
35+
CXX: g++-${{ matrix.gcc_v }}
3436
GCC_V: ${{ matrix.gcc_v }}
3537
BUILD_DIR: ${{ matrix.build == 'cmake' && 'build' || '.' }}
3638

@@ -46,17 +48,18 @@ jobs:
4648
- name: Install fypp
4749
run: pip install --upgrade fypp
4850

49-
- name: Install GFortran Linux
51+
- name: Install GCC compilers Linux
5052
if: contains( matrix.os, 'ubuntu')
5153
run: |
5254
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
5355
sudo apt-get update
54-
sudo apt-get install -y gcc-${GCC_V} gfortran-${GCC_V}
56+
sudo apt-get install -y gcc-${GCC_V} g++-${GCC_V} gfortran-${GCC_V}
5557
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_V} 100 \
5658
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \
59+
--slave /usr/bin/g++ g++ /usr/bin/g++-${GCC_V} \
5760
--slave /usr/bin/gcov gcov /usr/bin/gcov-${GCC_V}
5861

59-
- name: Install GFortran macOS
62+
- name: Install GCC compilers macOS
6063
if: contains( matrix.os, 'macos')
6164
run: |
6265
brew install gcc@${GCC_V} || brew upgrade gcc@${GCC_V} || true
@@ -108,12 +111,15 @@ jobs:
108111
matrix:
109112
os: [ubuntu-latest, macos-latest]
110113
fc: [ifort]
114+
cc: [icc]
115+
cxx: [icpc]
111116
env:
112117
MACOS_HPCKIT_URL: >-
113-
https://registrationcenter-download.intel.com/akdlm/irc_nas/17398/m_HPCKit_p_202110.2681_offline.dmg
114-
MACOS_FORTRAN_COMPONENTS: >-
115-
intel.oneapi.mac.ifort-compiler
118+
https://registrationcenter-download.intel.com/akdlm/irc_nas/18242/m_HPCKit_p_202140.3389_offline.dmg
119+
MACOS_FORTRAN_COMPONENTS: all
116120
FC: ${{ matrix.fc }}
121+
CC: ${{ matrix.cc }}
122+
CXX: ${{ matrix.cxx }}
117123

118124
steps:
119125
- name: Checkout code
@@ -151,6 +157,7 @@ jobs:
151157
if: contains(matrix.os, 'ubuntu')
152158
run: |
153159
sudo apt-get install intel-oneapi-compiler-fortran
160+
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
154161

155162
- name: Install Intel oneAPI compiler (OSX)
156163
if: contains(matrix.os, 'macos') && steps.cache-install.outputs.cache-hit != 'true'

‎CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
Features available from the latest git source
44

5+
- new module `stdlib_hash_32bit`
6+
[#573](https://github.com/fortran-lang/stdlib/pull/573)
7+
- new procedures: `fibonacci_hash`, `fnv_1_hash`,
8+
`fnv_1a_hash`, `new_nmhash32_seed`, `new_nmhash32x_seed`,
9+
`new_water_hash_seed`, `nmhash32`, `nmhash32x`, `odd_random_integer`,
10+
`universal_mult_hash`, and `water_hash`
11+
- new module `stdlib_hash_64bit`
12+
[#573](https://github.com/fortran-lang/stdlib/pull/573)
13+
- new procedures: `fibonacci_hash`, `fnv_1_hash`, `fnv_1a_hash`,
14+
`new_pengy_hash_seed`, `new_spooky_hash_seed`,
15+
`odd_random_integer`, `pengy_hash`, `spooky_hash`, `spookyhash_128`, and
16+
`universal_mult_hash`
517
- new module `stdlib_array`
618
[#603](https://github.com/fortran-lang/stdlib/pull/603)
719
- new procedures `trueloc`, `falseloc`

‎CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
2929
endif()
3030
add_compile_options(-fimplicit-none)
3131
add_compile_options(-ffree-line-length-132)
32+
add_compile_options(-fno-range-check) # Needed for gfortran 9 and
33+
# earlier for hash functions
3234
add_compile_options(-Wall)
3335
add_compile_options(-Wextra)
3436
add_compile_options(-Wimplicit-procedure)
@@ -40,12 +42,11 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
4042
add_compile_options(-std=f2018)
4143
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^Intel")
4244
if(WIN32)
43-
add_compile_options(/warn:declarations,general,usage,interfaces,unused)
44-
add_compile_options(/stand:f18)
45+
set(fortran_flags /stand:f18 /warn:declarations,general,usage,interfaces,unused)
4546
else()
46-
add_compile_options(-warn declarations,general,usage,interfaces,unused)
47-
add_compile_options(-stand f18)
47+
set(fortran_flags -stand f18 -warn declarations,general,usage,interfaces,unused)
4848
endif()
49+
add_compile_options("$<$<COMPILE_LANGUAGE:Fortran>:${fortran_flags}>")
4950
endif()
5051

5152
# --- compiler feature checks

‎Makefile.manual

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Fortran stdlib Makefile
22

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

78
VERSION := $(subst ., ,$(file < VERSION))

‎ci/fpm-deployment.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ include=(
2929
prune=(
3030
"$destdir/test/test_always_fail.f90"
3131
"$destdir/test/test_always_skip.f90"
32+
"$destdir/test/test_hash_functions.f90"
3233
"$destdir/src/common.f90"
3334
"$destdir/src/f18estop.f90"
3435
)

‎doc/specs/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ This is and index/directory of the specifications (specs) for each new module/fe
1515
- [ascii](./stdlib_ascii.html) - Procedures for handling ASCII characters
1616
- [bitsets](./stdlib_bitsets.html) - Bitset data types and procedures
1717
- [error](./stdlib_error.html) - Catching and handling errors
18+
- [hash\_procedures](./stdlib_hash_procedures.html) - Hashing integer
19+
vectors or character strings
1820
- [IO](./stdlib_io.html) - Input/output helper & convenience
1921
- [kinds](./stdlib_kinds.html) - Kind parameters
2022
- [linalg](./stdlib_linalg.html) - Linear Algebra

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /