コード例 #1
0
ファイル: CommandQueue.cs プロジェクト: bonomali/Ibasa
        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));
            }
        }
コード例 #2
0
 public static void EnqueueWaitForEvents(this CommandQueue commandQueue, params Event[] waitFor)
 {
     Cl.EnqueueWaitForEvents(commandQueue, (uint)waitFor.Length, waitFor);
 }