MTLSharedEvent
A type that synchronizes memory operations to one or more resources across multiple CPUs, GPUs, and processes.
Declaration
protocol MTLSharedEvent : MTLEventMentioned in
Overview
The MTLSharedEvent protocol inherits the MTLEvent protocol. An event can only synchronize memory operations that run on a single Metal device. A shared event can synchronize memory operations across multiple Metal devices and the CPU. Shared events work anywhere you can work with a regular event.
Create an MTLSharedEvent by calling the makeSharedEvent() method of an MTLDevice instance.
To pass this event to another process:
Create a handle to the shared event by calling the makeSharedEventHandle() method.
Transfer the handle to another process with XPC.
From the other process, call the makeSharedEvent(handle:) method.
For more information about shared events and synchronizing memory operations to resources, see:
Topics
Synchronizing a shareable event
Creating a shared event handle
Instance Methods
See Also
Synchronizing with events
Implementing a multistage image filter using heaps and eventsAbout synchronization eventsSynchronizing events within a single deviceSynchronizing events across multiple devices or processesSynchronizing events between a GPU and the CPUMTLEventMTLSharedEventHandleMTLSharedEventListenerMTLSharedEventNotificationBlock