ai.muna.muna 0.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Editor/Build/AndroidBuildHandler.cs +96 -0
- package/Editor/Build/AndroidBuildHandler.cs.meta +11 -0
- package/Editor/Build/BuildHandler.cs +128 -0
- package/Editor/Build/BuildHandler.cs.meta +11 -0
- package/Editor/Build/LinuxBuildHandler.cs +26 -0
- package/Editor/Build/LinuxBuildHandler.cs.meta +11 -0
- package/Editor/Build/WebGLBuildHandler.cs +69 -0
- package/Editor/Build/WebGLBuildHandler.cs.meta +11 -0
- package/Editor/Build/WindowsBuildHandler.cs +24 -0
- package/Editor/Build/WindowsBuildHandler.cs.meta +11 -0
- package/Editor/Build/iOSBuildHandler.cs +119 -0
- package/Editor/Build/iOSBuildHandler.cs.meta +11 -0
- package/Editor/Build/macOSBuildHandler.cs +133 -0
- package/Editor/Build/macOSBuildHandler.cs.meta +11 -0
- package/Editor/Build.meta +8 -0
- package/Editor/Muna.Editor.asmdef +18 -0
- package/Editor/Muna.Editor.asmdef.meta +7 -0
- package/Editor/MunaMenu.cs +32 -0
- package/Editor/MunaMenu.cs.meta +11 -0
- package/Editor/MunaProjectSettings.cs +43 -0
- package/Editor/MunaProjectSettings.cs.meta +11 -0
- package/Editor/MunaSettingsProvider.cs +27 -0
- package/Editor/MunaSettingsProvider.cs.meta +11 -0
- package/Editor.meta +8 -0
- package/LICENSE +201 -0
- package/LICENSE.meta +7 -0
- package/Plugins/Android/Function.aar +0 -0
- package/Plugins/Android/Function.aar.meta +32 -0
- package/Plugins/Android.meta +8 -0
- package/Plugins/Linux/arm64/libFunction.so +0 -0
- package/Plugins/Linux/arm64/libFunction.so.meta +62 -0
- package/Plugins/Linux/arm64.meta +8 -0
- package/Plugins/Linux/x86_64/libFunction.so +0 -0
- package/Plugins/Linux/x86_64/libFunction.so.meta +82 -0
- package/Plugins/Linux/x86_64.meta +8 -0
- package/Plugins/Linux.meta +8 -0
- package/Plugins/Web/libFunction.a +0 -0
- package/Plugins/Web/libFunction.a.meta +87 -0
- package/Plugins/Web.meta +8 -0
- package/Plugins/Windows/arm64/Function.dll +0 -0
- package/Plugins/Windows/arm64/Function.dll.meta +58 -0
- package/Plugins/Windows/arm64.meta +8 -0
- package/Plugins/Windows/x86_64/Function.dll +0 -0
- package/Plugins/Windows/x86_64/Function.dll.meta +82 -0
- package/Plugins/Windows/x86_64.meta +8 -0
- package/Plugins/Windows.meta +8 -0
- package/Plugins/iOS/Function.xcframework/Info.plist +75 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64/Function.framework/Function +0 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64/Function.framework/Headers/FXNConfiguration.h +313 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64/Function.framework/Headers/FXNPrediction.h +165 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64/Function.framework/Headers/FXNPredictionStream.h +63 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64/Function.framework/Headers/FXNPredictor.h +108 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64/Function.framework/Headers/FXNStatus.h +42 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64/Function.framework/Headers/FXNValue.h +395 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64/Function.framework/Headers/FXNValueMap.h +148 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64/Function.framework/Headers/FXNVersion.h +26 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64/Function.framework/Headers/Function.h +18 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64/Function.framework/Info.plist +0 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64/Function.framework/Modules/module.modulemap +6 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64/Function.framework/PrivacyInfo.xcprivacy +36 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64/Function.framework/_CodeSignature/CodeResources +223 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64_x86_64-simulator/Function.framework/Function +0 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64_x86_64-simulator/Function.framework/Headers/FXNConfiguration.h +313 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64_x86_64-simulator/Function.framework/Headers/FXNPrediction.h +165 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64_x86_64-simulator/Function.framework/Headers/FXNPredictionStream.h +63 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64_x86_64-simulator/Function.framework/Headers/FXNPredictor.h +108 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64_x86_64-simulator/Function.framework/Headers/FXNStatus.h +42 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64_x86_64-simulator/Function.framework/Headers/FXNValue.h +395 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64_x86_64-simulator/Function.framework/Headers/FXNValueMap.h +148 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64_x86_64-simulator/Function.framework/Headers/FXNVersion.h +26 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64_x86_64-simulator/Function.framework/Headers/Function.h +18 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64_x86_64-simulator/Function.framework/Info.plist +0 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64_x86_64-simulator/Function.framework/Modules/module.modulemap +6 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64_x86_64-simulator/Function.framework/PrivacyInfo.xcprivacy +36 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64_x86_64-simulator/Function.framework/_CodeSignature/CodeResources +223 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64/Function.framework/Function +0 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64/Function.framework/Headers/FXNConfiguration.h +313 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64/Function.framework/Headers/FXNPrediction.h +165 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64/Function.framework/Headers/FXNPredictionStream.h +63 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64/Function.framework/Headers/FXNPredictor.h +108 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64/Function.framework/Headers/FXNStatus.h +42 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64/Function.framework/Headers/FXNValue.h +395 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64/Function.framework/Headers/FXNValueMap.h +148 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64/Function.framework/Headers/FXNVersion.h +26 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64/Function.framework/Headers/Function.h +18 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64/Function.framework/Info.plist +0 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64/Function.framework/Modules/module.modulemap +6 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64/Function.framework/PrivacyInfo.xcprivacy +36 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64/Function.framework/_CodeSignature/CodeResources +223 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64_x86_64-simulator/Function.framework/Function +0 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64_x86_64-simulator/Function.framework/Headers/FXNConfiguration.h +313 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64_x86_64-simulator/Function.framework/Headers/FXNPrediction.h +165 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64_x86_64-simulator/Function.framework/Headers/FXNPredictionStream.h +63 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64_x86_64-simulator/Function.framework/Headers/FXNPredictor.h +108 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64_x86_64-simulator/Function.framework/Headers/FXNStatus.h +42 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64_x86_64-simulator/Function.framework/Headers/FXNValue.h +395 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64_x86_64-simulator/Function.framework/Headers/FXNValueMap.h +148 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64_x86_64-simulator/Function.framework/Headers/FXNVersion.h +26 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64_x86_64-simulator/Function.framework/Headers/Function.h +18 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64_x86_64-simulator/Function.framework/Info.plist +0 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64_x86_64-simulator/Function.framework/Modules/module.modulemap +6 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64_x86_64-simulator/Function.framework/PrivacyInfo.xcprivacy +36 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64_x86_64-simulator/Function.framework/_CodeSignature/CodeResources +223 -0
- package/Plugins/iOS/Function.xcframework.meta +83 -0
- package/Plugins/iOS.meta +8 -0
- package/Plugins/macOS/Function.dylib +0 -0
- package/Plugins/macOS/Function.dylib.meta +82 -0
- package/Plugins/macOS.meta +8 -0
- package/Plugins.meta +8 -0
- package/README.md +79 -0
- package/README.md.meta +7 -0
- package/Runtime/API/DotNetClient.cs +106 -0
- package/Runtime/API/DotNetClient.cs.meta +11 -0
- package/Runtime/API/MunaClient.cs +96 -0
- package/Runtime/API/MunaClient.cs.meta +11 -0
- package/Runtime/API.meta +8 -0
- package/Runtime/Beta/BetaClient.cs +33 -0
- package/Runtime/Beta/BetaClient.cs.meta +11 -0
- package/Runtime/Beta/PredictionService.cs +32 -0
- package/Runtime/Beta/PredictionService.cs.meta +11 -0
- package/Runtime/Beta/RemoteAcceleration.cs +38 -0
- package/Runtime/Beta/RemoteAcceleration.cs.meta +11 -0
- package/Runtime/Beta/RemotePredictionService.cs +187 -0
- package/Runtime/Beta/RemotePredictionService.cs.meta +11 -0
- package/Runtime/Beta/Value.cs +92 -0
- package/Runtime/Beta/Value.cs.meta +11 -0
- package/Runtime/Beta.meta +8 -0
- package/Runtime/C/Configuration.cs +139 -0
- package/Runtime/C/Configuration.cs.meta +11 -0
- package/Runtime/C/Function.cs +294 -0
- package/Runtime/C/Function.cs.meta +11 -0
- package/Runtime/C/Prediction.cs +70 -0
- package/Runtime/C/Prediction.cs.meta +11 -0
- package/Runtime/C/PredictionStream.cs +36 -0
- package/Runtime/C/PredictionStream.cs.meta +11 -0
- package/Runtime/C/Predictor.cs +42 -0
- package/Runtime/C/Predictor.cs.meta +11 -0
- package/Runtime/C/Value.cs +194 -0
- package/Runtime/C/Value.cs.meta +11 -0
- package/Runtime/C/ValueMap.cs +50 -0
- package/Runtime/C/ValueMap.cs.meta +11 -0
- package/Runtime/C.meta +8 -0
- package/Runtime/Muna.Runtime.asmdef +27 -0
- package/Runtime/Muna.Runtime.asmdef.meta +7 -0
- package/Runtime/Muna.cs +109 -0
- package/Runtime/Muna.cs.meta +11 -0
- package/Runtime/Services/Prediction.cs +247 -0
- package/Runtime/Services/Prediction.cs.meta +11 -0
- package/Runtime/Services/Predictor.cs +44 -0
- package/Runtime/Services/Predictor.cs.meta +11 -0
- package/Runtime/Services/User.cs +43 -0
- package/Runtime/Services/User.cs.meta +11 -0
- package/Runtime/Services.meta +8 -0
- package/Runtime/Types/Dtype.cs +118 -0
- package/Runtime/Types/Dtype.cs.meta +11 -0
- package/Runtime/Types/Image.cs +93 -0
- package/Runtime/Types/Image.cs.meta +11 -0
- package/Runtime/Types/Prediction.cs +113 -0
- package/Runtime/Types/Prediction.cs.meta +11 -0
- package/Runtime/Types/Predictor.cs +193 -0
- package/Runtime/Types/Predictor.cs.meta +11 -0
- package/Runtime/Types/Tensor.cs +58 -0
- package/Runtime/Types/Tensor.cs.meta +11 -0
- package/Runtime/Types/User.cs +54 -0
- package/Runtime/Types/User.cs.meta +11 -0
- package/Runtime/Types.meta +8 -0
- package/Runtime.meta +8 -0
- package/Unity/API/PredictionCacheClient.cs +144 -0
- package/Unity/API/PredictionCacheClient.cs.meta +11 -0
- package/Unity/API/UnityClient.cs +147 -0
- package/Unity/API/UnityClient.cs.meta +11 -0
- package/Unity/API.meta +8 -0
- package/Unity/Internal/MunaSettings.cs +59 -0
- package/Unity/Internal/MunaSettings.cs.meta +11 -0
- package/Unity/Internal.meta +8 -0
- package/Unity/Muna.Unity.asmdef +29 -0
- package/Unity/Muna.Unity.asmdef.meta +7 -0
- package/Unity/MunaUnity.cs +130 -0
- package/Unity/MunaUnity.cs.meta +11 -0
- package/Unity/Types/CachedPrediction.cs +36 -0
- package/Unity/Types/CachedPrediction.cs.meta +11 -0
- package/Unity/Types.meta +8 -0
- package/Unity.meta +8 -0
- package/package.json +38 -0
- package/package.json.meta +7 -0
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
//
|
|
2
|
+
// FXNPrediction.h
|
|
3
|
+
// Function
|
|
4
|
+
//
|
|
5
|
+
// Created by Yusuf Olokoba on 11/23/2023.
|
|
6
|
+
// Copyright © 2025 NatML Inc. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#pragma once
|
|
10
|
+
|
|
11
|
+
#include <stdint.h>
|
|
12
|
+
#include <Function/FXNValueMap.h>
|
|
13
|
+
|
|
14
|
+
#pragma region --Types--
|
|
15
|
+
/*!
|
|
16
|
+
@struct FXNPrediction
|
|
17
|
+
|
|
18
|
+
@abstract Prediction.
|
|
19
|
+
|
|
20
|
+
@discussion Prediction.
|
|
21
|
+
*/
|
|
22
|
+
struct FXNPrediction;
|
|
23
|
+
typedef struct FXNPrediction FXNPrediction;
|
|
24
|
+
#pragma endregion
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
#pragma region --Lifecycle--
|
|
28
|
+
/*!
|
|
29
|
+
@function FXNPredictionRelease
|
|
30
|
+
|
|
31
|
+
@abstract Release a prediction.
|
|
32
|
+
|
|
33
|
+
@discussion Release a prediction.
|
|
34
|
+
|
|
35
|
+
@param prediction
|
|
36
|
+
Prediction.
|
|
37
|
+
*/
|
|
38
|
+
FXN_API FXNStatus FXNPredictionRelease (FXNPrediction* prediction);
|
|
39
|
+
#pragma endregion
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
#pragma region --Operations--
|
|
43
|
+
/*!
|
|
44
|
+
@function FXNPredictionGetID
|
|
45
|
+
|
|
46
|
+
@abstract Get the prediction ID.
|
|
47
|
+
|
|
48
|
+
@discussion Get the prediction ID.
|
|
49
|
+
|
|
50
|
+
@param prediction
|
|
51
|
+
Prediction.
|
|
52
|
+
|
|
53
|
+
@param destination
|
|
54
|
+
Destination buffer.
|
|
55
|
+
|
|
56
|
+
@param size
|
|
57
|
+
Destination buffer size.
|
|
58
|
+
*/
|
|
59
|
+
FXN_API FXNStatus FXNPredictionGetID (
|
|
60
|
+
FXNPrediction* prediction,
|
|
61
|
+
char* destination,
|
|
62
|
+
int32_t size
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
/*!
|
|
66
|
+
@function FXNPredictionGetLatency
|
|
67
|
+
|
|
68
|
+
@abstract Get the prediction latency.
|
|
69
|
+
|
|
70
|
+
@discussion Get the prediction latency.
|
|
71
|
+
|
|
72
|
+
@param prediction
|
|
73
|
+
Prediction.
|
|
74
|
+
|
|
75
|
+
@param latency
|
|
76
|
+
Prediction latency in milliseconds.
|
|
77
|
+
*/
|
|
78
|
+
FXN_API FXNStatus FXNPredictionGetLatency (
|
|
79
|
+
FXNPrediction* prediction,
|
|
80
|
+
double* latency
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
/*!
|
|
84
|
+
@function FXNPredictionGetResults
|
|
85
|
+
|
|
86
|
+
@abstract Get the prediction results.
|
|
87
|
+
|
|
88
|
+
@discussion Get the prediction results.
|
|
89
|
+
|
|
90
|
+
@param prediction
|
|
91
|
+
Prediction.
|
|
92
|
+
|
|
93
|
+
@param map
|
|
94
|
+
Prediction output value map. Do NOT release this value map as it is owned by the prediction.
|
|
95
|
+
*/
|
|
96
|
+
FXN_API FXNStatus FXNPredictionGetResults (
|
|
97
|
+
FXNPrediction* prediction,
|
|
98
|
+
FXNValueMap** map
|
|
99
|
+
);
|
|
100
|
+
|
|
101
|
+
/*!
|
|
102
|
+
@function FXNPredictionGetError
|
|
103
|
+
|
|
104
|
+
@abstract Get the prediction error.
|
|
105
|
+
|
|
106
|
+
@discussion Get the prediction error.
|
|
107
|
+
|
|
108
|
+
@param prediction
|
|
109
|
+
Prediction.
|
|
110
|
+
|
|
111
|
+
@param error
|
|
112
|
+
Destination buffer.
|
|
113
|
+
|
|
114
|
+
@param size
|
|
115
|
+
Destination buffer size.
|
|
116
|
+
|
|
117
|
+
@returns `FXN_OK` if an error has been copied.
|
|
118
|
+
`FXN_ERROR_INVALID_OPERATION` if no error exists.
|
|
119
|
+
*/
|
|
120
|
+
FXN_API FXNStatus FXNPredictionGetError (
|
|
121
|
+
FXNPrediction* prediction,
|
|
122
|
+
char* error,
|
|
123
|
+
int32_t size
|
|
124
|
+
);
|
|
125
|
+
|
|
126
|
+
/*!
|
|
127
|
+
@function FXNPredictionGetLogs
|
|
128
|
+
|
|
129
|
+
@abstract Get the prediction logs.
|
|
130
|
+
|
|
131
|
+
@discussion Get the prediction logs.
|
|
132
|
+
|
|
133
|
+
@param prediction
|
|
134
|
+
Prediction.
|
|
135
|
+
|
|
136
|
+
@param logs
|
|
137
|
+
Destination buffer.
|
|
138
|
+
|
|
139
|
+
@param size
|
|
140
|
+
Destination buffer size.
|
|
141
|
+
*/
|
|
142
|
+
FXN_API FXNStatus FXNPredictionGetLogs (
|
|
143
|
+
FXNPrediction* prediction,
|
|
144
|
+
char* logs,
|
|
145
|
+
int32_t size
|
|
146
|
+
);
|
|
147
|
+
|
|
148
|
+
/*!
|
|
149
|
+
@function FXNPredictionGetLogLength
|
|
150
|
+
|
|
151
|
+
@abstract Get the prediction log length.
|
|
152
|
+
|
|
153
|
+
@discussion Get the prediction log length.
|
|
154
|
+
|
|
155
|
+
@param prediction
|
|
156
|
+
Prediction.
|
|
157
|
+
|
|
158
|
+
@param length
|
|
159
|
+
Logs length.
|
|
160
|
+
*/
|
|
161
|
+
FXN_API FXNStatus FXNPredictionGetLogLength (
|
|
162
|
+
FXNPrediction* prediction,
|
|
163
|
+
int32_t* length
|
|
164
|
+
);
|
|
165
|
+
#pragma endregion
|
package/Plugins/iOS/Function.xcframework/ios-arm64/Function.framework/Headers/FXNPredictionStream.h
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
//
|
|
2
|
+
// FXNPredictionStream.h
|
|
3
|
+
// Function
|
|
4
|
+
//
|
|
5
|
+
// Created by Yusuf Olokoba on 4/19/2024.
|
|
6
|
+
// Copyright © 2025 NatML Inc. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#pragma once
|
|
10
|
+
|
|
11
|
+
#include <Function/FXNPrediction.h>
|
|
12
|
+
|
|
13
|
+
#pragma region --Types--
|
|
14
|
+
/*!
|
|
15
|
+
@struct FXNPredictionStream
|
|
16
|
+
|
|
17
|
+
@abstract Prediction stream.
|
|
18
|
+
|
|
19
|
+
@discussion Prediction stream.
|
|
20
|
+
*/
|
|
21
|
+
struct FXNPredictionStream;
|
|
22
|
+
typedef struct FXNPredictionStream FXNPredictionStream;
|
|
23
|
+
#pragma endregion
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
#pragma region --Lifecycle--
|
|
27
|
+
/*!
|
|
28
|
+
@function FXNPredictionStreamRelease
|
|
29
|
+
|
|
30
|
+
@abstract Release a prediction stream.
|
|
31
|
+
|
|
32
|
+
@discussion Release a prediction stream.
|
|
33
|
+
|
|
34
|
+
@param stream
|
|
35
|
+
Prediction stream.
|
|
36
|
+
*/
|
|
37
|
+
FXN_API FXNStatus FXNPredictionStreamRelease (FXNPredictionStream* stream);
|
|
38
|
+
#pragma endregion
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
#pragma region --Operations--
|
|
42
|
+
/*!
|
|
43
|
+
@function FXNPredictionStreamReadNext
|
|
44
|
+
|
|
45
|
+
@abstract Read the next prediction in the stream.
|
|
46
|
+
|
|
47
|
+
@discussion Read the next prediction in the stream.
|
|
48
|
+
|
|
49
|
+
@param stream
|
|
50
|
+
Prediction stream.
|
|
51
|
+
|
|
52
|
+
@param prediction
|
|
53
|
+
Prediction.
|
|
54
|
+
You MUST release the prediction with `FXNPredictionRelease` when no longer needed.
|
|
55
|
+
|
|
56
|
+
@returns `FXN_OK` a prediction was successfully read from the stream.
|
|
57
|
+
`FXN_ERROR_INVALID_OPERATION` if the stream has no more predictions.
|
|
58
|
+
*/
|
|
59
|
+
FXN_API FXNStatus FXNPredictionStreamReadNext (
|
|
60
|
+
FXNPredictionStream* stream,
|
|
61
|
+
FXNPrediction** prediction
|
|
62
|
+
);
|
|
63
|
+
#pragma endregion
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
//
|
|
2
|
+
// FXNPredictor.h
|
|
3
|
+
// Function
|
|
4
|
+
//
|
|
5
|
+
// Created by Yusuf Olokoba on 10/14/2023.
|
|
6
|
+
// Copyright © 2025 NatML Inc. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#pragma once
|
|
10
|
+
|
|
11
|
+
#include <Function/FXNConfiguration.h>
|
|
12
|
+
#include <Function/FXNPrediction.h>
|
|
13
|
+
#include <Function/FXNPredictionStream.h>
|
|
14
|
+
|
|
15
|
+
#pragma region --Types--
|
|
16
|
+
/*!
|
|
17
|
+
@struct FXNPredictor
|
|
18
|
+
|
|
19
|
+
@abstract Predictor.
|
|
20
|
+
|
|
21
|
+
@discussion Predictor.
|
|
22
|
+
*/
|
|
23
|
+
struct FXNPredictor;
|
|
24
|
+
typedef struct FXNPredictor FXNPredictor;
|
|
25
|
+
#pragma endregion
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
#pragma region --Lifecycle--
|
|
29
|
+
/*!
|
|
30
|
+
@function FXNPredictorCreate
|
|
31
|
+
|
|
32
|
+
@abstract Create a predictor.
|
|
33
|
+
|
|
34
|
+
@discussion Create a predictor.
|
|
35
|
+
|
|
36
|
+
@param configuration
|
|
37
|
+
Predictor configuration.
|
|
38
|
+
|
|
39
|
+
@param predictor
|
|
40
|
+
Created predictor.
|
|
41
|
+
*/
|
|
42
|
+
FXN_API FXNStatus FXNPredictorCreate (
|
|
43
|
+
FXNConfiguration* configuration,
|
|
44
|
+
FXNPredictor** predictor
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
/*!
|
|
48
|
+
@function FXNPredictorRelease
|
|
49
|
+
|
|
50
|
+
@abstract Release a predictor.
|
|
51
|
+
|
|
52
|
+
@discussion Release a predictor.
|
|
53
|
+
|
|
54
|
+
@param predictor
|
|
55
|
+
Predictor.
|
|
56
|
+
*/
|
|
57
|
+
FXN_API FXNStatus FXNPredictorRelease (FXNPredictor* predictor);
|
|
58
|
+
#pragma endregion
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
#pragma region --Operations--
|
|
62
|
+
/*!
|
|
63
|
+
@function FXNPredictorCreatePrediction
|
|
64
|
+
|
|
65
|
+
@abstract Create a prediction.
|
|
66
|
+
|
|
67
|
+
@discussion Create a prediction.
|
|
68
|
+
|
|
69
|
+
@param predictor
|
|
70
|
+
Predictor.
|
|
71
|
+
|
|
72
|
+
@param inputs
|
|
73
|
+
Prediction inputs.
|
|
74
|
+
|
|
75
|
+
@param prediction
|
|
76
|
+
Prediction.
|
|
77
|
+
You MUST release the prediction with `FXNPredictionRelease` when no longer needed.
|
|
78
|
+
*/
|
|
79
|
+
FXN_API FXNStatus FXNPredictorCreatePrediction (
|
|
80
|
+
FXNPredictor* predictor,
|
|
81
|
+
FXNValueMap* inputs,
|
|
82
|
+
FXNPrediction** prediction
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
/*!
|
|
86
|
+
@function FXNPredictorStreamPrediction
|
|
87
|
+
|
|
88
|
+
@abstract Create a streaming prediction.
|
|
89
|
+
|
|
90
|
+
@discussion Create a streaming prediction.
|
|
91
|
+
NOTE: This API is currently experimental.
|
|
92
|
+
|
|
93
|
+
@param predictor
|
|
94
|
+
Predictor.
|
|
95
|
+
|
|
96
|
+
@param inputs
|
|
97
|
+
Prediction inputs.
|
|
98
|
+
|
|
99
|
+
@param prediction
|
|
100
|
+
Prediction stream.
|
|
101
|
+
You MUST release the prediction stream with `FXNPredictionStreamRelease` when no longer needed.
|
|
102
|
+
*/
|
|
103
|
+
FXN_API FXNStatus FXNPredictorStreamPrediction (
|
|
104
|
+
FXNPredictor* predictor,
|
|
105
|
+
FXNValueMap* inputs,
|
|
106
|
+
FXNPredictionStream** stream
|
|
107
|
+
);
|
|
108
|
+
#pragma endregion
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
//
|
|
2
|
+
// FXNStatus.h
|
|
3
|
+
// Function
|
|
4
|
+
//
|
|
5
|
+
// Created by Yusuf Olokoba on 10/14/2023.
|
|
6
|
+
// Copyright © 2025 NatML Inc. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#pragma once
|
|
10
|
+
|
|
11
|
+
#ifdef __cplusplus
|
|
12
|
+
#define FXN_API extern "C"
|
|
13
|
+
#else
|
|
14
|
+
#define FXN_API extern
|
|
15
|
+
#endif
|
|
16
|
+
|
|
17
|
+
#pragma region --Enumerations--
|
|
18
|
+
/*!
|
|
19
|
+
@enum FXNStatus
|
|
20
|
+
|
|
21
|
+
@abstract Function status codes.
|
|
22
|
+
|
|
23
|
+
@constant FXN_OK
|
|
24
|
+
Successful operation.
|
|
25
|
+
|
|
26
|
+
@constant FXN_ERROR_INVALID_ARGUMENT
|
|
27
|
+
Provided argument is invalid.
|
|
28
|
+
|
|
29
|
+
@constant FXN_ERROR_INVALID_OPERATION
|
|
30
|
+
Operation is invalid in current state.
|
|
31
|
+
|
|
32
|
+
@constant FXN_ERROR_NOT_IMPLEMENTED
|
|
33
|
+
Operation has not been implemented.
|
|
34
|
+
*/
|
|
35
|
+
enum FXNStatus {
|
|
36
|
+
FXN_OK = 0,
|
|
37
|
+
FXN_ERROR_INVALID_ARGUMENT = 1,
|
|
38
|
+
FXN_ERROR_INVALID_OPERATION = 2,
|
|
39
|
+
FXN_ERROR_NOT_IMPLEMENTED = 3,
|
|
40
|
+
};
|
|
41
|
+
typedef enum FXNStatus FXNStatus;
|
|
42
|
+
#pragma endregion
|