示例#1
0
        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));
        }
示例#2
0
 private static UnsafeNativeMethods.MemObjectDestructorCallback CreateCallback(MemObject key)
 {
     return((memObject, data) => key.OnDestroyed());
 }
示例#3
0
        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);
        }
示例#4
0
        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);
        }
示例#5
0
 private static UnsafeNativeMethods.MemObjectDestructorCallback CreateCallback(MemObject key)
 {
     return (memObject, data) => key.OnDestroyed();
 }