public void EnqueueWaitForEvents(Event[] events) { ClHelper.ThrowNullException(Handle); if (events == null) { throw new ArgumentNullException("events"); } if (events.Length == 0) { throw new ArgumentException("events is empty."); } unsafe { int num_events = events == null ? 0 : events.Length; IntPtr *wait_list = stackalloc IntPtr[num_events]; for (int i = 0; i < num_events; ++i) { wait_list[i] = events[i].Handle; } ClHelper.GetError(Cl.EnqueueWaitForEvents(Handle, (uint)num_events, wait_list)); } }
public static void EnqueueWaitForEvents(this CommandQueue commandQueue, params Event[] waitFor) { Cl.EnqueueWaitForEvents(commandQueue, (uint)waitFor.Length, waitFor); }