Skip to content

MPSCore iOS xcode15.3 b1

Alex Soto edited this page Jan 27, 2024 · 1 revision

#MPSCore.framework

diff -ruN /Applications/Xcode_15.2.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSCore.framework/Headers/MPSCoreTypes.h /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSCore.framework/Headers/MPSCoreTypes.h
--- /Applications/Xcode_15.2.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSCore.framework/Headers/MPSCoreTypes.h	2023-11-01 22:41:20
+++ /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSCore.framework/Headers/MPSCoreTypes.h	2024-01-18 01:20:33
@@ -473,9 +473,18 @@
 
 // A utility function to get the size of an MPSDataType.  This implementation
 // relies upon the specific bit pattern used to encode the type.
+static inline size_t MPSDataTypeBitsCount(MPSDataType t)
+{
+    return (t & 0xFFFF);
+}
+
+
+// A utility function to get the size of an MPSDataType.  This implementation
+// relies upon the specific bit pattern used to encode the type.
+// It assumes bits per element is >= 8.
 static inline size_t MPSSizeofMPSDataType(MPSDataType t)
 {
-    return (t & 0xFFFF) >> 3;
+    return MPSDataTypeBitsCount(t) >> 3;
 }
 
 
Clone this wiki locally