Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
4015fbc
Initial Commit
mborland Jul 9, 2020
3ee737b
Changed init of least_divisors
mborland Jul 10, 2020
9512bb6
Cleanup
mborland Jul 10, 2020
d762398
Cleanup
mborland Jul 10, 2020
5375a1d
Added additional tests, benchmarks, and overflow checks
mborland Jul 10, 2020
a684dbd
Fix include guard naming
mborland Jul 10, 2020
3e4db8a
Complete revamp of algorithm. Hide implementation behind detail names…
mborland Jul 12, 2020
dd8a61c
Re-added support and tests for boost::multiprecision::cpp_int [CI SKIP]
mborland Jul 12, 2020
4debd0d
Changed benchmarks to support threading [CI SKIP]
mborland Jul 13, 2020
2a7e031
Added execution policies. Increased performance for dynamically linke…
mborland Jul 14, 2020
a68910e
Added massively parallel section to prime_sieve. Increased length of …
mborland Jul 14, 2020
386cc4d
Add test for multi-threading section and add to Jamfile [CI SKIP]
mborland Jul 15, 2020
d79eddb
Added prime sieve to existing prime numbers documentation [CI SKIP]
mborland Jul 15, 2020
3fdf917
Revisions to documentation and send to CI
mborland Jul 15, 2020
6ca245b
Changed include guards to be compatible with C++11 and 14.
mborland Jul 15, 2020
7d3a520
Fixed doc, and ensured that primes are sorted
mborland Jul 15, 2020
a1ac504
Fixed documentation. Complete re-design of mask_sieve algo. Pre-gener…
mborland Jul 16, 2020
35d2aa1
All vectors now init {}. Change include guards. Replace raw pointer.
mborland Jul 17, 2020
243a299
Changed from [lower_bound, upper_bound] to [lower_bound, upper_bound)…
mborland Jul 18, 2020
2eadeff
Fixed documentation [CI SKIP]
mborland Jul 18, 2020
173ce0d
segmented_sieve now runs using std::async. [CI SKIP]
mborland Jul 18, 2020
23fba36
Removed extraneous operations [CI SKIP]
mborland Jul 19, 2020
f7b45fd
Cleanup style, and delete unused function. Enable par_unseq mask_siev…
mborland Jul 19, 2020
d687d5e
Small Cleanup and limit reduction for sieving methods.
mborland Jul 20, 2020
e51d727
Add pritchard's sub-linear algo [WIP][CI SKIP]
mborland Jul 25, 2020
1245d27
Added pritchards segmented sieve [WIP][CI SKIP]
mborland Jul 26, 2020
2052081
Implemented binary search in SetS [WIP][CI SKIP]
mborland Jul 27, 2020
9f81e0d
Tests and performance compairsons [WIP][CI SKIP]
mborland Jul 27, 2020
55ea045
More tests. Segmented sieve small cases fix
mborland Jul 27, 2020
31a2105
Imporve segmented performance [WIP][CI SKIP]
mborland Jul 29, 2020
f545928
Replaced SetS members with stl algos [WIP][CI SKIP]
mborland Jul 29, 2020
d780db5
Replace searching with tracked index. General performance improvement…
mborland Jul 31, 2020
2639bed
Minor change to SetS remove [WIP][CI SKIP]
mborland Aug 1, 2020
94fc1ac
Pritchard segmented performance improvements [WIP][CI SKIP]
mborland Aug 1, 2020
6ebb906
Fixed failed test [WIP][CI SKIP]
mborland Aug 1, 2020
0521854
Various performance improvements [WIP][CI SKIP]
mborland Aug 2, 2020
b233a80
Build primes in situ [WIP][CI SKIP]
mborland Aug 2, 2020
f95c2cf
Refactoring. Now requires C++17
mborland Aug 2, 2020
8e2e29a
Add segmented bit sieve [WIP][CI SKIP]
mborland Aug 4, 2020
1a24f16
Removed segmented bit sieve and excess headers [CI SKIP]
mborland Aug 6, 2020
c63f1f1
Added wheel class [WIP][CI SKIP]
Aug 15, 2020
b7d4256
Added fixed mod 210 wheel [WIP][CI SKIP]
Aug 23, 2020
fbc38c8
New segmented sieve algorithm [WIP][CI SKIP]
Aug 23, 2020
2e46b81
Added interval sieve to performance test [CI SKIP]
Aug 23, 2020
6759ede
Added unit tests [WIP][CI SKIP]
Aug 23, 2020
1b40403
Implemented interval sieve [CI SKIP]
Aug 23, 2020
97244be
Performance improvements and bug fixes [CI SKIP]
Aug 24, 2020
fa04133
Significant refactoring [WIP][CI SKIP]
Aug 25, 2020
c4a89c8
Seq policy actually sequential [CI SKIP]
Aug 25, 2020
91836f6
Fixes for multiprecision and policies [CI SKIP]
Aug 25, 2020
6d6b19f
cpp_int now passes all tests [CI SKIP]
Aug 27, 2020
81e4a6c
mpz_int passes unit tests [CI SKIP]
Aug 27, 2020
0b8f1d5
Documentation edits [CI SKIP]
mborland Aug 30, 2020
5ba0a1d
Replace magic number w variable template [CI SKIP]
mborland Aug 31, 2020
8e240f7
Better prime_range implementation [WIP][CI SKIP]
mborland Aug 31, 2020
7c0cbbf
Merge branch 'develop' into prime_functions
mborland Sep 1, 2020
3d9b77c
Minor changes and doc updates
mborland Sep 2, 2020
302fb5f
Merge branch 'develop' into prime_functions
mborland Sep 5, 2020
9792a23
Minor change to policy handling [CI SKIP]
mborland Sep 6, 2020
84a69f0
diffs from @jzmaddock [CI SKIP]
mborland Sep 8, 2020
5dc3523
Implemented linear sieve with iterators
mborland Sep 9, 2020
0dbe69c
Sanitize linear prime sieve and add wheel
mborland Sep 9, 2020
eee2c86
Added container method
mborland Sep 26, 2020
f5d789a
Improved Linear Algo and testing
mborland Sep 27, 2020
f2277e3
Merge branch 'prime_iterator' into mborland/prime_iterator
mborland Sep 27, 2020
1d2f03c
Linear sieve with output iterator and refactoring [CI SKIP][WIP]
mborland Sep 27, 2020
0d9d31b
Merge branch 'prime_functions' into mborland/prime_functions
mborland Sep 27, 2020
c361cde
Linear output iterator and refactoring [CI SKIP]
mborland Sep 27, 2020
66c2642
Added prime approximation function
mborland Sep 27, 2020
de1f331
prime approximation function for a range
mborland Sep 27, 2020
eaea5f9
Added interval sieve for output iterators
mborland Sep 27, 2020
e8196f3
Merge remote-tracking branch 'origin/develop' into prime_iterator
mborland Sep 27, 2020
58a1c7a
Merge branch 'prime_functions' of https://github.com/mborland/math in…
jzmaddock Sep 27, 2020
44ae862
Experimental prime_sieve.
jzmaddock Sep 27, 2020
cb5d978
Interval sieve with OI passes unit tests [CI SKIP]
mborland Sep 27, 2020
830ccc4
Merge branch 'prime_iterator' into prime_functions
mborland Sep 27, 2020
4dc3eb2
Add sequential composite sieve with OI [CI SKIP]
mborland Sep 30, 2020
90be100
Add threaded method. Currently INOP [CI SKIP]
mborland Sep 30, 2020
a772782
Threaded method completed and validated [CI SKIP]
mborland Oct 1, 2020
2d1461f
Resolves issue #439 [CI SKIP]
mborland Oct 1, 2020
e7cdb32
Updated benchmarks [CI SKIP]
mborland Oct 2, 2020
24a1e6c
Merge branch 'prime_functions' of https://github.com/mborland/math in…
jzmaddock Oct 2, 2020
263c7a2
Add experimental threaded support.
jzmaddock Oct 2, 2020
29eef88
Correct benchmark memory allocation [CI SKIP]
mborland Oct 3, 2020
b5a28b5
Add linear sieve direct from stepanov [CI SKIP]
mborland Oct 4, 2020
6c26b53
First draft of eratosthenes w/ wheel [CI SKIP]
mborland Oct 4, 2020
980bfe7
Fixes for multiprecision types [CI SKIP]
mborland Oct 4, 2020
07e6f58
wheel sieve passes standard battery [CI SKIP]
mborland Oct 4, 2020
86b9e5a
Add prime sieve wrapper [CI SKIP]
mborland Oct 5, 2020
f19149e
Implement dual interface for prime sieve [CI SKIP]
mborland Oct 7, 2020
1ad0d51
Implement dual interface for prime_range [CI SKIP]
mborland Oct 7, 2020
ae08996
Merge branch 'prime_functions' of https://github.com/mborland/math in…
jzmaddock Oct 13, 2020
157a5a8
Fix some GCC performance issues in jm::prime_sieve.
jzmaddock Oct 19, 2020
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
Prev Previous commit
Next Next commit
Experimental prime_sieve.
  • Loading branch information
