]> git.proxmox.com Git - rustc.git/blame - vendor/windows/src/Windows/Win32/AI/MachineLearning/WinML/mod.rs
Merge 1.70 into proxmox/bookworm
[rustc.git] / vendor / windows / src / Windows / Win32 / AI / MachineLearning / WinML / mod.rs
CommitLineData
353b0b11
FG
1#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
2#[inline]
3pub unsafe fn MLCreateOperatorRegistry() -> ::windows::core::Result<IMLOperatorRegistry> {
4 ::windows::imp::link ! ( "windows.ai.machinelearning.dll""system" fn MLCreateOperatorRegistry ( registry : *mut * mut::core::ffi::c_void ) -> :: windows::core::HRESULT );
5 let mut result__ = ::windows::core::zeroed::<IMLOperatorRegistry>();
6 MLCreateOperatorRegistry(&mut result__).from_abi(result__)
7}
8#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
9#[inline]
10pub unsafe fn WinMLCreateRuntime() -> ::windows::core::Result<IWinMLRuntime> {
11 ::windows::imp::link ! ( "winml.dll""system" fn WinMLCreateRuntime ( runtime : *mut * mut::core::ffi::c_void ) -> :: windows::core::HRESULT );
12 let mut result__ = ::windows::core::zeroed::<IWinMLRuntime>();
13 WinMLCreateRuntime(&mut result__).from_abi(result__)
14}
15#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
16#[repr(transparent)]
17pub struct IMLOperatorAttributes(::windows::core::IUnknown);
18impl IMLOperatorAttributes {
19 pub unsafe fn GetAttributeElementCount<P0>(&self, name: P0, r#type: MLOperatorAttributeType) -> ::windows::core::Result<u32>
20 where
21 P0: ::windows::core::IntoParam<::windows::core::PCSTR>,
22 {
23 let mut result__ = ::windows::core::zeroed::<u32>();
24 (::windows::core::Interface::vtable(self).GetAttributeElementCount)(::windows::core::Interface::as_raw(self), name.into_param().abi(), r#type, &mut result__).from_abi(result__)
25 }
26 pub unsafe fn GetAttribute<P0>(&self, name: P0, r#type: MLOperatorAttributeType, elementcount: u32, elementbytesize: usize, value: *mut ::core::ffi::c_void) -> ::windows::core::Result<()>
27 where
28 P0: ::windows::core::IntoParam<::windows::core::PCSTR>,
29 {
30 (::windows::core::Interface::vtable(self).GetAttribute)(::windows::core::Interface::as_raw(self), name.into_param().abi(), r#type, elementcount, elementbytesize, value).ok()
31 }
32 pub unsafe fn GetStringAttributeElementLength<P0>(&self, name: P0, elementindex: u32) -> ::windows::core::Result<u32>
33 where
34 P0: ::windows::core::IntoParam<::windows::core::PCSTR>,
35 {
36 let mut result__ = ::windows::core::zeroed::<u32>();
37 (::windows::core::Interface::vtable(self).GetStringAttributeElementLength)(::windows::core::Interface::as_raw(self), name.into_param().abi(), elementindex, &mut result__).from_abi(result__)
38 }
39 pub unsafe fn GetStringAttributeElement<P0>(&self, name: P0, elementindex: u32, attributeelement: &mut [u8]) -> ::windows::core::Result<()>
40 where
41 P0: ::windows::core::IntoParam<::windows::core::PCSTR>,
42 {
43 (::windows::core::Interface::vtable(self).GetStringAttributeElement)(::windows::core::Interface::as_raw(self), name.into_param().abi(), elementindex, attributeelement.len() as _, ::core::mem::transmute(attributeelement.as_ptr())).ok()
44 }
45}
46::windows::imp::interface_hierarchy!(IMLOperatorAttributes, ::windows::core::IUnknown);
47impl ::core::cmp::PartialEq for IMLOperatorAttributes {
48 fn eq(&self, other: &Self) -> bool {
49 self.0 == other.0
50 }
51}
52impl ::core::cmp::Eq for IMLOperatorAttributes {}
53impl ::core::fmt::Debug for IMLOperatorAttributes {
54 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
55 f.debug_tuple("IMLOperatorAttributes").field(&self.0).finish()
56 }
57}
58unsafe impl ::windows::core::Interface for IMLOperatorAttributes {
59 type Vtable = IMLOperatorAttributes_Vtbl;
60}
61impl ::core::clone::Clone for IMLOperatorAttributes {
62 fn clone(&self) -> Self {
63 Self(self.0.clone())
64 }
65}
66unsafe impl ::windows::core::ComInterface for IMLOperatorAttributes {
67 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4b1b1759_ec40_466c_aab4_beb5347fd24c);
68}
69#[repr(C)]
70#[doc(hidden)]
71pub struct IMLOperatorAttributes_Vtbl {
72 pub base__: ::windows::core::IUnknown_Vtbl,
73 pub GetAttributeElementCount: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, name: ::windows::core::PCSTR, r#type: MLOperatorAttributeType, elementcount: *mut u32) -> ::windows::core::HRESULT,
74 pub GetAttribute: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, name: ::windows::core::PCSTR, r#type: MLOperatorAttributeType, elementcount: u32, elementbytesize: usize, value: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
75 pub GetStringAttributeElementLength: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, name: ::windows::core::PCSTR, elementindex: u32, attributeelementbytesize: *mut u32) -> ::windows::core::HRESULT,
76 pub GetStringAttributeElement: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, name: ::windows::core::PCSTR, elementindex: u32, attributeelementbytesize: u32, attributeelement: ::windows::core::PSTR) -> ::windows::core::HRESULT,
77}
78#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
79#[repr(transparent)]
80pub struct IMLOperatorKernel(::windows::core::IUnknown);
81impl IMLOperatorKernel {
82 pub unsafe fn Compute<P0>(&self, context: P0) -> ::windows::core::Result<()>
83 where
84 P0: ::windows::core::IntoParam<IMLOperatorKernelContext>,
85 {
86 (::windows::core::Interface::vtable(self).Compute)(::windows::core::Interface::as_raw(self), context.into_param().abi()).ok()
87 }
88}
89::windows::imp::interface_hierarchy!(IMLOperatorKernel, ::windows::core::IUnknown);
90impl ::core::cmp::PartialEq for IMLOperatorKernel {
91 fn eq(&self, other: &Self) -> bool {
92 self.0 == other.0
93 }
94}
95impl ::core::cmp::Eq for IMLOperatorKernel {}
96impl ::core::fmt::Debug for IMLOperatorKernel {
97 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
98 f.debug_tuple("IMLOperatorKernel").field(&self.0).finish()
99 }
100}
101unsafe impl ::windows::core::Interface for IMLOperatorKernel {
102 type Vtable = IMLOperatorKernel_Vtbl;
103}
104impl ::core::clone::Clone for IMLOperatorKernel {
105 fn clone(&self) -> Self {
106 Self(self.0.clone())
107 }
108}
109unsafe impl ::windows::core::ComInterface for IMLOperatorKernel {
110 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x11c4b4a0_b467_4eaa_a1a6_b961d8d0ed79);
111}
112#[repr(C)]
113#[doc(hidden)]
114pub struct IMLOperatorKernel_Vtbl {
115 pub base__: ::windows::core::IUnknown_Vtbl,
116 pub Compute: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, context: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
117}
118#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
119#[repr(transparent)]
120pub struct IMLOperatorKernelContext(::windows::core::IUnknown);
121impl IMLOperatorKernelContext {
122 pub unsafe fn GetInputTensor(&self, inputindex: u32) -> ::windows::core::Result<IMLOperatorTensor> {
123 let mut result__ = ::windows::core::zeroed::<IMLOperatorTensor>();
124 (::windows::core::Interface::vtable(self).GetInputTensor)(::windows::core::Interface::as_raw(self), inputindex, &mut result__).from_abi(result__)
125 }
126 pub unsafe fn GetOutputTensor(&self, outputindex: u32, dimensionsizes: &[u32]) -> ::windows::core::Result<IMLOperatorTensor> {
127 let mut result__ = ::windows::core::zeroed::<IMLOperatorTensor>();
128 (::windows::core::Interface::vtable(self).GetOutputTensor)(::windows::core::Interface::as_raw(self), outputindex, dimensionsizes.len() as _, ::core::mem::transmute(dimensionsizes.as_ptr()), &mut result__).from_abi(result__)
129 }
130 pub unsafe fn GetOutputTensor2(&self, outputindex: u32) -> ::windows::core::Result<IMLOperatorTensor> {
131 let mut result__ = ::windows::core::zeroed::<IMLOperatorTensor>();
132 (::windows::core::Interface::vtable(self).GetOutputTensor2)(::windows::core::Interface::as_raw(self), outputindex, &mut result__).from_abi(result__)
133 }
134 pub unsafe fn AllocateTemporaryData(&self, size: usize) -> ::windows::core::Result<::windows::core::IUnknown> {
135 let mut result__ = ::windows::core::zeroed::<::windows::core::IUnknown>();
136 (::windows::core::Interface::vtable(self).AllocateTemporaryData)(::windows::core::Interface::as_raw(self), size, &mut result__).from_abi(result__)
137 }
138 pub unsafe fn GetExecutionInterface(&self) -> ::windows::core::Result<::windows::core::IUnknown> {
139 let mut result__ = ::windows::core::zeroed::<::windows::core::IUnknown>();
140 (::windows::core::Interface::vtable(self).GetExecutionInterface)(::windows::core::Interface::as_raw(self), &mut result__);
141 ::windows::core::from_abi(result__)
142 }
143}
144::windows::imp::interface_hierarchy!(IMLOperatorKernelContext, ::windows::core::IUnknown);
145impl ::core::cmp::PartialEq for IMLOperatorKernelContext {
146 fn eq(&self, other: &Self) -> bool {
147 self.0 == other.0
148 }
149}
150impl ::core::cmp::Eq for IMLOperatorKernelContext {}
151impl ::core::fmt::Debug for IMLOperatorKernelContext {
152 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
153 f.debug_tuple("IMLOperatorKernelContext").field(&self.0).finish()
154 }
155}
156unsafe impl ::windows::core::Interface for IMLOperatorKernelContext {
157 type Vtable = IMLOperatorKernelContext_Vtbl;
158}
159impl ::core::clone::Clone for IMLOperatorKernelContext {
160 fn clone(&self) -> Self {
161 Self(self.0.clone())
162 }
163}
164unsafe impl ::windows::core::ComInterface for IMLOperatorKernelContext {
165 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x82536a28_f022_4769_9d3f_8b278f84c0c3);
166}
167#[repr(C)]
168#[doc(hidden)]
169pub struct IMLOperatorKernelContext_Vtbl {
170 pub base__: ::windows::core::IUnknown_Vtbl,
171 pub GetInputTensor: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, inputindex: u32, tensor: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
172 pub GetOutputTensor: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, outputindex: u32, dimensioncount: u32, dimensionsizes: *const u32, tensor: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
173 pub GetOutputTensor2: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, outputindex: u32, tensor: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
174 pub AllocateTemporaryData: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, size: usize, data: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
175 pub GetExecutionInterface: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, executionobject: *mut *mut ::core::ffi::c_void),
176}
177#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
178#[repr(transparent)]
179pub struct IMLOperatorKernelCreationContext(::windows::core::IUnknown);
180impl IMLOperatorKernelCreationContext {
181 pub unsafe fn GetAttributeElementCount<P0>(&self, name: P0, r#type: MLOperatorAttributeType) -> ::windows::core::Result<u32>
182 where
183 P0: ::windows::core::IntoParam<::windows::core::PCSTR>,
184 {
185 let mut result__ = ::windows::core::zeroed::<u32>();
186 (::windows::core::Interface::vtable(self).base__.GetAttributeElementCount)(::windows::core::Interface::as_raw(self), name.into_param().abi(), r#type, &mut result__).from_abi(result__)
187 }
188 pub unsafe fn GetAttribute<P0>(&self, name: P0, r#type: MLOperatorAttributeType, elementcount: u32, elementbytesize: usize, value: *mut ::core::ffi::c_void) -> ::windows::core::Result<()>
189 where
190 P0: ::windows::core::IntoParam<::windows::core::PCSTR>,
191 {
192 (::windows::core::Interface::vtable(self).base__.GetAttribute)(::windows::core::Interface::as_raw(self), name.into_param().abi(), r#type, elementcount, elementbytesize, value).ok()
193 }
194 pub unsafe fn GetStringAttributeElementLength<P0>(&self, name: P0, elementindex: u32) -> ::windows::core::Result<u32>
195 where
196 P0: ::windows::core::IntoParam<::windows::core::PCSTR>,
197 {
198 let mut result__ = ::windows::core::zeroed::<u32>();
199 (::windows::core::Interface::vtable(self).base__.GetStringAttributeElementLength)(::windows::core::Interface::as_raw(self), name.into_param().abi(), elementindex, &mut result__).from_abi(result__)
200 }
201 pub unsafe fn GetStringAttributeElement<P0>(&self, name: P0, elementindex: u32, attributeelement: &mut [u8]) -> ::windows::core::Result<()>
202 where
203 P0: ::windows::core::IntoParam<::windows::core::PCSTR>,
204 {
205 (::windows::core::Interface::vtable(self).base__.GetStringAttributeElement)(::windows::core::Interface::as_raw(self), name.into_param().abi(), elementindex, attributeelement.len() as _, ::core::mem::transmute(attributeelement.as_ptr())).ok()
206 }
207 pub unsafe fn GetInputCount(&self) -> u32 {
208 (::windows::core::Interface::vtable(self).GetInputCount)(::windows::core::Interface::as_raw(self))
209 }
210 pub unsafe fn GetOutputCount(&self) -> u32 {
211 (::windows::core::Interface::vtable(self).GetOutputCount)(::windows::core::Interface::as_raw(self))
212 }
213 pub unsafe fn IsInputValid(&self, inputindex: u32) -> bool {
214 (::windows::core::Interface::vtable(self).IsInputValid)(::windows::core::Interface::as_raw(self), inputindex)
215 }
216 pub unsafe fn IsOutputValid(&self, outputindex: u32) -> bool {
217 (::windows::core::Interface::vtable(self).IsOutputValid)(::windows::core::Interface::as_raw(self), outputindex)
218 }
219 pub unsafe fn GetInputEdgeDescription(&self, inputindex: u32) -> ::windows::core::Result<MLOperatorEdgeDescription> {
220 let mut result__ = ::windows::core::zeroed::<MLOperatorEdgeDescription>();
221 (::windows::core::Interface::vtable(self).GetInputEdgeDescription)(::windows::core::Interface::as_raw(self), inputindex, &mut result__).from_abi(result__)
222 }
223 pub unsafe fn GetOutputEdgeDescription(&self, outputindex: u32) -> ::windows::core::Result<MLOperatorEdgeDescription> {
224 let mut result__ = ::windows::core::zeroed::<MLOperatorEdgeDescription>();
225 (::windows::core::Interface::vtable(self).GetOutputEdgeDescription)(::windows::core::Interface::as_raw(self), outputindex, &mut result__).from_abi(result__)
226 }
227 pub unsafe fn HasTensorShapeDescription(&self) -> bool {
228 (::windows::core::Interface::vtable(self).HasTensorShapeDescription)(::windows::core::Interface::as_raw(self))
229 }
230 pub unsafe fn GetTensorShapeDescription(&self) -> ::windows::core::Result<IMLOperatorTensorShapeDescription> {
231 let mut result__ = ::windows::core::zeroed::<IMLOperatorTensorShapeDescription>();
232 (::windows::core::Interface::vtable(self).GetTensorShapeDescription)(::windows::core::Interface::as_raw(self), &mut result__).from_abi(result__)
233 }
234 pub unsafe fn GetExecutionInterface(&self) -> ::windows::core::Result<::windows::core::IUnknown> {
235 let mut result__ = ::windows::core::zeroed::<::windows::core::IUnknown>();
236 (::windows::core::Interface::vtable(self).GetExecutionInterface)(::windows::core::Interface::as_raw(self), &mut result__);
237 ::windows::core::from_abi(result__)
238 }
239}
240::windows::imp::interface_hierarchy!(IMLOperatorKernelCreationContext, ::windows::core::IUnknown, IMLOperatorAttributes);
241impl ::core::cmp::PartialEq for IMLOperatorKernelCreationContext {
242 fn eq(&self, other: &Self) -> bool {
243 self.0 == other.0
244 }
245}
246impl ::core::cmp::Eq for IMLOperatorKernelCreationContext {}
247impl ::core::fmt::Debug for IMLOperatorKernelCreationContext {
248 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
249 f.debug_tuple("IMLOperatorKernelCreationContext").field(&self.0).finish()
250 }
251}
252unsafe impl ::windows::core::Interface for IMLOperatorKernelCreationContext {
253 type Vtable = IMLOperatorKernelCreationContext_Vtbl;
254}
255impl ::core::clone::Clone for IMLOperatorKernelCreationContext {
256 fn clone(&self) -> Self {
257 Self(self.0.clone())
258 }
259}
260unsafe impl ::windows::core::ComInterface for IMLOperatorKernelCreationContext {
261 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5459b53d_a0fc_4665_addd_70171ef7e631);
262}
263#[repr(C)]
264#[doc(hidden)]
265pub struct IMLOperatorKernelCreationContext_Vtbl {
266 pub base__: IMLOperatorAttributes_Vtbl,
267 pub GetInputCount: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> u32,
268 pub GetOutputCount: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> u32,
269 pub IsInputValid: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, inputindex: u32) -> bool,
270 pub IsOutputValid: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, outputindex: u32) -> bool,
271 pub GetInputEdgeDescription: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, inputindex: u32, edgedescription: *mut MLOperatorEdgeDescription) -> ::windows::core::HRESULT,
272 pub GetOutputEdgeDescription: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, outputindex: u32, edgedescription: *mut MLOperatorEdgeDescription) -> ::windows::core::HRESULT,
273 pub HasTensorShapeDescription: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> bool,
274 pub GetTensorShapeDescription: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, shapedescription: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
275 pub GetExecutionInterface: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, executionobject: *mut *mut ::core::ffi::c_void),
276}
277#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
278#[repr(transparent)]
279pub struct IMLOperatorKernelFactory(::windows::core::IUnknown);
280impl IMLOperatorKernelFactory {
281 pub unsafe fn CreateKernel<P0>(&self, context: P0) -> ::windows::core::Result<IMLOperatorKernel>
282 where
283 P0: ::windows::core::IntoParam<IMLOperatorKernelCreationContext>,
284 {
285 let mut result__ = ::windows::core::zeroed::<IMLOperatorKernel>();
286 (::windows::core::Interface::vtable(self).CreateKernel)(::windows::core::Interface::as_raw(self), context.into_param().abi(), &mut result__).from_abi(result__)
287 }
288}
289::windows::imp::interface_hierarchy!(IMLOperatorKernelFactory, ::windows::core::IUnknown);
290impl ::core::cmp::PartialEq for IMLOperatorKernelFactory {
291 fn eq(&self, other: &Self) -> bool {
292 self.0 == other.0
293 }
294}
295impl ::core::cmp::Eq for IMLOperatorKernelFactory {}
296impl ::core::fmt::Debug for IMLOperatorKernelFactory {
297 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
298 f.debug_tuple("IMLOperatorKernelFactory").field(&self.0).finish()
299 }
300}
301unsafe impl ::windows::core::Interface for IMLOperatorKernelFactory {
302 type Vtable = IMLOperatorKernelFactory_Vtbl;
303}
304impl ::core::clone::Clone for IMLOperatorKernelFactory {
305 fn clone(&self) -> Self {
306 Self(self.0.clone())
307 }
308}
309unsafe impl ::windows::core::ComInterface for IMLOperatorKernelFactory {
310 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xef15ad6f_0dc9_4908_ab35_a575a30dfbf8);
311}
312#[repr(C)]
313#[doc(hidden)]
314pub struct IMLOperatorKernelFactory_Vtbl {
315 pub base__: ::windows::core::IUnknown_Vtbl,
316 pub CreateKernel: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, context: *mut ::core::ffi::c_void, kernel: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
317}
318#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
319#[repr(transparent)]
320pub struct IMLOperatorRegistry(::windows::core::IUnknown);
321impl IMLOperatorRegistry {
322 pub unsafe fn RegisterOperatorSetSchema<P0, P1>(&self, operatorsetid: *const MLOperatorSetId, baselineversion: i32, schema: ::core::option::Option<&[*const MLOperatorSchemaDescription]>, typeinferrer: P0, shapeinferrer: P1) -> ::windows::core::Result<()>
323 where
324 P0: ::windows::core::IntoParam<IMLOperatorTypeInferrer>,
325 P1: ::windows::core::IntoParam<IMLOperatorShapeInferrer>,
326 {
327 (::windows::core::Interface::vtable(self).RegisterOperatorSetSchema)(::windows::core::Interface::as_raw(self), operatorsetid, baselineversion, ::core::mem::transmute(schema.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), schema.as_deref().map_or(0, |slice| slice.len() as _), typeinferrer.into_param().abi(), shapeinferrer.into_param().abi()).ok()
328 }
329 pub unsafe fn RegisterOperatorKernel<P0, P1>(&self, operatorkernel: *const MLOperatorKernelDescription, operatorkernelfactory: P0, shapeinferrer: P1) -> ::windows::core::Result<()>
330 where
331 P0: ::windows::core::IntoParam<IMLOperatorKernelFactory>,
332 P1: ::windows::core::IntoParam<IMLOperatorShapeInferrer>,
333 {
334 (::windows::core::Interface::vtable(self).RegisterOperatorKernel)(::windows::core::Interface::as_raw(self), operatorkernel, operatorkernelfactory.into_param().abi(), shapeinferrer.into_param().abi()).ok()
335 }
336}
337::windows::imp::interface_hierarchy!(IMLOperatorRegistry, ::windows::core::IUnknown);
338impl ::core::cmp::PartialEq for IMLOperatorRegistry {
339 fn eq(&self, other: &Self) -> bool {
340 self.0 == other.0
341 }
342}
343impl ::core::cmp::Eq for IMLOperatorRegistry {}
344impl ::core::fmt::Debug for IMLOperatorRegistry {
345 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
346 f.debug_tuple("IMLOperatorRegistry").field(&self.0).finish()
347 }
348}
349unsafe impl ::windows::core::Interface for IMLOperatorRegistry {
350 type Vtable = IMLOperatorRegistry_Vtbl;
351}
352impl ::core::clone::Clone for IMLOperatorRegistry {
353 fn clone(&self) -> Self {
354 Self(self.0.clone())
355 }
356}
357unsafe impl ::windows::core::ComInterface for IMLOperatorRegistry {
358 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2af9dd2d_b516_4672_9ab5_530c208493ad);
359}
360#[repr(C)]
361#[doc(hidden)]
362pub struct IMLOperatorRegistry_Vtbl {
363 pub base__: ::windows::core::IUnknown_Vtbl,
364 pub RegisterOperatorSetSchema: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, operatorsetid: *const MLOperatorSetId, baselineversion: i32, schema: *const *const MLOperatorSchemaDescription, schemacount: u32, typeinferrer: *mut ::core::ffi::c_void, shapeinferrer: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
365 pub RegisterOperatorKernel: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, operatorkernel: *const MLOperatorKernelDescription, operatorkernelfactory: *mut ::core::ffi::c_void, shapeinferrer: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
366}
367#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
368#[repr(transparent)]
369pub struct IMLOperatorShapeInferenceContext(::windows::core::IUnknown);
370impl IMLOperatorShapeInferenceContext {
371 pub unsafe fn GetAttributeElementCount<P0>(&self, name: P0, r#type: MLOperatorAttributeType) -> ::windows::core::Result<u32>
372 where
373 P0: ::windows::core::IntoParam<::windows::core::PCSTR>,
374 {
375 let mut result__ = ::windows::core::zeroed::<u32>();
376 (::windows::core::Interface::vtable(self).base__.GetAttributeElementCount)(::windows::core::Interface::as_raw(self), name.into_param().abi(), r#type, &mut result__).from_abi(result__)
377 }
378 pub unsafe fn GetAttribute<P0>(&self, name: P0, r#type: MLOperatorAttributeType, elementcount: u32, elementbytesize: usize, value: *mut ::core::ffi::c_void) -> ::windows::core::Result<()>
379 where
380 P0: ::windows::core::IntoParam<::windows::core::PCSTR>,
381 {
382 (::windows::core::Interface::vtable(self).base__.GetAttribute)(::windows::core::Interface::as_raw(self), name.into_param().abi(), r#type, elementcount, elementbytesize, value).ok()
383 }
384 pub unsafe fn GetStringAttributeElementLength<P0>(&self, name: P0, elementindex: u32) -> ::windows::core::Result<u32>
385 where
386 P0: ::windows::core::IntoParam<::windows::core::PCSTR>,
387 {
388 let mut result__ = ::windows::core::zeroed::<u32>();
389 (::windows::core::Interface::vtable(self).base__.GetStringAttributeElementLength)(::windows::core::Interface::as_raw(self), name.into_param().abi(), elementindex, &mut result__).from_abi(result__)
390 }
391 pub unsafe fn GetStringAttributeElement<P0>(&self, name: P0, elementindex: u32, attributeelement: &mut [u8]) -> ::windows::core::Result<()>
392 where
393 P0: ::windows::core::IntoParam<::windows::core::PCSTR>,
394 {
395 (::windows::core::Interface::vtable(self).base__.GetStringAttributeElement)(::windows::core::Interface::as_raw(self), name.into_param().abi(), elementindex, attributeelement.len() as _, ::core::mem::transmute(attributeelement.as_ptr())).ok()
396 }
397 pub unsafe fn GetInputCount(&self) -> u32 {
398 (::windows::core::Interface::vtable(self).GetInputCount)(::windows::core::Interface::as_raw(self))
399 }
400 pub unsafe fn GetOutputCount(&self) -> u32 {
401 (::windows::core::Interface::vtable(self).GetOutputCount)(::windows::core::Interface::as_raw(self))
402 }
403 pub unsafe fn IsInputValid(&self, inputindex: u32) -> bool {
404 (::windows::core::Interface::vtable(self).IsInputValid)(::windows::core::Interface::as_raw(self), inputindex)
405 }
406 pub unsafe fn IsOutputValid(&self, outputindex: u32) -> bool {
407 (::windows::core::Interface::vtable(self).IsOutputValid)(::windows::core::Interface::as_raw(self), outputindex)
408 }
409 pub unsafe fn GetInputEdgeDescription(&self, inputindex: u32) -> ::windows::core::Result<MLOperatorEdgeDescription> {
410 let mut result__ = ::windows::core::zeroed::<MLOperatorEdgeDescription>();
411 (::windows::core::Interface::vtable(self).GetInputEdgeDescription)(::windows::core::Interface::as_raw(self), inputindex, &mut result__).from_abi(result__)
412 }
413 pub unsafe fn GetInputTensorDimensionCount(&self, inputindex: u32) -> ::windows::core::Result<u32> {
414 let mut result__ = ::windows::core::zeroed::<u32>();
415 (::windows::core::Interface::vtable(self).GetInputTensorDimensionCount)(::windows::core::Interface::as_raw(self), inputindex, &mut result__).from_abi(result__)
416 }
417 pub unsafe fn GetInputTensorShape(&self, inputindex: u32, dimensions: &mut [u32]) -> ::windows::core::Result<()> {
418 (::windows::core::Interface::vtable(self).GetInputTensorShape)(::windows::core::Interface::as_raw(self), inputindex, dimensions.len() as _, ::core::mem::transmute(dimensions.as_ptr())).ok()
419 }
420 pub unsafe fn SetOutputTensorShape(&self, outputindex: u32, dimensioncount: u32, dimensions: *const u32) -> ::windows::core::Result<()> {
421 (::windows::core::Interface::vtable(self).SetOutputTensorShape)(::windows::core::Interface::as_raw(self), outputindex, dimensioncount, dimensions).ok()
422 }
423}
424::windows::imp::interface_hierarchy!(IMLOperatorShapeInferenceContext, ::windows::core::IUnknown, IMLOperatorAttributes);
425impl ::core::cmp::PartialEq for IMLOperatorShapeInferenceContext {
426 fn eq(&self, other: &Self) -> bool {
427 self.0 == other.0
428 }
429}
430impl ::core::cmp::Eq for IMLOperatorShapeInferenceContext {}
431impl ::core::fmt::Debug for IMLOperatorShapeInferenceContext {
432 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
433 f.debug_tuple("IMLOperatorShapeInferenceContext").field(&self.0).finish()
434 }
435}
436unsafe impl ::windows::core::Interface for IMLOperatorShapeInferenceContext {
437 type Vtable = IMLOperatorShapeInferenceContext_Vtbl;
438}
439impl ::core::clone::Clone for IMLOperatorShapeInferenceContext {
440 fn clone(&self) -> Self {
441 Self(self.0.clone())
442 }
443}
444unsafe impl ::windows::core::ComInterface for IMLOperatorShapeInferenceContext {
445 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x105b6b29_5408_4a68_9959_09b5955a3492);
446}
447#[repr(C)]
448#[doc(hidden)]
449pub struct IMLOperatorShapeInferenceContext_Vtbl {
450 pub base__: IMLOperatorAttributes_Vtbl,
451 pub GetInputCount: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> u32,
452 pub GetOutputCount: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> u32,
453 pub IsInputValid: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, inputindex: u32) -> bool,
454 pub IsOutputValid: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, outputindex: u32) -> bool,
455 pub GetInputEdgeDescription: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, inputindex: u32, edgedescription: *mut MLOperatorEdgeDescription) -> ::windows::core::HRESULT,
456 pub GetInputTensorDimensionCount: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, inputindex: u32, dimensioncount: *mut u32) -> ::windows::core::HRESULT,
457 pub GetInputTensorShape: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, inputindex: u32, dimensioncount: u32, dimensions: *mut u32) -> ::windows::core::HRESULT,
458 pub SetOutputTensorShape: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, outputindex: u32, dimensioncount: u32, dimensions: *const u32) -> ::windows::core::HRESULT,
459}
460#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
461#[repr(transparent)]
462pub struct IMLOperatorShapeInferrer(::windows::core::IUnknown);
463impl IMLOperatorShapeInferrer {
464 pub unsafe fn InferOutputShapes<P0>(&self, context: P0) -> ::windows::core::Result<()>
465 where
466 P0: ::windows::core::IntoParam<IMLOperatorShapeInferenceContext>,
467 {
468 (::windows::core::Interface::vtable(self).InferOutputShapes)(::windows::core::Interface::as_raw(self), context.into_param().abi()).ok()
469 }
470}
471::windows::imp::interface_hierarchy!(IMLOperatorShapeInferrer, ::windows::core::IUnknown);
472impl ::core::cmp::PartialEq for IMLOperatorShapeInferrer {
473 fn eq(&self, other: &Self) -> bool {
474 self.0 == other.0
475 }
476}
477impl ::core::cmp::Eq for IMLOperatorShapeInferrer {}
478impl ::core::fmt::Debug for IMLOperatorShapeInferrer {
479 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
480 f.debug_tuple("IMLOperatorShapeInferrer").field(&self.0).finish()
481 }
482}
483unsafe impl ::windows::core::Interface for IMLOperatorShapeInferrer {
484 type Vtable = IMLOperatorShapeInferrer_Vtbl;
485}
486impl ::core::clone::Clone for IMLOperatorShapeInferrer {
487 fn clone(&self) -> Self {
488 Self(self.0.clone())
489 }
490}
491unsafe impl ::windows::core::ComInterface for IMLOperatorShapeInferrer {
492 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x540be5be_a6c9_40ee_83f6_d2b8b40a7798);
493}
494#[repr(C)]
495#[doc(hidden)]
496pub struct IMLOperatorShapeInferrer_Vtbl {
497 pub base__: ::windows::core::IUnknown_Vtbl,
498 pub InferOutputShapes: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, context: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
499}
500#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
501#[repr(transparent)]
502pub struct IMLOperatorTensor(::windows::core::IUnknown);
503impl IMLOperatorTensor {
504 pub unsafe fn GetDimensionCount(&self) -> u32 {
505 (::windows::core::Interface::vtable(self).GetDimensionCount)(::windows::core::Interface::as_raw(self))
506 }
507 pub unsafe fn GetShape(&self, dimensions: &mut [u32]) -> ::windows::core::Result<()> {
508 (::windows::core::Interface::vtable(self).GetShape)(::windows::core::Interface::as_raw(self), dimensions.len() as _, ::core::mem::transmute(dimensions.as_ptr())).ok()
509 }
510 pub unsafe fn GetTensorDataType(&self) -> MLOperatorTensorDataType {
511 (::windows::core::Interface::vtable(self).GetTensorDataType)(::windows::core::Interface::as_raw(self))
512 }
513 pub unsafe fn IsCpuData(&self) -> bool {
514 (::windows::core::Interface::vtable(self).IsCpuData)(::windows::core::Interface::as_raw(self))
515 }
516 pub unsafe fn IsDataInterface(&self) -> bool {
517 (::windows::core::Interface::vtable(self).IsDataInterface)(::windows::core::Interface::as_raw(self))
518 }
519 pub unsafe fn GetData(&self) -> *mut ::core::ffi::c_void {
520 (::windows::core::Interface::vtable(self).GetData)(::windows::core::Interface::as_raw(self))
521 }
522 pub unsafe fn GetDataInterface(&self) -> ::windows::core::Result<::windows::core::IUnknown> {
523 let mut result__ = ::windows::core::zeroed::<::windows::core::IUnknown>();
524 (::windows::core::Interface::vtable(self).GetDataInterface)(::windows::core::Interface::as_raw(self), &mut result__);
525 ::windows::core::from_abi(result__)
526 }
527}
528::windows::imp::interface_hierarchy!(IMLOperatorTensor, ::windows::core::IUnknown);
529impl ::core::cmp::PartialEq for IMLOperatorTensor {
530 fn eq(&self, other: &Self) -> bool {
531 self.0 == other.0
532 }
533}
534impl ::core::cmp::Eq for IMLOperatorTensor {}
535impl ::core::fmt::Debug for IMLOperatorTensor {
536 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
537 f.debug_tuple("IMLOperatorTensor").field(&self.0).finish()
538 }
539}
540unsafe impl ::windows::core::Interface for IMLOperatorTensor {
541 type Vtable = IMLOperatorTensor_Vtbl;
542}
543impl ::core::clone::Clone for IMLOperatorTensor {
544 fn clone(&self) -> Self {
545 Self(self.0.clone())
546 }
547}
548unsafe impl ::windows::core::ComInterface for IMLOperatorTensor {
549 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7fe41f41_f430_440e_aece_54416dc8b9db);
550}
551#[repr(C)]
552#[doc(hidden)]
553pub struct IMLOperatorTensor_Vtbl {
554 pub base__: ::windows::core::IUnknown_Vtbl,
555 pub GetDimensionCount: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> u32,
556 pub GetShape: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, dimensioncount: u32, dimensions: *mut u32) -> ::windows::core::HRESULT,
557 pub GetTensorDataType: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> MLOperatorTensorDataType,
558 pub IsCpuData: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> bool,
559 pub IsDataInterface: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> bool,
560 pub GetData: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> *mut ::core::ffi::c_void,
561 pub GetDataInterface: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, datainterface: *mut *mut ::core::ffi::c_void),
562}
563#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
564#[repr(transparent)]
565pub struct IMLOperatorTensorShapeDescription(::windows::core::IUnknown);
566impl IMLOperatorTensorShapeDescription {
567 pub unsafe fn GetInputTensorDimensionCount(&self, inputindex: u32) -> ::windows::core::Result<u32> {
568 let mut result__ = ::windows::core::zeroed::<u32>();
569 (::windows::core::Interface::vtable(self).GetInputTensorDimensionCount)(::windows::core::Interface::as_raw(self), inputindex, &mut result__).from_abi(result__)
570 }
571 pub unsafe fn GetInputTensorShape(&self, inputindex: u32, dimensions: &mut [u32]) -> ::windows::core::Result<()> {
572 (::windows::core::Interface::vtable(self).GetInputTensorShape)(::windows::core::Interface::as_raw(self), inputindex, dimensions.len() as _, ::core::mem::transmute(dimensions.as_ptr())).ok()
573 }
574 pub unsafe fn HasOutputShapeDescription(&self) -> bool {
575 (::windows::core::Interface::vtable(self).HasOutputShapeDescription)(::windows::core::Interface::as_raw(self))
576 }
577 pub unsafe fn GetOutputTensorDimensionCount(&self, outputindex: u32) -> ::windows::core::Result<u32> {
578 let mut result__ = ::windows::core::zeroed::<u32>();
579 (::windows::core::Interface::vtable(self).GetOutputTensorDimensionCount)(::windows::core::Interface::as_raw(self), outputindex, &mut result__).from_abi(result__)
580 }
581 pub unsafe fn GetOutputTensorShape(&self, outputindex: u32, dimensions: &mut [u32]) -> ::windows::core::Result<()> {
582 (::windows::core::Interface::vtable(self).GetOutputTensorShape)(::windows::core::Interface::as_raw(self), outputindex, dimensions.len() as _, ::core::mem::transmute(dimensions.as_ptr())).ok()
583 }
584}
585::windows::imp::interface_hierarchy!(IMLOperatorTensorShapeDescription, ::windows::core::IUnknown);
586impl ::core::cmp::PartialEq for IMLOperatorTensorShapeDescription {
587 fn eq(&self, other: &Self) -> bool {
588 self.0 == other.0
589 }
590}
591impl ::core::cmp::Eq for IMLOperatorTensorShapeDescription {}
592impl ::core::fmt::Debug for IMLOperatorTensorShapeDescription {
593 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
594 f.debug_tuple("IMLOperatorTensorShapeDescription").field(&self.0).finish()
595 }
596}
597unsafe impl ::windows::core::Interface for IMLOperatorTensorShapeDescription {
598 type Vtable = IMLOperatorTensorShapeDescription_Vtbl;
599}
600impl ::core::clone::Clone for IMLOperatorTensorShapeDescription {
601 fn clone(&self) -> Self {
602 Self(self.0.clone())
603 }
604}
605unsafe impl ::windows::core::ComInterface for IMLOperatorTensorShapeDescription {
606 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf20e8cbe_3b28_4248_be95_f96fbc6e4643);
607}
608#[repr(C)]
609#[doc(hidden)]
610pub struct IMLOperatorTensorShapeDescription_Vtbl {
611 pub base__: ::windows::core::IUnknown_Vtbl,
612 pub GetInputTensorDimensionCount: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, inputindex: u32, dimensioncount: *mut u32) -> ::windows::core::HRESULT,
613 pub GetInputTensorShape: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, inputindex: u32, dimensioncount: u32, dimensions: *mut u32) -> ::windows::core::HRESULT,
614 pub HasOutputShapeDescription: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> bool,
615 pub GetOutputTensorDimensionCount: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, outputindex: u32, dimensioncount: *mut u32) -> ::windows::core::HRESULT,
616 pub GetOutputTensorShape: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, outputindex: u32, dimensioncount: u32, dimensions: *mut u32) -> ::windows::core::HRESULT,
617}
618#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
619#[repr(transparent)]
620pub struct IMLOperatorTypeInferenceContext(::windows::core::IUnknown);
621impl IMLOperatorTypeInferenceContext {
622 pub unsafe fn GetAttributeElementCount<P0>(&self, name: P0, r#type: MLOperatorAttributeType) -> ::windows::core::Result<u32>
623 where
624 P0: ::windows::core::IntoParam<::windows::core::PCSTR>,
625 {
626 let mut result__ = ::windows::core::zeroed::<u32>();
627 (::windows::core::Interface::vtable(self).base__.GetAttributeElementCount)(::windows::core::Interface::as_raw(self), name.into_param().abi(), r#type, &mut result__).from_abi(result__)
628 }
629 pub unsafe fn GetAttribute<P0>(&self, name: P0, r#type: MLOperatorAttributeType, elementcount: u32, elementbytesize: usize, value: *mut ::core::ffi::c_void) -> ::windows::core::Result<()>
630 where
631 P0: ::windows::core::IntoParam<::windows::core::PCSTR>,
632 {
633 (::windows::core::Interface::vtable(self).base__.GetAttribute)(::windows::core::Interface::as_raw(self), name.into_param().abi(), r#type, elementcount, elementbytesize, value).ok()
634 }
635 pub unsafe fn GetStringAttributeElementLength<P0>(&self, name: P0, elementindex: u32) -> ::windows::core::Result<u32>
636 where
637 P0: ::windows::core::IntoParam<::windows::core::PCSTR>,
638 {
639 let mut result__ = ::windows::core::zeroed::<u32>();
640 (::windows::core::Interface::vtable(self).base__.GetStringAttributeElementLength)(::windows::core::Interface::as_raw(self), name.into_param().abi(), elementindex, &mut result__).from_abi(result__)
641 }
642 pub unsafe fn GetStringAttributeElement<P0>(&self, name: P0, elementindex: u32, attributeelement: &mut [u8]) -> ::windows::core::Result<()>
643 where
644 P0: ::windows::core::IntoParam<::windows::core::PCSTR>,
645 {
646 (::windows::core::Interface::vtable(self).base__.GetStringAttributeElement)(::windows::core::Interface::as_raw(self), name.into_param().abi(), elementindex, attributeelement.len() as _, ::core::mem::transmute(attributeelement.as_ptr())).ok()
647 }
648 pub unsafe fn GetInputCount(&self) -> u32 {
649 (::windows::core::Interface::vtable(self).GetInputCount)(::windows::core::Interface::as_raw(self))
650 }
651 pub unsafe fn GetOutputCount(&self) -> u32 {
652 (::windows::core::Interface::vtable(self).GetOutputCount)(::windows::core::Interface::as_raw(self))
653 }
654 pub unsafe fn IsInputValid(&self, inputindex: u32) -> bool {
655 (::windows::core::Interface::vtable(self).IsInputValid)(::windows::core::Interface::as_raw(self), inputindex)
656 }
657 pub unsafe fn IsOutputValid(&self, outputindex: u32) -> bool {
658 (::windows::core::Interface::vtable(self).IsOutputValid)(::windows::core::Interface::as_raw(self), outputindex)
659 }
660 pub unsafe fn GetInputEdgeDescription(&self, inputindex: u32) -> ::windows::core::Result<MLOperatorEdgeDescription> {
661 let mut result__ = ::windows::core::zeroed::<MLOperatorEdgeDescription>();
662 (::windows::core::Interface::vtable(self).GetInputEdgeDescription)(::windows::core::Interface::as_raw(self), inputindex, &mut result__).from_abi(result__)
663 }
664 pub unsafe fn SetOutputEdgeDescription(&self, outputindex: u32, edgedescription: *const MLOperatorEdgeDescription) -> ::windows::core::Result<()> {
665 (::windows::core::Interface::vtable(self).SetOutputEdgeDescription)(::windows::core::Interface::as_raw(self), outputindex, edgedescription).ok()
666 }
667}
668::windows::imp::interface_hierarchy!(IMLOperatorTypeInferenceContext, ::windows::core::IUnknown, IMLOperatorAttributes);
669impl ::core::cmp::PartialEq for IMLOperatorTypeInferenceContext {
670 fn eq(&self, other: &Self) -> bool {
671 self.0 == other.0
672 }
673}
674impl ::core::cmp::Eq for IMLOperatorTypeInferenceContext {}
675impl ::core::fmt::Debug for IMLOperatorTypeInferenceContext {
676 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
677 f.debug_tuple("IMLOperatorTypeInferenceContext").field(&self.0).finish()
678 }
679}
680unsafe impl ::windows::core::Interface for IMLOperatorTypeInferenceContext {
681 type Vtable = IMLOperatorTypeInferenceContext_Vtbl;
682}
683impl ::core::clone::Clone for IMLOperatorTypeInferenceContext {
684 fn clone(&self) -> Self {
685 Self(self.0.clone())
686 }
687}
688unsafe impl ::windows::core::ComInterface for IMLOperatorTypeInferenceContext {
689 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xec893bb1_f938_427b_8488_c8dcf775f138);
690}
691#[repr(C)]
692#[doc(hidden)]
693pub struct IMLOperatorTypeInferenceContext_Vtbl {
694 pub base__: IMLOperatorAttributes_Vtbl,
695 pub GetInputCount: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> u32,
696 pub GetOutputCount: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> u32,
697 pub IsInputValid: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, inputindex: u32) -> bool,
698 pub IsOutputValid: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, outputindex: u32) -> bool,
699 pub GetInputEdgeDescription: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, inputindex: u32, edgedescription: *mut MLOperatorEdgeDescription) -> ::windows::core::HRESULT,
700 pub SetOutputEdgeDescription: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, outputindex: u32, edgedescription: *const MLOperatorEdgeDescription) -> ::windows::core::HRESULT,
701}
702#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
703#[repr(transparent)]
704pub struct IMLOperatorTypeInferrer(::windows::core::IUnknown);
705impl IMLOperatorTypeInferrer {
706 pub unsafe fn InferOutputTypes<P0>(&self, context: P0) -> ::windows::core::Result<()>
707 where
708 P0: ::windows::core::IntoParam<IMLOperatorTypeInferenceContext>,
709 {
710 (::windows::core::Interface::vtable(self).InferOutputTypes)(::windows::core::Interface::as_raw(self), context.into_param().abi()).ok()
711 }
712}
713::windows::imp::interface_hierarchy!(IMLOperatorTypeInferrer, ::windows::core::IUnknown);
714impl ::core::cmp::PartialEq for IMLOperatorTypeInferrer {
715 fn eq(&self, other: &Self) -> bool {
716 self.0 == other.0
717 }
718}
719impl ::core::cmp::Eq for IMLOperatorTypeInferrer {}
720impl ::core::fmt::Debug for IMLOperatorTypeInferrer {
721 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
722 f.debug_tuple("IMLOperatorTypeInferrer").field(&self.0).finish()
723 }
724}
725unsafe impl ::windows::core::Interface for IMLOperatorTypeInferrer {
726 type Vtable = IMLOperatorTypeInferrer_Vtbl;
727}
728impl ::core::clone::Clone for IMLOperatorTypeInferrer {
729 fn clone(&self) -> Self {
730 Self(self.0.clone())
731 }
732}
733unsafe impl ::windows::core::ComInterface for IMLOperatorTypeInferrer {
734 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x781aeb48_9bcb_4797_bf77_8bf455217beb);
735}
736#[repr(C)]
737#[doc(hidden)]
738pub struct IMLOperatorTypeInferrer_Vtbl {
739 pub base__: ::windows::core::IUnknown_Vtbl,
740 pub InferOutputTypes: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, context: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
741}
742#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
743#[repr(transparent)]
744pub struct IWinMLEvaluationContext(::windows::core::IUnknown);
745impl IWinMLEvaluationContext {
746 #[doc = "*Required features: `\"Win32_Graphics_Direct3D12\"`*"]
747 #[cfg(feature = "Win32_Graphics_Direct3D12")]
748 pub unsafe fn BindValue(&self, pdescriptor: *const WINML_BINDING_DESC) -> ::windows::core::Result<()> {
749 (::windows::core::Interface::vtable(self).BindValue)(::windows::core::Interface::as_raw(self), pdescriptor).ok()
750 }
751 #[doc = "*Required features: `\"Win32_Graphics_Direct3D12\"`*"]
752 #[cfg(feature = "Win32_Graphics_Direct3D12")]
753 pub unsafe fn GetValueByName<P0>(&self, name: P0) -> ::windows::core::Result<*mut WINML_BINDING_DESC>
754 where
755 P0: ::windows::core::IntoParam<::windows::core::PCWSTR>,
756 {
757 let mut result__ = ::windows::core::zeroed::<*mut WINML_BINDING_DESC>();
758 (::windows::core::Interface::vtable(self).GetValueByName)(::windows::core::Interface::as_raw(self), name.into_param().abi(), &mut result__).from_abi(result__)
759 }
760 pub unsafe fn Clear(&self) -> ::windows::core::Result<()> {
761 (::windows::core::Interface::vtable(self).Clear)(::windows::core::Interface::as_raw(self)).ok()
762 }
763}
764::windows::imp::interface_hierarchy!(IWinMLEvaluationContext, ::windows::core::IUnknown);
765impl ::core::cmp::PartialEq for IWinMLEvaluationContext {
766 fn eq(&self, other: &Self) -> bool {
767 self.0 == other.0
768 }
769}
770impl ::core::cmp::Eq for IWinMLEvaluationContext {}
771impl ::core::fmt::Debug for IWinMLEvaluationContext {
772 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
773 f.debug_tuple("IWinMLEvaluationContext").field(&self.0).finish()
774 }
775}
776unsafe impl ::windows::core::Interface for IWinMLEvaluationContext {
777 type Vtable = IWinMLEvaluationContext_Vtbl;
778}
779impl ::core::clone::Clone for IWinMLEvaluationContext {
780 fn clone(&self) -> Self {
781 Self(self.0.clone())
782 }
783}
784unsafe impl ::windows::core::ComInterface for IWinMLEvaluationContext {
785 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x95848f9e_583d_4054_af12_916387cd8426);
786}
787#[repr(C)]
788#[doc(hidden)]
789pub struct IWinMLEvaluationContext_Vtbl {
790 pub base__: ::windows::core::IUnknown_Vtbl,
791 #[cfg(feature = "Win32_Graphics_Direct3D12")]
792 pub BindValue: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, pdescriptor: *const WINML_BINDING_DESC) -> ::windows::core::HRESULT,
793 #[cfg(not(feature = "Win32_Graphics_Direct3D12"))]
794 BindValue: usize,
795 #[cfg(feature = "Win32_Graphics_Direct3D12")]
796 pub GetValueByName: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, name: ::windows::core::PCWSTR, pdescriptor: *mut *mut WINML_BINDING_DESC) -> ::windows::core::HRESULT,
797 #[cfg(not(feature = "Win32_Graphics_Direct3D12"))]
798 GetValueByName: usize,
799 pub Clear: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
800}
801#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
802#[repr(transparent)]
803pub struct IWinMLModel(::windows::core::IUnknown);
804impl IWinMLModel {
805 pub unsafe fn GetDescription(&self) -> ::windows::core::Result<*mut WINML_MODEL_DESC> {
806 let mut result__ = ::windows::core::zeroed::<*mut WINML_MODEL_DESC>();
807 (::windows::core::Interface::vtable(self).GetDescription)(::windows::core::Interface::as_raw(self), &mut result__).from_abi(result__)
808 }
809 pub unsafe fn EnumerateMetadata(&self, index: u32, pkey: *mut ::windows::core::PWSTR, pvalue: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
810 (::windows::core::Interface::vtable(self).EnumerateMetadata)(::windows::core::Interface::as_raw(self), index, pkey, pvalue).ok()
811 }
812 #[doc = "*Required features: `\"Win32_Foundation\"`*"]
813 #[cfg(feature = "Win32_Foundation")]
814 pub unsafe fn EnumerateModelInputs(&self, index: u32) -> ::windows::core::Result<*mut WINML_VARIABLE_DESC> {
815 let mut result__ = ::windows::core::zeroed::<*mut WINML_VARIABLE_DESC>();
816 (::windows::core::Interface::vtable(self).EnumerateModelInputs)(::windows::core::Interface::as_raw(self), index, &mut result__).from_abi(result__)
817 }
818 #[doc = "*Required features: `\"Win32_Foundation\"`*"]
819 #[cfg(feature = "Win32_Foundation")]
820 pub unsafe fn EnumerateModelOutputs(&self, index: u32) -> ::windows::core::Result<*mut WINML_VARIABLE_DESC> {
821 let mut result__ = ::windows::core::zeroed::<*mut WINML_VARIABLE_DESC>();
822 (::windows::core::Interface::vtable(self).EnumerateModelOutputs)(::windows::core::Interface::as_raw(self), index, &mut result__).from_abi(result__)
823 }
824}
825::windows::imp::interface_hierarchy!(IWinMLModel, ::windows::core::IUnknown);
826impl ::core::cmp::PartialEq for IWinMLModel {
827 fn eq(&self, other: &Self) -> bool {
828 self.0 == other.0
829 }
830}
831impl ::core::cmp::Eq for IWinMLModel {}
832impl ::core::fmt::Debug for IWinMLModel {
833 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
834 f.debug_tuple("IWinMLModel").field(&self.0).finish()
835 }
836}
837unsafe impl ::windows::core::Interface for IWinMLModel {
838 type Vtable = IWinMLModel_Vtbl;
839}
840impl ::core::clone::Clone for IWinMLModel {
841 fn clone(&self) -> Self {
842 Self(self.0.clone())
843 }
844}
845unsafe impl ::windows::core::ComInterface for IWinMLModel {
846 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe2eeb6a9_f31f_4055_a521_e30b5b33664a);
847}
848#[repr(C)]
849#[doc(hidden)]
850pub struct IWinMLModel_Vtbl {
851 pub base__: ::windows::core::IUnknown_Vtbl,
852 pub GetDescription: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, ppdescription: *mut *mut WINML_MODEL_DESC) -> ::windows::core::HRESULT,
853 pub EnumerateMetadata: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, index: u32, pkey: *mut ::windows::core::PWSTR, pvalue: *mut ::windows::core::PWSTR) -> ::windows::core::HRESULT,
854 #[cfg(feature = "Win32_Foundation")]
855 pub EnumerateModelInputs: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, index: u32, ppinputdescriptor: *mut *mut WINML_VARIABLE_DESC) -> ::windows::core::HRESULT,
856 #[cfg(not(feature = "Win32_Foundation"))]
857 EnumerateModelInputs: usize,
858 #[cfg(feature = "Win32_Foundation")]
859 pub EnumerateModelOutputs: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, index: u32, ppoutputdescriptor: *mut *mut WINML_VARIABLE_DESC) -> ::windows::core::HRESULT,
860 #[cfg(not(feature = "Win32_Foundation"))]
861 EnumerateModelOutputs: usize,
862}
863#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
864#[repr(transparent)]
865pub struct IWinMLRuntime(::windows::core::IUnknown);
866impl IWinMLRuntime {
867 pub unsafe fn LoadModel<P0>(&self, path: P0) -> ::windows::core::Result<IWinMLModel>
868 where
869 P0: ::windows::core::IntoParam<::windows::core::PCWSTR>,
870 {
871 let mut result__ = ::windows::core::zeroed::<IWinMLModel>();
872 (::windows::core::Interface::vtable(self).LoadModel)(::windows::core::Interface::as_raw(self), path.into_param().abi(), &mut result__).from_abi(result__)
873 }
874 #[doc = "*Required features: `\"Win32_Graphics_Direct3D12\"`*"]
875 #[cfg(feature = "Win32_Graphics_Direct3D12")]
876 pub unsafe fn CreateEvaluationContext<P0>(&self, device: P0) -> ::windows::core::Result<IWinMLEvaluationContext>
877 where
878 P0: ::windows::core::IntoParam<super::super::super::Graphics::Direct3D12::ID3D12Device>,
879 {
880 let mut result__ = ::windows::core::zeroed::<IWinMLEvaluationContext>();
881 (::windows::core::Interface::vtable(self).CreateEvaluationContext)(::windows::core::Interface::as_raw(self), device.into_param().abi(), &mut result__).from_abi(result__)
882 }
883 pub unsafe fn EvaluateModel<P0>(&self, pcontext: P0) -> ::windows::core::Result<()>
884 where
885 P0: ::windows::core::IntoParam<IWinMLEvaluationContext>,
886 {
887 (::windows::core::Interface::vtable(self).EvaluateModel)(::windows::core::Interface::as_raw(self), pcontext.into_param().abi()).ok()
888 }
889}
890::windows::imp::interface_hierarchy!(IWinMLRuntime, ::windows::core::IUnknown);
891impl ::core::cmp::PartialEq for IWinMLRuntime {
892 fn eq(&self, other: &Self) -> bool {
893 self.0 == other.0
894 }
895}
896impl ::core::cmp::Eq for IWinMLRuntime {}
897impl ::core::fmt::Debug for IWinMLRuntime {
898 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
899 f.debug_tuple("IWinMLRuntime").field(&self.0).finish()
900 }
901}
902unsafe impl ::windows::core::Interface for IWinMLRuntime {
903 type Vtable = IWinMLRuntime_Vtbl;
904}
905impl ::core::clone::Clone for IWinMLRuntime {
906 fn clone(&self) -> Self {
907 Self(self.0.clone())
908 }
909}
910unsafe impl ::windows::core::ComInterface for IWinMLRuntime {
911 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa0425329_40ae_48d9_bce3_829ef7b8a41a);
912}
913#[repr(C)]
914#[doc(hidden)]
915pub struct IWinMLRuntime_Vtbl {
916 pub base__: ::windows::core::IUnknown_Vtbl,
917 pub LoadModel: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, path: ::windows::core::PCWSTR, ppmodel: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
918 #[cfg(feature = "Win32_Graphics_Direct3D12")]
919 pub CreateEvaluationContext: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, device: *mut ::core::ffi::c_void, ppcontext: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
920 #[cfg(not(feature = "Win32_Graphics_Direct3D12"))]
921 CreateEvaluationContext: usize,
922 pub EvaluateModel: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, pcontext: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
923}
924#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
925#[repr(transparent)]
926pub struct IWinMLRuntimeFactory(::windows::core::IUnknown);
927impl IWinMLRuntimeFactory {
928 pub unsafe fn CreateRuntime(&self, runtimetype: WINML_RUNTIME_TYPE) -> ::windows::core::Result<IWinMLRuntime> {
929 let mut result__ = ::windows::core::zeroed::<IWinMLRuntime>();
930 (::windows::core::Interface::vtable(self).CreateRuntime)(::windows::core::Interface::as_raw(self), runtimetype, &mut result__).from_abi(result__)
931 }
932}
933::windows::imp::interface_hierarchy!(IWinMLRuntimeFactory, ::windows::core::IUnknown);
934impl ::core::cmp::PartialEq for IWinMLRuntimeFactory {
935 fn eq(&self, other: &Self) -> bool {
936 self.0 == other.0
937 }
938}
939impl ::core::cmp::Eq for IWinMLRuntimeFactory {}
940impl ::core::fmt::Debug for IWinMLRuntimeFactory {
941 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
942 f.debug_tuple("IWinMLRuntimeFactory").field(&self.0).finish()
943 }
944}
945unsafe impl ::windows::core::Interface for IWinMLRuntimeFactory {
946 type Vtable = IWinMLRuntimeFactory_Vtbl;
947}
948impl ::core::clone::Clone for IWinMLRuntimeFactory {
949 fn clone(&self) -> Self {
950 Self(self.0.clone())
951 }
952}
953unsafe impl ::windows::core::ComInterface for IWinMLRuntimeFactory {
954 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa807b84d_4ae5_4bc0_a76a_941aa246bd41);
955}
956#[repr(C)]
957#[doc(hidden)]
958pub struct IWinMLRuntimeFactory_Vtbl {
959 pub base__: ::windows::core::IUnknown_Vtbl,
960 pub CreateRuntime: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, runtimetype: WINML_RUNTIME_TYPE, ppruntime: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
961}
962#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
963pub const WINML_TENSOR_DIMENSION_COUNT_MAX: u32 = 4u32;
964#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
965#[repr(transparent)]
966#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
967pub struct MLOperatorAttributeType(pub u32);
968impl MLOperatorAttributeType {
969 pub const Undefined: Self = Self(0u32);
970 pub const Float: Self = Self(2u32);
971 pub const Int: Self = Self(3u32);
972 pub const String: Self = Self(4u32);
973 pub const FloatArray: Self = Self(7u32);
974 pub const IntArray: Self = Self(8u32);
975 pub const StringArray: Self = Self(9u32);
976}
977impl ::core::marker::Copy for MLOperatorAttributeType {}
978impl ::core::clone::Clone for MLOperatorAttributeType {
979 fn clone(&self) -> Self {
980 *self
981 }
982}
983impl ::core::default::Default for MLOperatorAttributeType {
984 fn default() -> Self {
985 Self(0)
986 }
987}
988impl ::windows::core::TypeKind for MLOperatorAttributeType {
989 type TypeKind = ::windows::core::CopyType;
990}
991impl ::core::fmt::Debug for MLOperatorAttributeType {
992 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
993 f.debug_tuple("MLOperatorAttributeType").field(&self.0).finish()
994 }
995}
996#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
997#[repr(transparent)]
998#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
999pub struct MLOperatorEdgeType(pub u32);
1000impl MLOperatorEdgeType {
1001 pub const Undefined: Self = Self(0u32);
1002 pub const Tensor: Self = Self(1u32);
1003}
1004impl ::core::marker::Copy for MLOperatorEdgeType {}
1005impl ::core::clone::Clone for MLOperatorEdgeType {
1006 fn clone(&self) -> Self {
1007 *self
1008 }
1009}
1010impl ::core::default::Default for MLOperatorEdgeType {
1011 fn default() -> Self {
1012 Self(0)
1013 }
1014}
1015impl ::windows::core::TypeKind for MLOperatorEdgeType {
1016 type TypeKind = ::windows::core::CopyType;
1017}
1018impl ::core::fmt::Debug for MLOperatorEdgeType {
1019 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1020 f.debug_tuple("MLOperatorEdgeType").field(&self.0).finish()
1021 }
1022}
1023#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1024#[repr(transparent)]
1025#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
1026pub struct MLOperatorExecutionType(pub u32);
1027impl MLOperatorExecutionType {
1028 pub const Undefined: Self = Self(0u32);
1029 pub const Cpu: Self = Self(1u32);
1030 pub const D3D12: Self = Self(2u32);
1031}
1032impl ::core::marker::Copy for MLOperatorExecutionType {}
1033impl ::core::clone::Clone for MLOperatorExecutionType {
1034 fn clone(&self) -> Self {
1035 *self
1036 }
1037}
1038impl ::core::default::Default for MLOperatorExecutionType {
1039 fn default() -> Self {
1040 Self(0)
1041 }
1042}
1043impl ::windows::core::TypeKind for MLOperatorExecutionType {
1044 type TypeKind = ::windows::core::CopyType;
1045}
1046impl ::core::fmt::Debug for MLOperatorExecutionType {
1047 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1048 f.debug_tuple("MLOperatorExecutionType").field(&self.0).finish()
1049 }
1050}
1051#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1052#[repr(transparent)]
1053#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
1054pub struct MLOperatorKernelOptions(pub u32);
1055impl MLOperatorKernelOptions {
1056 pub const None: Self = Self(0u32);
1057 pub const AllowDynamicInputShapes: Self = Self(1u32);
1058}
1059impl ::core::marker::Copy for MLOperatorKernelOptions {}
1060impl ::core::clone::Clone for MLOperatorKernelOptions {
1061 fn clone(&self) -> Self {
1062 *self
1063 }
1064}
1065impl ::core::default::Default for MLOperatorKernelOptions {
1066 fn default() -> Self {
1067 Self(0)
1068 }
1069}
1070impl ::windows::core::TypeKind for MLOperatorKernelOptions {
1071 type TypeKind = ::windows::core::CopyType;
1072}
1073impl ::core::fmt::Debug for MLOperatorKernelOptions {
1074 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1075 f.debug_tuple("MLOperatorKernelOptions").field(&self.0).finish()
1076 }
1077}
1078impl MLOperatorKernelOptions {
1079 pub const fn contains(&self, other: Self) -> bool {
1080 self.0 & other.0 == other.0
1081 }
1082}
1083impl ::core::ops::BitOr for MLOperatorKernelOptions {
1084 type Output = Self;
1085 fn bitor(self, other: Self) -> Self {
1086 Self(self.0 | other.0)
1087 }
1088}
1089impl ::core::ops::BitAnd for MLOperatorKernelOptions {
1090 type Output = Self;
1091 fn bitand(self, other: Self) -> Self {
1092 Self(self.0 & other.0)
1093 }
1094}
1095impl ::core::ops::BitOrAssign for MLOperatorKernelOptions {
1096 fn bitor_assign(&mut self, other: Self) {
1097 self.0.bitor_assign(other.0)
1098 }
1099}
1100impl ::core::ops::BitAndAssign for MLOperatorKernelOptions {
1101 fn bitand_assign(&mut self, other: Self) {
1102 self.0.bitand_assign(other.0)
1103 }
1104}
1105impl ::core::ops::Not for MLOperatorKernelOptions {
1106 type Output = Self;
1107 fn not(self) -> Self {
1108 Self(self.0.not())
1109 }
1110}
1111#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1112#[repr(transparent)]
1113#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
1114pub struct MLOperatorParameterOptions(pub u32);
1115impl MLOperatorParameterOptions {
1116 pub const Single: Self = Self(0u32);
1117 pub const Optional: Self = Self(1u32);
1118 pub const Variadic: Self = Self(2u32);
1119}
1120impl ::core::marker::Copy for MLOperatorParameterOptions {}
1121impl ::core::clone::Clone for MLOperatorParameterOptions {
1122 fn clone(&self) -> Self {
1123 *self
1124 }
1125}
1126impl ::core::default::Default for MLOperatorParameterOptions {
1127 fn default() -> Self {
1128 Self(0)
1129 }
1130}
1131impl ::windows::core::TypeKind for MLOperatorParameterOptions {
1132 type TypeKind = ::windows::core::CopyType;
1133}
1134impl ::core::fmt::Debug for MLOperatorParameterOptions {
1135 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1136 f.debug_tuple("MLOperatorParameterOptions").field(&self.0).finish()
1137 }
1138}
1139impl MLOperatorParameterOptions {
1140 pub const fn contains(&self, other: Self) -> bool {
1141 self.0 & other.0 == other.0
1142 }
1143}
1144impl ::core::ops::BitOr for MLOperatorParameterOptions {
1145 type Output = Self;
1146 fn bitor(self, other: Self) -> Self {
1147 Self(self.0 | other.0)
1148 }
1149}
1150impl ::core::ops::BitAnd for MLOperatorParameterOptions {
1151 type Output = Self;
1152 fn bitand(self, other: Self) -> Self {
1153 Self(self.0 & other.0)
1154 }
1155}
1156impl ::core::ops::BitOrAssign for MLOperatorParameterOptions {
1157 fn bitor_assign(&mut self, other: Self) {
1158 self.0.bitor_assign(other.0)
1159 }
1160}
1161impl ::core::ops::BitAndAssign for MLOperatorParameterOptions {
1162 fn bitand_assign(&mut self, other: Self) {
1163 self.0.bitand_assign(other.0)
1164 }
1165}
1166impl ::core::ops::Not for MLOperatorParameterOptions {
1167 type Output = Self;
1168 fn not(self) -> Self {
1169 Self(self.0.not())
1170 }
1171}
1172#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1173#[repr(transparent)]
1174#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
1175pub struct MLOperatorSchemaEdgeTypeFormat(pub i32);
1176impl MLOperatorSchemaEdgeTypeFormat {
1177 pub const EdgeDescription: Self = Self(0i32);
1178 pub const Label: Self = Self(1i32);
1179}
1180impl ::core::marker::Copy for MLOperatorSchemaEdgeTypeFormat {}
1181impl ::core::clone::Clone for MLOperatorSchemaEdgeTypeFormat {
1182 fn clone(&self) -> Self {
1183 *self
1184 }
1185}
1186impl ::core::default::Default for MLOperatorSchemaEdgeTypeFormat {
1187 fn default() -> Self {
1188 Self(0)
1189 }
1190}
1191impl ::windows::core::TypeKind for MLOperatorSchemaEdgeTypeFormat {
1192 type TypeKind = ::windows::core::CopyType;
1193}
1194impl ::core::fmt::Debug for MLOperatorSchemaEdgeTypeFormat {
1195 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1196 f.debug_tuple("MLOperatorSchemaEdgeTypeFormat").field(&self.0).finish()
1197 }
1198}
1199#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1200#[repr(transparent)]
1201#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
1202pub struct MLOperatorTensorDataType(pub u32);
1203impl MLOperatorTensorDataType {
1204 pub const Undefined: Self = Self(0u32);
1205 pub const Float: Self = Self(1u32);
1206 pub const UInt8: Self = Self(2u32);
1207 pub const Int8: Self = Self(3u32);
1208 pub const UInt16: Self = Self(4u32);
1209 pub const Int16: Self = Self(5u32);
1210 pub const Int32: Self = Self(6u32);
1211 pub const Int64: Self = Self(7u32);
1212 pub const String: Self = Self(8u32);
1213 pub const Bool: Self = Self(9u32);
1214 pub const Float16: Self = Self(10u32);
1215 pub const Double: Self = Self(11u32);
1216 pub const UInt32: Self = Self(12u32);
1217 pub const UInt64: Self = Self(13u32);
1218 pub const Complex64: Self = Self(14u32);
1219 pub const Complex128: Self = Self(15u32);
1220}
1221impl ::core::marker::Copy for MLOperatorTensorDataType {}
1222impl ::core::clone::Clone for MLOperatorTensorDataType {
1223 fn clone(&self) -> Self {
1224 *self
1225 }
1226}
1227impl ::core::default::Default for MLOperatorTensorDataType {
1228 fn default() -> Self {
1229 Self(0)
1230 }
1231}
1232impl ::windows::core::TypeKind for MLOperatorTensorDataType {
1233 type TypeKind = ::windows::core::CopyType;
1234}
1235impl ::core::fmt::Debug for MLOperatorTensorDataType {
1236 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1237 f.debug_tuple("MLOperatorTensorDataType").field(&self.0).finish()
1238 }
1239}
1240#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1241#[repr(transparent)]
1242#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
1243pub struct WINML_BINDING_TYPE(pub i32);
1244#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1245pub const WINML_BINDING_UNDEFINED: WINML_BINDING_TYPE = WINML_BINDING_TYPE(0i32);
1246#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1247pub const WINML_BINDING_TENSOR: WINML_BINDING_TYPE = WINML_BINDING_TYPE(1i32);
1248#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1249pub const WINML_BINDING_SEQUENCE: WINML_BINDING_TYPE = WINML_BINDING_TYPE(2i32);
1250#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1251pub const WINML_BINDING_MAP: WINML_BINDING_TYPE = WINML_BINDING_TYPE(3i32);
1252#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1253pub const WINML_BINDING_IMAGE: WINML_BINDING_TYPE = WINML_BINDING_TYPE(4i32);
1254#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1255pub const WINML_BINDING_RESOURCE: WINML_BINDING_TYPE = WINML_BINDING_TYPE(5i32);
1256impl ::core::marker::Copy for WINML_BINDING_TYPE {}
1257impl ::core::clone::Clone for WINML_BINDING_TYPE {
1258 fn clone(&self) -> Self {
1259 *self
1260 }
1261}
1262impl ::core::default::Default for WINML_BINDING_TYPE {
1263 fn default() -> Self {
1264 Self(0)
1265 }
1266}
1267impl ::windows::core::TypeKind for WINML_BINDING_TYPE {
1268 type TypeKind = ::windows::core::CopyType;
1269}
1270impl ::core::fmt::Debug for WINML_BINDING_TYPE {
1271 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1272 f.debug_tuple("WINML_BINDING_TYPE").field(&self.0).finish()
1273 }
1274}
1275#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1276#[repr(transparent)]
1277#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
1278pub struct WINML_FEATURE_TYPE(pub i32);
1279#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1280pub const WINML_FEATURE_UNDEFINED: WINML_FEATURE_TYPE = WINML_FEATURE_TYPE(0i32);
1281#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1282pub const WINML_FEATURE_TENSOR: WINML_FEATURE_TYPE = WINML_FEATURE_TYPE(1i32);
1283#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1284pub const WINML_FEATURE_SEQUENCE: WINML_FEATURE_TYPE = WINML_FEATURE_TYPE(2i32);
1285#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1286pub const WINML_FEATURE_MAP: WINML_FEATURE_TYPE = WINML_FEATURE_TYPE(3i32);
1287#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1288pub const WINML_FEATURE_IMAGE: WINML_FEATURE_TYPE = WINML_FEATURE_TYPE(4i32);
1289impl ::core::marker::Copy for WINML_FEATURE_TYPE {}
1290impl ::core::clone::Clone for WINML_FEATURE_TYPE {
1291 fn clone(&self) -> Self {
1292 *self
1293 }
1294}
1295impl ::core::default::Default for WINML_FEATURE_TYPE {
1296 fn default() -> Self {
1297 Self(0)
1298 }
1299}
1300impl ::windows::core::TypeKind for WINML_FEATURE_TYPE {
1301 type TypeKind = ::windows::core::CopyType;
1302}
1303impl ::core::fmt::Debug for WINML_FEATURE_TYPE {
1304 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1305 f.debug_tuple("WINML_FEATURE_TYPE").field(&self.0).finish()
1306 }
1307}
1308#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1309#[repr(transparent)]
1310#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
1311pub struct WINML_RUNTIME_TYPE(pub i32);
1312#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1313pub const WINML_RUNTIME_CNTK: WINML_RUNTIME_TYPE = WINML_RUNTIME_TYPE(0i32);
1314impl ::core::marker::Copy for WINML_RUNTIME_TYPE {}
1315impl ::core::clone::Clone for WINML_RUNTIME_TYPE {
1316 fn clone(&self) -> Self {
1317 *self
1318 }
1319}
1320impl ::core::default::Default for WINML_RUNTIME_TYPE {
1321 fn default() -> Self {
1322 Self(0)
1323 }
1324}
1325impl ::windows::core::TypeKind for WINML_RUNTIME_TYPE {
1326 type TypeKind = ::windows::core::CopyType;
1327}
1328impl ::core::fmt::Debug for WINML_RUNTIME_TYPE {
1329 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1330 f.debug_tuple("WINML_RUNTIME_TYPE").field(&self.0).finish()
1331 }
1332}
1333#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1334#[repr(transparent)]
1335#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
1336pub struct WINML_TENSOR_DATA_TYPE(pub i32);
1337#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1338pub const WINML_TENSOR_UNDEFINED: WINML_TENSOR_DATA_TYPE = WINML_TENSOR_DATA_TYPE(0i32);
1339#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1340pub const WINML_TENSOR_FLOAT: WINML_TENSOR_DATA_TYPE = WINML_TENSOR_DATA_TYPE(1i32);
1341#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1342pub const WINML_TENSOR_UINT8: WINML_TENSOR_DATA_TYPE = WINML_TENSOR_DATA_TYPE(2i32);
1343#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1344pub const WINML_TENSOR_INT8: WINML_TENSOR_DATA_TYPE = WINML_TENSOR_DATA_TYPE(3i32);
1345#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1346pub const WINML_TENSOR_UINT16: WINML_TENSOR_DATA_TYPE = WINML_TENSOR_DATA_TYPE(4i32);
1347#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1348pub const WINML_TENSOR_INT16: WINML_TENSOR_DATA_TYPE = WINML_TENSOR_DATA_TYPE(5i32);
1349#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1350pub const WINML_TENSOR_INT32: WINML_TENSOR_DATA_TYPE = WINML_TENSOR_DATA_TYPE(6i32);
1351#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1352pub const WINML_TENSOR_INT64: WINML_TENSOR_DATA_TYPE = WINML_TENSOR_DATA_TYPE(7i32);
1353#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1354pub const WINML_TENSOR_STRING: WINML_TENSOR_DATA_TYPE = WINML_TENSOR_DATA_TYPE(8i32);
1355#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1356pub const WINML_TENSOR_BOOLEAN: WINML_TENSOR_DATA_TYPE = WINML_TENSOR_DATA_TYPE(9i32);
1357#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1358pub const WINML_TENSOR_FLOAT16: WINML_TENSOR_DATA_TYPE = WINML_TENSOR_DATA_TYPE(10i32);
1359#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1360pub const WINML_TENSOR_DOUBLE: WINML_TENSOR_DATA_TYPE = WINML_TENSOR_DATA_TYPE(11i32);
1361#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1362pub const WINML_TENSOR_UINT32: WINML_TENSOR_DATA_TYPE = WINML_TENSOR_DATA_TYPE(12i32);
1363#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1364pub const WINML_TENSOR_UINT64: WINML_TENSOR_DATA_TYPE = WINML_TENSOR_DATA_TYPE(13i32);
1365#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1366pub const WINML_TENSOR_COMPLEX64: WINML_TENSOR_DATA_TYPE = WINML_TENSOR_DATA_TYPE(14i32);
1367#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1368pub const WINML_TENSOR_COMPLEX128: WINML_TENSOR_DATA_TYPE = WINML_TENSOR_DATA_TYPE(15i32);
1369impl ::core::marker::Copy for WINML_TENSOR_DATA_TYPE {}
1370impl ::core::clone::Clone for WINML_TENSOR_DATA_TYPE {
1371 fn clone(&self) -> Self {
1372 *self
1373 }
1374}
1375impl ::core::default::Default for WINML_TENSOR_DATA_TYPE {
1376 fn default() -> Self {
1377 Self(0)
1378 }
1379}
1380impl ::windows::core::TypeKind for WINML_TENSOR_DATA_TYPE {
1381 type TypeKind = ::windows::core::CopyType;
1382}
1383impl ::core::fmt::Debug for WINML_TENSOR_DATA_TYPE {
1384 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1385 f.debug_tuple("WINML_TENSOR_DATA_TYPE").field(&self.0).finish()
1386 }
1387}
1388#[repr(C)]
1389#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1390pub struct MLOperatorAttribute {
1391 pub name: ::windows::core::PCSTR,
1392 pub r#type: MLOperatorAttributeType,
1393 pub required: u8,
1394}
1395impl ::core::marker::Copy for MLOperatorAttribute {}
1396impl ::core::clone::Clone for MLOperatorAttribute {
1397 fn clone(&self) -> Self {
1398 *self
1399 }
1400}
1401impl ::core::fmt::Debug for MLOperatorAttribute {
1402 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1403 f.debug_struct("MLOperatorAttribute").field("name", &self.name).field("type", &self.r#type).field("required", &self.required).finish()
1404 }
1405}
1406impl ::windows::core::TypeKind for MLOperatorAttribute {
1407 type TypeKind = ::windows::core::CopyType;
1408}
1409impl ::core::cmp::PartialEq for MLOperatorAttribute {
1410 fn eq(&self, other: &Self) -> bool {
1411 self.name == other.name && self.r#type == other.r#type && self.required == other.required
1412 }
1413}
1414impl ::core::cmp::Eq for MLOperatorAttribute {}
1415impl ::core::default::Default for MLOperatorAttribute {
1416 fn default() -> Self {
1417 unsafe { ::core::mem::zeroed() }
1418 }
1419}
1420#[repr(C)]
1421#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1422pub struct MLOperatorAttributeNameValue {
1423 pub name: ::windows::core::PCSTR,
1424 pub r#type: MLOperatorAttributeType,
1425 pub valueCount: u32,
1426 pub Anonymous: MLOperatorAttributeNameValue_0,
1427}
1428impl ::core::marker::Copy for MLOperatorAttributeNameValue {}
1429impl ::core::clone::Clone for MLOperatorAttributeNameValue {
1430 fn clone(&self) -> Self {
1431 *self
1432 }
1433}
1434impl ::windows::core::TypeKind for MLOperatorAttributeNameValue {
1435 type TypeKind = ::windows::core::CopyType;
1436}
1437impl ::core::default::Default for MLOperatorAttributeNameValue {
1438 fn default() -> Self {
1439 unsafe { ::core::mem::zeroed() }
1440 }
1441}
1442#[repr(C)]
1443#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1444pub union MLOperatorAttributeNameValue_0 {
1445 pub reserved: *const ::core::ffi::c_void,
1446 pub ints: *const i64,
1447 pub strings: *const *const i8,
1448 pub floats: *const f32,
1449}
1450impl ::core::marker::Copy for MLOperatorAttributeNameValue_0 {}
1451impl ::core::clone::Clone for MLOperatorAttributeNameValue_0 {
1452 fn clone(&self) -> Self {
1453 *self
1454 }
1455}
1456impl ::windows::core::TypeKind for MLOperatorAttributeNameValue_0 {
1457 type TypeKind = ::windows::core::CopyType;
1458}
1459impl ::core::default::Default for MLOperatorAttributeNameValue_0 {
1460 fn default() -> Self {
1461 unsafe { ::core::mem::zeroed() }
1462 }
1463}
1464#[repr(C)]
1465#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1466pub struct MLOperatorEdgeDescription {
1467 pub edgeType: MLOperatorEdgeType,
1468 pub Anonymous: MLOperatorEdgeDescription_0,
1469}
1470impl ::core::marker::Copy for MLOperatorEdgeDescription {}
1471impl ::core::clone::Clone for MLOperatorEdgeDescription {
1472 fn clone(&self) -> Self {
1473 *self
1474 }
1475}
1476impl ::windows::core::TypeKind for MLOperatorEdgeDescription {
1477 type TypeKind = ::windows::core::CopyType;
1478}
1479impl ::core::default::Default for MLOperatorEdgeDescription {
1480 fn default() -> Self {
1481 unsafe { ::core::mem::zeroed() }
1482 }
1483}
1484#[repr(C)]
1485#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1486pub union MLOperatorEdgeDescription_0 {
1487 pub reserved: u64,
1488 pub tensorDataType: MLOperatorTensorDataType,
1489}
1490impl ::core::marker::Copy for MLOperatorEdgeDescription_0 {}
1491impl ::core::clone::Clone for MLOperatorEdgeDescription_0 {
1492 fn clone(&self) -> Self {
1493 *self
1494 }
1495}
1496impl ::windows::core::TypeKind for MLOperatorEdgeDescription_0 {
1497 type TypeKind = ::windows::core::CopyType;
1498}
1499impl ::core::default::Default for MLOperatorEdgeDescription_0 {
1500 fn default() -> Self {
1501 unsafe { ::core::mem::zeroed() }
1502 }
1503}
1504#[repr(C)]
1505#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1506pub struct MLOperatorEdgeTypeConstraint {
1507 pub typeLabel: ::windows::core::PCSTR,
1508 pub allowedTypes: *const MLOperatorEdgeDescription,
1509 pub allowedTypeCount: u32,
1510}
1511impl ::core::marker::Copy for MLOperatorEdgeTypeConstraint {}
1512impl ::core::clone::Clone for MLOperatorEdgeTypeConstraint {
1513 fn clone(&self) -> Self {
1514 *self
1515 }
1516}
1517impl ::core::fmt::Debug for MLOperatorEdgeTypeConstraint {
1518 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1519 f.debug_struct("MLOperatorEdgeTypeConstraint").field("typeLabel", &self.typeLabel).field("allowedTypes", &self.allowedTypes).field("allowedTypeCount", &self.allowedTypeCount).finish()
1520 }
1521}
1522impl ::windows::core::TypeKind for MLOperatorEdgeTypeConstraint {
1523 type TypeKind = ::windows::core::CopyType;
1524}
1525impl ::core::cmp::PartialEq for MLOperatorEdgeTypeConstraint {
1526 fn eq(&self, other: &Self) -> bool {
1527 self.typeLabel == other.typeLabel && self.allowedTypes == other.allowedTypes && self.allowedTypeCount == other.allowedTypeCount
1528 }
1529}
1530impl ::core::cmp::Eq for MLOperatorEdgeTypeConstraint {}
1531impl ::core::default::Default for MLOperatorEdgeTypeConstraint {
1532 fn default() -> Self {
1533 unsafe { ::core::mem::zeroed() }
1534 }
1535}
1536#[repr(C)]
1537#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1538pub struct MLOperatorKernelDescription {
1539 pub domain: ::windows::core::PCSTR,
1540 pub name: ::windows::core::PCSTR,
1541 pub minimumOperatorSetVersion: i32,
1542 pub executionType: MLOperatorExecutionType,
1543 pub typeConstraints: *const MLOperatorEdgeTypeConstraint,
1544 pub typeConstraintCount: u32,
1545 pub defaultAttributes: *const MLOperatorAttributeNameValue,
1546 pub defaultAttributeCount: u32,
1547 pub options: MLOperatorKernelOptions,
1548 pub executionOptions: u32,
1549}
1550impl ::core::marker::Copy for MLOperatorKernelDescription {}
1551impl ::core::clone::Clone for MLOperatorKernelDescription {
1552 fn clone(&self) -> Self {
1553 *self
1554 }
1555}
1556impl ::core::fmt::Debug for MLOperatorKernelDescription {
1557 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1558 f.debug_struct("MLOperatorKernelDescription")
1559 .field("domain", &self.domain)
1560 .field("name", &self.name)
1561 .field("minimumOperatorSetVersion", &self.minimumOperatorSetVersion)
1562 .field("executionType", &self.executionType)
1563 .field("typeConstraints", &self.typeConstraints)
1564 .field("typeConstraintCount", &self.typeConstraintCount)
1565 .field("defaultAttributes", &self.defaultAttributes)
1566 .field("defaultAttributeCount", &self.defaultAttributeCount)
1567 .field("options", &self.options)
1568 .field("executionOptions", &self.executionOptions)
1569 .finish()
1570 }
1571}
1572impl ::windows::core::TypeKind for MLOperatorKernelDescription {
1573 type TypeKind = ::windows::core::CopyType;
1574}
1575impl ::core::cmp::PartialEq for MLOperatorKernelDescription {
1576 fn eq(&self, other: &Self) -> bool {
1577 self.domain == other.domain && self.name == other.name && self.minimumOperatorSetVersion == other.minimumOperatorSetVersion && self.executionType == other.executionType && self.typeConstraints == other.typeConstraints && self.typeConstraintCount == other.typeConstraintCount && self.defaultAttributes == other.defaultAttributes && self.defaultAttributeCount == other.defaultAttributeCount && self.options == other.options && self.executionOptions == other.executionOptions
1578 }
1579}
1580impl ::core::cmp::Eq for MLOperatorKernelDescription {}
1581impl ::core::default::Default for MLOperatorKernelDescription {
1582 fn default() -> Self {
1583 unsafe { ::core::mem::zeroed() }
1584 }
1585}
1586#[repr(C)]
1587#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1588pub struct MLOperatorSchemaDescription {
1589 pub name: ::windows::core::PCSTR,
1590 pub operatorSetVersionAtLastChange: i32,
1591 pub inputs: *const MLOperatorSchemaEdgeDescription,
1592 pub inputCount: u32,
1593 pub outputs: *const MLOperatorSchemaEdgeDescription,
1594 pub outputCount: u32,
1595 pub typeConstraints: *const MLOperatorEdgeTypeConstraint,
1596 pub typeConstraintCount: u32,
1597 pub attributes: *const MLOperatorAttribute,
1598 pub attributeCount: u32,
1599 pub defaultAttributes: *const MLOperatorAttributeNameValue,
1600 pub defaultAttributeCount: u32,
1601}
1602impl ::core::marker::Copy for MLOperatorSchemaDescription {}
1603impl ::core::clone::Clone for MLOperatorSchemaDescription {
1604 fn clone(&self) -> Self {
1605 *self
1606 }
1607}
1608impl ::core::fmt::Debug for MLOperatorSchemaDescription {
1609 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1610 f.debug_struct("MLOperatorSchemaDescription")
1611 .field("name", &self.name)
1612 .field("operatorSetVersionAtLastChange", &self.operatorSetVersionAtLastChange)
1613 .field("inputs", &self.inputs)
1614 .field("inputCount", &self.inputCount)
1615 .field("outputs", &self.outputs)
1616 .field("outputCount", &self.outputCount)
1617 .field("typeConstraints", &self.typeConstraints)
1618 .field("typeConstraintCount", &self.typeConstraintCount)
1619 .field("attributes", &self.attributes)
1620 .field("attributeCount", &self.attributeCount)
1621 .field("defaultAttributes", &self.defaultAttributes)
1622 .field("defaultAttributeCount", &self.defaultAttributeCount)
1623 .finish()
1624 }
1625}
1626impl ::windows::core::TypeKind for MLOperatorSchemaDescription {
1627 type TypeKind = ::windows::core::CopyType;
1628}
1629impl ::core::cmp::PartialEq for MLOperatorSchemaDescription {
1630 fn eq(&self, other: &Self) -> bool {
1631 self.name == other.name && self.operatorSetVersionAtLastChange == other.operatorSetVersionAtLastChange && self.inputs == other.inputs && self.inputCount == other.inputCount && self.outputs == other.outputs && self.outputCount == other.outputCount && self.typeConstraints == other.typeConstraints && self.typeConstraintCount == other.typeConstraintCount && self.attributes == other.attributes && self.attributeCount == other.attributeCount && self.defaultAttributes == other.defaultAttributes && self.defaultAttributeCount == other.defaultAttributeCount
1632 }
1633}
1634impl ::core::cmp::Eq for MLOperatorSchemaDescription {}
1635impl ::core::default::Default for MLOperatorSchemaDescription {
1636 fn default() -> Self {
1637 unsafe { ::core::mem::zeroed() }
1638 }
1639}
1640#[repr(C)]
1641#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1642pub struct MLOperatorSchemaEdgeDescription {
1643 pub options: MLOperatorParameterOptions,
1644 pub typeFormat: MLOperatorSchemaEdgeTypeFormat,
1645 pub Anonymous: MLOperatorSchemaEdgeDescription_0,
1646}
1647impl ::core::marker::Copy for MLOperatorSchemaEdgeDescription {}
1648impl ::core::clone::Clone for MLOperatorSchemaEdgeDescription {
1649 fn clone(&self) -> Self {
1650 *self
1651 }
1652}
1653impl ::windows::core::TypeKind for MLOperatorSchemaEdgeDescription {
1654 type TypeKind = ::windows::core::CopyType;
1655}
1656impl ::core::default::Default for MLOperatorSchemaEdgeDescription {
1657 fn default() -> Self {
1658 unsafe { ::core::mem::zeroed() }
1659 }
1660}
1661#[repr(C)]
1662#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1663pub union MLOperatorSchemaEdgeDescription_0 {
1664 pub reserved: *const ::core::ffi::c_void,
1665 pub typeLabel: ::windows::core::PCSTR,
1666 pub edgeDescription: MLOperatorEdgeDescription,
1667}
1668impl ::core::marker::Copy for MLOperatorSchemaEdgeDescription_0 {}
1669impl ::core::clone::Clone for MLOperatorSchemaEdgeDescription_0 {
1670 fn clone(&self) -> Self {
1671 *self
1672 }
1673}
1674impl ::windows::core::TypeKind for MLOperatorSchemaEdgeDescription_0 {
1675 type TypeKind = ::windows::core::CopyType;
1676}
1677impl ::core::default::Default for MLOperatorSchemaEdgeDescription_0 {
1678 fn default() -> Self {
1679 unsafe { ::core::mem::zeroed() }
1680 }
1681}
1682#[repr(C)]
1683#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1684pub struct MLOperatorSetId {
1685 pub domain: ::windows::core::PCSTR,
1686 pub version: i32,
1687}
1688impl ::core::marker::Copy for MLOperatorSetId {}
1689impl ::core::clone::Clone for MLOperatorSetId {
1690 fn clone(&self) -> Self {
1691 *self
1692 }
1693}
1694impl ::core::fmt::Debug for MLOperatorSetId {
1695 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1696 f.debug_struct("MLOperatorSetId").field("domain", &self.domain).field("version", &self.version).finish()
1697 }
1698}
1699impl ::windows::core::TypeKind for MLOperatorSetId {
1700 type TypeKind = ::windows::core::CopyType;
1701}
1702impl ::core::cmp::PartialEq for MLOperatorSetId {
1703 fn eq(&self, other: &Self) -> bool {
1704 self.domain == other.domain && self.version == other.version
1705 }
1706}
1707impl ::core::cmp::Eq for MLOperatorSetId {}
1708impl ::core::default::Default for MLOperatorSetId {
1709 fn default() -> Self {
1710 unsafe { ::core::mem::zeroed() }
1711 }
1712}
1713#[repr(C)]
1714#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`, `\"Win32_Graphics_Direct3D12\"`*"]
1715#[cfg(feature = "Win32_Graphics_Direct3D12")]
1716pub struct WINML_BINDING_DESC {
1717 pub Name: ::windows::core::PCWSTR,
1718 pub BindType: WINML_BINDING_TYPE,
1719 pub Anonymous: WINML_BINDING_DESC_0,
1720}
1721#[cfg(feature = "Win32_Graphics_Direct3D12")]
1722impl ::core::clone::Clone for WINML_BINDING_DESC {
1723 fn clone(&self) -> Self {
1724 unsafe { ::core::mem::transmute_copy(self) }
1725 }
1726}
1727#[cfg(feature = "Win32_Graphics_Direct3D12")]
1728impl ::windows::core::TypeKind for WINML_BINDING_DESC {
1729 type TypeKind = ::windows::core::CopyType;
1730}
1731#[cfg(feature = "Win32_Graphics_Direct3D12")]
1732impl ::core::default::Default for WINML_BINDING_DESC {
1733 fn default() -> Self {
1734 unsafe { ::core::mem::zeroed() }
1735 }
1736}
1737#[repr(C)]
1738#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`, `\"Win32_Graphics_Direct3D12\"`*"]
1739#[cfg(feature = "Win32_Graphics_Direct3D12")]
1740pub union WINML_BINDING_DESC_0 {
1741 pub Tensor: WINML_TENSOR_BINDING_DESC,
1742 pub Sequence: WINML_SEQUENCE_BINDING_DESC,
1743 pub Map: WINML_MAP_BINDING_DESC,
1744 pub Image: WINML_IMAGE_BINDING_DESC,
1745 pub Resource: ::std::mem::ManuallyDrop<WINML_RESOURCE_BINDING_DESC>,
1746}
1747#[cfg(feature = "Win32_Graphics_Direct3D12")]
1748impl ::core::clone::Clone for WINML_BINDING_DESC_0 {
1749 fn clone(&self) -> Self {
1750 unsafe { ::core::mem::transmute_copy(self) }
1751 }
1752}
1753#[cfg(feature = "Win32_Graphics_Direct3D12")]
1754impl ::windows::core::TypeKind for WINML_BINDING_DESC_0 {
1755 type TypeKind = ::windows::core::CopyType;
1756}
1757#[cfg(feature = "Win32_Graphics_Direct3D12")]
1758impl ::core::default::Default for WINML_BINDING_DESC_0 {
1759 fn default() -> Self {
1760 unsafe { ::core::mem::zeroed() }
1761 }
1762}
1763#[repr(C)]
1764#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1765pub struct WINML_IMAGE_BINDING_DESC {
1766 pub ElementType: WINML_TENSOR_DATA_TYPE,
1767 pub NumDimensions: u32,
1768 pub pShape: *mut i64,
1769 pub DataSize: u32,
1770 pub pData: *mut ::core::ffi::c_void,
1771}
1772impl ::core::marker::Copy for WINML_IMAGE_BINDING_DESC {}
1773impl ::core::clone::Clone for WINML_IMAGE_BINDING_DESC {
1774 fn clone(&self) -> Self {
1775 *self
1776 }
1777}
1778impl ::core::fmt::Debug for WINML_IMAGE_BINDING_DESC {
1779 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1780 f.debug_struct("WINML_IMAGE_BINDING_DESC").field("ElementType", &self.ElementType).field("NumDimensions", &self.NumDimensions).field("pShape", &self.pShape).field("DataSize", &self.DataSize).field("pData", &self.pData).finish()
1781 }
1782}
1783impl ::windows::core::TypeKind for WINML_IMAGE_BINDING_DESC {
1784 type TypeKind = ::windows::core::CopyType;
1785}
1786impl ::core::cmp::PartialEq for WINML_IMAGE_BINDING_DESC {
1787 fn eq(&self, other: &Self) -> bool {
1788 self.ElementType == other.ElementType && self.NumDimensions == other.NumDimensions && self.pShape == other.pShape && self.DataSize == other.DataSize && self.pData == other.pData
1789 }
1790}
1791impl ::core::cmp::Eq for WINML_IMAGE_BINDING_DESC {}
1792impl ::core::default::Default for WINML_IMAGE_BINDING_DESC {
1793 fn default() -> Self {
1794 unsafe { ::core::mem::zeroed() }
1795 }
1796}
1797#[repr(C)]
1798#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1799pub struct WINML_IMAGE_VARIABLE_DESC {
1800 pub ElementType: WINML_TENSOR_DATA_TYPE,
1801 pub NumDimensions: u32,
1802 pub pShape: *mut i64,
1803}
1804impl ::core::marker::Copy for WINML_IMAGE_VARIABLE_DESC {}
1805impl ::core::clone::Clone for WINML_IMAGE_VARIABLE_DESC {
1806 fn clone(&self) -> Self {
1807 *self
1808 }
1809}
1810impl ::core::fmt::Debug for WINML_IMAGE_VARIABLE_DESC {
1811 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1812 f.debug_struct("WINML_IMAGE_VARIABLE_DESC").field("ElementType", &self.ElementType).field("NumDimensions", &self.NumDimensions).field("pShape", &self.pShape).finish()
1813 }
1814}
1815impl ::windows::core::TypeKind for WINML_IMAGE_VARIABLE_DESC {
1816 type TypeKind = ::windows::core::CopyType;
1817}
1818impl ::core::cmp::PartialEq for WINML_IMAGE_VARIABLE_DESC {
1819 fn eq(&self, other: &Self) -> bool {
1820 self.ElementType == other.ElementType && self.NumDimensions == other.NumDimensions && self.pShape == other.pShape
1821 }
1822}
1823impl ::core::cmp::Eq for WINML_IMAGE_VARIABLE_DESC {}
1824impl ::core::default::Default for WINML_IMAGE_VARIABLE_DESC {
1825 fn default() -> Self {
1826 unsafe { ::core::mem::zeroed() }
1827 }
1828}
1829#[repr(C)]
1830#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1831pub struct WINML_MAP_BINDING_DESC {
1832 pub ElementCount: u32,
1833 pub KeyType: WINML_TENSOR_DATA_TYPE,
1834 pub Anonymous1: WINML_MAP_BINDING_DESC_0,
1835 pub Fields: WINML_TENSOR_DATA_TYPE,
1836 pub Anonymous2: WINML_MAP_BINDING_DESC_1,
1837}
1838impl ::core::marker::Copy for WINML_MAP_BINDING_DESC {}
1839impl ::core::clone::Clone for WINML_MAP_BINDING_DESC {
1840 fn clone(&self) -> Self {
1841 *self
1842 }
1843}
1844impl ::windows::core::TypeKind for WINML_MAP_BINDING_DESC {
1845 type TypeKind = ::windows::core::CopyType;
1846}
1847impl ::core::default::Default for WINML_MAP_BINDING_DESC {
1848 fn default() -> Self {
1849 unsafe { ::core::mem::zeroed() }
1850 }
1851}
1852#[repr(C)]
1853#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1854pub union WINML_MAP_BINDING_DESC_0 {
1855 pub pStringKeys: *mut ::windows::core::PWSTR,
1856 pub pIntKeys: *mut i64,
1857}
1858impl ::core::marker::Copy for WINML_MAP_BINDING_DESC_0 {}
1859impl ::core::clone::Clone for WINML_MAP_BINDING_DESC_0 {
1860 fn clone(&self) -> Self {
1861 *self
1862 }
1863}
1864impl ::windows::core::TypeKind for WINML_MAP_BINDING_DESC_0 {
1865 type TypeKind = ::windows::core::CopyType;
1866}
1867impl ::core::default::Default for WINML_MAP_BINDING_DESC_0 {
1868 fn default() -> Self {
1869 unsafe { ::core::mem::zeroed() }
1870 }
1871}
1872#[repr(C)]
1873#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1874pub union WINML_MAP_BINDING_DESC_1 {
1875 pub pStringFields: *mut ::windows::core::PWSTR,
1876 pub pIntFields: *mut i64,
1877 pub pFloatFields: *mut f32,
1878 pub pDoubleFields: *mut f64,
1879}
1880impl ::core::marker::Copy for WINML_MAP_BINDING_DESC_1 {}
1881impl ::core::clone::Clone for WINML_MAP_BINDING_DESC_1 {
1882 fn clone(&self) -> Self {
1883 *self
1884 }
1885}
1886impl ::windows::core::TypeKind for WINML_MAP_BINDING_DESC_1 {
1887 type TypeKind = ::windows::core::CopyType;
1888}
1889impl ::core::default::Default for WINML_MAP_BINDING_DESC_1 {
1890 fn default() -> Self {
1891 unsafe { ::core::mem::zeroed() }
1892 }
1893}
1894#[repr(C)]
1895#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1896pub struct WINML_MAP_VARIABLE_DESC {
1897 pub KeyType: WINML_TENSOR_DATA_TYPE,
1898 pub Fields: WINML_TENSOR_DATA_TYPE,
1899}
1900impl ::core::marker::Copy for WINML_MAP_VARIABLE_DESC {}
1901impl ::core::clone::Clone for WINML_MAP_VARIABLE_DESC {
1902 fn clone(&self) -> Self {
1903 *self
1904 }
1905}
1906impl ::core::fmt::Debug for WINML_MAP_VARIABLE_DESC {
1907 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1908 f.debug_struct("WINML_MAP_VARIABLE_DESC").field("KeyType", &self.KeyType).field("Fields", &self.Fields).finish()
1909 }
1910}
1911impl ::windows::core::TypeKind for WINML_MAP_VARIABLE_DESC {
1912 type TypeKind = ::windows::core::CopyType;
1913}
1914impl ::core::cmp::PartialEq for WINML_MAP_VARIABLE_DESC {
1915 fn eq(&self, other: &Self) -> bool {
1916 self.KeyType == other.KeyType && self.Fields == other.Fields
1917 }
1918}
1919impl ::core::cmp::Eq for WINML_MAP_VARIABLE_DESC {}
1920impl ::core::default::Default for WINML_MAP_VARIABLE_DESC {
1921 fn default() -> Self {
1922 unsafe { ::core::mem::zeroed() }
1923 }
1924}
1925#[repr(C)]
1926#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
1927pub struct WINML_MODEL_DESC {
1928 pub Author: ::windows::core::PWSTR,
1929 pub Name: ::windows::core::PWSTR,
1930 pub Domain: ::windows::core::PWSTR,
1931 pub Description: ::windows::core::PWSTR,
1932 pub Version: usize,
1933}
1934impl ::core::marker::Copy for WINML_MODEL_DESC {}
1935impl ::core::clone::Clone for WINML_MODEL_DESC {
1936 fn clone(&self) -> Self {
1937 *self
1938 }
1939}
1940impl ::core::fmt::Debug for WINML_MODEL_DESC {
1941 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1942 f.debug_struct("WINML_MODEL_DESC").field("Author", &self.Author).field("Name", &self.Name).field("Domain", &self.Domain).field("Description", &self.Description).field("Version", &self.Version).finish()
1943 }
1944}
1945impl ::windows::core::TypeKind for WINML_MODEL_DESC {
1946 type TypeKind = ::windows::core::CopyType;
1947}
1948impl ::core::cmp::PartialEq for WINML_MODEL_DESC {
1949 fn eq(&self, other: &Self) -> bool {
1950 self.Author == other.Author && self.Name == other.Name && self.Domain == other.Domain && self.Description == other.Description && self.Version == other.Version
1951 }
1952}
1953impl ::core::cmp::Eq for WINML_MODEL_DESC {}
1954impl ::core::default::Default for WINML_MODEL_DESC {
1955 fn default() -> Self {
1956 unsafe { ::core::mem::zeroed() }
1957 }
1958}
1959#[repr(C)]
1960#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`, `\"Win32_Graphics_Direct3D12\"`*"]
1961#[cfg(feature = "Win32_Graphics_Direct3D12")]
1962pub struct WINML_RESOURCE_BINDING_DESC {
1963 pub ElementType: WINML_TENSOR_DATA_TYPE,
1964 pub NumDimensions: u32,
1965 pub pShape: *mut i64,
1966 pub pResource: ::std::mem::ManuallyDrop<::core::option::Option<super::super::super::Graphics::Direct3D12::ID3D12Resource>>,
1967}
1968#[cfg(feature = "Win32_Graphics_Direct3D12")]
1969impl ::core::clone::Clone for WINML_RESOURCE_BINDING_DESC {
1970 fn clone(&self) -> Self {
1971 unsafe { ::core::mem::transmute_copy(self) }
1972 }
1973}
1974#[cfg(feature = "Win32_Graphics_Direct3D12")]
1975impl ::core::fmt::Debug for WINML_RESOURCE_BINDING_DESC {
1976 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1977 f.debug_struct("WINML_RESOURCE_BINDING_DESC").field("ElementType", &self.ElementType).field("NumDimensions", &self.NumDimensions).field("pShape", &self.pShape).field("pResource", &self.pResource).finish()
1978 }
1979}
1980#[cfg(feature = "Win32_Graphics_Direct3D12")]
1981impl ::windows::core::TypeKind for WINML_RESOURCE_BINDING_DESC {
1982 type TypeKind = ::windows::core::CopyType;
1983}
1984#[cfg(feature = "Win32_Graphics_Direct3D12")]
1985impl ::core::cmp::PartialEq for WINML_RESOURCE_BINDING_DESC {
1986 fn eq(&self, other: &Self) -> bool {
1987 self.ElementType == other.ElementType && self.NumDimensions == other.NumDimensions && self.pShape == other.pShape && self.pResource == other.pResource
1988 }
1989}
1990#[cfg(feature = "Win32_Graphics_Direct3D12")]
1991impl ::core::cmp::Eq for WINML_RESOURCE_BINDING_DESC {}
1992#[cfg(feature = "Win32_Graphics_Direct3D12")]
1993impl ::core::default::Default for WINML_RESOURCE_BINDING_DESC {
1994 fn default() -> Self {
1995 unsafe { ::core::mem::zeroed() }
1996 }
1997}
1998#[repr(C)]
1999#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
2000pub struct WINML_SEQUENCE_BINDING_DESC {
2001 pub ElementCount: u32,
2002 pub ElementType: WINML_TENSOR_DATA_TYPE,
2003 pub Anonymous: WINML_SEQUENCE_BINDING_DESC_0,
2004}
2005impl ::core::marker::Copy for WINML_SEQUENCE_BINDING_DESC {}
2006impl ::core::clone::Clone for WINML_SEQUENCE_BINDING_DESC {
2007 fn clone(&self) -> Self {
2008 *self
2009 }
2010}
2011impl ::windows::core::TypeKind for WINML_SEQUENCE_BINDING_DESC {
2012 type TypeKind = ::windows::core::CopyType;
2013}
2014impl ::core::default::Default for WINML_SEQUENCE_BINDING_DESC {
2015 fn default() -> Self {
2016 unsafe { ::core::mem::zeroed() }
2017 }
2018}
2019#[repr(C)]
2020#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
2021pub union WINML_SEQUENCE_BINDING_DESC_0 {
2022 pub pStrings: *mut ::windows::core::PWSTR,
2023 pub pInts: *mut i64,
2024 pub pFloats: *mut f32,
2025 pub pDoubles: *mut f64,
2026}
2027impl ::core::marker::Copy for WINML_SEQUENCE_BINDING_DESC_0 {}
2028impl ::core::clone::Clone for WINML_SEQUENCE_BINDING_DESC_0 {
2029 fn clone(&self) -> Self {
2030 *self
2031 }
2032}
2033impl ::windows::core::TypeKind for WINML_SEQUENCE_BINDING_DESC_0 {
2034 type TypeKind = ::windows::core::CopyType;
2035}
2036impl ::core::default::Default for WINML_SEQUENCE_BINDING_DESC_0 {
2037 fn default() -> Self {
2038 unsafe { ::core::mem::zeroed() }
2039 }
2040}
2041#[repr(C)]
2042#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
2043pub struct WINML_SEQUENCE_VARIABLE_DESC {
2044 pub ElementType: WINML_TENSOR_DATA_TYPE,
2045}
2046impl ::core::marker::Copy for WINML_SEQUENCE_VARIABLE_DESC {}
2047impl ::core::clone::Clone for WINML_SEQUENCE_VARIABLE_DESC {
2048 fn clone(&self) -> Self {
2049 *self
2050 }
2051}
2052impl ::core::fmt::Debug for WINML_SEQUENCE_VARIABLE_DESC {
2053 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2054 f.debug_struct("WINML_SEQUENCE_VARIABLE_DESC").field("ElementType", &self.ElementType).finish()
2055 }
2056}
2057impl ::windows::core::TypeKind for WINML_SEQUENCE_VARIABLE_DESC {
2058 type TypeKind = ::windows::core::CopyType;
2059}
2060impl ::core::cmp::PartialEq for WINML_SEQUENCE_VARIABLE_DESC {
2061 fn eq(&self, other: &Self) -> bool {
2062 self.ElementType == other.ElementType
2063 }
2064}
2065impl ::core::cmp::Eq for WINML_SEQUENCE_VARIABLE_DESC {}
2066impl ::core::default::Default for WINML_SEQUENCE_VARIABLE_DESC {
2067 fn default() -> Self {
2068 unsafe { ::core::mem::zeroed() }
2069 }
2070}
2071#[repr(C)]
2072#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
2073pub struct WINML_TENSOR_BINDING_DESC {
2074 pub DataType: WINML_TENSOR_DATA_TYPE,
2075 pub NumDimensions: u32,
2076 pub pShape: *mut i64,
2077 pub DataSize: u32,
2078 pub pData: *mut ::core::ffi::c_void,
2079}
2080impl ::core::marker::Copy for WINML_TENSOR_BINDING_DESC {}
2081impl ::core::clone::Clone for WINML_TENSOR_BINDING_DESC {
2082 fn clone(&self) -> Self {
2083 *self
2084 }
2085}
2086impl ::core::fmt::Debug for WINML_TENSOR_BINDING_DESC {
2087 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2088 f.debug_struct("WINML_TENSOR_BINDING_DESC").field("DataType", &self.DataType).field("NumDimensions", &self.NumDimensions).field("pShape", &self.pShape).field("DataSize", &self.DataSize).field("pData", &self.pData).finish()
2089 }
2090}
2091impl ::windows::core::TypeKind for WINML_TENSOR_BINDING_DESC {
2092 type TypeKind = ::windows::core::CopyType;
2093}
2094impl ::core::cmp::PartialEq for WINML_TENSOR_BINDING_DESC {
2095 fn eq(&self, other: &Self) -> bool {
2096 self.DataType == other.DataType && self.NumDimensions == other.NumDimensions && self.pShape == other.pShape && self.DataSize == other.DataSize && self.pData == other.pData
2097 }
2098}
2099impl ::core::cmp::Eq for WINML_TENSOR_BINDING_DESC {}
2100impl ::core::default::Default for WINML_TENSOR_BINDING_DESC {
2101 fn default() -> Self {
2102 unsafe { ::core::mem::zeroed() }
2103 }
2104}
2105#[repr(C)]
2106#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`*"]
2107pub struct WINML_TENSOR_VARIABLE_DESC {
2108 pub ElementType: WINML_TENSOR_DATA_TYPE,
2109 pub NumDimensions: u32,
2110 pub pShape: *mut i64,
2111}
2112impl ::core::marker::Copy for WINML_TENSOR_VARIABLE_DESC {}
2113impl ::core::clone::Clone for WINML_TENSOR_VARIABLE_DESC {
2114 fn clone(&self) -> Self {
2115 *self
2116 }
2117}
2118impl ::core::fmt::Debug for WINML_TENSOR_VARIABLE_DESC {
2119 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2120 f.debug_struct("WINML_TENSOR_VARIABLE_DESC").field("ElementType", &self.ElementType).field("NumDimensions", &self.NumDimensions).field("pShape", &self.pShape).finish()
2121 }
2122}
2123impl ::windows::core::TypeKind for WINML_TENSOR_VARIABLE_DESC {
2124 type TypeKind = ::windows::core::CopyType;
2125}
2126impl ::core::cmp::PartialEq for WINML_TENSOR_VARIABLE_DESC {
2127 fn eq(&self, other: &Self) -> bool {
2128 self.ElementType == other.ElementType && self.NumDimensions == other.NumDimensions && self.pShape == other.pShape
2129 }
2130}
2131impl ::core::cmp::Eq for WINML_TENSOR_VARIABLE_DESC {}
2132impl ::core::default::Default for WINML_TENSOR_VARIABLE_DESC {
2133 fn default() -> Self {
2134 unsafe { ::core::mem::zeroed() }
2135 }
2136}
2137#[repr(C)]
2138#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`, `\"Win32_Foundation\"`*"]
2139#[cfg(feature = "Win32_Foundation")]
2140pub struct WINML_VARIABLE_DESC {
2141 pub Name: ::windows::core::PWSTR,
2142 pub Description: ::windows::core::PWSTR,
2143 pub FeatureType: WINML_FEATURE_TYPE,
2144 pub Required: super::super::super::Foundation::BOOL,
2145 pub Anonymous: WINML_VARIABLE_DESC_0,
2146}
2147#[cfg(feature = "Win32_Foundation")]
2148impl ::core::marker::Copy for WINML_VARIABLE_DESC {}
2149#[cfg(feature = "Win32_Foundation")]
2150impl ::core::clone::Clone for WINML_VARIABLE_DESC {
2151 fn clone(&self) -> Self {
2152 *self
2153 }
2154}
2155#[cfg(feature = "Win32_Foundation")]
2156impl ::windows::core::TypeKind for WINML_VARIABLE_DESC {
2157 type TypeKind = ::windows::core::CopyType;
2158}
2159#[cfg(feature = "Win32_Foundation")]
2160impl ::core::default::Default for WINML_VARIABLE_DESC {
2161 fn default() -> Self {
2162 unsafe { ::core::mem::zeroed() }
2163 }
2164}
2165#[repr(C)]
2166#[doc = "*Required features: `\"Win32_AI_MachineLearning_WinML\"`, `\"Win32_Foundation\"`*"]
2167#[cfg(feature = "Win32_Foundation")]
2168pub union WINML_VARIABLE_DESC_0 {
2169 pub Tensor: WINML_TENSOR_VARIABLE_DESC,
2170 pub Sequence: WINML_SEQUENCE_VARIABLE_DESC,
2171 pub Map: WINML_MAP_VARIABLE_DESC,
2172 pub Image: WINML_IMAGE_VARIABLE_DESC,
2173}
2174#[cfg(feature = "Win32_Foundation")]
2175impl ::core::marker::Copy for WINML_VARIABLE_DESC_0 {}
2176#[cfg(feature = "Win32_Foundation")]
2177impl ::core::clone::Clone for WINML_VARIABLE_DESC_0 {
2178 fn clone(&self) -> Self {
2179 *self
2180 }
2181}
2182#[cfg(feature = "Win32_Foundation")]
2183impl ::windows::core::TypeKind for WINML_VARIABLE_DESC_0 {
2184 type TypeKind = ::windows::core::CopyType;
2185}
2186#[cfg(feature = "Win32_Foundation")]
2187impl ::core::default::Default for WINML_VARIABLE_DESC_0 {
2188 fn default() -> Self {
2189 unsafe { ::core::mem::zeroed() }
2190 }
2191}
2192#[cfg(feature = "implement")]
2193::core::include!("impl.rs");