Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
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 std::exception {
public:
  // construct/copy/destruct
  context_error(const context *, const char *, const void *, size_t);
  ~context_error();

  // public member functions
  const char * what() const;
  const context * get_context_ptr() const;
  const void * get_private_info_ptr() const;
  size_t get_private_info_size() 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 char * what() const;
    Returns a string with a description of the error.
  2. const context * get_context_ptr() const;

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

  3. const void * get_private_info_ptr() const;
    Returns a pointer to the private info memory block.
  4. size_t get_private_info_size() const;
    Returns the size of the private info memory block.

PrevUpHomeNext