summaryrefslogtreecommitdiff
path: root/sieve.hh
diff options
context:
space:
mode:
Diffstat (limited to 'sieve.hh')
-rw-r--r--sieve.hh11
1 files changed, 11 insertions, 0 deletions
diff --git a/sieve.hh b/sieve.hh
new file mode 100644
index 0000000..c3e6c14
--- /dev/null
+++ b/sieve.hh
@@ -0,0 +1,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);