Function pocky_opencl_context_default

Function Documentation

cl_int pocky_opencl_context_default(cl_context *ctx)

Creates a context with the default platform and devices.

Important

The user is responsible for checking the return code before using the context in ctx, since the handle is not valid if the context could not be created.

Parameters:
  • ctx[out] Created context with default configuration

Returns:

On success, CL_SUCCESS, otherwise an OpenCL error code