...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::compute::context_error — A run-time OpenCL context error.
// In header: <boost/compute/exception/context_error.hpp> class context_error : public std::exception { public: // public member functions context_error(const context *, const char *, const void *, size_t); ~context_error(); const char * what() const; const context * get_context_ptr() const; const void * get_private_info_ptr() const; size_t get_private_info_size() const; };
The context_error exception is thrown when the OpenCL context encounters an error condition. Boost.Compute is notified of these error conditions by registering an error handler when creating context objects (via the pfn_notify
argument to the clCreateContext()
function).
This exception is different than the opencl_error exception which is thrown as a result of error caused when calling a single OpenCL API function.
See Also: opencl_error
context_error
public member functionscontext_error(const context * context, const char * errinfo, const void * private_info, size_t private_info_size);Creates a new context error exception object.
~context_error();Destroys the context error object.
const char * what() const;Returns a string with a description of the error.
const context * get_context_ptr() const;
Returns a pointer to the context object which generated the error notification.
const void * get_private_info_ptr() const;Returns a pointer to the private info memory block.
size_t get_private_info_size() const;Returns the size of the private info memory block.