From 710d75698de8998deae287c0ee8f3be56d02ec4e Mon Sep 17 00:00:00 2001 From: "James D. Mitchell" Date: Sat, 21 Oct 2023 09:08:38 +0200 Subject: [PATCH 1/5] Rename VERSION to .VERSION The reason for this change is that "version" is a C++ standard library header file from C++20 onwards, and the file VERSION can be confused with this header when trying to "#include ". Even if there are no explicit "#include " in HPCombi, some standard library files include "version" and then fail to compile if there's another file named "VERSION" in the include path. --- VERSION => .VERSION | 0 VERSION.in => .VERSION.in | 0 CMakeLists.txt | 4 ++-- 3 files changed, 2 insertions(+), 2 deletions(-) rename VERSION => .VERSION (100%) rename VERSION.in => .VERSION.in (100%) diff --git a/VERSION b/.VERSION similarity index 100% rename from VERSION rename to .VERSION diff --git a/VERSION.in b/.VERSION.in similarity index 100% rename from VERSION.in rename to .VERSION.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 56c06598..a6c93568 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -138,7 +138,7 @@ ENDIF(BUILD_TESTING) ##################### # config.h file stuff configure_file(${CMAKE_SOURCE_DIR}/config.h.in ${CMAKE_BINARY_DIR}/HPCombi-config.h) -configure_file(${CMAKE_SOURCE_DIR}/VERSION.in ${CMAKE_BINARY_DIR}/VERSION) +configure_file(${CMAKE_SOURCE_DIR}/.VERSION.in ${CMAKE_BINARY_DIR}/.VERSION) set(AUTOGENERATED_WARNING "WARNING: THIS IS A CMAKE AUTO-GENERATED FILE.") @@ -151,7 +151,7 @@ foreach(f ${install_misc}) DESTINATION share/${CMAKE_PROJECT_NAME}) endforeach(f) -install (FILES ${CMAKE_CURRENT_BINARY_DIR}/VERSION DESTINATION ".") +install (FILES ${CMAKE_CURRENT_BINARY_DIR}/.VERSION DESTINATION ".") install (FILES ${CMAKE_CURRENT_BINARY_DIR}/HPCombi-config.h DESTINATION include/${CMAKE_PROJECT_NAME}) From 0bccd4bec57c4f992ec6934325b53ae3520f6110 Mon Sep 17 00:00:00 2001 From: "James D. Mitchell" Date: Sat, 21 Oct 2023 10:17:57 +0200 Subject: [PATCH 2/5] etc: add script for checking list_intrin.txt --- etc/check-list-intrin.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 etc/check-list-intrin.sh diff --git a/etc/check-list-intrin.sh b/etc/check-list-intrin.sh new file mode 100755 index 00000000..8ff7d6cd --- /dev/null +++ b/etc/check-list-intrin.sh @@ -0,0 +1,33 @@ +#!/bin/bash +set -e + +bold() { + printf "\033[1m%s\033[0m\n" "$*" +} + +if [[ $# -ne 0 ]]; then + bold "error expected no arguments, got $#!" + exit 1 +fi + +echo "Checking intrinsics used in code base versus declared in 'list_intrin.txt' . . ." + +grep -oh -e "_mm\w*\b" include/*.* | sort | uniq > intrin_actuals.txt + +python3 - < Date: Sat, 21 Oct 2023 09:06:42 +0200 Subject: [PATCH 3/5] Update version numbers etc for v0.0.8 --- .VERSION | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.VERSION b/.VERSION index 1750564f..d169b2f2 100644 --- a/.VERSION +++ b/.VERSION @@ -1 +1 @@ -0.0.6 +0.0.8 diff --git a/README.md b/README.md index 276a47ff..8829eb79 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # HPCombi ![build status](https://api.travis-ci.org/hivert/HPCombi.svg?branch=master) -High Performance Combinatorics in C++ using vector instructions v0.0.6 +High Performance Combinatorics in C++ using vector instructions v0.0.8 SSE and AVX instruction sets allows for very fast manipulation of combinatorial objects such as transformations, permutations, boolean matrices From 62050fd94daa403256f6a8c7fb8b395f01633e6f Mon Sep 17 00:00:00 2001 From: "James D. Mitchell" Date: Mon, 23 Oct 2023 10:59:19 +0200 Subject: [PATCH 4/5] Move src -> experiments --- experiments/Perm32/README.md | 3 +++ {src => experiments}/Perm32/demovect.cpp | 0 {src => experiments}/Perm32/demovect32_avx2.cpp | 0 {src => experiments}/Perm32/perm32.cpp | 0 {src => experiments}/Perm32/perm64.cpp | 0 {src => experiments}/Perm32/permbig.cpp | 0 {src => experiments}/Perm32/permdesc_red.cpp | 0 src/Perm32/README.md | 4 ---- 8 files changed, 3 insertions(+), 4 deletions(-) create mode 100644 experiments/Perm32/README.md rename {src => experiments}/Perm32/demovect.cpp (100%) rename {src => experiments}/Perm32/demovect32_avx2.cpp (100%) rename {src => experiments}/Perm32/perm32.cpp (100%) rename {src => experiments}/Perm32/perm64.cpp (100%) rename {src => experiments}/Perm32/permbig.cpp (100%) rename {src => experiments}/Perm32/permdesc_red.cpp (100%) delete mode 100644 src/Perm32/README.md diff --git a/experiments/Perm32/README.md b/experiments/Perm32/README.md new file mode 100644 index 00000000..99b7baac --- /dev/null +++ b/experiments/Perm32/README.md @@ -0,0 +1,3 @@ +# HPCombi Experimental files + +These files contains experiments to be later incorporated into the sources. diff --git a/src/Perm32/demovect.cpp b/experiments/Perm32/demovect.cpp similarity index 100% rename from src/Perm32/demovect.cpp rename to experiments/Perm32/demovect.cpp diff --git a/src/Perm32/demovect32_avx2.cpp b/experiments/Perm32/demovect32_avx2.cpp similarity index 100% rename from src/Perm32/demovect32_avx2.cpp rename to experiments/Perm32/demovect32_avx2.cpp diff --git a/src/Perm32/perm32.cpp b/experiments/Perm32/perm32.cpp similarity index 100% rename from src/Perm32/perm32.cpp rename to experiments/Perm32/perm32.cpp diff --git a/src/Perm32/perm64.cpp b/experiments/Perm32/perm64.cpp similarity index 100% rename from src/Perm32/perm64.cpp rename to experiments/Perm32/perm64.cpp diff --git a/src/Perm32/permbig.cpp b/experiments/Perm32/permbig.cpp similarity index 100% rename from src/Perm32/permbig.cpp rename to experiments/Perm32/permbig.cpp diff --git a/src/Perm32/permdesc_red.cpp b/experiments/Perm32/permdesc_red.cpp similarity index 100% rename from src/Perm32/permdesc_red.cpp rename to experiments/Perm32/permdesc_red.cpp diff --git a/src/Perm32/README.md b/src/Perm32/README.md deleted file mode 100644 index 5ebb7ade..00000000 --- a/src/Perm32/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# HPCombi Experimental files -High Performance Combinatorics in C++ using vector instructions v0.0.1 - -These files contains experiments to be later incirporated into the sources. From 48474543dd0b7e285475def1b244c5f832b48d21 Mon Sep 17 00:00:00 2001 From: "James D. Mitchell" Date: Mon, 23 Oct 2023 11:03:17 +0200 Subject: [PATCH 5/5] Fix list_intrin.txt --- list_intrin.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/list_intrin.txt b/list_intrin.txt index 3d0189d3..df995b99 100644 --- a/list_intrin.txt +++ b/list_intrin.txt @@ -4,20 +4,21 @@ _mm_blendv_epi8;__m128i(),__m128i(),__m128i() _mm_bslli_si128;__m128i(),1 _mm_bsrli_si128;__m128i(),1 -_mm_cmpeq_epi8;__m128i(),__m128i() _mm_cmpestri;__m128i(),1,__m128i(),1,1 _mm_cmpestrm;__m128i(),1,__m128i(),1,1 -_mm_cmplt_epi8;__m128i(),__m128i() _mm_extract_epi64;__m128i(),1 -_mm_max_epi8;__m128i(),__m128i() _mm_max_epu8;__m128i(),__m128i() _mm_min_epi8;__m128i(),__m128i() _mm_min_epu8;__m128i(),__m128i() _mm_movemask_epi8;__m128i() _mm_popcnt_u32;1 +_mm_popcnt_u64;1 _mm_set_epi64x;1,1 _mm_shuffle_epi8;__m128i(),__m128i() _mm_slli_epi32;__m128i(),1 _mm_testc_si128;__m128i(),__m128i() _mm_testz_si128;__m128i(),__m128i() _mm_xor_si128;__m128i(),__m128i() +# _mm_cmpeq_epi8;__m128i(),__m128i() +# _mm_cmplt_epi8;__m128i(),__m128i() +# _mm_max_epi8