Context Functions

Creates an OpenCL context.
An OpenCL context is created with one or more devices. Contexts are used by
the OpenCL runtime for managing objects such as command-queues, memory,
program and kernel objects and for executing kernels on one or more devices
specified in the context.

Increment the context reference count.
clCreateContext and clCreateContextFromType perform an implicit retain.
This is very helpful for 3rd party libraries, which typically get a context
passed to them by the application. However, it is possible that the
application may delete the context without informing the library. Allowing
functions to attach to (i.e. retain) and release a context solves the
problem of a context being used by a library no longer being valid.
Returns True if the function is executed successfully, or False if
context is not a valid OpenCL context.

Decrement the context reference count.
After the context reference count becomes zero and all the objects attached
to context (such as memory objects, command-queues) are released, the
context is deleted.
Returns True if the function is executed successfully, or False if
context is not a valid OpenCL context.

Return the context reference count. The reference count returned should be
considered immediately stale. It is unsuitable for general use in
applications. This feature is provided for identifying memory leaks.