device reference count.
cl_int clRetainDevice(cl_device_id device)
CL_SUCCESS if the function is executed successfully or the device is a root-level device.
Otherwise, it returns one of the following errors:
deviceis not a valid sub-device created by a call to
CL_OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.
CL_OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.