Пример #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();
 }