]>
Commit | Line | Data |
---|---|---|
5e7ed085 FG |
1 | #[link(name = "windows")] |
2 | extern "system" { | |
04454e1e | 3 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 4 | pub fn MLCreateOperatorRegistry(registry: *mut IMLOperatorRegistry) -> ::windows_sys::core::HRESULT; |
04454e1e | 5 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 FG |
6 | pub fn WinMLCreateRuntime(runtime: *mut IWinMLRuntime) -> ::windows_sys::core::HRESULT; |
7 | } | |
8 | pub type IMLOperatorAttributes = *mut ::core::ffi::c_void; | |
9 | pub type IMLOperatorKernel = *mut ::core::ffi::c_void; | |
10 | pub type IMLOperatorKernelContext = *mut ::core::ffi::c_void; | |
11 | pub type IMLOperatorKernelCreationContext = *mut ::core::ffi::c_void; | |
12 | pub type IMLOperatorKernelFactory = *mut ::core::ffi::c_void; | |
13 | pub type IMLOperatorRegistry = *mut ::core::ffi::c_void; | |
14 | pub type IMLOperatorShapeInferenceContext = *mut ::core::ffi::c_void; | |
15 | pub type IMLOperatorShapeInferrer = *mut ::core::ffi::c_void; | |
16 | pub type IMLOperatorTensor = *mut ::core::ffi::c_void; | |
17 | pub type IMLOperatorTensorShapeDescription = *mut ::core::ffi::c_void; | |
18 | pub type IMLOperatorTypeInferenceContext = *mut ::core::ffi::c_void; | |
19 | pub type IMLOperatorTypeInferrer = *mut ::core::ffi::c_void; | |
20 | pub type IWinMLEvaluationContext = *mut ::core::ffi::c_void; | |
21 | pub type IWinMLModel = *mut ::core::ffi::c_void; | |
22 | pub type IWinMLRuntime = *mut ::core::ffi::c_void; | |
23 | pub type IWinMLRuntimeFactory = *mut ::core::ffi::c_void; | |
24 | #[repr(C)] | |
04454e1e | 25 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 26 | pub struct MLOperatorAttribute { |
04454e1e | 27 | pub name: ::windows_sys::core::PCSTR, |
5e7ed085 FG |
28 | pub r#type: MLOperatorAttributeType, |
29 | pub required: bool, | |
30 | } | |
5e7ed085 | 31 | impl ::core::marker::Copy for MLOperatorAttribute {} |
5e7ed085 FG |
32 | impl ::core::clone::Clone for MLOperatorAttribute { |
33 | fn clone(&self) -> Self { | |
34 | *self | |
35 | } | |
36 | } | |
37 | #[repr(C)] | |
04454e1e | 38 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 39 | pub struct MLOperatorAttributeNameValue { |
04454e1e | 40 | pub name: ::windows_sys::core::PCSTR, |
5e7ed085 FG |
41 | pub r#type: MLOperatorAttributeType, |
42 | pub valueCount: u32, | |
43 | pub Anonymous: MLOperatorAttributeNameValue_0, | |
44 | } | |
5e7ed085 | 45 | impl ::core::marker::Copy for MLOperatorAttributeNameValue {} |
5e7ed085 FG |
46 | impl ::core::clone::Clone for MLOperatorAttributeNameValue { |
47 | fn clone(&self) -> Self { | |
48 | *self | |
49 | } | |
50 | } | |
51 | #[repr(C)] | |
04454e1e | 52 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 FG |
53 | pub union MLOperatorAttributeNameValue_0 { |
54 | pub reserved: *const ::core::ffi::c_void, | |
55 | pub ints: *const i64, | |
56 | pub strings: *const *const i8, | |
57 | pub floats: *const f32, | |
58 | } | |
5e7ed085 | 59 | impl ::core::marker::Copy for MLOperatorAttributeNameValue_0 {} |
5e7ed085 FG |
60 | impl ::core::clone::Clone for MLOperatorAttributeNameValue_0 { |
61 | fn clone(&self) -> Self { | |
62 | *self | |
63 | } | |
64 | } | |
04454e1e | 65 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 FG |
66 | #[repr(transparent)] |
67 | pub struct MLOperatorAttributeType(pub u32); | |
68 | impl MLOperatorAttributeType { | |
69 | pub const Undefined: Self = Self(0u32); | |
70 | pub const Float: Self = Self(2u32); | |
71 | pub const Int: Self = Self(3u32); | |
72 | pub const String: Self = Self(4u32); | |
73 | pub const FloatArray: Self = Self(7u32); | |
74 | pub const IntArray: Self = Self(8u32); | |
75 | pub const StringArray: Self = Self(9u32); | |
76 | } | |
77 | impl ::core::marker::Copy for MLOperatorAttributeType {} | |
78 | impl ::core::clone::Clone for MLOperatorAttributeType { | |
79 | fn clone(&self) -> Self { | |
80 | *self | |
81 | } | |
82 | } | |
83 | #[repr(C)] | |
04454e1e | 84 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 FG |
85 | pub struct MLOperatorEdgeDescription { |
86 | pub edgeType: MLOperatorEdgeType, | |
87 | pub Anonymous: MLOperatorEdgeDescription_0, | |
88 | } | |
89 | impl ::core::marker::Copy for MLOperatorEdgeDescription {} | |
90 | impl ::core::clone::Clone for MLOperatorEdgeDescription { | |
91 | fn clone(&self) -> Self { | |
92 | *self | |
93 | } | |
94 | } | |
95 | #[repr(C)] | |
04454e1e | 96 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 FG |
97 | pub union MLOperatorEdgeDescription_0 { |
98 | pub reserved: u64, | |
99 | pub tensorDataType: MLOperatorTensorDataType, | |
100 | } | |
101 | impl ::core::marker::Copy for MLOperatorEdgeDescription_0 {} | |
102 | impl ::core::clone::Clone for MLOperatorEdgeDescription_0 { | |
103 | fn clone(&self) -> Self { | |
104 | *self | |
105 | } | |
106 | } | |
04454e1e | 107 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 FG |
108 | #[repr(transparent)] |
109 | pub struct MLOperatorEdgeType(pub u32); | |
110 | impl MLOperatorEdgeType { | |
111 | pub const Undefined: Self = Self(0u32); | |
112 | pub const Tensor: Self = Self(1u32); | |
113 | } | |
114 | impl ::core::marker::Copy for MLOperatorEdgeType {} | |
115 | impl ::core::clone::Clone for MLOperatorEdgeType { | |
116 | fn clone(&self) -> Self { | |
117 | *self | |
118 | } | |
119 | } | |
120 | #[repr(C)] | |
04454e1e | 121 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 122 | pub struct MLOperatorEdgeTypeConstraint { |
04454e1e | 123 | pub typeLabel: ::windows_sys::core::PCSTR, |
5e7ed085 FG |
124 | pub allowedTypes: *const MLOperatorEdgeDescription, |
125 | pub allowedTypeCount: u32, | |
126 | } | |
5e7ed085 | 127 | impl ::core::marker::Copy for MLOperatorEdgeTypeConstraint {} |
5e7ed085 FG |
128 | impl ::core::clone::Clone for MLOperatorEdgeTypeConstraint { |
129 | fn clone(&self) -> Self { | |
130 | *self | |
131 | } | |
132 | } | |
04454e1e | 133 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 FG |
134 | #[repr(transparent)] |
135 | pub struct MLOperatorExecutionType(pub u32); | |
136 | impl MLOperatorExecutionType { | |
137 | pub const Undefined: Self = Self(0u32); | |
138 | pub const Cpu: Self = Self(1u32); | |
139 | pub const D3D12: Self = Self(2u32); | |
140 | } | |
141 | impl ::core::marker::Copy for MLOperatorExecutionType {} | |
142 | impl ::core::clone::Clone for MLOperatorExecutionType { | |
143 | fn clone(&self) -> Self { | |
144 | *self | |
145 | } | |
146 | } | |
147 | #[repr(C)] | |
04454e1e | 148 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 149 | pub struct MLOperatorKernelDescription { |
04454e1e FG |
150 | pub domain: ::windows_sys::core::PCSTR, |
151 | pub name: ::windows_sys::core::PCSTR, | |
5e7ed085 FG |
152 | pub minimumOperatorSetVersion: i32, |
153 | pub executionType: MLOperatorExecutionType, | |
154 | pub typeConstraints: *const MLOperatorEdgeTypeConstraint, | |
155 | pub typeConstraintCount: u32, | |
156 | pub defaultAttributes: *const MLOperatorAttributeNameValue, | |
157 | pub defaultAttributeCount: u32, | |
158 | pub options: MLOperatorKernelOptions, | |
159 | pub executionOptions: u32, | |
160 | } | |
5e7ed085 | 161 | impl ::core::marker::Copy for MLOperatorKernelDescription {} |
5e7ed085 FG |
162 | impl ::core::clone::Clone for MLOperatorKernelDescription { |
163 | fn clone(&self) -> Self { | |
164 | *self | |
165 | } | |
166 | } | |
04454e1e | 167 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 FG |
168 | #[repr(transparent)] |
169 | pub struct MLOperatorKernelOptions(pub u32); | |
170 | impl MLOperatorKernelOptions { | |
171 | pub const None: Self = Self(0u32); | |
172 | pub const AllowDynamicInputShapes: Self = Self(1u32); | |
173 | } | |
174 | impl ::core::marker::Copy for MLOperatorKernelOptions {} | |
175 | impl ::core::clone::Clone for MLOperatorKernelOptions { | |
176 | fn clone(&self) -> Self { | |
177 | *self | |
178 | } | |
179 | } | |
04454e1e | 180 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 FG |
181 | #[repr(transparent)] |
182 | pub struct MLOperatorParameterOptions(pub u32); | |
183 | impl MLOperatorParameterOptions { | |
184 | pub const Single: Self = Self(0u32); | |
185 | pub const Optional: Self = Self(1u32); | |
186 | pub const Variadic: Self = Self(2u32); | |
187 | } | |
188 | impl ::core::marker::Copy for MLOperatorParameterOptions {} | |
189 | impl ::core::clone::Clone for MLOperatorParameterOptions { | |
190 | fn clone(&self) -> Self { | |
191 | *self | |
192 | } | |
193 | } | |
194 | #[repr(C)] | |
04454e1e | 195 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 196 | pub struct MLOperatorSchemaDescription { |
04454e1e | 197 | pub name: ::windows_sys::core::PCSTR, |
5e7ed085 FG |
198 | pub operatorSetVersionAtLastChange: i32, |
199 | pub inputs: *const MLOperatorSchemaEdgeDescription, | |
200 | pub inputCount: u32, | |
201 | pub outputs: *const MLOperatorSchemaEdgeDescription, | |
202 | pub outputCount: u32, | |
203 | pub typeConstraints: *const MLOperatorEdgeTypeConstraint, | |
204 | pub typeConstraintCount: u32, | |
205 | pub attributes: *const MLOperatorAttribute, | |
206 | pub attributeCount: u32, | |
207 | pub defaultAttributes: *const MLOperatorAttributeNameValue, | |
208 | pub defaultAttributeCount: u32, | |
209 | } | |
5e7ed085 | 210 | impl ::core::marker::Copy for MLOperatorSchemaDescription {} |
5e7ed085 FG |
211 | impl ::core::clone::Clone for MLOperatorSchemaDescription { |
212 | fn clone(&self) -> Self { | |
213 | *self | |
214 | } | |
215 | } | |
216 | #[repr(C)] | |
04454e1e | 217 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 FG |
218 | pub struct MLOperatorSchemaEdgeDescription { |
219 | pub options: MLOperatorParameterOptions, | |
220 | pub typeFormat: MLOperatorSchemaEdgeTypeFormat, | |
221 | pub Anonymous: MLOperatorSchemaEdgeDescription_0, | |
222 | } | |
5e7ed085 | 223 | impl ::core::marker::Copy for MLOperatorSchemaEdgeDescription {} |
5e7ed085 FG |
224 | impl ::core::clone::Clone for MLOperatorSchemaEdgeDescription { |
225 | fn clone(&self) -> Self { | |
226 | *self | |
227 | } | |
228 | } | |
229 | #[repr(C)] | |
04454e1e | 230 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 FG |
231 | pub union MLOperatorSchemaEdgeDescription_0 { |
232 | pub reserved: *const ::core::ffi::c_void, | |
04454e1e | 233 | pub typeLabel: ::windows_sys::core::PCSTR, |
5e7ed085 FG |
234 | pub edgeDescription: MLOperatorEdgeDescription, |
235 | } | |
5e7ed085 | 236 | impl ::core::marker::Copy for MLOperatorSchemaEdgeDescription_0 {} |
5e7ed085 FG |
237 | impl ::core::clone::Clone for MLOperatorSchemaEdgeDescription_0 { |
238 | fn clone(&self) -> Self { | |
239 | *self | |
240 | } | |
241 | } | |
04454e1e | 242 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 FG |
243 | #[repr(transparent)] |
244 | pub struct MLOperatorSchemaEdgeTypeFormat(pub i32); | |
245 | impl MLOperatorSchemaEdgeTypeFormat { | |
246 | pub const EdgeDescription: Self = Self(0i32); | |
247 | pub const Label: Self = Self(1i32); | |
248 | } | |
249 | impl ::core::marker::Copy for MLOperatorSchemaEdgeTypeFormat {} | |
250 | impl ::core::clone::Clone for MLOperatorSchemaEdgeTypeFormat { | |
251 | fn clone(&self) -> Self { | |
252 | *self | |
253 | } | |
254 | } | |
255 | #[repr(C)] | |
04454e1e | 256 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 257 | pub struct MLOperatorSetId { |
04454e1e | 258 | pub domain: ::windows_sys::core::PCSTR, |
5e7ed085 FG |
259 | pub version: i32, |
260 | } | |
5e7ed085 | 261 | impl ::core::marker::Copy for MLOperatorSetId {} |
5e7ed085 FG |
262 | impl ::core::clone::Clone for MLOperatorSetId { |
263 | fn clone(&self) -> Self { | |
264 | *self | |
265 | } | |
266 | } | |
04454e1e | 267 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 FG |
268 | #[repr(transparent)] |
269 | pub struct MLOperatorTensorDataType(pub u32); | |
270 | impl MLOperatorTensorDataType { | |
271 | pub const Undefined: Self = Self(0u32); | |
272 | pub const Float: Self = Self(1u32); | |
273 | pub const UInt8: Self = Self(2u32); | |
274 | pub const Int8: Self = Self(3u32); | |
275 | pub const UInt16: Self = Self(4u32); | |
276 | pub const Int16: Self = Self(5u32); | |
277 | pub const Int32: Self = Self(6u32); | |
278 | pub const Int64: Self = Self(7u32); | |
279 | pub const String: Self = Self(8u32); | |
280 | pub const Bool: Self = Self(9u32); | |
281 | pub const Float16: Self = Self(10u32); | |
282 | pub const Double: Self = Self(11u32); | |
283 | pub const UInt32: Self = Self(12u32); | |
284 | pub const UInt64: Self = Self(13u32); | |
285 | pub const Complex64: Self = Self(14u32); | |
286 | pub const Complex128: Self = Self(15u32); | |
287 | } | |
288 | impl ::core::marker::Copy for MLOperatorTensorDataType {} | |
289 | impl ::core::clone::Clone for MLOperatorTensorDataType { | |
290 | fn clone(&self) -> Self { | |
291 | *self | |
292 | } | |
293 | } | |
294 | #[repr(C)] | |
04454e1e FG |
295 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`, `\"Win32_Graphics_Direct3D12\"`*"] |
296 | #[cfg(feature = "Win32_Graphics_Direct3D12")] | |
5e7ed085 | 297 | pub struct WINML_BINDING_DESC { |
04454e1e | 298 | pub Name: ::windows_sys::core::PCWSTR, |
5e7ed085 FG |
299 | pub BindType: WINML_BINDING_TYPE, |
300 | pub Anonymous: WINML_BINDING_DESC_0, | |
301 | } | |
04454e1e | 302 | #[cfg(feature = "Win32_Graphics_Direct3D12")] |
5e7ed085 | 303 | impl ::core::marker::Copy for WINML_BINDING_DESC {} |
04454e1e | 304 | #[cfg(feature = "Win32_Graphics_Direct3D12")] |
5e7ed085 FG |
305 | impl ::core::clone::Clone for WINML_BINDING_DESC { |
306 | fn clone(&self) -> Self { | |
307 | *self | |
308 | } | |
309 | } | |
310 | #[repr(C)] | |
04454e1e FG |
311 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`, `\"Win32_Graphics_Direct3D12\"`*"] |
312 | #[cfg(feature = "Win32_Graphics_Direct3D12")] | |
5e7ed085 FG |
313 | pub union WINML_BINDING_DESC_0 { |
314 | pub Tensor: WINML_TENSOR_BINDING_DESC, | |
315 | pub Sequence: WINML_SEQUENCE_BINDING_DESC, | |
316 | pub Map: WINML_MAP_BINDING_DESC, | |
317 | pub Image: WINML_IMAGE_BINDING_DESC, | |
318 | pub Resource: WINML_RESOURCE_BINDING_DESC, | |
319 | } | |
04454e1e | 320 | #[cfg(feature = "Win32_Graphics_Direct3D12")] |
5e7ed085 | 321 | impl ::core::marker::Copy for WINML_BINDING_DESC_0 {} |
04454e1e | 322 | #[cfg(feature = "Win32_Graphics_Direct3D12")] |
5e7ed085 FG |
323 | impl ::core::clone::Clone for WINML_BINDING_DESC_0 { |
324 | fn clone(&self) -> Self { | |
325 | *self | |
326 | } | |
327 | } | |
04454e1e | 328 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 329 | pub type WINML_BINDING_TYPE = i32; |
04454e1e | 330 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 331 | pub const WINML_BINDING_UNDEFINED: WINML_BINDING_TYPE = 0i32; |
04454e1e | 332 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 333 | pub const WINML_BINDING_TENSOR: WINML_BINDING_TYPE = 1i32; |
04454e1e | 334 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 335 | pub const WINML_BINDING_SEQUENCE: WINML_BINDING_TYPE = 2i32; |
04454e1e | 336 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 337 | pub const WINML_BINDING_MAP: WINML_BINDING_TYPE = 3i32; |
04454e1e | 338 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 339 | pub const WINML_BINDING_IMAGE: WINML_BINDING_TYPE = 4i32; |
04454e1e | 340 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 341 | pub const WINML_BINDING_RESOURCE: WINML_BINDING_TYPE = 5i32; |
04454e1e | 342 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 343 | pub type WINML_FEATURE_TYPE = i32; |
04454e1e | 344 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 345 | pub const WINML_FEATURE_UNDEFINED: WINML_FEATURE_TYPE = 0i32; |
04454e1e | 346 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 347 | pub const WINML_FEATURE_TENSOR: WINML_FEATURE_TYPE = 1i32; |
04454e1e | 348 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 349 | pub const WINML_FEATURE_SEQUENCE: WINML_FEATURE_TYPE = 2i32; |
04454e1e | 350 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 351 | pub const WINML_FEATURE_MAP: WINML_FEATURE_TYPE = 3i32; |
04454e1e | 352 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 FG |
353 | pub const WINML_FEATURE_IMAGE: WINML_FEATURE_TYPE = 4i32; |
354 | #[repr(C)] | |
04454e1e | 355 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 FG |
356 | pub struct WINML_IMAGE_BINDING_DESC { |
357 | pub ElementType: WINML_TENSOR_DATA_TYPE, | |
358 | pub NumDimensions: u32, | |
359 | pub pShape: *mut i64, | |
360 | pub DataSize: u32, | |
361 | pub pData: *mut ::core::ffi::c_void, | |
362 | } | |
363 | impl ::core::marker::Copy for WINML_IMAGE_BINDING_DESC {} | |
364 | impl ::core::clone::Clone for WINML_IMAGE_BINDING_DESC { | |
365 | fn clone(&self) -> Self { | |
366 | *self | |
367 | } | |
368 | } | |
369 | #[repr(C)] | |
04454e1e | 370 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 FG |
371 | pub struct WINML_IMAGE_VARIABLE_DESC { |
372 | pub ElementType: WINML_TENSOR_DATA_TYPE, | |
373 | pub NumDimensions: u32, | |
374 | pub pShape: *mut i64, | |
375 | } | |
376 | impl ::core::marker::Copy for WINML_IMAGE_VARIABLE_DESC {} | |
377 | impl ::core::clone::Clone for WINML_IMAGE_VARIABLE_DESC { | |
378 | fn clone(&self) -> Self { | |
379 | *self | |
380 | } | |
381 | } | |
382 | #[repr(C)] | |
04454e1e | 383 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 FG |
384 | pub struct WINML_MAP_BINDING_DESC { |
385 | pub ElementCount: u32, | |
386 | pub KeyType: WINML_TENSOR_DATA_TYPE, | |
387 | pub Anonymous1: WINML_MAP_BINDING_DESC_0, | |
388 | pub Fields: WINML_TENSOR_DATA_TYPE, | |
389 | pub Anonymous2: WINML_MAP_BINDING_DESC_1, | |
390 | } | |
5e7ed085 | 391 | impl ::core::marker::Copy for WINML_MAP_BINDING_DESC {} |
5e7ed085 FG |
392 | impl ::core::clone::Clone for WINML_MAP_BINDING_DESC { |
393 | fn clone(&self) -> Self { | |
394 | *self | |
395 | } | |
396 | } | |
397 | #[repr(C)] | |
04454e1e | 398 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 399 | pub union WINML_MAP_BINDING_DESC_0 { |
04454e1e | 400 | pub pStringKeys: *mut ::windows_sys::core::PWSTR, |
5e7ed085 FG |
401 | pub pIntKeys: *mut i64, |
402 | } | |
5e7ed085 | 403 | impl ::core::marker::Copy for WINML_MAP_BINDING_DESC_0 {} |
5e7ed085 FG |
404 | impl ::core::clone::Clone for WINML_MAP_BINDING_DESC_0 { |
405 | fn clone(&self) -> Self { | |
406 | *self | |
407 | } | |
408 | } | |
409 | #[repr(C)] | |
04454e1e | 410 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 411 | pub union WINML_MAP_BINDING_DESC_1 { |
04454e1e | 412 | pub pStringFields: *mut ::windows_sys::core::PWSTR, |
5e7ed085 FG |
413 | pub pIntFields: *mut i64, |
414 | pub pFloatFields: *mut f32, | |
415 | pub pDoubleFields: *mut f64, | |
416 | } | |
5e7ed085 | 417 | impl ::core::marker::Copy for WINML_MAP_BINDING_DESC_1 {} |
5e7ed085 FG |
418 | impl ::core::clone::Clone for WINML_MAP_BINDING_DESC_1 { |
419 | fn clone(&self) -> Self { | |
420 | *self | |
421 | } | |
422 | } | |
423 | #[repr(C)] | |
04454e1e | 424 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 FG |
425 | pub struct WINML_MAP_VARIABLE_DESC { |
426 | pub KeyType: WINML_TENSOR_DATA_TYPE, | |
427 | pub Fields: WINML_TENSOR_DATA_TYPE, | |
428 | } | |
429 | impl ::core::marker::Copy for WINML_MAP_VARIABLE_DESC {} | |
430 | impl ::core::clone::Clone for WINML_MAP_VARIABLE_DESC { | |
431 | fn clone(&self) -> Self { | |
432 | *self | |
433 | } | |
434 | } | |
435 | #[repr(C)] | |
04454e1e | 436 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 437 | pub struct WINML_MODEL_DESC { |
04454e1e FG |
438 | pub Author: ::windows_sys::core::PWSTR, |
439 | pub Name: ::windows_sys::core::PWSTR, | |
440 | pub Domain: ::windows_sys::core::PWSTR, | |
441 | pub Description: ::windows_sys::core::PWSTR, | |
5e7ed085 FG |
442 | pub Version: usize, |
443 | } | |
5e7ed085 | 444 | impl ::core::marker::Copy for WINML_MODEL_DESC {} |
5e7ed085 FG |
445 | impl ::core::clone::Clone for WINML_MODEL_DESC { |
446 | fn clone(&self) -> Self { | |
447 | *self | |
448 | } | |
449 | } | |
450 | #[repr(C)] | |
04454e1e | 451 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`, `\"Win32_Graphics_Direct3D12\"`*"] |
5e7ed085 FG |
452 | #[cfg(feature = "Win32_Graphics_Direct3D12")] |
453 | pub struct WINML_RESOURCE_BINDING_DESC { | |
454 | pub ElementType: WINML_TENSOR_DATA_TYPE, | |
455 | pub NumDimensions: u32, | |
456 | pub pShape: *mut i64, | |
457 | pub pResource: super::super::super::Graphics::Direct3D12::ID3D12Resource, | |
458 | } | |
459 | #[cfg(feature = "Win32_Graphics_Direct3D12")] | |
460 | impl ::core::marker::Copy for WINML_RESOURCE_BINDING_DESC {} | |
461 | #[cfg(feature = "Win32_Graphics_Direct3D12")] | |
462 | impl ::core::clone::Clone for WINML_RESOURCE_BINDING_DESC { | |
463 | fn clone(&self) -> Self { | |
464 | *self | |
465 | } | |
466 | } | |
04454e1e | 467 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 468 | pub type WINML_RUNTIME_TYPE = i32; |
04454e1e | 469 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 FG |
470 | pub const WINML_RUNTIME_CNTK: WINML_RUNTIME_TYPE = 0i32; |
471 | #[repr(C)] | |
04454e1e | 472 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 FG |
473 | pub struct WINML_SEQUENCE_BINDING_DESC { |
474 | pub ElementCount: u32, | |
475 | pub ElementType: WINML_TENSOR_DATA_TYPE, | |
476 | pub Anonymous: WINML_SEQUENCE_BINDING_DESC_0, | |
477 | } | |
5e7ed085 | 478 | impl ::core::marker::Copy for WINML_SEQUENCE_BINDING_DESC {} |
5e7ed085 FG |
479 | impl ::core::clone::Clone for WINML_SEQUENCE_BINDING_DESC { |
480 | fn clone(&self) -> Self { | |
481 | *self | |
482 | } | |
483 | } | |
484 | #[repr(C)] | |
04454e1e | 485 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 486 | pub union WINML_SEQUENCE_BINDING_DESC_0 { |
04454e1e | 487 | pub pStrings: *mut ::windows_sys::core::PWSTR, |
5e7ed085 FG |
488 | pub pInts: *mut i64, |
489 | pub pFloats: *mut f32, | |
490 | pub pDoubles: *mut f64, | |
491 | } | |
5e7ed085 | 492 | impl ::core::marker::Copy for WINML_SEQUENCE_BINDING_DESC_0 {} |
5e7ed085 FG |
493 | impl ::core::clone::Clone for WINML_SEQUENCE_BINDING_DESC_0 { |
494 | fn clone(&self) -> Self { | |
495 | *self | |
496 | } | |
497 | } | |
498 | #[repr(C)] | |
04454e1e | 499 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 FG |
500 | pub struct WINML_SEQUENCE_VARIABLE_DESC { |
501 | pub ElementType: WINML_TENSOR_DATA_TYPE, | |
502 | } | |
503 | impl ::core::marker::Copy for WINML_SEQUENCE_VARIABLE_DESC {} | |
504 | impl ::core::clone::Clone for WINML_SEQUENCE_VARIABLE_DESC { | |
505 | fn clone(&self) -> Self { | |
506 | *self | |
507 | } | |
508 | } | |
509 | #[repr(C)] | |
04454e1e | 510 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 FG |
511 | pub struct WINML_TENSOR_BINDING_DESC { |
512 | pub DataType: WINML_TENSOR_DATA_TYPE, | |
513 | pub NumDimensions: u32, | |
514 | pub pShape: *mut i64, | |
515 | pub DataSize: u32, | |
516 | pub pData: *mut ::core::ffi::c_void, | |
517 | } | |
518 | impl ::core::marker::Copy for WINML_TENSOR_BINDING_DESC {} | |
519 | impl ::core::clone::Clone for WINML_TENSOR_BINDING_DESC { | |
520 | fn clone(&self) -> Self { | |
521 | *self | |
522 | } | |
523 | } | |
04454e1e | 524 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 525 | pub type WINML_TENSOR_DATA_TYPE = i32; |
04454e1e | 526 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 527 | pub const WINML_TENSOR_UNDEFINED: WINML_TENSOR_DATA_TYPE = 0i32; |
04454e1e | 528 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 529 | pub const WINML_TENSOR_FLOAT: WINML_TENSOR_DATA_TYPE = 1i32; |
04454e1e | 530 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 531 | pub const WINML_TENSOR_UINT8: WINML_TENSOR_DATA_TYPE = 2i32; |
04454e1e | 532 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 533 | pub const WINML_TENSOR_INT8: WINML_TENSOR_DATA_TYPE = 3i32; |
04454e1e | 534 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 535 | pub const WINML_TENSOR_UINT16: WINML_TENSOR_DATA_TYPE = 4i32; |
04454e1e | 536 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 537 | pub const WINML_TENSOR_INT16: WINML_TENSOR_DATA_TYPE = 5i32; |
04454e1e | 538 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 539 | pub const WINML_TENSOR_INT32: WINML_TENSOR_DATA_TYPE = 6i32; |
04454e1e | 540 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 541 | pub const WINML_TENSOR_INT64: WINML_TENSOR_DATA_TYPE = 7i32; |
04454e1e | 542 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 543 | pub const WINML_TENSOR_STRING: WINML_TENSOR_DATA_TYPE = 8i32; |
04454e1e | 544 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 545 | pub const WINML_TENSOR_BOOLEAN: WINML_TENSOR_DATA_TYPE = 9i32; |
04454e1e | 546 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 547 | pub const WINML_TENSOR_FLOAT16: WINML_TENSOR_DATA_TYPE = 10i32; |
04454e1e | 548 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 549 | pub const WINML_TENSOR_DOUBLE: WINML_TENSOR_DATA_TYPE = 11i32; |
04454e1e | 550 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 551 | pub const WINML_TENSOR_UINT32: WINML_TENSOR_DATA_TYPE = 12i32; |
04454e1e | 552 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 553 | pub const WINML_TENSOR_UINT64: WINML_TENSOR_DATA_TYPE = 13i32; |
04454e1e | 554 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 555 | pub const WINML_TENSOR_COMPLEX64: WINML_TENSOR_DATA_TYPE = 14i32; |
04454e1e | 556 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 | 557 | pub const WINML_TENSOR_COMPLEX128: WINML_TENSOR_DATA_TYPE = 15i32; |
04454e1e | 558 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 FG |
559 | pub const WINML_TENSOR_DIMENSION_COUNT_MAX: u32 = 4u32; |
560 | #[repr(C)] | |
04454e1e | 561 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"] |
5e7ed085 FG |
562 | pub struct WINML_TENSOR_VARIABLE_DESC { |
563 | pub ElementType: WINML_TENSOR_DATA_TYPE, | |
564 | pub NumDimensions: u32, | |
565 | pub pShape: *mut i64, | |
566 | } | |
567 | impl ::core::marker::Copy for WINML_TENSOR_VARIABLE_DESC {} | |
568 | impl ::core::clone::Clone for WINML_TENSOR_VARIABLE_DESC { | |
569 | fn clone(&self) -> Self { | |
570 | *self | |
571 | } | |
572 | } | |
573 | #[repr(C)] | |
04454e1e | 574 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`, `\"Win32_Foundation\"`*"] |
5e7ed085 FG |
575 | #[cfg(feature = "Win32_Foundation")] |
576 | pub struct WINML_VARIABLE_DESC { | |
04454e1e FG |
577 | pub Name: ::windows_sys::core::PWSTR, |
578 | pub Description: ::windows_sys::core::PWSTR, | |
5e7ed085 FG |
579 | pub FeatureType: WINML_FEATURE_TYPE, |
580 | pub Required: super::super::super::Foundation::BOOL, | |
581 | pub Anonymous: WINML_VARIABLE_DESC_0, | |
582 | } | |
583 | #[cfg(feature = "Win32_Foundation")] | |
584 | impl ::core::marker::Copy for WINML_VARIABLE_DESC {} | |
585 | #[cfg(feature = "Win32_Foundation")] | |
586 | impl ::core::clone::Clone for WINML_VARIABLE_DESC { | |
587 | fn clone(&self) -> Self { | |
588 | *self | |
589 | } | |
590 | } | |
591 | #[repr(C)] | |
04454e1e | 592 | #[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`, `\"Win32_Foundation\"`*"] |
5e7ed085 FG |
593 | #[cfg(feature = "Win32_Foundation")] |
594 | pub union WINML_VARIABLE_DESC_0 { | |
595 | pub Tensor: WINML_TENSOR_VARIABLE_DESC, | |
596 | pub Sequence: WINML_SEQUENCE_VARIABLE_DESC, | |
597 | pub Map: WINML_MAP_VARIABLE_DESC, | |
598 | pub Image: WINML_IMAGE_VARIABLE_DESC, | |
599 | } | |
600 | #[cfg(feature = "Win32_Foundation")] | |
601 | impl ::core::marker::Copy for WINML_VARIABLE_DESC_0 {} | |
602 | #[cfg(feature = "Win32_Foundation")] | |
603 | impl ::core::clone::Clone for WINML_VARIABLE_DESC_0 { | |
604 | fn clone(&self) -> Self { | |
605 | *self | |
606 | } | |
607 | } |