/// <summary> /// Enqueues a wait command for a collection of <see cref="ComputeEvent"/>s to complete before any future commands queued in the <see cref="ComputeCommandQueue"/> are executed. /// </summary> /// <param name="events"> The <see cref="ComputeEvent"/>s that this command will wait for. </param> public void Wait(ICollection <ComputeEventBase> events) { int eventWaitListSize; CLEventHandle[] eventHandles = ComputeTools.ExtractHandles(events, out eventWaitListSize); ComputeErrorCode error = CL10.EnqueueWaitForEvents(Handle, eventWaitListSize, eventHandles); ComputeException.ThrowOnError(error); }
/// <summary> /// Enqueues a wait command for a collection of <see cref="OpenCLEvent"/>s to complete before any future commands queued in the <see cref="OpenCLCommandQueue"/> are executed. /// </summary> /// <param name="events"> The <see cref="OpenCLEvent"/>s that this command will wait for. </param> public void Wait(IReadOnlyList <OpenCLEventBase> events) { int eventWaitListSize; CLEventHandle[] eventHandles = OpenCLTools.ExtractHandles(events, out eventWaitListSize); OpenCLErrorCode error = CL10.EnqueueWaitForEvents(Handle, eventWaitListSize, eventHandles); OpenCLException.ThrowOnError(error); }