Package apple.metalperformanceshaders
Class MPSTemporaryVector
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.metalperformanceshaders.MPSVector
-
- apple.metalperformanceshaders.MPSTemporaryVector
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedMPSTemporaryVector(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()static MPSTemporaryVectoralloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)static booleanautomaticallyNotifiesObserversForKey(java.lang.String key)static voidcancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)static NSArray<java.lang.String>classFallbacksForKeyedArchiver()static org.moe.natj.objc.ClassclassForKeyedUnarchiver()static java.lang.StringdebugDescription_static()static java.lang.Stringdescription_static()static longhash_static()MPSTemporaryVectorinit()MPSTemporaryVectorinitWithBufferDescriptor(MTLBuffer buffer, MPSVectorDescriptor descriptor)Initialize a MPSVector object with a MTLBuffer.MPSTemporaryVectorinitWithBufferOffsetDescriptor(MTLBuffer buffer, long offset, MPSVectorDescriptor descriptor)Initialize a MPSVector object with a MTLBuffer and an offset.MPSTemporaryVectorinitWithDeviceDescriptor(MTLDevice device, MPSVectorDescriptor descriptor)Initialize a lazily backed MPSVector object with a descriptor The vector object will be created, but the storage to hold the vector data will only be allocated when it is needed, typically when the data property is invoked.static NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(java.lang.String key)static java.lang.Objectnew_objc()static voidprefetchStorageWithCommandBufferDescriptorList(MTLCommandBuffer commandBuffer, NSArray<? extends MPSVectorDescriptor> descriptorList)Help MPS decide which allocations to make ahead of time The buffer cache that underlies the MPSTemporaryVector can automatically allocate new storage as needed as you create new temporary vectors.longreadCount()The number of times a temporary vector may be read by a MPSMatrix... kernel before its contents become undefined.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)voidsetReadCount(long value)The number of times a temporary vector may be read by a MPSMatrix... kernel before its contents become undefined.static voidsetVersion_static(long aVersion)static org.moe.natj.objc.Classsuperclass_static()static MPSTemporaryVectortemporaryVectorWithCommandBufferDescriptor(MTLCommandBuffer commandBuffer, MPSVectorDescriptor descriptor)Initialize a MPSTemporaryVector for use on a MTLCommandBufferstatic longversion_static()-
Methods inherited from class apple.metalperformanceshaders.MPSVector
data, dataType, device, length, offset, resourceSize, synchronizeOnCommandBuffer, vectorBytes, vectors
-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static MPSTemporaryVector alloc()
-
allocWithZone
public static java.lang.Object allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)
-
classFallbacksForKeyedArchiver
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
-
debugDescription_static
public static java.lang.String debugDescription_static()
-
description_static
public static java.lang.String description_static()
-
hash_static
public static long hash_static()
-
init
public MPSTemporaryVector init()
-
initWithBufferDescriptor
public MPSTemporaryVector initWithBufferDescriptor(MTLBuffer buffer, MPSVectorDescriptor descriptor)
Description copied from class:MPSVectorInitialize a MPSVector object with a MTLBuffer. This function returns a MPSVector object which uses the supplied MTLBuffer. The length, number of vectors, and stride between vectors are specified by the MPSVectorDescriptor object. The provided MTLBuffer must have enough storage to hold (descriptor.vectors-1) * descriptor.vectorBytes + descriptor.length * (element size) bytes.- Overrides:
initWithBufferDescriptorin classMPSVector- Parameters:
buffer- The MTLBuffer object which contains the data to use for the MPSVector. May not be NULL.descriptor- The MPSVectorDescriptor. May not be NULL.- Returns:
- A valid MPSVector object or nil, if failure.
-
initWithBufferOffsetDescriptor
public MPSTemporaryVector initWithBufferOffsetDescriptor(MTLBuffer buffer, long offset, MPSVectorDescriptor descriptor)
Description copied from class:MPSVectorInitialize a MPSVector object with a MTLBuffer and an offset.- Overrides:
initWithBufferOffsetDescriptorin classMPSVector- Parameters:
buffer- The MTLBuffer containing the data.offset- The offset, in bytes, into the buffer at which data begins.descriptor- The MPSVectorDescriptor.
-
initWithDeviceDescriptor
public MPSTemporaryVector initWithDeviceDescriptor(MTLDevice device, MPSVectorDescriptor descriptor)
Description copied from class:MPSVectorInitialize a lazily backed MPSVector object with a descriptor The vector object will be created, but the storage to hold the vector data will only be allocated when it is needed, typically when the data property is invoked. In conjunction with -resourceSize, this will allow you to estimate storage needs without actually creating the backing store for the vector.- Overrides:
initWithDeviceDescriptorin classMPSVector- Parameters:
device- The device with which it will be useddescriptor- The shape and style of the matrix- Returns:
- A valid MPSVector object or nil
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
instanceMethodSignatureForSelector
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
-
instancesRespondToSelector
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
-
isSubclassOfClass
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
-
keyPathsForValuesAffectingValueForKey
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
-
new_objc
public static java.lang.Object new_objc()
-
prefetchStorageWithCommandBufferDescriptorList
public static void prefetchStorageWithCommandBufferDescriptorList(MTLCommandBuffer commandBuffer, NSArray<? extends MPSVectorDescriptor> descriptorList)
Help MPS decide which allocations to make ahead of time The buffer cache that underlies the MPSTemporaryVector can automatically allocate new storage as needed as you create new temporary vectors. However, sometimes a more global view of what you plan to make is useful for maximizing memory reuse to get the most efficient operation. This class method hints to the cache what the list of matrices will be. It is never necessary to call this method. It is purely a performance and memory optimization.- Parameters:
commandBuffer- The command buffer on which the MPSTemporaryVector will be useddescriptorList- A NSArray of MPSVectorDescriptor objects, indicating vectors that will be created
-
readCount
public long readCount()
The number of times a temporary vector may be read by a MPSMatrix... kernel before its contents become undefined. MPSTemporaryVector objects must release their underlying buffers for reuse immediately after last use. So as to facilitate *prompt* convenient memory recycling, each time a MPSTemporaryVector is read by a MPSMatrix... -encode... method, its readCount is automatically decremented. When the readCount reaches 0, the underlying buffer is automatically made available for reuse to MPS for its own needs and for other MPSTemporaryVector objects prior to return from the -encode.. function. The contents of the buffer become undefined at this time. By default, the readCount is initialized to 1, indicating a matrix that may be overwritten any number of times, but read only once. You may change the readCount as desired to allow MPSMatrix kernels to read the MPSTemporaryVector additional times. However, it is an error to change the readCount once it is zero. It is an error to read or write to a MPSTemporaryVector with a zero readCount. You may set the readCount to 0 yourself to cause the underlying buffer to be returned to MPS. Writing to a MPSTemporaryVector does not adjust the readCount. The Metal API Validation layer will assert if a MPSTemporaryVector is deallocated with non-zero readCount to help identify cases when resources are not returned promptly.
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
-
setReadCount
public void setReadCount(long value)
The number of times a temporary vector may be read by a MPSMatrix... kernel before its contents become undefined. MPSTemporaryVector objects must release their underlying buffers for reuse immediately after last use. So as to facilitate *prompt* convenient memory recycling, each time a MPSTemporaryVector is read by a MPSMatrix... -encode... method, its readCount is automatically decremented. When the readCount reaches 0, the underlying buffer is automatically made available for reuse to MPS for its own needs and for other MPSTemporaryVector objects prior to return from the -encode.. function. The contents of the buffer become undefined at this time. By default, the readCount is initialized to 1, indicating a matrix that may be overwritten any number of times, but read only once. You may change the readCount as desired to allow MPSMatrix kernels to read the MPSTemporaryVector additional times. However, it is an error to change the readCount once it is zero. It is an error to read or write to a MPSTemporaryVector with a zero readCount. You may set the readCount to 0 yourself to cause the underlying buffer to be returned to MPS. Writing to a MPSTemporaryVector does not adjust the readCount. The Metal API Validation layer will assert if a MPSTemporaryVector is deallocated with non-zero readCount to help identify cases when resources are not returned promptly.
-
setVersion_static
public static void setVersion_static(long aVersion)
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
temporaryVectorWithCommandBufferDescriptor
public static MPSTemporaryVector temporaryVectorWithCommandBufferDescriptor(MTLCommandBuffer commandBuffer, MPSVectorDescriptor descriptor)
Initialize a MPSTemporaryVector for use on a MTLCommandBuffer- Parameters:
commandBuffer- The MTLCommandBuffer on which the MPSTemporaryMatrix will be exclusively useddescriptor- A valid MPSVectorDescriptor describing the MPSVector format to create- Returns:
- A valid MPSTemporaryVector. The object is not managed by a NSAutoreleasePool. The object will be released when the command buffer is committed. The underlying buffer will become invalid before this time due to the action of the readCount property. Please read and understand the use of the readCount property before using this object.
-
version_static
public static long version_static()
-
-