Interface MPSHeapProvider


  • public interface MPSHeapProvider
    • Method Detail

      • newHeapWithDescriptor

        MTLHeap newHeapWithDescriptor​(MTLHeapDescriptor descriptor)
        Return a heap of the size indicated The heap may be larger than requested. id implements this method.
        Parameters:
        descriptor - A descriptor for the new heap
        Returns:
        A new heap of size at least descriptor.size. If nil is returned, MPS will use the MPS internal heap cache instead to satisfy the allocation.
      • retireHeapCacheDelay

        default void retireHeapCacheDelay​(MTLHeap heap,
                                          double seconds)
        Retire a heap When MPS is done with the heap, this is called to return the heap to the heap provider MPS will release the heap after this is called.
        Parameters:
        heap - The heap to be retired
        seconds - A hint for how long to cache the heap before retiring it. See MPSSetHeapCacheDuration().