Skip to content

Releases: kimwalisch/primecount

primecount-7.14

02 Aug 11:54
Compare
Choose a tag to compare

This is a maintenance release, the C/C++ API and ABI are fully backwards compatible with primecount-7.*

  • Fix libdivide.h issue with GCC 15 #76.
  • Move x86 cpuid code from cpuid.hpp to src/x86/cpuid.cpp.
  • Move generate.hpp code to src/generate_primes.cpp.
  • Move generate_phi.hpp code to src/phi_vector.cpp.
  • int128_t.hpp: Rename namespace port to pstd (portable std namespace).
  • Sieve.hpp: Tune AVX512 and ARM SVE simd code.
  • Sieve.hpp: Branchfree bitmask calculation.
  • cpu_supports_popcnt.hpp: Simplify, move preprocessor checks to new multiarch_x86_popcnt.cmake.
  • multiarch_avx512_vpopcnt.cmake: Tune AVX512 code.
  • multiarch_x86_popcnt.cmake: Detect x86 POPCNT.
  • CMakeLists.txt: Use CMake list for all compile time definitions.

primecount-7.13

18 Apr 17:57
Compare
Choose a tag to compare

This release adds runtime dispatching to AVX512 and ARM SVE for CPUs that support it. Runtime dispatching to AVX512 (x64 CPUs) is now enabled by default when compiling using GCC and Clang on all operating systems.

  • CMakeLists.txt: New WITH_MULTIARCH option (default ON).
  • Sieve.hpp: New AVX512 popcount algorithm for x86 CPUs.
  • Sieve.hpp: New ARM SVE popcount algorithm.
  • int128.cmake: Improve int128_t support for Windows.
  • OpenMP.cmake: Improve LLVM/Clang OpenMP detection.
  • Add preliminary MSVC 128-bit support.
  • Deleted ci-sage.yml, it has not been updated in 3 years.

primecount-7.12

02 Apr 19:31
Compare
Choose a tag to compare

This is a bug-fix release, the previous primecount-7.11 may cause an infinite loop when calculating the logarithmic integral on the i386 CPU architecture (x86 32-bit CPU using Linux and GNU glibc). The C/C++ API and ABI of this release are backwards compatible with the previous release.

  • LogarithmicIntegral.cpp: Fix infinite loop on Linux i386 #66.
  • RiemannR.cpp: Fix infinite loop on Linux i386 #66.
  • CMakeLists.txt: Remove WITH_POPCNT=OFF option used to build a portable primecount binary. primecount is now portable by default (on x86 CPUs primecount now checks using CPUID if the CPU supports the POPCNT instruction before using it).
  • popcnt.hpp: On x86 & x64 CPUs enable CPUID POPCNT runtime check by default (unless the user compiles with -mpopcnt).
  • LoadBalancerAC.cpp: New dynamic adaptive load balancing #67.
  • RiemannR.cpp: Faster and simpler RiemannR_inverse(x).
  • test/Li.cpp: Add more tests.
  • test/Riemann_R.cpp: Add more tests.
  • fast_div.hpp: Get rid of make_smaller<T>::type hack.

primecount-7.11

12 Mar 13:46
Compare
Choose a tag to compare

This is a new maintenance release, the C/C++ API and ABI are fully backwards compatible with the previous release.

  • CMakeLists.txt: Detect Apple Silicon CPUs at build time (on Apples OSes only) and disable libdivide since Apple Silicon CPUs have very fast integer division instructions that are usually faster than libdivide. This speeds up the computation of the easy special leaves algorithms (--S2-easy & --AC) by up to 10%.
  • Faster RiemannR(x) and RiemannR_inverse(x) implementations: kimwalisch/primesieve#144.
  • test/iroot.cpp: Fix musl libc issue: kimwalisch/primesieve#147.
  • test/Li.cpp: Speed up test.
  • CmdOptions.cpp: Detect incompatible options.
  • PiTable.cpp: Increase cache size to 2 KiB.
  • Renamed command-line option --Ri to -R or --RiemannR.
  • Renamed command-line option --Ri-inverse to --RiemannR-inverse.
  • Improve status output on Windows.
  • Update to latest primesieve-12.1 library.

primecount-7.10

10 Jan 21:13
Compare
Choose a tag to compare

This is a new maintenance release, it is fully backwards compatible with the previous release. This release contains a CMake bug fix, tests have been ported to GitHub Actions and the nth prime code has been cleaned up.

  • cmake/OpenMP.cmake: Improve libatomic detection: kimwalisch/primesieve#141
  • .github/workflows/ci.yml: Port AppVeyor CI tests to GitHub Actions.
  • RiemannR.cpp: Fix potential integer overflows in Li_inverse(x) & Ri_inverse(x).
  • nth_prime.cpp: Use new nth_prime_approx(n).
  • Vector.hpp: Rename pod_vector to Vector and pod_array to Array.
  • README.md: Add C & C++ API badges.
  • Update to latest primesieve-11.2 library.

Thanks to @sethtroisi and Sven S. for being sponsors in this release cycle!

