Interface MPSHeapProvider
-
public interface MPSHeapProvider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description MTLHeapnewHeapWithDescriptor(MTLHeapDescriptor descriptor)Return a heap of the size indicated The heap may be larger than requested.default voidretireHeapCacheDelay(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.
-
-
-
Method Detail
-
newHeapWithDescriptor
MTLHeap newHeapWithDescriptor(MTLHeapDescriptor descriptor)
Return a heap of the size indicated The heap may be larger than requested. idimplements 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 retiredseconds- A hint for how long to cache the heap before retiring it. See MPSSetHeapCacheDuration().
-
-