public Event EnqueueUnmapMemObject(MemObject memObject, IntPtr mappedPointer, params Event[] eventWaitList) { EventSafeHandle[] eventHandles = null; if (eventWaitList != null) { eventHandles = Array.ConvertAll(eventWaitList, @event => @event.Handle); } EventSafeHandle handle = UnsafeNativeMethods.EnqueueUnmapMemObject(Handle, memObject.BaseHandle, mappedPointer, eventHandles); return(new Event(handle)); }
private static UnsafeNativeMethods.MemObjectDestructorCallback CreateCallback(MemObject key) { return((memObject, data) => key.OnDestroyed()); }
public Event EnqueueMigrateMemObjects(MemObject[] memObjects, MigrationFlags flags, params Event[] eventWaitList) { MemObjectSafeHandle[] memHandles = null; if (memObjects != null) memHandles = Array.ConvertAll(memObjects, mem => mem.BaseHandle); EventSafeHandle[] eventHandles = null; if (eventWaitList != null) eventHandles = Array.ConvertAll(eventWaitList, @event => @event.Handle); EventSafeHandle handle = UnsafeNativeMethods.EnqueueMigrateMemObjects(this.Handle, memHandles, flags, eventHandles); return new Event(handle); }
public Event EnqueueUnmapMemObject(MemObject memObject, IntPtr mappedPointer, params Event[] eventWaitList) { EventSafeHandle[] eventHandles = null; if (eventWaitList != null) eventHandles = Array.ConvertAll(eventWaitList, @event => @event.Handle); EventSafeHandle handle = UnsafeNativeMethods.EnqueueUnmapMemObject(this.Handle, memObject.BaseHandle, mappedPointer, eventHandles); return new Event(handle); }
private static UnsafeNativeMethods.MemObjectDestructorCallback CreateCallback(MemObject key) { return (memObject, data) => key.OnDestroyed(); }