Example #1
0
        public Event EnqueueWriteImage(Image image, bool blocking, BufferCoordinates origin, BufferSize region, long inputRowPitch, long inputSlicePitch, IntPtr source, params Event[] eventWaitList)
        {
            EventSafeHandle[] eventHandles = null;
            if (eventWaitList != null)
            {
                eventHandles = Array.ConvertAll(eventWaitList, @event => @event.Handle);
            }

            EventSafeHandle handle = UnsafeNativeMethods.EnqueueWriteImage(Handle, image.Handle, blocking, ref origin, ref region, (IntPtr)inputRowPitch, (IntPtr)inputSlicePitch, source, eventHandles);

            return(new Event(handle));
        }