Skip to content

Commit

Permalink
Merge pull request #573 from wclodius2/hash_functions2
Browse files Browse the repository at this point in the history
Revised Hash functions incorporating changes in the main Stdlib repository.
  • Loading branch information
milancurcic authored Dec 22, 2021
2 parents 30f5321 + f0629ae commit 9f1aa24
Show file tree
Hide file tree
Showing 39 changed files with 8,013 additions and 11 deletions.
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

0 comments on commit 9f1aa24

Please sign in to comment.