You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ The goal for EPR was to create a correct and easy to use library with extremely
14
14
15
15
## Requirements
16
16
17
-
The EPR library requires compiler support for C++17 (if you are not using CMake, you may need to specify the option *-std="c++17"* when compiling). Compilers that are confirmed to build the library without warnings or errors on x86 include clang6, clang10, gcc7, gcc10, intel compiler 19, and Microsoft Visual C++ 2017 and 2019. The library is intended for use on all architectures (e.g. x86/64, ARM, RISC-V, Power), but has been tested only on x86/x64.
17
+
The EPR library requires compiler support for C++17 (if you are not using CMake, you may need to specify the option *-std="c++17"* when compiling). Compilers that are confirmed to build the library without warnings or errors on x86 include clang6, clang10, clang18, gcc7, gcc10, gcc13, intel compiler 19, and Microsoft Visual C++ 2017, 2019, 2022. The library is intended for use on all architectures (e.g. x86/64, ARM, RISC-V, Power), but has been tested only on x86/x64.
18
18
19
19
For good performance you absolutely *must* ensure that the standard macro NDEBUG (see <cassert>) is defined when compiling.
20
20
@@ -67,14 +67,15 @@ It may help to see a simple [example](examples/example_without_cmake).
67
67
68
68
The API consists of five header files in total (all the headers that are not under the *detail* folder). These files are the three general purpose files *factorize.h*, *is_prime.h*, *greatest_common_divisor.h*, and in the resource_intensive_api folder, the two special purpose files *factorize_intensive_uint32.h* and *IsPrimeIntensive.h*. Please view these files for their documentation. A quick summary of the functions is provided below; in all cases T is a template parameter of integral type.
69
69
70
-
*hurchalla::factorize(T x, int& num_factors)*. Returns a std::array containing the factors of x.
70
+
*hurchalla::factorize(T x, unsigned int& num_factors)*. Returns a std::array containing the factors of x.
71
71
*hurchalla::factorize(T x, std::vector& factors)*. Clears a std::vector and fills it with the factors of x.
72
72
*hurchalla::greatest_common_divisor(T a, T b)*. Returns the greatest common divisor of a and b.
73
73
*hurchalla::is_prime(T x)*. Returns true if x is prime. Otherwise returns false.
74
74
75
75
(from the resource_intensive_api folder)
76
-
*hurchalla::IsPrimeIntensive(T x)*. This is a functor that returns true if x is prime, and otherwise returns false. Depending on the type T, this functor can use a very large amount of memory and can take many seconds to construct. See IsPrimeIntensive.h for details.
77
-
*hurchalla::factorize_intensive_uint32(uint32_t x, int& num_factors, const IsPrimeIntensive<uint32_t,true>& ipi)*. Returns a std::array containing the factors of x. Note that the IsPrimeIntensive argument will usually take many seconds for you to construct and will use a large amount of memory. See IsPrimeIntensive.h for details.
76
+
*hurchalla::IsPrimeIntensive*. This is a functor called with (T x) that returns true if x is prime, and otherwise returns false. Depending on the type T, this functor can use a very large amount of memory and can take many seconds to construct. See IsPrimeIntensive.h for details.
77
+
*hurchalla::factorize_intensive_uint32(uint32_t x, unsigned int& num_factors, const IsPrimeIntensive<uint32_t,true>& ipi)*. Returns a std::array containing the factors of x. Note that the IsPrimeIntensive argument will usually take many seconds for you to construct and will use a large amount of memory. See IsPrimeIntensive.h for details.
78
+
*hurchalla::FactorByTable32*. This is a functor called with (uint32_t x) that returns a std::array containing the factors of x. The functor typically takes a few minutes to construct from scratch (i.e. when constructed without a pre-saved table file), since it creates a 1.5GB factor table in memory. To save the table to file, so as to use the file later to quickly construct this functor, the class provides writeTableToFile(). See FactorByTable32.h for details.
0 commit comments