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

Try alternative xxhash implementation #148

Merged
merged 5 commits into from
Sep 13, 2022
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
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
with:
submodules: recursive
- uses: actions/setup-python@v3
with:
python-version: 3.10.6
- uses: pre-commit/[email protected]
with:
extra_args: --hook-stage manual --all-files
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
url = https://github.com/imneme/pcg-cpp.git
[submodule "xxhash"]
path = xxhash
url = https://github.com/RedSpah/xxhash_cpp.git
url = https://github.com/Cyan4973/xxHash.git
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ target_include_directories(correctionlib
PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/rapidjson/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/cpp-peglib>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/xxhash/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/xxhash>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/pcg-cpp/include>
)
target_compile_features(correctionlib PUBLIC cxx_std_17)
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ else
PYLDFLAG=-Wl,-rpath,'$$ORIGIN/lib'
endif
OSXFLAG=$(shell uname|grep -q Darwin && echo "-undefined dynamic_lookup")
CFLAGS=--std=c++17 -O3 -Wall -fPIC -Irapidjson/include -Ipybind11/include -Icpp-peglib $(PYINC) -Iinclude
CFLAGS=--std=c++17 -O3 -Wall -fPIC -Irapidjson/include -Ipybind11/include -Icpp-peglib -Ixxhash -Ipcg-cpp/include $(PYINC) -Iinclude
PREFIX ?= correctionlib
STRVER=$(shell git describe --tags)
MAJOR=$(shell git describe --tags|sed -n "s/v\([0-9]\+\)\..*/\1/p")
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ build-backend = "setuptools.build_meta"
write_to = "src/correctionlib/version.py"

[tool.cibuildwheel]
skip = ["cp311-*"]
skip = ["pp*-*", "cp311-*"]
test-extras = "test"
test-command = "python -m pytest {package}/tests"
# update skip when numpy wheels become available
Expand Down
5 changes: 3 additions & 2 deletions src/correction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
#include <cmath>
#include <random>
#include "correction.h"
#include "xxhash.hpp"
#define XXH_INLINE_ALL 1
#include "xxhash.h"
#include "pcg_random.hpp"
#if __has_include(<zlib.h>)
#include <zlib.h>
Expand Down Expand Up @@ -288,7 +289,7 @@ double HashPRNG::evaluate(const std::vector<Variable::Type>& values) const {
}
else { throw std::logic_error("I should not have ever seen a string"); }
}
gen.seed(xxh::xxhash<64>((const void*) seedData, nbytes));
gen.seed(XXH64((const void*) seedData, nbytes, 0ul));
switch (dist_) {
case Distribution::stdflat:
return std::uniform_real_distribution<>()(gen);
Expand Down
2 changes: 1 addition & 1 deletion xxhash
Submodule xxhash updated 81 files
+7 −60 .gitattributes
+0 −38 .github/ISSUE_TEMPLATE/bug_report.md
+439 −0 .github/workflows/ci.yml
+46 −278 .gitignore
+142 −38 .travis.yml
+71 −0 CHANGELOG
+0 −60 CMakeLists.txt
+0 −76 CODE_OF_CONDUCT.md
+58 −0 Doxyfile
+19 −19 LICENSE
+546 −0 Makefile
+205 −90 README.md
+115 −0 appveyor.yml
+339 −0 cli/COPYING
+4 −0 cli/README.md
+153 −0 cli/xsum_arch.h
+436 −0 cli/xsum_bench.c
+51 −0 cli/xsum_bench.h
+214 −0 cli/xsum_config.h
+482 −0 cli/xsum_os_specific.c
+89 −0 cli/xsum_os_specific.h
+65 −0 cli/xsum_output.c
+62 −0 cli/xsum_output.h
+692 −0 cli/xsum_sanity_check.c
+60 −0 cli/xsum_sanity_check.h
+106 −0 cli/xxhsum.1
+148 −0 cli/xxhsum.1.md
+1,138 −0 cli/xxhsum.c
+12 −0 cmake_unofficial/.gitignore
+173 −0 cmake_unofficial/CMakeLists.txt
+36 −0 cmake_unofficial/README.md
+4 −0 cmake_unofficial/xxHashConfig.cmake.in
+9 −0 doc/README.md
+206 −0 doc/xxhash.cry
+351 −0 doc/xxhash_spec.md
+0 −2,082 include/xxhash.hpp
+15 −0 libxxhash.pc.in
+0 −24 test/CMakeLists.txt
+0 −14,075 test/catch.hpp
+0 −627 test/test_main.cpp
+0 −2,115 test/xxh3.h
+0 −1,941 test/xxhash.h
+112 −0 tests/Makefile
+1 −0 tests/bench/.clang_complete
+11 −0 tests/bench/.gitignore
+339 −0 tests/bench/LICENSE
+68 −0 tests/bench/Makefile
+164 −0 tests/bench/benchHash.c
+67 −0 tests/bench/benchHash.h
+252 −0 tests/bench/benchfn.c
+183 −0 tests/bench/benchfn.h
+160 −0 tests/bench/bhDisplay.c
+61 −0 tests/bench/bhDisplay.h
+118 −0 tests/bench/hashes.h
+220 −0 tests/bench/main.c
+168 −0 tests/bench/timefn.c
+89 −0 tests/bench/timefn.h
+2 −0 tests/collisions/.gitignore
+339 −0 tests/collisions/LICENSE
+75 −0 tests/collisions/Makefile
+122 −0 tests/collisions/README.md
+1 −0 tests/collisions/allcodecs/README.md
+38 −0 tests/collisions/allcodecs/dummy.c
+45 −0 tests/collisions/allcodecs/dummy.h
+127 −0 tests/collisions/hashes.h
+1,124 −0 tests/collisions/main.c
+344 −0 tests/collisions/pool.c
+80 −0 tests/collisions/pool.h
+59 −0 tests/collisions/sort.cc
+40 −0 tests/collisions/sort.hh
+82 −0 tests/collisions/threading.c
+124 −0 tests/collisions/threading.h
+154 −0 tests/generate_unicode_test.c
+78 −0 tests/multiInclude.c
+62 −0 tests/ppc_define.c
+43 −0 tests/unicode_lint.sh
+55 −0 xxh3.h
+770 −0 xxh_x86dispatch.c
+86 −0 xxh_x86dispatch.h
+43 −0 xxhash.c
+5,580 −0 xxhash.h