We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9a58e7 commit a9803e5Copy full SHA for a9803e5
cp-algo/math/sieve.hpp
@@ -109,7 +109,6 @@ namespace cp_algo::math {
109
return primes;
110
}();
111
112
- constexpr size_t max_wheel_size = 1 << 21;
113
struct wheel_t {
114
dynamic_bit_array mask;
115
uint32_t product;
@@ -187,8 +186,9 @@ namespace cp_algo::math {
187
186
N++;
188
dynamic_bit_array prime(to_ord(N));
189
prime.set_all();
190
- constexpr uint32_t wheel_threshold = 500;
191
static const auto [wheels, medium_primes_begin] = []() {
+ constexpr size_t max_wheel_size = 1 << 21;
+ constexpr uint32_t wheel_threshold = 500;
192
uint32_t product = period * dynamic_bit_array::width;
193
big_vector<uint32_t> current;
194
big_vector<wheel_t> wheels;
0 commit comments