1 /* Licensed under LGPLv2+ - see LICENSE file for details */
2 #ifndef CCAN_ERATOSTHENES_H_
3 #define CCAN_ERATOSTHENES_H_
9 #include <ccan/bitmap/bitmap.h>
16 void eratosthenes_init(struct eratosthenes *s);
18 void eratosthenes_reset(struct eratosthenes *s);
20 void eratosthenes_sieve(struct eratosthenes *s, unsigned long limit);
22 bool eratosthenes_isprime(const struct eratosthenes *s, unsigned long n);
24 unsigned long eratosthenes_nextprime(const struct eratosthenes *s,
27 #endif /* CCAN_ERATOSTHENES_H_ */