summaryrefslogtreecommitdiff
path: root/sieve.hh
blob: c3e6c14f64723ef0b8bd89f24ed2ba5be6a4f221 (plain)
1
2
3
4
5
6
7
8
9
10
11
#pragma once

#include <vector>

[[nodiscard]] bool isPrime(std::size_t x);

[[nodiscard]] std::vector<int> sieve1(std::size_t size);
[[nodiscard]] std::vector<int> sieve2(std::size_t size);
[[nodiscard]] std::vector<int> sieve3(std::size_t size);
[[nodiscard]] std::vector<int> segmentedSieve(std::size_t size);
[[nodiscard]] std::vector<int> pthreadSieve(std::size_t size);