Previous  Next

CLContextCreate

Creates an OpenCL context and returns its handle.

int  CLContextCreate(
   int  device=CL_USE_ANY     // Serial number of the OpenCL device or macro
   );

Parameter

device

[in]  The ordinal number of the OpenCL-device in the system. Instead of a specific number, you can specify one of the following values:

Return Value

A handle to the OpenCL context if successful, otherwise -1. For information about the error, use the GetLastError() function.