jzmaddock committed Sep 27, 2020
commit 44ae862ce9bcaa57635cb6e65c3aac55aa5dcbf1
7 changes: 4 additions & 3 deletions include/boost/math/special_functions/prime_sieve.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,9 @@ void prime_sieve(ExecutionPolicy&& policy, Integer upper_bound, Container &prime
boost::math::detail::linear_sieve(static_cast<Integer>(upper_bound), primes);
}

else if constexpr (std::is_same_v<std::remove_reference_t<decltype(policy)>, decltype(std::execution::seq)> ||
else if constexpr (std::is_same_v<std::remove_reference_t<decltype(policy)>, decltype(std::execution::seq)>
#if __cpp_lib_execution > 201900
||
std::is_same_v<std::remove_reference_t<decltype(policy)>, decltype(std::execution::unseq)>
#endif
)
Expand Down Expand Up @@ -306,9 +307,9 @@ void prime_range(ExecutionPolicy&& policy, Integer lower_bound, Integer upper_bo
boost::math::detail::linear_sieve(static_cast<Integer>(upper_bound), primes);
}

else if constexpr (std::is_same_v<std::remove_reference_t<decltype(policy)>, decltype(std::execution::seq)> ||
else if constexpr (std::is_same_v<std::remove_reference_t<decltype(policy)>, decltype(std::execution::seq)>
#if __cpp_lib_execution > 201900
std::is_same_v<std::remove_reference_t<decltype(policy)>, decltype(std::execution::unseq)>
|| std::is_same_v<std::remove_reference_t<decltype(policy)>, decltype(std::execution::unseq)>
#endif
)
{
Expand Down
Loading