Skip to content

MetalPerformanceShadersGraph tvOS xcode15.0 b2

Alex Soto edited this page Jun 21, 2023 · 1 revision

#MetalPerformanceShadersGraph.framework

diff -ruN /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraph.h /Applications/Xcode_15.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraph.h
--- /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraph.h	2023-05-19 20:58:43
+++ /Applications/Xcode_15.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraph.h	2023-06-10 05:15:19
@@ -89,43 +89,43 @@
 typedef void (^MPSGraphCompilationCompletionHandler)(MPSGraphExecutable* executable,
                                                      NSError * _Nullable error);
 
-/// A structure which consists of all the levers users can use to compile their graphs.
+/// This is a class that consists of all the levers for compiling graphs.
 MPS_CLASS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0))
 @interface MPSGraphCompilationDescriptor : MPSGraphObject <NSCopying>
 
-/// Turns off type inference and we rely on type inference during runtime.
+/// Turns off type inference and relies on type inference during runtime.
 -(void) disableTypeInference;
 
-/// optimization level for the graph execution, default is MPSGraphOptimizationLevel1.
+/// The optimization level for the graph execution, default is MPSGraphOptimizationLevel1.
 @property (readwrite, nonatomic) MPSGraphOptimization optimizationLevel MPS_AVAILABLE_STARTING(macos(12.3), ios(15.4), tvos(15.4));
 
-/// optimization profile for the graph optimization, default is MPSGraphOptimizationProfilePerformance.
-@property (readwrite, nonatomic) MPSGraphOptimizationProfile optimizationProfile
-MPS_AVAILABLE_STARTING_BUT_DEPRECATED("MPSGraph will automatically provide the best performance and power efficiency with MPSGraphOptimizationLevel1.",
-                                      macos(12.3, 14.0), ios(15.4, 17.0), tvos(15.4, 17.0));
-
-/// makes the compile or specialize call blocking till the entire compilation is completed, defaults to NO.
+/// Flag that makes the compile or specialize call blocking till the entire compilation is complete, defaults to NO.
 @property (readwrite, nonatomic) BOOL waitForCompilationCompletion MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
 
-/// compilationCompletionHandler for the compilation, default value is nil, it is called after compilation is completed.
+/// The graph calls this handler at the completion of the compilation, default value is nil.
 @property (readwrite, atomic) MPSGraphCompilationCompletionHandler compilationCompletionHandler MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
 
-/// dispatchQueue for the compilation, default value is nil.
+/// The dispatch queue used for the compilation, default value is nil.
 @property (readwrite, atomic, retain) dispatch_queue_t dispatchQueue MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
 
+/// The optimization profile for the graph optimization, default is MPSGraphOptimizationProfilePerformance.
+@property (readwrite, nonatomic) MPSGraphOptimizationProfile optimizationProfile
+MPS_AVAILABLE_STARTING_BUT_DEPRECATED("MPSGraph will automatically provide the best performance and power efficiency with MPSGraphOptimizationLevel1.",
+                                      macos(12.3, 14.0), ios(15.4, 17.0), tvos(15.4, 17.0));
+
 @end
 
-/// A structure which consists of all the levers users can use to synchronize and schedule their graph execution.
+/// This is a class that consists of all the levers  to synchronize and schedule graph execution.
 MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
 @interface MPSGraphExecutionDescriptor : MPSGraphObject
 
-/// scheduledHandler for the graph, default value is nil.
+/// The graph calls this handler when it schedules the execution, default value is nil.
 @property (readwrite, atomic) MPSGraphScheduledHandler scheduledHandler;
 
-/// completionHandler for the graph, default value is nil.
+/// The graph calls this handler at the completion of the execution, default value is nil.
 @property (readwrite, atomic) MPSGraphCompletionHandler completionHandler;
 
-/// waitUntilCompleted for the graph, default value is false.
+/// Flag that makes the execution call blocking till the entire compilation is complete, defaults to NO.
 @property (readwrite, atomic) BOOL waitUntilCompleted;
 
 /// compilationDescriptor for the graph, default value is nil.
