Skip to content

Commit 02729b8

Browse files
authored
Enum for Module load mode.
Differential Revision: D71752743 Pull Request resolved: #9606
1 parent 2e2cf98 commit 02729b8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

extension/apple/ExecuTorch/Exported/ExecuTorchModule.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,18 @@
1010

1111
NS_ASSUME_NONNULL_BEGIN
1212

13+
/**
14+
* Enum to define loading behavior.
15+
* Values can be a subset, but must numerically match exactly those defined in
16+
* extension/module/module.h
17+
*/
18+
typedef NS_ENUM(NSInteger, ExecuTorchModuleLoadMode) {
19+
ExecuTorchModuleLoadModeFile = 0,
20+
ExecuTorchModuleLoadModeMmap,
21+
ExecuTorchModuleLoadModeMmapUseMlock,
22+
ExecuTorchModuleLoadModeMmapUseMlockIgnoreErrors,
23+
} NS_SWIFT_NAME(ModuleLoadMode);
24+
1325
NS_SWIFT_NAME(Module)
1426
__attribute__((deprecated("This API is experimental.")))
1527
@interface ExecuTorchModule : NSObject

0 commit comments

Comments
 (0)