Skip to content

Commit

Permalink
Merge pull request #1598 from evoskuil/master
Browse files Browse the repository at this point in the history
Incorporate MIT Licensed PoolSTL single file impl.
  • Loading branch information
evoskuil authored Jan 28, 2025
2 parents 67bbd3f + 7b47ca9 commit 98b075a
Show file tree
Hide file tree
Showing 8 changed files with 2,834 additions and 94 deletions.
99 changes: 6 additions & 93 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,12 @@ jobs:
optimization: "debug"
assert: "debug"
coverage: "nocov"
detectcpuflags: "ignore"
boost: "--build-boost"
icu: ""
secp256k1: "--build-secp256k1"
cc: "clang-15"
flags: "-Og -fPIE"
options: "--enable-isystem --enable-avx2 --enable-sse41"
options: "--enable-isystem --enable-avx2 --enable-sse4"
packager: "apt"
packages: ""

Expand All @@ -39,7 +38,6 @@ jobs:
optimization: "size"
assert: "ndebug"
coverage: "nocov"
detectcpuflags: "ignore"
boost: "--build-boost"
icu: "--build-icu --with-icu"
secp256k1: "--build-secp256k1"
Expand All @@ -55,13 +53,12 @@ jobs:
optimization: "size"
assert: "ndebug"
coverage: "nocov"
detectcpuflags: "ignore"
boost: "--build-boost"
icu: ""
secp256k1: "--build-secp256k1"
cc: "gcc-11"
flags: "-Os -fPIE"
options: "--enable-isystem --enable-sse41"
options: "--enable-isystem --enable-sse4"
packager: "apt"
packages: ""

Expand All @@ -71,7 +68,6 @@ jobs:
optimization: "size"
assert: "ndebug"
coverage: "cov"
detectcpuflags: "detect"
boost: "--build-boost"
icu: "--build-icu --with-icu"
secp256k1: "--build-secp256k1"
Expand All @@ -87,7 +83,6 @@ jobs:
optimization: "size"
assert: "ndebug"
coverage: "nocov"
detectcpuflags: "ignore"
boost: "--build-boost"
icu: ""
secp256k1: "--build-secp256k1"
Expand All @@ -103,7 +98,6 @@ jobs:
optimization: "size"
assert: "ndebug"
coverage: "nocov"
detectcpuflags: "ignore"
boost: "--build-boost"
icu: ""
secp256k1: "--build-secp256k1"
Expand Down Expand Up @@ -142,29 +136,6 @@ jobs:
run: |
brew install autoconf automake libtool ${{ matrix.packages }}
- name: Determine CPU flags
shell: bash
run: |
if [[ -n $(cat /proc/cpuinfo | grep flags | grep " sse4_1 ") ]]; then
echo "CPU_SUPPORT_SSE41=--enable-sse41" >> $GITHUB_ENV
fi
if [[ -n $(cat /proc/cpuinfo | grep flags | grep " avx " | grep " avx2 ") ]]; then
echo "CPU_SUPPORT_AVX2=--enable-avx2" >> $GITHUB_ENV
fi
if [[ -n $(cat /proc/cpuinfo | grep flags | grep " avx512bw ") ]]; then
echo "CPU_SUPPORT_AVX512=--enable-avx512" >> $GITHUB_ENV
fi
if [[ -n $(cat /proc/cpuinfo | grep flags | grep " sha_ni ") ]]; then
echo "CPU_SUPPORT_SHANI=--enable-shani" >> $GITHUB_ENV
fi
if [[ ${{ matrix.detectcpuflags }} == 'detect' ]]; then
echo "CPU_SUPPORTED_FLAGS='$CPU_SUPPORT_SSE41 $CPU_SUPPORT_AVX2 $CPU_SUPPORT_AVX512 $CPU_SUPPORT_SHANI'" >> $GITHUB_ENV
fi
- name: Denormalize parameterization
shell: bash
run: |
Expand Down Expand Up @@ -203,7 +174,6 @@ jobs:
--prefix=${{ env.LIBBITCOIN_SRC_PATH }}prefix
${{ env.LINKAGE }}
${{ env.ASSERT_NDEBUG }}
${{ env.CPU_SUPPORTED_FLAGS }}
${{ matrix.boost }}
${{ matrix.icu }}
${{ matrix.secp256k1 }}
Expand Down Expand Up @@ -285,13 +255,12 @@ jobs:
optimization: "debug"
assert: "debug"
coverage: "nocov"
detectcpuflags: "ignore"
boost: "--build-boost"
icu: ""
secp256k1: "--build-secp256k1"
cc: "clang-15"
flags: "-Og -fPIE"
options: "-Denable-avx2=on -Denable-sse41=on"
options: "-Denable-avx2=on -Denable-sse4=on"
packager: "apt"
packages: ""

