// // Created by Kyle Stevenson on 01/02/2025. // #ifndef PRIME_SIEVES_H #define PRIME_SIEVES_H #include #include #include #include #include "bit_operations.h" /** * @brief Implements the Sieve of Eratosthenes algorithm using bitwise operations. * * This function efficiently finds all prime numbers up to a given limit by using a bit array. * Each number is represented by a single bit, significantly reducing memory usage compared * to a traditional boolean array. * * @param maxBits The upper bound (inclusive) up to which prime numbers are computed. * @param dbFile The path to the SQLite database file. * */ void sieveOfEratosthenes(const size_t maxBits, const char *dbFile); #endif //PRIME_SIEVES_H