Package apple.metalperformanceshaders
Class MPSNDArrayDescriptor
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.metalperformanceshaders.MPSNDArrayDescriptor
-
-
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 protectedMPSNDArrayDescriptor(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()static MPSNDArrayDescriptoralloc()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()intdataType()Data Type of the MPSNDArray elementsstatic java.lang.StringdebugDescription_static()static java.lang.Stringdescription_static()static MPSNDArrayDescriptordescriptorWithDataTypeDimensionCountDimensionSizes(int dataType, long numberOfDimensions, org.moe.natj.general.ptr.NUIntPtr dimensionSizes)Create an MPSNDArrayDescriptor object for a given size of dimensions.static MPSNDArrayDescriptordescriptorWithDataTypeDimensionSizes(int dataType, long dimension0, java.lang.Object... varargs)Create an MPSNDArrayDescriptor object for a given size of dimensions.static MPSNDArrayDescriptordescriptorWithDataTypeShape(int dataType, NSArray<? extends NSNumber> shape)A convenience function to create an MPSNDArrayDescriptor object for a given size of dimensions.static longhash_static()MPSNDArrayDescriptorinit()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)longlengthOfDimension(long dimensionIndex)The number of elements of type dataType in the indicated dimension.static java.lang.Objectnew_objc()longnumberOfDimensions()The number of dimensions in the NDArray.voidreshapeWithDimensionCountDimensionSizes(long numberOfDimensions, org.moe.natj.general.ptr.NUIntPtr dimensionSizes)Changes dimension sizes and number of dimensions on the current descriptorvoidreshapeWithShape(NSArray<? extends NSNumber> shape)Changes dimension sizes and number of dimensions on the current descriptorstatic booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)voidsetDataType(int value)Data Type of the MPSNDArray elementsvoidsetNumberOfDimensions(long value)The number of dimensions in the NDArray.static voidsetVersion_static(long aVersion)voidsliceDimensionWithSubrange(long dimensionIndex, MPSDimensionSlice subRange)The slice dimensions for each dimension [@discusion] A slice is a subregion of a dimension.MPSDimensionSlicesliceRangeForDimension(long dimensionIndex)The slice dimensions for each dimension [@discusion] A slice is a subregion of a dimension.static org.moe.natj.objc.Classsuperclass_static()voidtransposeDimensionWithDimension(long dimensionIndex, long dimensionIndex2)transpose two dimensions [@discusion] If the intention is to insert a length 1 dimension, increment the numberOfDimensions first.static longversion_static()-
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 MPSNDArrayDescriptor 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()
-
dataType
public int dataType()
Data Type of the MPSNDArray elements
-
debugDescription_static
public static java.lang.String debugDescription_static()
-
description_static
public static java.lang.String description_static()
-
descriptorWithDataTypeDimensionCountDimensionSizes
public static MPSNDArrayDescriptor descriptorWithDataTypeDimensionCountDimensionSizes(int dataType, long numberOfDimensions, org.moe.natj.general.ptr.NUIntPtr dimensionSizes)
Create an MPSNDArrayDescriptor object for a given size of dimensions. Sample code: [@code] // Creates an NDArrayDescriptor of dimensions [32, 6, 5, 3] NSUInteger sizes[] = {3,5,6,32}; [ MPSNDArray descriptorWithDataType: MPSDataTypeFloat32 dimensionCount: 4 dimensionSizes: sizes ]; // array of numberOfDimensions dimensions. Starts with dimension 0 [@endcode]- Parameters:
dataType- MPSDataType of elements in the MPSNDArraynumberOfDimensions- Number of dimensions in the NDArray. May not exceed 16.dimensionSizes- An array of NSUIntegers where dimension lengths provided by the user goes from fastest moving to slowest moving dimension. The product of all dimension lengths must be less than 2**31. Additional system memory limits may apply- Returns:
- A valid MPSNDArrayDescriptor object or nil, if failure.
-
descriptorWithDataTypeDimensionSizes
public static MPSNDArrayDescriptor descriptorWithDataTypeDimensionSizes(int dataType, long dimension0, java.lang.Object... varargs)
Create an MPSNDArrayDescriptor object for a given size of dimensions. Sample code: [@code] // Creates an NDArrayDescriptor of dimensions [32, 5, 6, 3] [ MPSNDArray descriptorWithDataType: MPSDataTypeFloat32 dimensionSizes: 3, 6, 5, 32, 0 //<--list terminator! ]; // array of numberOfDimensions dimensions. Starts with dimension 0 [@endcode]- Parameters:
dataType- MPSDataType of elements in the MPSNDArraydimension0- The start of a 0-terminated variadric list of NSUIntegers where dimension lengths provided by the user goes from fastest moving to slowest moving dimension. The product of all dimension sizes must be less than 2**31. Additional system memory limits may apply- Returns:
- A valid MPSNDArrayDescriptor object or nil, if failure.
-
descriptorWithDataTypeShape
public static MPSNDArrayDescriptor descriptorWithDataTypeShape(int dataType, NSArray<? extends NSNumber> shape)
A convenience function to create an MPSNDArrayDescriptor object for a given size of dimensions. Sample code: [@code] // Creates an NDArrayDescriptor of dimensions [32, 6, 5, 3] NSArraysizes = {@32,@6,@5,@3}; [ MPSNDArray descriptorWithDataType: MPSDataTypeFloat32 shape: &sizes]; [@endcode] - Parameters:
dataType- MPSDataType of elements in the MPSNDArrayshape- An array of NSUIntegers where dimension lengths provided by the user goes from slowest moving to fastest moving dimension. This is same order as MLMultiArray in coreML and most frameworks in Python The product of all dimension lengths must be less than 2**31. Additional system memory limits may apply- Returns:
- A valid MPSNDArrayDescriptor object or nil, if failure.
-
hash_static
public static long hash_static()
-
init
public MPSNDArrayDescriptor init()
-
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)
-
lengthOfDimension
public long lengthOfDimension(long dimensionIndex)
The number of elements of type dataType in the indicated dimension. If dimensionIndex >= numberOfDimensions, 1 will be returned.- Parameters:
dimensionIndex- dimension the MPSNDArray for which to return the length- Returns:
- The number of elements in that dimension.
-
new_objc
public static java.lang.Object new_objc()
-
numberOfDimensions
public long numberOfDimensions()
The number of dimensions in the NDArray. May not exceed 16. A 0-diumension MPSNDArray is a single scalar value. Undefined dimensions are implicitly length 1.
-
reshapeWithDimensionCountDimensionSizes
public void reshapeWithDimensionCountDimensionSizes(long numberOfDimensions, org.moe.natj.general.ptr.NUIntPtr dimensionSizes)Changes dimension sizes and number of dimensions on the current descriptor- Parameters:
numberOfDimensions- Number of dimensions in the NDArray. May not exceed 16.dimensionSizes- An array of NSUIntegers where dimension lengths provided by the user goes from fastest moving to slowest moving dimension. The product of all dimension lengths must be less than 2**31. Additional system memory limits may apply
-
reshapeWithShape
public void reshapeWithShape(NSArray<? extends NSNumber> shape)
Changes dimension sizes and number of dimensions on the current descriptor- Parameters:
shape- An array of NSUIntegers where dimension lengths provided by the user goes from slowest moving to fastest moving dimension. This is same order as MLMultiArray in coreML and most frameworks in Python The product of all dimension lengths must be less than 2**31. Additional system memory limits may apply
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
-
setDataType
public void setDataType(int value)
Data Type of the MPSNDArray elements
-
setNumberOfDimensions
public void setNumberOfDimensions(long value)
The number of dimensions in the NDArray. May not exceed 16. A 0-diumension MPSNDArray is a single scalar value. Undefined dimensions are implicitly length 1.
-
setVersion_static
public static void setVersion_static(long aVersion)
-
sliceDimensionWithSubrange
public void sliceDimensionWithSubrange(long dimensionIndex, MPSDimensionSlice subRange)The slice dimensions for each dimension [@discusion] A slice is a subregion of a dimension. It is used to calve off a fraction of a larger NDArray. Default: NSRange(0, lengthOfDimension(i))- Parameters:
subRange- The region of the slice, start value is wrt dimensionLength of the NDArray.dimensionIndex- The index of the dimension. Must be < numberOfDimensions
-
sliceRangeForDimension
public MPSDimensionSlice sliceRangeForDimension(long dimensionIndex)
The slice dimensions for each dimension [@discusion] A slice is a subregion of a dimension. It is used to calve off a fraction of a larger NDArray.- Parameters:
dimensionIndex- The index of the dimension- Returns:
- Returns the slice range for the index. If the dimensionIndex >= numberOfDimensions, {0,1} is returned.
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
transposeDimensionWithDimension
public void transposeDimensionWithDimension(long dimensionIndex, long dimensionIndex2)transpose two dimensions [@discusion] If the intention is to insert a length 1 dimension, increment the numberOfDimensions first.- Parameters:
dimensionIndex- The first dimension. Must be < numberOfDimensionsdimensionIndex2- The second dimension. Must be < number of Dimensions.
-
version_static
public static long version_static()
-
-