Expand All @@ -301,7 +270,6 @@ jobs:
optimization: "size"
assert: "ndebug"
coverage: "nocov"
detectcpuflags: "ignore"
boost: "--build-boost"
icu: "--build-icu --with-icu"
secp256k1: "--build-secp256k1"
Expand All @@ -317,13 +285,12 @@ jobs:
optimization: "size"
assert: "ndebug"
coverage: "nocov"
detectcpuflags: "ignore"
boost: "--build-boost"
icu: ""
secp256k1: "--build-secp256k1"
cc: "gcc-11"
flags: "-Os -fPIE"
options: "-Denable-sse41=on"
options: "-Denable-sse4=on"
packager: "apt"
packages: ""

Expand All @@ -333,7 +300,6 @@ jobs:
optimization: "size"
assert: "ndebug"
coverage: "nocov"
detectcpuflags: "ignore"
boost: "--build-boost"
icu: "--build-icu --with-icu"
secp256k1: "--build-secp256k1"
Expand All @@ -349,7 +315,6 @@ jobs:
optimization: "size"
assert: "ndebug"
coverage: "nocov"
detectcpuflags: "ignore"
boost: "--build-boost"
icu: ""
secp256k1: "--build-secp256k1"
Expand All @@ -365,7 +330,6 @@ jobs:
optimization: "size"
assert: "ndebug"
coverage: "nocov"
detectcpuflags: "ignore"
boost: "--build-boost"
icu: ""
secp256k1: "--build-secp256k1"
Expand Down Expand Up @@ -404,29 +368,6 @@ jobs:
run: |
brew install autoconf automake libtool ${{ matrix.packages }}
- name: Determine CPU flags
shell: bash
run: |
if [[ -n $(cat /proc/cpuinfo | grep flags | grep " sse4_1 ") ]]; then
echo "CPU_SUPPORT_SSE41=-Denable-sse41=on" >> $GITHUB_ENV
fi
if [[ -n $(cat /proc/cpuinfo | grep flags | grep " avx " | grep " avx2 ") ]]; then
echo "CPU_SUPPORT_AVX2=-Denable-avx2=on" >> $GITHUB_ENV
fi
if [[ -n $(cat /proc/cpuinfo | grep flags | grep " avx512bw ") ]]; then
echo "CPU_SUPPORT_AVX512=-Denable-avx512=on" >> $GITHUB_ENV
fi
if [[ -n $(cat /proc/cpuinfo | grep flags | grep " sha_ni ") ]]; then
echo "CPU_SUPPORT_SHANI=-Denable-shani=on" >> $GITHUB_ENV
fi
if [[ ${{ matrix.detectcpuflags }} == 'detect' ]]; then
echo "CPU_SUPPORTED_FLAGS='$CPU_SUPPORT_SSE41 $CPU_SUPPORT_AVX2 $CPU_SUPPORT_AVX512 $CPU_SUPPORT_SHANI'" >> $GITHUB_ENV
fi
- name: Denormalize parameterization
shell: bash
run: |
Expand Down Expand Up @@ -468,7 +409,6 @@ jobs:
--prefix=${{ env.LIBBITCOIN_SRC_PATH }}prefix
${{ env.LINKAGE }}
${{ env.ASSERT_NDEBUG }}
${{ env.CPU_SUPPORTED_FLAGS }}
${{ matrix.boost }}
${{ matrix.icu }}
${{ matrix.secp256k1 }}
Expand Down Expand Up @@ -561,13 +501,12 @@ jobs:
optimization: "debug"
assert: "debug"
coverage: "nocov"
detectcpuflags: "ignore"
boost: "--build-boost"
icu: ""
secp256k1: "--build-secp256k1"
cc: "clang-15"
flags: "-Og -fPIE"
options: "-Denable-avx2=on -Denable-sse41=on"
options: "-Denable-avx2=on -Denable-sse4=on"
packager: "apt"
packages: ""

