mirror of
https://github.com/kimwalisch/primecount.git
synced 2026-06-08 03:39:47 +09:00
39 lines
1.2 KiB
C++
39 lines
1.2 KiB
C++
///
|
|
/// @file S.hpp
|
|
/// @brief The S1 and S2 functions are part of the Deleglise-Rivat
|
|
/// prime counting algorithm.
|
|
///
|
|
/// Copyright (C) 2026 Kim Walisch, <kim.walisch@gmail.com>
|
|
///
|
|
/// This file is distributed under the BSD License. See the COPYING
|
|
/// file in the top level directory.
|
|
///
|
|
|
|
#ifndef S_HPP
|
|
#define S_HPP
|
|
|
|
#include <int128_t.hpp>
|
|
#include <print.hpp>
|
|
|
|
#include <stdint.h>
|
|
|
|
namespace primecount {
|
|
|
|
int64_t S1(int64_t x, int64_t y, int64_t c, int threads, bool print = is_print());
|
|
int64_t S2_trivial(int64_t x, int64_t y, int64_t z, int64_t c, int threads, bool print = is_print());
|
|
int64_t S2_easy(int64_t x, int64_t y, int64_t z, int64_t c, int threads, bool print = is_print());
|
|
int64_t S2_hard(int64_t x, int64_t y, int64_t z, int64_t c, int threads, bool print = is_print());
|
|
|
|
#ifdef HAVE_INT128_T
|
|
|
|
int128_t S1(int128_t x, int64_t y, int64_t c, int threads, bool print = is_print());
|
|
int128_t S2_trivial(int128_t x, int64_t y, int64_t z, int64_t c, int threads, bool print = is_print());
|
|
int128_t S2_easy(int128_t x, int64_t y, int64_t z, int64_t c, int threads, bool print = is_print());
|
|
int128_t S2_hard(int128_t x, int64_t y, int64_t z, int64_t c, int threads, bool print = is_print());
|
|
|
|
#endif
|
|
|
|
} // namespace
|
|
|
|
#endif
|