<MPSDeviceProvider>(3) MetalPerformanceShaders.framework <MPSDeviceProvider>(3)

<MPSDeviceProvider>

#import <MPSCoreTypes.h>

Inherited by MPSKeyedUnarchiver.


(id< MTLDevice >) - mpsMTLDevice

A way of extending a NSCoder to enable the setting of MTLDevice for unarchived objects When a object is initialized by a NSCoder, it calls -initWithCoder:, which is missing the necessary MTLDevice to correctly initialize the MPSKernel, or MPSNNGraph. If the coder does not conform to MPSDeviceProvider, the system default device will be used. If you would like to specify which device to use, subclass the NSCoder (NSKeyedUnarchiver, etc.) to conform to MPSDeviceProvider so that the device can be gotten from the NSCoder.

See MPSKeyedUnarchiver for one implementation of this protocol. It reads files prepared with the NSKeyedArchiver and allows you to set the MTLDevice that the unarchived objects use.

- (id <MTLDevice>) mpsMTLDevice

Return the device to use when making MPSKernel subclasses from the NSCoder

Reimplemented in MPSKeyedUnarchiver.

Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code.

Mon Jul 9 2018 Version MetalPerformanceShaders-119.3