Class MPSState

All Implemented Interfaces:
NSObjectProtocol, ObjCProtocol
Direct Known Subclasses:
MPSCNNConvolutionWeightsAndBiasesState, MPSCNNLossLabels, MPSCNNNormalizationGammaAndBetaState, MPSCNNNormalizationMeanAndVarianceState, MPSNDArrayGradientState, MPSNNBinaryGradientState, MPSNNGradientState, MPSNNMultiaryGradientState, MPSRNNMatrixTrainingState, MPSRNNRecurrentImageState, MPSRNNRecurrentMatrixState

public class MPSState
extends NSObject
Since:
Available in iOS 11.0 and later.
  • Constructor Details

  • Method Details

    • getResourceCount

      public long getResourceCount()
    • getReadCount

      public long getReadCount()
    • setReadCount

      public void setReadCount​(long v)
    • isTemporary

      public boolean isTemporary()
    • getLabel

      public String getLabel()
    • setLabel

      public void setLabel​(String v)
    • getResource

      @Deprecated public MTLResource getResource()
      Deprecated.
      Deprecated in iOS 12.0. Use Please use -resourceAtIndex:allocateMemory: instead
      Since:
      Available in iOS 11.0 and later.
    • init

      protected long init​(MTLDevice device, long bufferSize)
    • init

      protected long init​(MTLDevice device, MTLTextureDescriptor descriptor)
    • init

      protected long init​(MTLResource resource)
    • init

      protected long init​(MTLDevice device, MPSStateResourceList resourceList)
      Since:
      Available in iOS 11.3 and later.
    • init

      protected long init​(NSArray<?> resources)
    • getResource

      public MTLResource getResource​(long index, boolean allocateMemory)
    • bufferSizeAtIndex

      public long bufferSizeAtIndex​(long index)
    • textureInfoAtIndex

      public MPSStateTextureInfo textureInfoAtIndex​(long index)
    • resourceTypeAtIndex

      public MPSStateResourceType resourceTypeAtIndex​(long index)
    • synchronizeOnCommandBuffer

      public void synchronizeOnCommandBuffer​(MTLCommandBuffer commandBuffer)
      Since:
      Available in iOS 11.3 and later.
    • resourceSize

      public long resourceSize()
      Since:
      Available in iOS 11.3 and later.
    • getDestinationImageDescriptor

      public MPSImageDescriptor getDestinationImageDescriptor​(NSArray<MPSImage> sourceImages, NSArray<MPSState> sourceStates, MPSKernel kernel, MPSImageDescriptor inDescriptor)
    • create

      protected static long create​(MTLCommandBuffer cmdBuf, long bufferSize)
    • create

      protected static long create​(MTLCommandBuffer cmdBuf, MTLTextureDescriptor descriptor)
    • create

      protected static long create​(MTLCommandBuffer cmdBuf)
    • create

      protected static long create​(MTLCommandBuffer commandBuffer, MPSStateResourceList resourceList)
      Since:
      Available in iOS 11.3 and later.