Exemple #1
0
PUBLIC cl_int
clReleaseCommandQueue(cl_command_queue q) {
   if (!q)
      return CL_INVALID_COMMAND_QUEUE;

   if (q->release())
      delete q;

   return CL_SUCCESS;
}
Exemple #2
0
	cl_int clReleaseCommandQueueFCL (cl_command_queue command_queue)
	{
		MSG(clReleaseCommandQueueFCL);
		if (!FreeOCL::is_valid(command_queue))
			return CL_INVALID_COMMAND_QUEUE;

		command_queue->release();
		if (command_queue->get_ref_count() == 0)
		{
			command_queue->invalidate();
			command_queue->unlock();
			delete command_queue;
		}
		else
			command_queue->unlock();
		return CL_SUCCESS;
	}