primecount-7.9

03 Jul 19:19
785cf3c
Compare
Choose a tag to compare

The focus of this release has been to improve primecount's test suite. Before this release there were e.g. no unit tests for most of the algorithms used in the pi_gourdon(x) prime counting function. Now virtually everything is unit tested!

  • test/README.md: Add debug mode + GCC/Clang sanitizers documentation.
  • doc/BUILD.md: Add link to detailed test information.
  • test/pi_lehmer.cpp: Add new test.
  • test/pi_*.cpp: Add large pi(x) computation tests.
  • test/gourdon/AC.cpp: Add new test.
  • test/gourdon/B.cpp: Add new test.
  • test/gourdon/D.cpp: Add new test.
  • test/gourdon/Phi0.cpp: Add new test.
  • test/gourdon/Sigma.cpp: Add new test.
  • test/gourdon/alpha_y.cpp: Add 128-bit tests.
  • test/gourdon/alpha_z.cpp: Add 128-bit tests.
  • test/deleglise-rivat/S2_trivial.cpp: Add large computation tests.
  • test/deleglise-rivat/S2_easy.cpp: Add large computation tests.
  • test/deleglise-rivat/S2_hard.cpp: Add large computation tests.
  • test/deleglise-rivat/alpha_deleglise_rivat.cpp: Add 128-bit tests.
  • test/lmo/alpha.cpp: Add more tests.
  • test/api/nth_prime.cpp: Add large computation tests.

Thanks to @entersoftone for being a sponsor in this release cycle!

primecount-7.8

28 Mar 09:19
Compare
Choose a tag to compare

I fixed the pi(-n) crash for 64-bit integers two days ago. Unfortunately I forgot to fix the same issue for 128-bit integers. Hence this release fixes the same issue for 128-bit integers.

  • api.cpp: Add missing check for negative numbers in pi(int128_t x), pi_deleglise_rivat(int128_t x), pi_gourdon(int128_t x).
  • test/api.cpp: Add more pi(-n) tests.
  • test/api_c.cpp: Add more primecount_pi(-n) tests.
  • test/pi_cache.cpp: Add new test.
  • test/pi_deleglise_rivat.cpp: Add new test.
  • test/pi_gourdon.cpp: Add new test.
  • test/pi_legendre.cpp: Add new test.
  • test/pi_lmo5.cpp: Add new test.
  • test/pi_lmo_parallel.cpp: Add new test.
  • test/pi_meissel.cpp: Add new test.
  • CMakeLists.txt: Disable building libprimesieve examples.

primecount-7.7

26 Mar 16:46
Compare
Choose a tag to compare

This is a bug fix release.

  • api.cpp: Fix pi(-1) crash #64. Now pi(-1) returns 0 without reporting any error. (Same behavior for all other negative numbers i.e. pi(-n) = 0)
  • test/api.cpp: Add pi(-1) test.
  • test/api_c.c: Add primecount_pi(-1) test. Convert api_c.cpp to api_c.c.
  • test/nthprime.cpp: Add new test.
  • primecount.h: Fix -Wstrict-prototypes warning.

primecount-7.6

07 Dec 15:47
Compare
Choose a tag to compare

This is a bug fix release.

There is a missing header include in primecount-7.5 (in print.hpp) which may cause the build to fail when compiling with C++17 or later. This e.g. caused the build of primecount-7.5 to fail on Fedora-39 i686. This issue has been fixed in primecount-7.6, there are no other changes. The API and ABI of primecount-7.6 are backwards compatible with primecount-7.*

ChangeLog

  • print.hpp: Add missing <string_view> header.

primecount-7.5

06 Dec 18:08
Compare
Choose a tag to compare

The C/C++ API and ABI of primecount-7.5 are backwards compatible but primecount-7.5 now requires β‰₯ libprimesieve.so.11. The previous primecount-7.4 requried β‰₯ libprimesieve.so.10.

ChangeLog

  • Update to the latest libprimesieve-11.0.
  • phi.cpp: 10% phi(x, a) speedup.
  • pi_gourdon.cpp: Reduce context switches and cpu migrations by up to 2x.
  • LoadBalancerP2.cpp: Improve load balancing for high CPU core count servers.
  • S2_hard.cpp: Improve load balancing for high CPU core count servers.
  • S2_easy.cpp: Improve load balancing for high CPU core count servers.
  • AC.cpp: Improve load balancing for high CPU core count servers.
  • D.cpp: Improve load balancing for high CPU core count servers.
  • P3.cpp: Improve load balancing for high CPU core count servers.
  • Sieve.cpp: Simplify COUNT_UNSET_BIT() macro.
  • pod_vector.hpp: Added support for types with destructors.
  • CMakeLists.txt: Use WITH_DIV32=OFF when using the Clang compiler.
  • Hard-Special-Leaves.md: Convert formulas to MathJax.
  • Easy-Special-Leaves.md: Convert formulas to MathJax.
  • Partial-Sieve-Function.md: Convert formulas to MathJax.