Function pocky_opencl_context_default_gpus

Function Documentation

cl_int pocky_opencl_context_default_gpus(cl_context *ctx)

Creates a context with the default platform and its GPU 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