-
Notifications
You must be signed in to change notification settings - Fork 520
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CoreML] Add xcode 15 beta 7 support. (#18898)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
- Loading branch information
1 parent
138884a
commit d59ddc0
Showing
10 changed files
with
87 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using System; | ||
using System.Runtime.InteropServices; | ||
using Foundation; | ||
using ObjCRuntime; | ||
|
||
#nullable enable | ||
|
||
namespace CoreML { | ||
|
||
public partial class MLModel { | ||
#if NET | ||
[SupportedOSPlatform ("tvos17.0")] | ||
[SupportedOSPlatform ("macos14.0")] | ||
[SupportedOSPlatform ("ios17.0")] | ||
[SupportedOSPlatform ("maccatalyst17.0")] | ||
#else | ||
[Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] | ||
#endif | ||
[DllImport (Constants.CoreMLLibrary)] | ||
static extern /* MLComputeDeviceProtocol[] */ IntPtr MLAllComputeDevices (); | ||
|
||
#if NET | ||
[SupportedOSPlatform ("tvos17.0")] | ||
[SupportedOSPlatform ("macos14.0")] | ||
[SupportedOSPlatform ("ios17.0")] | ||
[SupportedOSPlatform ("maccatalyst17.0")] | ||
#else | ||
[Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] | ||
#endif | ||
public static IMLComputeDeviceProtocol [] AllComputeDevices { | ||
get { | ||
var ptr = MLAllComputeDevices (); | ||
if (ptr == IntPtr.Zero) | ||
return Array.Empty<IMLComputeDeviceProtocol> (); | ||
return NSArray.ArrayFromHandle<IMLComputeDeviceProtocol> (ptr); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreML.todo
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
tests/xtro-sharpie/api-annotations-dotnet/tvOS-CoreML.todo
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.