Interface MPSNNGramMatrixCallback

  • All Superinterfaces:
    NSCoding, NSCopying, NSSecureCoding

    public interface MPSNNGramMatrixCallback
    extends NSSecureCoding, NSCopying
    [@protocol] MPSNNGramMatrixCallback MPSNNGramMatrixCallback Defines a callback protocol for @ref MPSNNGramMatrixCalculationNode to set the 'alpha' scaling value dynamically just before encoding the underlying MPSNNGramMatrixCalculation kernel.
    • Method Detail

      • alphaForSourceImageDestinationImage

        float alphaForSourceImageDestinationImage​(MPSImage sourceImage,
                                                  MPSImage destinationImage)
        Returns the desired alpha scaling value.
        Parameters:
        sourceImage - One of the source images in the batch given as a reference for the alpha computation.
        destinationImage - One of the destination images in the batch given as a reference for the alpha computation.
        Returns:
        The desired alpha value.