diff -ruN /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphNonMaximumSuppressionOps.h /Applications/Xcode_15.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphNonMaximumSuppressionOps.h
--- /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphNonMaximumSuppressionOps.h	1969-12-31 19:00:00
+++ /Applications/Xcode_15.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphNonMaximumSuppressionOps.h	2023-06-10 03:02:38
@@ -0,0 +1,85 @@
+//
+//  MPSGraphNonMaximumSuppressionOps.h
+//  MetalPerformanceShadersGraph
+//
+//  Created on 5/11/23.
+//  Copyright © 2023 Apple Inc. All rights reserved.
+//
+
+#ifndef MPSGraphNonMaximumSuppressionOps_h
+#define MPSGraphNonMaximumSuppressionOps_h
+
+#import <MetalPerformanceShadersGraph/MetalPerformanceShadersGraph.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/*!
+ *  @typedef    MPSGraphNonMaximumSuppressionCoordinateMode
+ *  @discussion The coordinate mode to use. At initialization defaults to MPSGraphNonMaximumSuppressionCoordinateModeCornersHeightFirst.
+ *              This mode specifies the representation used for the 4 box coordinate values.
+ *
+ *              Center coordinate modes define a centered box and the box dimensions
+ *              @code
+ *              CornersHeightFirst:
+ *                  [h_start, w_start, h_end, w_end]
+ *              CornersWidthFirst:
+ *                  [w_start, h_start, w_end, h_end]
+ *              CentersHeightFirst:
+ *                  [h_center, w_center, box_height, box_width]
+ *              CentersWidthFirst:
+ *                  [w_center, w_center, box_height, box_width]
+ *              @endcode
+ */
+typedef NS_ENUM(NSUInteger, MPSGraphNonMaximumSuppressionCoordinateMode)
+{
+    MPSGraphNonMaximumSuppressionCoordinateModeCornersHeightFirst    MPS_ENUM_AVAILABLE_STARTING(macos(14.0), ios(17.0), tvos(17.0)) MPS_SWIFT_NAME(explicit)   =  0L,
+    MPSGraphNonMaximumSuppressionCoordinateModeCornersWidthFirst     MPS_ENUM_AVAILABLE_STARTING(macos(14.0), ios(17.0), tvos(17.0))                            =  1L,
+    MPSGraphNonMaximumSuppressionCoordinateModeCentersHeightFirst    MPS_ENUM_AVAILABLE_STARTING(macos(14.0), ios(17.0), tvos(17.0))                            =  2L,
+    MPSGraphNonMaximumSuppressionCoordinateModeCentersWidthFirst     MPS_ENUM_AVAILABLE_STARTING(macos(14.0), ios(17.0), tvos(17.0))                            =  3L,
+};
+
+MPS_CLASS_AVAILABLE_STARTING(macos(14.0), ios(17.0), tvos(17.0))
+@interface MPSGraph(MPSGraphNonMaximumSuppressionOps)
+
+/// Create a nonMaximumumSuppression op and return the result tensor
+/// - Parameters:
+///   - boxesTensor: A tensor containing the coordinates of the input boxes. Must be a rank 3 tensor of shape [N,B,4] of type ``MPSDataTypeFloat32``
+///   - scoresTensor: A tensor containing the scores of the input boxes. Must be a rank 3 tensor of shape [N,B,K] of type ``MPSDataTypeFloat32``
+///   - IOUThreshold: The threshold for when to reject boxes based on their Intersection Over Union. Valid range is [0,1].
+///   - scoreThreshold: The threshold for when to reject boxes based on their score, before IOU suppression.
+///   - perClassSuppression: When this is specified a box will only suppress another box if they have the same class.
+///   - coordinateMode: The coordinate mode the box coordinates are provided in.
+///   - name: The name for the operation.
+-(MPSGraphTensor *) nonMaximumSuppressionWithBoxesTensor:(MPSGraphTensor *) boxesTensor
+                                            scoresTensor:(MPSGraphTensor *) scoresTensor
+                                            IOUThreshold:(float) IOUThreshold
+                                          scoreThreshold:(float) scoreThreshold
+                                     perClassSuppression:(BOOL) perClassSuppression
+                                          coordinateMode:(MPSGraphNonMaximumSuppressionCoordinateMode) coordinateMode
+                                                    name:(NSString * _Nullable) name;
+
+/// Create a nonMaximumumSuppression op and return the result tensor
+/// - Parameters:
+///   - boxesTensor: A tensor containing the coordinates of the input boxes. Must be a rank 3 tensor of shape [N,B,4] of type ``MPSDataTypeFloat32``
+///   - scoresTensor: A tensor containing the scores of the input boxes. Must be a rank 3 tensor of shape [N,B,1] of type ``MPSDataTypeFloat32``
+///   - classIndicesTensor: A tensor containing the class indices of the input boxes. Must be a rank 2 tensor of shape [N,B] of type ``MPSDataTypeInt32``
+///   - IOUThreshold: The threshold for when to reject boxes based on their Intersection Over Union. Valid range is [0,1].
+///   - scoreThreshold: The threshold for when to reject boxes based on their score, before IOU suppression.
+///   - perClassSuppression: When this is specified a box will only suppress another box if they have the same class.
+///   - coordinateMode: The coordinate mode the box coordinates are provided in.
+///   - name: The name for the operation.
+-(MPSGraphTensor *) nonMaximumSuppressionWithBoxesTensor:(MPSGraphTensor *) boxesTensor
+                                            scoresTensor:(MPSGraphTensor *) scoresTensor
+                                      classIndicesTensor:(MPSGraphTensor *) classIndicesTensor
+                                            IOUThreshold:(float) IOUThreshold
+                                          scoreThreshold:(float) scoreThreshold
+                                     perClassSuppression:(BOOL) perClassSuppression
+                                          coordinateMode:(MPSGraphNonMaximumSuppressionCoordinateMode) coordinateMode
+                                                    name:(NSString * _Nullable) name;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+
+#endif /* MPSGraphNonMaximumSuppressionOps_h */
diff -ruN /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MetalPerformanceShadersGraph.h /Applications/Xcode_15.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MetalPerformanceShadersGraph.h
--- /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MetalPerformanceShadersGraph.h	2023-05-19 21:42:50
+++ /Applications/Xcode_15.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MetalPerformanceShadersGraph.h	2023-06-10 02:46:39
@@ -25,6 +25,7 @@
 #import <MetalPerformanceShadersGraph/MPSGraphMatrixInverseOps.h>
 #import <MetalPerformanceShadersGraph/MPSGraphMatrixMultiplicationOps.h>
 #import <MetalPerformanceShadersGraph/MPSGraphMemoryOps.h>
+#import <MetalPerformanceShadersGraph/MPSGraphNonMaximumSuppressionOps.h>
 #import <MetalPerformanceShadersGraph/MPSGraphNonZeroOps.h>
 #import <MetalPerformanceShadersGraph/MPSGraphNormalizationOps.h>
 #import <MetalPerformanceShadersGraph/MPSGraphOneHotOps.h>
Clone this wiki locally