public class MPSVector extends NSObject
[@dependency] This depends on Metal.framework
A MPSVector object describes a 1-dimensional array of data and provides storage for its values. Some MPSMatrixKernel objects operate on MPSVector objects for convenience.
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret| Modifier | Constructor and Description |
|---|---|
protected |
MPSVector(org.moe.natj.general.Pointer peer) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
accessInstanceVariablesDirectly() |
static MPSVector |
alloc() |
static MPSVector |
allocWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
static boolean |
automaticallyNotifiesObserversForKey(java.lang.String key) |
static void |
cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget) |
static void |
cancelPreviousPerformRequestsWithTargetSelectorObject(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.Class |
classForKeyedUnarchiver() |
MTLBuffer |
data()
[@property] data
|
int |
dataType()
[@property] dataType
|
static java.lang.String |
debugDescription_static() |
static java.lang.String |
description_static() |
MTLDevice |
device()
[@property] device
|
static long |
hash_static() |
MPSVector |
init() |
MPSVector |
initWithBufferDescriptor(MTLBuffer buffer,
MPSVectorDescriptor descriptor)
Initialize a MPSVector object with a MTLBuffer.
|
MPSVector |
initWithBufferOffsetDescriptor(MTLBuffer buffer,
long offset,
MPSVectorDescriptor descriptor)
Initialize a MPSVector object with a MTLBuffer and an offset.
|
MPSVector |
initWithDeviceDescriptor(MTLDevice device,
MPSVectorDescriptor descriptor)
Initialize a lazily backed MPSVector object with a descriptor
|
static NSObject.Function_instanceMethodForSelector_ret |
instanceMethodForSelector(org.moe.natj.objc.SEL aSelector) |
static NSMethodSignature |
instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
instancesRespondToSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
isSubclassOfClass(org.moe.natj.objc.Class aClass) |
static NSSet<java.lang.String> |
keyPathsForValuesAffectingValueForKey(java.lang.String key) |
long |
length()
[@property] length
|
static MPSVector |
new_objc() |
long |
offset()
[@property] offset
|
static boolean |
resolveClassMethod(org.moe.natj.objc.SEL sel) |
static boolean |
resolveInstanceMethod(org.moe.natj.objc.SEL sel) |
long |
resourceSize()
Get the number of bytes used to allocate underyling MTLResources
|
static void |
setVersion_static(long aVersion) |
static org.moe.natj.objc.Class |
superclass_static() |
void |
synchronizeOnCommandBuffer(MTLCommandBuffer commandBuffer)
Flush the underlying MTLBuffer from the device's caches, and invalidate any CPU caches if needed.
|
long |
vectorBytes()
[@property] vectorBytes
|
long |
vectors()
[@property] vectors
|
static long |
version_static() |
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, willChangeValuesAtIndexesForKeypublic static boolean accessInstanceVariablesDirectly()
public static MPSVector alloc()
public static MPSVector allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument)
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
public MTLBuffer data()
An MTLBuffer to store the data.
public int dataType()
The type of the MPSVector data.
public static java.lang.String debugDescription_static()
public static java.lang.String description_static()
public MTLDevice device()
The device on which the MPSVector will be used.
public static long hash_static()
public MPSVector initWithBufferDescriptor(MTLBuffer buffer, MPSVectorDescriptor descriptor)
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.
buffer - The MTLBuffer object which contains the data to use for the
MPSVector. May not be NULL.descriptor - The MPSVectorDescriptor. May not be NULL.public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
public long length()
The number of elements in the vector.
public static MPSVector new_objc()
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
public static void setVersion_static(long aVersion)
public static org.moe.natj.objc.Class superclass_static()
public long vectorBytes()
The stride, in bytes, between corresponding elements of consecutive vectors.
public long vectors()
The number of vectors in the MPSVector.
public static long version_static()
public MPSVector initWithBufferOffsetDescriptor(MTLBuffer buffer, long offset, MPSVectorDescriptor descriptor)
buffer - The MTLBuffer containing the data.offset - The offset, in bytes, into the buffer at which data begins.descriptor - The MPSVectorDescriptor.public MPSVector initWithDeviceDescriptor(MTLDevice device, MPSVectorDescriptor 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.
device - The device with which it will be useddescriptor - The shape and style of the matrixpublic long offset()
Byte-offset to the buffer where the vector data begins - see @ref initWithBuffer: offset: descriptor: .
public long resourceSize()
This is the size of the backing store of underlying MTLResources. It does not include all storage used by the object, for example the storage used to hold the MPSVector instantiation and MTLBuffer is not included. It only measures the size of the allocation used to hold the vector data in the buffer. This value is subject to change between different devices and operating systems.
Except when -initWithBuffer:descriptor: is used, most MPSVectors are allocated without a backing store. The backing store is allocated lazily when it is needed, typically when the .texture property is called. Consequently, in most cases, it should be inexpensive to make a MPSMatrix to see how much memory it will need, and release it if it is too large.
This method may fail in certain circumstances, such as when the MPSMatrix is created with -initWithBuffer:descriptor:. In such cases, 0 will be returned.
public void synchronizeOnCommandBuffer(MTLCommandBuffer commandBuffer)
This will call [id
commandBuffer - The commandbuffer on which to synchronize