Expand All @@ -578,7 +517,6 @@ jobs:
optimization: "size"
assert: "ndebug"
coverage: "nocov"
detectcpuflags: "ignore"
boost: "--build-boost"
icu: "--build-icu --with-icu"
secp256k1: "--build-secp256k1"
Expand All @@ -595,13 +533,12 @@ jobs:
optimization: "size"
assert: "ndebug"
coverage: "nocov"
detectcpuflags: "ignore"
boost: "--build-boost"
icu: ""
secp256k1: "--build-secp256k1"
cc: "gcc-11"
flags: "-Os -fPIE"
options: "-Denable-sse41=on"
options: "-Denable-sse4=on"
packager: "apt"
packages: ""

Expand Down Expand Up @@ -634,29 +571,6 @@ jobs:
run: |
brew install autoconf automake libtool ${{ matrix.packages }}
- name: Determine CPU flags
shell: bash
run: |
if [[ -n $(cat /proc/cpuinfo | grep flags | grep " sse4_1 ") ]]; then
echo "CPU_SUPPORT_SSE41=-Denable-sse41=on" >> $GITHUB_ENV
fi
if [[ -n $(cat /proc/cpuinfo | grep flags | grep " avx " | grep " avx2 ") ]]; then
echo "CPU_SUPPORT_AVX2=-Denable-avx2=on" >> $GITHUB_ENV
fi
if [[ -n $(cat /proc/cpuinfo | grep flags | grep " avx512bw ") ]]; then
echo "CPU_SUPPORT_AVX512=-Denable-avx512=on" >> $GITHUB_ENV
fi
if [[ -n $(cat /proc/cpuinfo | grep flags | grep " sha_ni ") ]]; then
echo "CPU_SUPPORT_SHANI=-Denable-shani=on" >> $GITHUB_ENV
fi
if [[ ${{ matrix.detectcpuflags }} == 'detect' ]]; then
echo "CPU_SUPPORTED_FLAGS='$CPU_SUPPORT_SSE41 $CPU_SUPPORT_AVX2 $CPU_SUPPORT_AVX512 $CPU_SUPPORT_SHANI'" >> $GITHUB_ENV
fi
- name: Denormalize parameterization
shell: bash
run: |
Expand Down Expand Up @@ -699,7 +613,6 @@ jobs:
--preset=${{ matrix.preset }}
${{ env.LINKAGE }}
${{ env.ASSERT_NDEBUG }}
${{ env.CPU_SUPPORTED_FLAGS }}
${{ matrix.boost }}
${{ matrix.icu }}
${{ matrix.secp256k1 }}
Expand Down
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ include_bitcoin_system_HEADERS = \
include/bitcoin/system/constraints.hpp \
include/bitcoin/system/define.hpp \
include/bitcoin/system/exceptions.hpp \
include/bitcoin/system/execution.hpp \
include/bitcoin/system/forks.hpp \
include/bitcoin/system/funclets.hpp \
include/bitcoin/system/have.hpp \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@
<ClInclude Include="..\..\..\..\include\bitcoin\system\error\script_error_t.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\system\error\transaction_error_t.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\system\exceptions.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\system\execution.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\system\forks.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\system\funclets.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\system\hash\accumulator.hpp" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -869,6 +869,9 @@
<ClInclude Include="..\..\..\..\include\bitcoin\system\exceptions.hpp">
<Filter>include\bitcoin\system</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\bitcoin\system\execution.hpp">
<Filter>include\bitcoin\system</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\bitcoin\system\forks.hpp">
<Filter>include\bitcoin\system</Filter>
</ClInclude>
Expand Down
1 change: 1 addition & 0 deletions include/bitcoin/system.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <bitcoin/system/constraints.hpp>
#include <bitcoin/system/define.hpp>
#include <bitcoin/system/exceptions.hpp>
#include <bitcoin/system/execution.hpp>
#include <bitcoin/system/forks.hpp>
#include <bitcoin/system/funclets.hpp>
#include <bitcoin/system/have.hpp>
Expand Down
Loading

0 comments on commit 98b075a

Please sign in to comment.