Parallel numerical verification of the σ_odd problem
October 6, 2018
|
Typedefs | |
using | nat_type = sigmaodd::nat_type |
using | prime_type = sigmaodd::prime_type |
Functions | |
std::string | get_device_info_string (const cl::Device &device, cl_device_info info) |
Return the corresponding information about the device. More... | |
cl::Device | get_first_device_gpu () |
Return the first GPU device found. If not found then print an error message and exit. More... | |
std::string | error_name (cl_int code) |
Return the error name corresponding to the error code. More... | |
void | print_device (const cl::Device &device) |
Print information on this device. More... | |
void | print_error (cl_int code, std::string message="", bool only_if_error=true, bool exit_if_error=true) |
Print an error message corresponding to the error code. More... | |
void | print_platform (const cl::Platform &platform) |
Print information on this platform. More... | |
void | print_platforms () |
Print information on all platforms. More... | |
cl_bool | get_device_info_cl_bool (const cl::Device &device, cl_device_info info) |
Return the corresponding information about the device. More... | |
cl_device_fp_config | get_device_info_cl_device_fp_config (const cl::Device &device, cl_device_info info) |
Return the corresponding information about the device. More... | |
cl_device_local_mem_type | get_device_info_cl_device_local_mem_type (const cl::Device &device, cl_device_info info) |
Return the corresponding information about the device. More... | |
cl_device_mem_cache_type | get_device_info_cl_device_mem_cache_type (const cl::Device &device, cl_device_info info) |
Return the corresponding information about the device. More... | |
cl_device_type | get_device_info_cl_device_type (const cl::Device &device, cl_device_info info) |
Return the corresponding information about the device. More... | |
cl_uint | get_device_info_cl_uint (const cl::Device &device, cl_device_info info) |
Return the corresponding information about the device. More... | |
cl_ulong | get_device_info_cl_ulong (const cl::Device &device, cl_device_info info) |
Return the corresponding information about the device. More... | |
size_t | get_device_info_size_t (const cl::Device &device, cl_device_info info) |
Return the corresponding information about the device. More... | |
VECTOR_CLASS<::size_t > | get_device_info_vector_size_t (const cl::Device &device, cl_device_info info) |
Return the corresponding information about the device. More... | |
std::set< nat_type > | opencl_check_gentle_varsigma_odd (nat_type first_n, nat_type last_n, unsigned int opencl_nb_number=65536, bool print_bad=true, bool print_time=true) |
Check in the order all odd gentle numbers between first_n and last_n, and if print_bad then print all bad numbers between first_n and last_n (included). The consequence of the result is that: if (all numbers < first_n respect the conjecture) and (all perfect squares < last_n respect the conjecture) and (all bad numbers < last_n respect the conjecture) then all numbers < last_n respect the conjecture. More... | |
std::set< nat_type > | opencl_check_gentle_varsigma_odd__parallelize_factorization (nat_type first_n, nat_type last_n, unsigned int opencl_nb=1024, bool print_bad=true, bool print_time=true) |
Like opencl_check_gentle_varsigma_odd() but instead parallelize on group of opencl_nb numbers, compute separately for each number and parallelize the factorization. More... | |
std::vector< nat_type > | opencl_check_ns (const std::vector< nat_type > &ns) |
Check all numbers in ns and return vector of all bad numbers found. More... | |
std::vector< nat_type > | opencl_run_program_on_ns (const std::string &filename, const std::string &kernal_name, const std::vector< nat_type > &ns) |
Run the OpenCL program from filename on ns. Used for tests. More... | |
Variables | |
const std::map< int32_t, std::string > | errors_map |
Table associating error codes to error names. More... | |
using opencl::nat_type = typedef sigmaodd::nat_type |
Definition at line 28 of file helper.hpp.
using opencl::prime_type = typedef sigmaodd::prime_type |
Definition at line 29 of file helper.hpp.
std::string opencl::error_name | ( | cl_int | code | ) |
Return the error name corresponding to the error code.
Definition at line 215 of file helper.cpp.
cl_bool opencl::get_device_info_cl_bool | ( | const cl::Device & | device, |
cl_device_info | info | ||
) |
Return the corresponding information about the device.
cl_device_fp_config opencl::get_device_info_cl_device_fp_config | ( | const cl::Device & | device, |
cl_device_info | info | ||
) |
Return the corresponding information about the device.
cl_device_local_mem_type opencl::get_device_info_cl_device_local_mem_type | ( | const cl::Device & | device, |
cl_device_info | info | ||
) |
Return the corresponding information about the device.
cl_device_mem_cache_type opencl::get_device_info_cl_device_mem_cache_type | ( | const cl::Device & | device, |
cl_device_info | info | ||
) |
Return the corresponding information about the device.
cl_device_type opencl::get_device_info_cl_device_type | ( | const cl::Device & | device, |
cl_device_info | info | ||
) |
Return the corresponding information about the device.
cl_uint opencl::get_device_info_cl_uint | ( | const cl::Device & | device, |
cl_device_info | info | ||
) |
Return the corresponding information about the device.
cl_ulong opencl::get_device_info_cl_ulong | ( | const cl::Device & | device, |
cl_device_info | info | ||
) |
Return the corresponding information about the device.
size_t opencl::get_device_info_size_t | ( | const cl::Device & | device, |
cl_device_info | info | ||
) |
Return the corresponding information about the device.
std::string opencl::get_device_info_string | ( | const cl::Device & | device, |
cl_device_info | info | ||
) |
Return the corresponding information about the device.
Definition at line 169 of file helper.cpp.
VECTOR_CLASS<::size_t> opencl::get_device_info_vector_size_t | ( | const cl::Device & | device, |
cl_device_info | info | ||
) |
Return the corresponding information about the device.
cl::Device opencl::get_first_device_gpu | ( | ) |
Return the first GPU device found. If not found then print an error message and exit.
Definition at line 194 of file helper.cpp.
std::set< nat_type > opencl::opencl_check_gentle_varsigma_odd | ( | nat_type | first_n, |
nat_type | last_n, | ||
unsigned int | opencl_nb_number = 65536 , |
||
bool | print_bad = true , |
||
bool | print_time = true |
||
) |
Check in the order all odd gentle numbers between first_n and last_n, and if print_bad then print all bad numbers between first_n and last_n (included). The consequence of the result is that: if (all numbers < first_n respect the conjecture) and (all perfect squares < last_n respect the conjecture) and (all bad numbers < last_n respect the conjecture) then all numbers < last_n respect the conjecture.
If prime_time then print the calculation time computed by OpenCL.
sigmaodd::primes.cpp must be compiled without the macro PRIME16.
first_n | 3 <= odd <= last_n |
last_n | <= MAX_POSSIBLE_N |
opencl_nb_number | number of n transmitted to OpenCL in one step |
print_bad | |
print_time |
Definition at line 31 of file opencl.cpp.
std::set< nat_type > opencl::opencl_check_gentle_varsigma_odd__parallelize_factorization | ( | nat_type | first_n, |
nat_type | last_n, | ||
unsigned int | opencl_nb = 1024 , |
||
bool | print_bad = true , |
||
bool | print_time = true |
||
) |
Like opencl_check_gentle_varsigma_odd() but instead parallelize on group of opencl_nb numbers, compute separately for each number and parallelize the factorization.
sigmaodd::primes.cpp must be compiled without the macro PRIME16.
first_n | 3 <= odd <= last_n |
last_n | <= MAX_POSSIBLE_N |
opencl_nb | number of OpenCL units (must be a power of 2, at least 2) |
print_bad | |
print_time |
Definition at line 219 of file opencl.cpp.
Check all numbers in ns and return vector of all bad numbers found.
ns | vector of odds |
Definition at line 440 of file opencl.cpp.
std::vector< nat_type > opencl::opencl_run_program_on_ns | ( | const std::string & | filename, |
const std::string & | kernal_name, | ||
const std::vector< nat_type > & | ns | ||
) |
Run the OpenCL program from filename on ns. Used for tests.
Definition at line 516 of file opencl.cpp.
void opencl::print_device | ( | const cl::Device & | device | ) |
Print information on this device.
Definition at line 225 of file helper.cpp.
void opencl::print_error | ( | cl_int | code, |
std::string | message = "" , |
||
bool | only_if_error = true , |
||
bool | exit_if_error = true |
||
) |
Print an error message corresponding to the error code.
If only_if_error then print only if != 0, else print same if code == 0.
If exit_if_error and (code != 0) then exit.
Definition at line 352 of file helper.cpp.
void opencl::print_platform | ( | const cl::Platform & | platform | ) |
Print information on this platform.
Definition at line 373 of file helper.cpp.
void opencl::print_platforms | ( | ) |
Print information on all platforms.
Definition at line 407 of file helper.cpp.
const std::map< int32_t, std::string > opencl::errors_map |
Table associating error codes to error names.
https://www.khronos.org/registry/OpenCL/sdk/1.0/docs/man/xhtml/errors.html
Definition at line 28 of file helper.cpp.