10 #ifndef PROGS_SRC_OPENCL_OPENCL_HELPER_HPP_ 11 #define PROGS_SRC_OPENCL_OPENCL_HELPER_HPP_ 22 #include "../../common/sigmaodd/helper.hpp" 23 #include "../../common/sigmaodd/primes.hpp" 41 extern const std::map<int32_t, std::string>
errors_map;
66 cl_device_local_mem_type
73 cl_device_mem_cache_type
115 VECTOR_CLASS<::size_t>
153 bool only_if_error =
true,
bool exit_if_error =
true);
171 #endif // PROGS_SRC_OPENCL_OPENCL_HELPER_HPP_ cl_ulong get_device_info_cl_ulong(const cl::Device &device, cl_device_info info)
Return the corresponding information about the device.
cl::Device get_first_device_gpu()
Return the first GPU device found. If not found then print an error message and exit.
cl_device_type get_device_info_cl_device_type(const cl::Device &device, cl_device_info info)
Return the corresponding information about the device.
uint64_t nat_type
Type for natural number used in all code, on 64 bits.
std::string get_device_info_string(const cl::Device &device, cl_device_info info)
Return the corresponding information about the device.
cl_uint get_device_info_cl_uint(const cl::Device &device, cl_device_info info)
Return the corresponding information about the device.
std::string error_name(cl_int code)
Return the error name corresponding to the error code.
uint32_t prime_type
Type for prime number, particularly for the table of primes.
sigmaodd::nat_type nat_type
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.
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.
void print_device(const cl::Device &device)
Print information on this device.
void print_platform(const cl::Platform &platform)
Print information on this platform.
void print_error(cl_int code, std::string message, bool only_if_error, bool exit_if_error)
Print an error message corresponding to the error code.
size_t get_device_info_size_t(const cl::Device &device, cl_device_info info)
Return the corresponding information about the device.
void print_platforms()
Print information on all platforms.
cl_bool get_device_info_cl_bool(const cl::Device &device, cl_device_info info)
Return the corresponding information about the device.
sigmaodd::prime_type prime_type
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.
const std::map< int32_t, std::string > errors_map
Table associating error codes to error names.
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.