Trait MLCustomLayer

Source
pub unsafe trait MLCustomLayer {
    // Provided methods
    unsafe fn initWithParameterDictionary_error(
        this: Allocated<Self>,
        parameters: &NSDictionary<NSString, AnyObject>,
    ) -> Result<Retained<Self>, Retained<NSError>>
       where Self: Sized + Message { ... }
    unsafe fn setWeightData_error(
        &self,
        weights: &NSArray<NSData>,
    ) -> Result<(), Retained<NSError>>
       where Self: Sized + Message { ... }
    unsafe fn outputShapesForInputShapes_error(
        &self,
        input_shapes: &NSArray<NSArray<NSNumber>>,
    ) -> Result<Retained<NSArray<NSArray<NSNumber>>>, Retained<NSError>>
       where Self: Sized + Message { ... }
    unsafe fn evaluateOnCPUWithInputs_outputs_error(
        &self,
        inputs: &NSArray<MLMultiArray>,
        outputs: &NSArray<MLMultiArray>,
    ) -> Result<(), Retained<NSError>>
       where Self: Sized + Message { ... }
    unsafe fn encodeToCommandBuffer_inputs_outputs_error(
        &self,
        command_buffer: &ProtocolObject<dyn MTLCommandBuffer>,
        inputs: &NSArray<ProtocolObject<dyn MTLTexture>>,
        outputs: &NSArray<ProtocolObject<dyn MTLTexture>>,
    ) -> Result<(), Retained<NSError>>
       where Self: Sized + Message { ... }
}
Available on crate feature MLCustomLayer only.
Expand description

Provided Methods§

Source

unsafe fn initWithParameterDictionary_error( this: Allocated<Self>, parameters: &NSDictionary<NSString, AnyObject>, ) -> Result<Retained<Self>, Retained<NSError>>
where Self: Sized + Message,

Source

unsafe fn setWeightData_error( &self, weights: &NSArray<NSData>, ) -> Result<(), Retained<NSError>>
where Self: Sized + Message,

Source

unsafe fn outputShapesForInputShapes_error( &self, input_shapes: &NSArray<NSArray<NSNumber>>, ) -> Result<Retained<NSArray<NSArray<NSNumber>>>, Retained<NSError>>
where Self: Sized + Message,

Source

unsafe fn evaluateOnCPUWithInputs_outputs_error( &self, inputs: &NSArray<MLMultiArray>, outputs: &NSArray<MLMultiArray>, ) -> Result<(), Retained<NSError>>
where Self: Sized + Message,

Available on crate feature MLMultiArray only.
Source

unsafe fn encodeToCommandBuffer_inputs_outputs_error( &self, command_buffer: &ProtocolObject<dyn MTLCommandBuffer>, inputs: &NSArray<ProtocolObject<dyn MTLTexture>>, outputs: &NSArray<ProtocolObject<dyn MTLTexture>>, ) -> Result<(), Retained<NSError>>
where Self: Sized + Message,

Available on crate feature objc2-metal and non-watchOS only.

Trait Implementations§

Source§

impl ProtocolType for dyn MLCustomLayer

Source§

const NAME: &'static str = "MLCustomLayer"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn MLCustomLayer
where T: ?Sized + Message + MLCustomLayer,

Implementations on Foreign Types§

Source§

impl<T> MLCustomLayer for ProtocolObject<T>
where T: ?Sized + MLCustomLayer,

Implementors§