PrevUpHomeNext

Class context_error

boost::compute::context_error — A run-time OpenCL context error.

Synopsis

// In header: <boost/compute/exception/context_error.hpp>


class context_error : public exception {
public:
  // construct/copy/destruct
  context_error(const context *, const char *, const void *, size_t);
  ~context_error();

  // public member functions
  const context * get_context() const;
  const char * what() const;
};

Description

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 construct/copy/destruct

  1. context_error(const context * context, const char * errinfo, 
                  const void * private_info, size_t private_info_size);
    Creates a new context error exception object.
  2. ~context_error();
    Destroys the context error object.

context_error public member functions

  1. const context * get_context() const;

    Returns a pointer to the context object which generated the error notification.

  2. const char * what() const;
    Returns a string with a description of the error.

PrevUpHomeNext