ai.muna.muna 0.0.48 → 0.0.49
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/Plugins/Android/Muna.aar +0 -0
- package/Plugins/Linux/arm64/libFunction.so +0 -0
- package/Plugins/Linux/x86_64/libFunction.so +0 -0
- package/Plugins/Web/libFunction.a +0 -0
- package/Plugins/Windows/arm64/Function.dll +0 -0
- package/Plugins/Windows/x86_64/Function.dll +0 -0
- package/Plugins/iOS/Function.xcframework/Info.plist +10 -12
- package/Plugins/iOS/Function.xcframework/ios-arm64/Function.framework/Function +0 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64/Function.framework/Headers/FXNConfiguration.h +15 -15
- package/Plugins/iOS/Function.xcframework/ios-arm64/Function.framework/Headers/FXNPrediction.h +8 -8
- package/Plugins/iOS/Function.xcframework/ios-arm64/Function.framework/Headers/FXNPredictionStream.h +3 -3
- package/Plugins/iOS/Function.xcframework/ios-arm64/Function.framework/Headers/FXNPredictor.h +5 -5
- package/Plugins/iOS/Function.xcframework/ios-arm64/Function.framework/Headers/FXNStatus.h +1 -1
- package/Plugins/iOS/Function.xcframework/ios-arm64/Function.framework/Headers/FXNValue.h +117 -33
- package/Plugins/iOS/Function.xcframework/ios-arm64/Function.framework/Headers/FXNValueList.h +87 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64/Function.framework/Headers/FXNValueMap.h +8 -37
- package/Plugins/iOS/Function.xcframework/ios-arm64/Function.framework/Headers/FXNVersion.h +3 -3
- package/Plugins/iOS/Function.xcframework/ios-arm64/Function.framework/Headers/Function.h +2 -1
- package/Plugins/iOS/Function.xcframework/ios-arm64/Function.framework/Info.plist +0 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64/Function.framework/_CodeSignature/CodeResources +30 -19
- package/Plugins/iOS/Function.xcframework/ios-arm64-simulator/Function.framework/Function +0 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64-simulator/Function.framework/Headers/FXNConfiguration.h +313 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64-simulator/Function.framework/Headers/FXNPrediction.h +165 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64-simulator/Function.framework/Headers/FXNPredictionStream.h +63 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64-simulator/Function.framework/Headers/FXNPredictor.h +108 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64-simulator/Function.framework/Headers/FXNStatus.h +42 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64-simulator/Function.framework/Headers/FXNValue.h +479 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64-simulator/Function.framework/Headers/FXNValueList.h +87 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64-simulator/Function.framework/Headers/FXNValueMap.h +119 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64-simulator/Function.framework/Headers/FXNVersion.h +26 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64-simulator/Function.framework/Headers/Function.h +19 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64-simulator/Function.framework/Info.plist +0 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64-simulator/Function.framework/Modules/module.modulemap +6 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64-simulator/Function.framework/PrivacyInfo.xcprivacy +36 -0
- package/Plugins/iOS/Function.xcframework/ios-arm64-simulator/Function.framework/_CodeSignature/CodeResources +234 -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 +15 -15
- package/Plugins/iOS/Function.xcframework/xros-arm64/Function.framework/Headers/FXNPrediction.h +8 -8
- package/Plugins/iOS/Function.xcframework/xros-arm64/Function.framework/Headers/FXNPredictionStream.h +3 -3
- package/Plugins/iOS/Function.xcframework/xros-arm64/Function.framework/Headers/FXNPredictor.h +5 -5
- package/Plugins/iOS/Function.xcframework/xros-arm64/Function.framework/Headers/FXNStatus.h +1 -1
- package/Plugins/iOS/Function.xcframework/xros-arm64/Function.framework/Headers/FXNValue.h +117 -33
- package/Plugins/iOS/Function.xcframework/xros-arm64/Function.framework/Headers/FXNValueList.h +87 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64/Function.framework/Headers/FXNValueMap.h +8 -37
- package/Plugins/iOS/Function.xcframework/xros-arm64/Function.framework/Headers/FXNVersion.h +3 -3
- package/Plugins/iOS/Function.xcframework/xros-arm64/Function.framework/Headers/Function.h +2 -1
- package/Plugins/iOS/Function.xcframework/xros-arm64/Function.framework/Info.plist +0 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64/Function.framework/_CodeSignature/CodeResources +30 -19
- package/Plugins/iOS/Function.xcframework/xros-arm64-simulator/Function.framework/Function +0 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64-simulator/Function.framework/Headers/FXNConfiguration.h +313 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64-simulator/Function.framework/Headers/FXNPrediction.h +165 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64-simulator/Function.framework/Headers/FXNPredictionStream.h +63 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64-simulator/Function.framework/Headers/FXNPredictor.h +108 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64-simulator/Function.framework/Headers/FXNStatus.h +42 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64-simulator/Function.framework/Headers/FXNValue.h +479 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64-simulator/Function.framework/Headers/FXNValueList.h +87 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64-simulator/Function.framework/Headers/FXNValueMap.h +119 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64-simulator/Function.framework/Headers/FXNVersion.h +26 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64-simulator/Function.framework/Headers/Function.h +19 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64-simulator/Function.framework/Info.plist +0 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64-simulator/Function.framework/Modules/module.modulemap +6 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64-simulator/Function.framework/PrivacyInfo.xcprivacy +36 -0
- package/Plugins/iOS/Function.xcframework/xros-arm64-simulator/Function.framework/_CodeSignature/CodeResources +234 -0
- package/Plugins/macOS/Function.dylib +0 -0
- package/README.md +1 -1
- package/Runtime/C/Configuration.cs +3 -3
- package/Runtime/C/Function.cs +25 -5
- package/Runtime/C/PredictionStream.cs +1 -1
- package/Runtime/C/Predictor.cs +1 -1
- package/Runtime/C/Value.cs +18 -4
- package/Runtime/C/ValueList.cs +40 -0
- package/Runtime/C/ValueList.cs.meta +2 -0
- package/Runtime/C/ValueMap.cs +2 -2
- package/Runtime/Muna.cs +1 -1
- package/Runtime/Types/Dtype.cs +29 -24
- package/Runtime/Types/Image.cs +1 -1
- package/Runtime/Types/Parameter.cs +1 -1
- package/Runtime/Types/Prediction.cs +1 -1
- package/Runtime/Types/Predictor.cs +1 -1
- package/Runtime/Types/Tensor.cs +1 -1
- package/Runtime/Types/User.cs +1 -1
- package/Unity/Internal/PredictionCache.cs +10 -5
- package/package.json +1 -1
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
//
|
|
2
|
+
// FXNValueList.h
|
|
3
|
+
// Function
|
|
4
|
+
//
|
|
5
|
+
// Created by Yusuf Olokoba on 12/21/2025.
|
|
6
|
+
// Copyright © 2026 NatML Inc. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#pragma once
|
|
10
|
+
|
|
11
|
+
#include <stdbool.h>
|
|
12
|
+
#include <Function/FXNValue.h>
|
|
13
|
+
|
|
14
|
+
#pragma region --Types--
|
|
15
|
+
/*!
|
|
16
|
+
@struct FXNValueList
|
|
17
|
+
|
|
18
|
+
@abstract Prediction value list.
|
|
19
|
+
|
|
20
|
+
@discussion Prediction value list.
|
|
21
|
+
*/
|
|
22
|
+
typedef FXNValue FXNValueList;
|
|
23
|
+
#pragma endregion
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
#pragma region --Operations--
|
|
27
|
+
/*!
|
|
28
|
+
@function FXNValueListGetSize
|
|
29
|
+
|
|
30
|
+
@abstract Get the size of the value list.
|
|
31
|
+
|
|
32
|
+
@discussion Get the size of the value list.
|
|
33
|
+
|
|
34
|
+
@param list
|
|
35
|
+
Prediction value list.
|
|
36
|
+
|
|
37
|
+
@param size
|
|
38
|
+
Output size. MUST NOT be `NULL`.
|
|
39
|
+
*/
|
|
40
|
+
FXN_API FXNStatus FXNValueListGetSize(
|
|
41
|
+
FXNValueList* list,
|
|
42
|
+
int32_t* size
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
/*!
|
|
46
|
+
@function FXNValueListGetValue
|
|
47
|
+
|
|
48
|
+
@abstract Get the value for a given key in the value list.
|
|
49
|
+
|
|
50
|
+
@discussion Get the value for a given key in the value list.
|
|
51
|
+
|
|
52
|
+
@param list
|
|
53
|
+
Prediction value list.
|
|
54
|
+
|
|
55
|
+
@param index
|
|
56
|
+
Value index.
|
|
57
|
+
|
|
58
|
+
@param value
|
|
59
|
+
Output value. MUST NOT be `NULL`.
|
|
60
|
+
*/
|
|
61
|
+
FXN_API FXNStatus FXNValueListGetValue(
|
|
62
|
+
FXNValueList* list,
|
|
63
|
+
int32_t index,
|
|
64
|
+
FXNValue** value
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
/*!
|
|
68
|
+
@function FXNValueListAppendValue
|
|
69
|
+
|
|
70
|
+
@abstract Append a value to a value list.
|
|
71
|
+
|
|
72
|
+
@discussion Append a value to a value list.
|
|
73
|
+
|
|
74
|
+
NOTE: The value list takes ownership of the value.
|
|
75
|
+
As such, you must not call `FXNValueRelease` on the value.
|
|
76
|
+
|
|
77
|
+
@param list
|
|
78
|
+
Prediction value map.
|
|
79
|
+
|
|
80
|
+
@param value
|
|
81
|
+
Value.
|
|
82
|
+
*/
|
|
83
|
+
FXN_API FXNStatus FXNValueListAppendValue(
|
|
84
|
+
FXNValueList* list,
|
|
85
|
+
FXNValue* value
|
|
86
|
+
);
|
|
87
|
+
#pragma endregion
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// Function
|
|
4
4
|
//
|
|
5
5
|
// Created by Yusuf Olokoba on 10/14/2023.
|
|
6
|
-
// Copyright ©
|
|
6
|
+
// Copyright © 2026 NatML Inc. All rights reserved.
|
|
7
7
|
//
|
|
8
8
|
|
|
9
9
|
#pragma once
|
|
@@ -15,40 +15,11 @@
|
|
|
15
15
|
/*!
|
|
16
16
|
@struct FXNValueMap
|
|
17
17
|
|
|
18
|
-
@abstract
|
|
18
|
+
@abstract Prediction value map.
|
|
19
19
|
|
|
20
|
-
@discussion
|
|
20
|
+
@discussion Prediction value map.
|
|
21
21
|
*/
|
|
22
|
-
|
|
23
|
-
typedef struct FXNValueMap FXNValueMap;
|
|
24
|
-
#pragma endregion
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
#pragma region --Lifecycle--
|
|
28
|
-
/*!
|
|
29
|
-
@function FXNValueMapCreate
|
|
30
|
-
|
|
31
|
-
@abstract Create a prediction value map.
|
|
32
|
-
|
|
33
|
-
@discussion Create a prediction value map.
|
|
34
|
-
|
|
35
|
-
@param map
|
|
36
|
-
Created value map. MUST NOT be `NULL`.
|
|
37
|
-
*/
|
|
38
|
-
FXN_API FXNStatus FXNValueMapCreate (FXNValueMap** map);
|
|
39
|
-
|
|
40
|
-
/*!
|
|
41
|
-
@function FXNValueMapRelease
|
|
42
|
-
|
|
43
|
-
@abstract Release the prediction value map.
|
|
44
|
-
|
|
45
|
-
@discussion Release the prediction value map.
|
|
46
|
-
This releases all values currently within the map.
|
|
47
|
-
|
|
48
|
-
@param map
|
|
49
|
-
Prediction value map.
|
|
50
|
-
*/
|
|
51
|
-
FXN_API FXNStatus FXNValueMapRelease (FXNValueMap* map);
|
|
22
|
+
typedef FXNValue FXNValueMap;
|
|
52
23
|
#pragma endregion
|
|
53
24
|
|
|
54
25
|
|
|
@@ -66,7 +37,7 @@ FXN_API FXNStatus FXNValueMapRelease (FXNValueMap* map);
|
|
|
66
37
|
@param size
|
|
67
38
|
Output size. MUST NOT be `NULL`.
|
|
68
39
|
*/
|
|
69
|
-
FXN_API FXNStatus FXNValueMapGetSize
|
|
40
|
+
FXN_API FXNStatus FXNValueMapGetSize(
|
|
70
41
|
FXNValueMap* map,
|
|
71
42
|
int32_t* size
|
|
72
43
|
);
|
|
@@ -90,7 +61,7 @@ FXN_API FXNStatus FXNValueMapGetSize (
|
|
|
90
61
|
@param size
|
|
91
62
|
Size of destination buffer.
|
|
92
63
|
*/
|
|
93
|
-
FXN_API FXNStatus FXNValueMapGetKey
|
|
64
|
+
FXN_API FXNStatus FXNValueMapGetKey(
|
|
94
65
|
FXNValueMap* map,
|
|
95
66
|
int32_t index,
|
|
96
67
|
char* key,
|
|
@@ -115,7 +86,7 @@ FXN_API FXNStatus FXNValueMapGetKey (
|
|
|
115
86
|
|
|
116
87
|
@returns `FXN_OK` if the value map contains a value for the given key else `FXN_ERROR_INVALID_ARGUMENT`.
|
|
117
88
|
*/
|
|
118
|
-
FXN_API FXNStatus FXNValueMapGetValue
|
|
89
|
+
FXN_API FXNStatus FXNValueMapGetValue(
|
|
119
90
|
FXNValueMap* map,
|
|
120
91
|
const char* key,
|
|
121
92
|
FXNValue** value
|
|
@@ -140,7 +111,7 @@ FXN_API FXNStatus FXNValueMapGetValue (
|
|
|
140
111
|
@param value
|
|
141
112
|
Value. Pass `NULL` to remove the value from the map if present.
|
|
142
113
|
*/
|
|
143
|
-
FXN_API FXNStatus FXNValueMapSetValue
|
|
114
|
+
FXN_API FXNStatus FXNValueMapSetValue(
|
|
144
115
|
FXNValueMap* map,
|
|
145
116
|
const char* key,
|
|
146
117
|
FXNValue* value
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// Function
|
|
4
4
|
//
|
|
5
5
|
// Created by Yusuf Olokoba on 10/14/2023.
|
|
6
|
-
// Copyright ©
|
|
6
|
+
// Copyright © 2026 NatML Inc. All rights reserved.
|
|
7
7
|
//
|
|
8
8
|
|
|
9
9
|
#pragma once
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
#define FXN_VERSION_MAJOR 0
|
|
14
14
|
#define FXN_VERSION_MINOR 0
|
|
15
|
-
#define FXN_VERSION_PATCH
|
|
15
|
+
#define FXN_VERSION_PATCH 39
|
|
16
16
|
|
|
17
17
|
/*!
|
|
18
18
|
@function FXNGetVersion
|
|
@@ -23,4 +23,4 @@
|
|
|
23
23
|
|
|
24
24
|
@returns Function version string.
|
|
25
25
|
*/
|
|
26
|
-
FXN_API const char* FXNGetVersion
|
|
26
|
+
FXN_API const char* FXNGetVersion();
|
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
// Function
|
|
4
4
|
//
|
|
5
5
|
// Created by Yusuf Olokoba on 5/27/2023.
|
|
6
|
-
// Copyright ©
|
|
6
|
+
// Copyright © 2026 NatML Inc. All rights reserved.
|
|
7
7
|
//
|
|
8
8
|
|
|
9
9
|
#pragma once
|
|
10
10
|
|
|
11
11
|
#include <Function/FXNStatus.h>
|
|
12
12
|
#include <Function/FXNValue.h>
|
|
13
|
+
#include <Function/FXNValueList.h>
|
|
13
14
|
#include <Function/FXNValueMap.h>
|
|
14
15
|
#include <Function/FXNConfiguration.h>
|
|
15
16
|
#include <Function/FXNPrediction.h>
|
|
Binary file
|
package/Plugins/iOS/Function.xcframework/ios-arm64/Function.framework/_CodeSignature/CodeResources
CHANGED
|
@@ -6,43 +6,47 @@
|
|
|
6
6
|
<dict>
|
|
7
7
|
<key>Headers/FXNConfiguration.h</key>
|
|
8
8
|
<data>
|
|
9
|
-
|
|
9
|
+
EbS43j0cFG4OOKyLtGP86eGSvNM=
|
|
10
10
|
</data>
|
|
11
11
|
<key>Headers/FXNPrediction.h</key>
|
|
12
12
|
<data>
|
|
13
|
-
|
|
13
|
+
v1B/+UYieWkZ7HQJHfEy5HrDomc=
|
|
14
14
|
</data>
|
|
15
15
|
<key>Headers/FXNPredictionStream.h</key>
|
|
16
16
|
<data>
|
|
17
|
-
|
|
17
|
+
Greg+YaffvPKKH+luOZQp3yXNCU=
|
|
18
18
|
</data>
|
|
19
19
|
<key>Headers/FXNPredictor.h</key>
|
|
20
20
|
<data>
|
|
21
|
-
|
|
21
|
+
o41IirofuUe5IxqtetPnX/kov8U=
|
|
22
22
|
</data>
|
|
23
23
|
<key>Headers/FXNStatus.h</key>
|
|
24
24
|
<data>
|
|
25
|
-
|
|
25
|
+
VApmhu5x/w5IRn/cjMqF52VtzTc=
|
|
26
26
|
</data>
|
|
27
27
|
<key>Headers/FXNValue.h</key>
|
|
28
28
|
<data>
|
|
29
|
-
|
|
29
|
+
jyJIY0QMD9+wveprF48DXJEUDPY=
|
|
30
|
+
</data>
|
|
31
|
+
<key>Headers/FXNValueList.h</key>
|
|
32
|
+
<data>
|
|
33
|
+
ld0JDWdJIswhucKkyw89ueUPbi4=
|
|
30
34
|
</data>
|
|
31
35
|
<key>Headers/FXNValueMap.h</key>
|
|
32
36
|
<data>
|
|
33
|
-
|
|
37
|
+
yEs3fRfrIfvL764zB4ttl+wYOMQ=
|
|
34
38
|
</data>
|
|
35
39
|
<key>Headers/FXNVersion.h</key>
|
|
36
40
|
<data>
|
|
37
|
-
|
|
41
|
+
xyxbK7tXG5fHBwwlpfD8qmDrpZI=
|
|
38
42
|
</data>
|
|
39
43
|
<key>Headers/Function.h</key>
|
|
40
44
|
<data>
|
|
41
|
-
|
|
45
|
+
86RjZyv42zhJTCJlE+ae3Y3ehcs=
|
|
42
46
|
</data>
|
|
43
47
|
<key>Info.plist</key>
|
|
44
48
|
<data>
|
|
45
|
-
|
|
49
|
+
id1w7/JnOtEUcwoXYpDnubIW/KQ=
|
|
46
50
|
</data>
|
|
47
51
|
<key>Modules/module.modulemap</key>
|
|
48
52
|
<data>
|
|
@@ -59,63 +63,70 @@
|
|
|
59
63
|
<dict>
|
|
60
64
|
<key>hash2</key>
|
|
61
65
|
<data>
|
|
62
|
-
|
|
66
|
+
y9ybe3TrcDp/r4fokSfYRP4Yk6rWRcJgkVdE9kqE20I=
|
|
63
67
|
</data>
|
|
64
68
|
</dict>
|
|
65
69
|
<key>Headers/FXNPrediction.h</key>
|
|
66
70
|
<dict>
|
|
67
71
|
<key>hash2</key>
|
|
68
72
|
<data>
|
|
69
|
-
|
|
73
|
+
gKQW6DY0xZuGqErUuQWj8WiuTJqF4WJbwI1a+HBZqLQ=
|
|
70
74
|
</data>
|
|
71
75
|
</dict>
|
|
72
76
|
<key>Headers/FXNPredictionStream.h</key>
|
|
73
77
|
<dict>
|
|
74
78
|
<key>hash2</key>
|
|
75
79
|
<data>
|
|
76
|
-
|
|
80
|
+
zK5eqCAOrXG9XsfKGFCQEl5DhsvTI52ZGZvnkwoMQBk=
|
|
77
81
|
</data>
|
|
78
82
|
</dict>
|
|
79
83
|
<key>Headers/FXNPredictor.h</key>
|
|
80
84
|
<dict>
|
|
81
85
|
<key>hash2</key>
|
|
82
86
|
<data>
|
|
83
|
-
|
|
87
|
+
KV7gRJRltk/1F1Di7yCqc3kLgNU34TZvFWIGnMfn8y4=
|
|
84
88
|
</data>
|
|
85
89
|
</dict>
|
|
86
90
|
<key>Headers/FXNStatus.h</key>
|
|
87
91
|
<dict>
|
|
88
92
|
<key>hash2</key>
|
|
89
93
|
<data>
|
|
90
|
-
|
|
94
|
+
Sqaogg1mx4UIkBxAGM1fDq1HW6/8ERp7EIJr4j+cYpw=
|
|
91
95
|
</data>
|
|
92
96
|
</dict>
|
|
93
97
|
<key>Headers/FXNValue.h</key>
|
|
94
98
|
<dict>
|
|
95
99
|
<key>hash2</key>
|
|
96
100
|
<data>
|
|
97
|
-
|
|
101
|
+
vNsG8bHy88vkUE9tjrQgagbBqdpMUoJaxn7BGtopA1w=
|
|
102
|
+
</data>
|
|
103
|
+
</dict>
|
|
104
|
+
<key>Headers/FXNValueList.h</key>
|
|
105
|
+
<dict>
|
|
106
|
+
<key>hash2</key>
|
|
107
|
+
<data>
|
|
108
|
+
IymyAX4E0KWKDkPyFP8CGHv7wQeQZRm+1wgzHd7zAKk=
|
|
98
109
|
</data>
|
|
99
110
|
</dict>
|
|
100
111
|
<key>Headers/FXNValueMap.h</key>
|
|
101
112
|
<dict>
|
|
102
113
|
<key>hash2</key>
|
|
103
114
|
<data>
|
|
104
|
-
|
|
115
|
+
ACZlHVK3fEOQ3rDv5QOxjD+KnTuMDXkNWm6I8dFo2rk=
|
|
105
116
|
</data>
|
|
106
117
|
</dict>
|
|
107
118
|
<key>Headers/FXNVersion.h</key>
|
|
108
119
|
<dict>
|
|
109
120
|
<key>hash2</key>
|
|
110
121
|
<data>
|
|
111
|
-
|
|
122
|
+
mZnAnYFeC3h2GusDoaqoDj5Oh2AeoT21Ql5UINOKH+E=
|
|
112
123
|
</data>
|
|
113
124
|
</dict>
|
|
114
125
|
<key>Headers/Function.h</key>
|
|
115
126
|
<dict>
|
|
116
127
|
<key>hash2</key>
|
|
117
128
|
<data>
|
|
118
|
-
|
|
129
|
+
utJBegbI3h5PQCi/FCnJvDnbpE0E+WYvG0LBKnI2NAQ=
|
|
119
130
|
</data>
|
|
120
131
|
</dict>
|
|
121
132
|
<key>Modules/module.modulemap</key>
|
|
Binary file
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
//
|
|
2
|
+
// FXNConfiguration.h
|
|
3
|
+
// Function
|
|
4
|
+
//
|
|
5
|
+
// Created by Yusuf Olokoba on 5/27/2023.
|
|
6
|
+
// Copyright © 2026 NatML Inc. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#pragma once
|
|
10
|
+
|
|
11
|
+
#include <stdint.h>
|
|
12
|
+
#include <Function/FXNStatus.h>
|
|
13
|
+
|
|
14
|
+
#pragma region --Enumerations--
|
|
15
|
+
/*!
|
|
16
|
+
@enum FXNAcceleration
|
|
17
|
+
|
|
18
|
+
@abstract Hardware acceleration used for predictions.
|
|
19
|
+
|
|
20
|
+
@constant FXN_ACCELERATION_AUTO
|
|
21
|
+
Use the optimal acceleration for the current device.
|
|
22
|
+
|
|
23
|
+
@constant FXN_ACCELERATION_CPU
|
|
24
|
+
Use the CPU.
|
|
25
|
+
|
|
26
|
+
@constant FXN_ACCELERATION_GPU
|
|
27
|
+
Use the GPU.
|
|
28
|
+
|
|
29
|
+
@constant FXN_ACCELERATION_NPU
|
|
30
|
+
Use the neural processing unit.
|
|
31
|
+
*/
|
|
32
|
+
enum FXNAcceleration {
|
|
33
|
+
FXN_ACCELERATION_AUTO = 0,
|
|
34
|
+
FXN_ACCELERATION_CPU = 1 << 0,
|
|
35
|
+
FXN_ACCELERATION_GPU = 1 << 1,
|
|
36
|
+
FXN_ACCELERATION_NPU = 1 << 2,
|
|
37
|
+
};
|
|
38
|
+
typedef enum FXNAcceleration FXNAcceleration;
|
|
39
|
+
#pragma endregion
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
#pragma region --Types--
|
|
43
|
+
/*!
|
|
44
|
+
@struct FXNConfiguration
|
|
45
|
+
|
|
46
|
+
@abstract Opaque type for predictor configuration.
|
|
47
|
+
*/
|
|
48
|
+
struct FXNConfiguration;
|
|
49
|
+
typedef struct FXNConfiguration FXNConfiguration;
|
|
50
|
+
|
|
51
|
+
/*!
|
|
52
|
+
@typedef FXNConfigurationAddResourceHandler
|
|
53
|
+
|
|
54
|
+
@abstract Callback invoked when a configuration resource has been loaded.
|
|
55
|
+
|
|
56
|
+
@param context
|
|
57
|
+
User context.
|
|
58
|
+
|
|
59
|
+
@param status
|
|
60
|
+
Result status.
|
|
61
|
+
*/
|
|
62
|
+
typedef void (*FXNConfigurationAddResourceHandler)(
|
|
63
|
+
void* context,
|
|
64
|
+
FXNStatus status
|
|
65
|
+
);
|
|
66
|
+
#pragma endregion
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
#pragma region --Lifecycle--
|
|
70
|
+
/*!
|
|
71
|
+
@function FXNConfigurationGetUniqueID
|
|
72
|
+
|
|
73
|
+
@abstract Get the configuration unique identifier.
|
|
74
|
+
|
|
75
|
+
@discussion Get the configuration unique identifier.
|
|
76
|
+
|
|
77
|
+
@param identifier
|
|
78
|
+
Configuration unique identifier.
|
|
79
|
+
|
|
80
|
+
@param size
|
|
81
|
+
Identifier size.
|
|
82
|
+
*/
|
|
83
|
+
FXN_API FXNStatus FXNConfigurationGetUniqueID(
|
|
84
|
+
char* identifier,
|
|
85
|
+
int32_t size
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
/*!
|
|
89
|
+
@function FXNConfigurationGetClientID
|
|
90
|
+
|
|
91
|
+
@abstract Get the configuration client identifier.
|
|
92
|
+
|
|
93
|
+
@discussion Get the configuration client identifier.
|
|
94
|
+
|
|
95
|
+
@param identifier
|
|
96
|
+
Configuration client identifier.
|
|
97
|
+
|
|
98
|
+
@param size
|
|
99
|
+
Identifier size.
|
|
100
|
+
*/
|
|
101
|
+
FXN_API FXNStatus FXNConfigurationGetClientID(
|
|
102
|
+
char* identifier,
|
|
103
|
+
int32_t size
|
|
104
|
+
);
|
|
105
|
+
|
|
106
|
+
/*!
|
|
107
|
+
@function FXNConfigurationCreate
|
|
108
|
+
|
|
109
|
+
@abstract Create a predictor configuration.
|
|
110
|
+
|
|
111
|
+
@discussion Create a predictor configuration.
|
|
112
|
+
|
|
113
|
+
@param configuration
|
|
114
|
+
Created configuration. MUST NOT be `NULL`.
|
|
115
|
+
*/
|
|
116
|
+
FXN_API FXNStatus FXNConfigurationCreate(FXNConfiguration** configuration);
|
|
117
|
+
|
|
118
|
+
/*!
|
|
119
|
+
@function FXNConfigurationRelease
|
|
120
|
+
|
|
121
|
+
@abstract Release the predictor configuration.
|
|
122
|
+
|
|
123
|
+
@discussion Release the predictor configuration.
|
|
124
|
+
|
|
125
|
+
@param configuration
|
|
126
|
+
Predictor configuration.
|
|
127
|
+
*/
|
|
128
|
+
FXN_API FXNStatus FXNConfigurationRelease(FXNConfiguration* configuration);
|
|
129
|
+
#pragma endregion
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
#pragma region --Configuration--
|
|
133
|
+
/*!
|
|
134
|
+
@function FXNConfigurationGetTag
|
|
135
|
+
|
|
136
|
+
@abstract Get the predictor tag.
|
|
137
|
+
|
|
138
|
+
@discussion Get the predictor tag.
|
|
139
|
+
|
|
140
|
+
@param configuration
|
|
141
|
+
Predictor configuration.
|
|
142
|
+
|
|
143
|
+
@param tag
|
|
144
|
+
Destination buffer.
|
|
145
|
+
|
|
146
|
+
@param size
|
|
147
|
+
Size of destination buffer.
|
|
148
|
+
*/
|
|
149
|
+
FXN_API FXNStatus FXNConfigurationGetTag(
|
|
150
|
+
FXNConfiguration* configuration,
|
|
151
|
+
char* tag,
|
|
152
|
+
int32_t size
|
|
153
|
+
);
|
|
154
|
+
|
|
155
|
+
/*!
|
|
156
|
+
@function FXNConfigurationSetTag
|
|
157
|
+
|
|
158
|
+
@abstract Set the predictor tag.
|
|
159
|
+
|
|
160
|
+
@discussion Set the predictor tag.
|
|
161
|
+
This is requried for Function to load the predictor.
|
|
162
|
+
|
|
163
|
+
@param configuration
|
|
164
|
+
Predictor configuration.
|
|
165
|
+
|
|
166
|
+
@param tag
|
|
167
|
+
Predictor tag.
|
|
168
|
+
*/
|
|
169
|
+
FXN_API FXNStatus FXNConfigurationSetTag(
|
|
170
|
+
FXNConfiguration* configuration,
|
|
171
|
+
const char* tag
|
|
172
|
+
);
|
|
173
|
+
|
|
174
|
+
/*!
|
|
175
|
+
@function FXNConfigurationGetToken
|
|
176
|
+
|
|
177
|
+
@abstract Get the configuration token.
|
|
178
|
+
|
|
179
|
+
@discussion Get the configuration token.
|
|
180
|
+
|
|
181
|
+
@param configuration
|
|
182
|
+
Predictor configuration.
|
|
183
|
+
|
|
184
|
+
@param token
|
|
185
|
+
Destination buffer.
|
|
186
|
+
|
|
187
|
+
@param size
|
|
188
|
+
Size of destination buffer.
|
|
189
|
+
*/
|
|
190
|
+
FXN_API FXNStatus FXNConfigurationGetToken(
|
|
191
|
+
FXNConfiguration* configuration,
|
|
192
|
+
char* token,
|
|
193
|
+
int32_t size
|
|
194
|
+
);
|
|
195
|
+
|
|
196
|
+
/*!
|
|
197
|
+
@function FXNConfigurationSetToken
|
|
198
|
+
|
|
199
|
+
@abstract Set the configuration token.
|
|
200
|
+
|
|
201
|
+
@discussion Set the configuration token.
|
|
202
|
+
This is requried for Function to load the predictor.
|
|
203
|
+
|
|
204
|
+
@param configuration
|
|
205
|
+
Predictor configuration.
|
|
206
|
+
|
|
207
|
+
@param token
|
|
208
|
+
Configuration token.
|
|
209
|
+
*/
|
|
210
|
+
FXN_API FXNStatus FXNConfigurationSetToken(
|
|
211
|
+
FXNConfiguration* configuration,
|
|
212
|
+
const char* token
|
|
213
|
+
);
|
|
214
|
+
|
|
215
|
+
/*!
|
|
216
|
+
@function FXNConfigurationGetAcceleration
|
|
217
|
+
|
|
218
|
+
@abstract Get the acceleration used for making predictions.
|
|
219
|
+
|
|
220
|
+
@discussion Get the acceleration used for making predictions.
|
|
221
|
+
|
|
222
|
+
@param configuration
|
|
223
|
+
Predictor configuration.
|
|
224
|
+
|
|
225
|
+
@param acceleration
|
|
226
|
+
Acceleration.
|
|
227
|
+
*/
|
|
228
|
+
FXN_API FXNStatus FXNConfigurationGetAcceleration(
|
|
229
|
+
FXNConfiguration* configuration,
|
|
230
|
+
FXNAcceleration* acceleration
|
|
231
|
+
);
|
|
232
|
+
|
|
233
|
+
/*!
|
|
234
|
+
@function FXNConfigurationSetAcceleration
|
|
235
|
+
|
|
236
|
+
@abstract Specify the acceleration used for making predictions.
|
|
237
|
+
|
|
238
|
+
@discussion Specify the acceleration used for making predictions.
|
|
239
|
+
|
|
240
|
+
@param configuration
|
|
241
|
+
Predictor configuration.
|
|
242
|
+
|
|
243
|
+
@param acceleration
|
|
244
|
+
Acceleration used for making predictions predictions.
|
|
245
|
+
*/
|
|
246
|
+
FXN_API FXNStatus FXNConfigurationSetAcceleration(
|
|
247
|
+
FXNConfiguration* configuration,
|
|
248
|
+
FXNAcceleration acceleration
|
|
249
|
+
);
|
|
250
|
+
|
|
251
|
+
/*!
|
|
252
|
+
@function FXNConfigurationGetDevice
|
|
253
|
+
|
|
254
|
+
@abstract Get the compute device used for compute acceleration.
|
|
255
|
+
|
|
256
|
+
@discussion Get the compute device used for compute acceleration.
|
|
257
|
+
|
|
258
|
+
@param configuration
|
|
259
|
+
Predictor configuration.
|
|
260
|
+
|
|
261
|
+
@param device
|
|
262
|
+
Compute device.
|
|
263
|
+
The type of this device is platform-dependent.
|
|
264
|
+
See https://docs.fxn.ai/workflows/realtime#specifying-the-acceleration-device for more information.
|
|
265
|
+
*/
|
|
266
|
+
FXN_API FXNStatus FXNConfigurationGetDevice(
|
|
267
|
+
FXNConfiguration* configuration,
|
|
268
|
+
void** device
|
|
269
|
+
);
|
|
270
|
+
|
|
271
|
+
/*!
|
|
272
|
+
@function FXNConfigurationSetDevice
|
|
273
|
+
|
|
274
|
+
@abstract Specify the compute device used for compute acceleration.
|
|
275
|
+
|
|
276
|
+
@discussion Specify the compute device used for compute acceleration.
|
|
277
|
+
|
|
278
|
+
@param configuration
|
|
279
|
+
Predictor configuration.
|
|
280
|
+
|
|
281
|
+
@param device
|
|
282
|
+
Compute device.
|
|
283
|
+
The type of this device is platform-dependent.
|
|
284
|
+
Pass `NULL` to use the default compute device.
|
|
285
|
+
See https://docs.fxn.ai/workflows/realtime#specifying-the-acceleration-device for more information.
|
|
286
|
+
*/
|
|
287
|
+
FXN_API FXNStatus FXNConfigurationSetDevice(
|
|
288
|
+
FXNConfiguration* configuration,
|
|
289
|
+
void* device
|
|
290
|
+
);
|
|
291
|
+
|
|
292
|
+
/*!
|
|
293
|
+
@function FXNConfigurationAddResource
|
|
294
|
+
|
|
295
|
+
@abstract Add a prediction resource.
|
|
296
|
+
|
|
297
|
+
@discussion Add a prediction resource.
|
|
298
|
+
|
|
299
|
+
@param configuration
|
|
300
|
+
Predictor configuration.
|
|
301
|
+
|
|
302
|
+
@param type
|
|
303
|
+
Resource type.
|
|
304
|
+
|
|
305
|
+
@param path
|
|
306
|
+
Resource path.
|
|
307
|
+
*/
|
|
308
|
+
FXN_API FXNStatus FXNConfigurationAddResource(
|
|
309
|
+
FXNConfiguration* configuration,
|
|
310
|
+
const char* type,
|
|
311
|
+
const char* path
|
|
312
|
+
);
|
|
313
|
+
#pragma endregion
|