Contents

MTLDeviceNotificationHandler

A Swift closure or an Objective-C block that Metal calls when the system adds or removes a GPU device.

Declaration

typealias MTLDeviceNotificationHandler = @Sendable (any MTLDevice, MTLDeviceNotificationName) -> Void

Parameters

  • device:

    An Mtldevice that represents the GPU that’s sending the notification.

  • notifyName:

    A notification that represents a change to a GPU device in the system.

See Also

Locating GPUs