// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Windows_AI_MachineLearning_Preview_H #define WINRT_Windows_AI_MachineLearning_Preview_H #include "winrt/base.h" static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.240405.15"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.240405.15" #include "winrt/Windows.AI.MachineLearning.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.Graphics.Imaging.2.h" #include "winrt/impl/Windows.Storage.2.h" #include "winrt/impl/Windows.Storage.Streams.2.h" #include "winrt/impl/Windows.AI.MachineLearning.Preview.2.h" namespace winrt::impl { template auto consume_Windows_AI_MachineLearning_Preview_IImageVariableDescriptorPreview::BitmapPixelFormat() const { winrt::Windows::Graphics::Imaging::BitmapPixelFormat value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::IImageVariableDescriptorPreview)->get_BitmapPixelFormat(reinterpret_cast(&value))); return value; } template auto consume_Windows_AI_MachineLearning_Preview_IImageVariableDescriptorPreview::Width() const { uint32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::IImageVariableDescriptorPreview)->get_Width(&value)); return value; } template auto consume_Windows_AI_MachineLearning_Preview_IImageVariableDescriptorPreview::Height() const { uint32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::IImageVariableDescriptorPreview)->get_Height(&value)); return value; } template auto consume_Windows_AI_MachineLearning_Preview_IInferencingOptionsPreview::PreferredDeviceKind() const { winrt::Windows::AI::MachineLearning::Preview::LearningModelDeviceKindPreview value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::IInferencingOptionsPreview)->get_PreferredDeviceKind(reinterpret_cast(&value))); return value; } template auto consume_Windows_AI_MachineLearning_Preview_IInferencingOptionsPreview::PreferredDeviceKind(winrt::Windows::AI::MachineLearning::Preview::LearningModelDeviceKindPreview const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::IInferencingOptionsPreview)->put_PreferredDeviceKind(static_cast(value))); } template auto consume_Windows_AI_MachineLearning_Preview_IInferencingOptionsPreview::IsTracingEnabled() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::IInferencingOptionsPreview)->get_IsTracingEnabled(&value)); return value; } template auto consume_Windows_AI_MachineLearning_Preview_IInferencingOptionsPreview::IsTracingEnabled(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::IInferencingOptionsPreview)->put_IsTracingEnabled(value)); } template auto consume_Windows_AI_MachineLearning_Preview_IInferencingOptionsPreview::MaxBatchSize() const { int32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::IInferencingOptionsPreview)->get_MaxBatchSize(&value)); return value; } template auto consume_Windows_AI_MachineLearning_Preview_IInferencingOptionsPreview::MaxBatchSize(int32_t value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::IInferencingOptionsPreview)->put_MaxBatchSize(value)); } template auto consume_Windows_AI_MachineLearning_Preview_IInferencingOptionsPreview::MinimizeMemoryAllocation() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::IInferencingOptionsPreview)->get_MinimizeMemoryAllocation(&value)); return value; } template auto consume_Windows_AI_MachineLearning_Preview_IInferencingOptionsPreview::MinimizeMemoryAllocation(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::IInferencingOptionsPreview)->put_MinimizeMemoryAllocation(value)); } template auto consume_Windows_AI_MachineLearning_Preview_IInferencingOptionsPreview::ReclaimMemoryAfterEvaluation() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::IInferencingOptionsPreview)->get_ReclaimMemoryAfterEvaluation(&value)); return value; } template auto consume_Windows_AI_MachineLearning_Preview_IInferencingOptionsPreview::ReclaimMemoryAfterEvaluation(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::IInferencingOptionsPreview)->put_ReclaimMemoryAfterEvaluation(value)); } template auto consume_Windows_AI_MachineLearning_Preview_ILearningModelBindingPreview::Bind(param::hstring const& name, winrt::Windows::Foundation::IInspectable const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::ILearningModelBindingPreview)->Bind(*(void**)(&name), *(void**)(&value))); } template auto consume_Windows_AI_MachineLearning_Preview_ILearningModelBindingPreview::Bind(param::hstring const& name, winrt::Windows::Foundation::IInspectable const& value, winrt::Windows::Foundation::Collections::IPropertySet const& metadata) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::ILearningModelBindingPreview)->BindWithProperties(*(void**)(&name), *(void**)(&value), *(void**)(&metadata))); } template auto consume_Windows_AI_MachineLearning_Preview_ILearningModelBindingPreview::Clear() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::ILearningModelBindingPreview)->Clear()); } template auto consume_Windows_AI_MachineLearning_Preview_ILearningModelBindingPreviewFactory::CreateFromModel(winrt::Windows::AI::MachineLearning::Preview::LearningModelPreview const& model) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::ILearningModelBindingPreviewFactory)->CreateFromModel(*(void**)(&model), &value)); return winrt::Windows::AI::MachineLearning::Preview::LearningModelBindingPreview{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_Preview_ILearningModelDescriptionPreview::Author() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::ILearningModelDescriptionPreview)->get_Author(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_Preview_ILearningModelDescriptionPreview::Name() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::ILearningModelDescriptionPreview)->get_Name(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_Preview_ILearningModelDescriptionPreview::Domain() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::ILearningModelDescriptionPreview)->get_Domain(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_Preview_ILearningModelDescriptionPreview::Description() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::ILearningModelDescriptionPreview)->get_Description(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_Preview_ILearningModelDescriptionPreview::Version() const { int64_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::ILearningModelDescriptionPreview)->get_Version(&value)); return value; } template auto consume_Windows_AI_MachineLearning_Preview_ILearningModelDescriptionPreview::Metadata() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::ILearningModelDescriptionPreview)->get_Metadata(&value)); return winrt::Windows::Foundation::Collections::IMapView{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_Preview_ILearningModelDescriptionPreview::InputFeatures() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::ILearningModelDescriptionPreview)->get_InputFeatures(&value)); return winrt::Windows::Foundation::Collections::IIterable{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_Preview_ILearningModelDescriptionPreview::OutputFeatures() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::ILearningModelDescriptionPreview)->get_OutputFeatures(&value)); return winrt::Windows::Foundation::Collections::IIterable{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_Preview_ILearningModelEvaluationResultPreview::CorrelationId() const { void* correlationId{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::ILearningModelEvaluationResultPreview)->get_CorrelationId(&correlationId)); return hstring{ correlationId, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_Preview_ILearningModelEvaluationResultPreview::Outputs() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::ILearningModelEvaluationResultPreview)->get_Outputs(&value)); return winrt::Windows::Foundation::Collections::IMapView{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_Preview_ILearningModelPreview::EvaluateAsync(winrt::Windows::AI::MachineLearning::Preview::LearningModelBindingPreview const& binding, param::hstring const& correlationId) const { void* evalOperation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::ILearningModelPreview)->EvaluateAsync(*(void**)(&binding), *(void**)(&correlationId), &evalOperation)); return winrt::Windows::Foundation::IAsyncOperation{ evalOperation, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_Preview_ILearningModelPreview::EvaluateFeaturesAsync(param::map const& features, param::hstring const& correlationId) const { void* evalOperation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::ILearningModelPreview)->EvaluateFeaturesAsync(*(void**)(&features), *(void**)(&correlationId), &evalOperation)); return winrt::Windows::Foundation::IAsyncOperation{ evalOperation, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_Preview_ILearningModelPreview::Description() const { void* returnValue{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::ILearningModelPreview)->get_Description(&returnValue)); return winrt::Windows::AI::MachineLearning::Preview::LearningModelDescriptionPreview{ returnValue, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_Preview_ILearningModelPreview::InferencingOptions() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::ILearningModelPreview)->get_InferencingOptions(&value)); return winrt::Windows::AI::MachineLearning::Preview::InferencingOptionsPreview{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_Preview_ILearningModelPreview::InferencingOptions(winrt::Windows::AI::MachineLearning::Preview::InferencingOptionsPreview const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::ILearningModelPreview)->put_InferencingOptions(*(void**)(&value))); } template auto consume_Windows_AI_MachineLearning_Preview_ILearningModelPreviewStatics::LoadModelFromStorageFileAsync(winrt::Windows::Storage::IStorageFile const& modelFile) const { void* modelCreationOperation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::ILearningModelPreviewStatics)->LoadModelFromStorageFileAsync(*(void**)(&modelFile), &modelCreationOperation)); return winrt::Windows::Foundation::IAsyncOperation{ modelCreationOperation, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_Preview_ILearningModelPreviewStatics::LoadModelFromStreamAsync(winrt::Windows::Storage::Streams::IRandomAccessStreamReference const& modelStream) const { void* modelCreationOperation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::ILearningModelPreviewStatics)->LoadModelFromStreamAsync(*(void**)(&modelStream), &modelCreationOperation)); return winrt::Windows::Foundation::IAsyncOperation{ modelCreationOperation, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_Preview_ILearningModelVariableDescriptorPreview::Name() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::ILearningModelVariableDescriptorPreview)->get_Name(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_Preview_ILearningModelVariableDescriptorPreview::Description() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::ILearningModelVariableDescriptorPreview)->get_Description(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_Preview_ILearningModelVariableDescriptorPreview::ModelFeatureKind() const { winrt::Windows::AI::MachineLearning::Preview::LearningModelFeatureKindPreview value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::ILearningModelVariableDescriptorPreview)->get_ModelFeatureKind(reinterpret_cast(&value))); return value; } template auto consume_Windows_AI_MachineLearning_Preview_ILearningModelVariableDescriptorPreview::IsRequired() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::ILearningModelVariableDescriptorPreview)->get_IsRequired(&value)); return value; } template auto consume_Windows_AI_MachineLearning_Preview_IMapVariableDescriptorPreview::KeyKind() const { winrt::Windows::AI::MachineLearning::Preview::FeatureElementKindPreview value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::IMapVariableDescriptorPreview)->get_KeyKind(reinterpret_cast(&value))); return value; } template auto consume_Windows_AI_MachineLearning_Preview_IMapVariableDescriptorPreview::ValidStringKeys() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::IMapVariableDescriptorPreview)->get_ValidStringKeys(&value)); return winrt::Windows::Foundation::Collections::IIterable{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_Preview_IMapVariableDescriptorPreview::ValidIntegerKeys() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::IMapVariableDescriptorPreview)->get_ValidIntegerKeys(&value)); return winrt::Windows::Foundation::Collections::IIterable{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_Preview_IMapVariableDescriptorPreview::Fields() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::IMapVariableDescriptorPreview)->get_Fields(&value)); return winrt::Windows::AI::MachineLearning::Preview::ILearningModelVariableDescriptorPreview{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_Preview_ISequenceVariableDescriptorPreview::ElementType() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::ISequenceVariableDescriptorPreview)->get_ElementType(&value)); return winrt::Windows::AI::MachineLearning::Preview::ILearningModelVariableDescriptorPreview{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_Preview_ITensorVariableDescriptorPreview::DataType() const { winrt::Windows::AI::MachineLearning::Preview::FeatureElementKindPreview value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::ITensorVariableDescriptorPreview)->get_DataType(reinterpret_cast(&value))); return value; } template auto consume_Windows_AI_MachineLearning_Preview_ITensorVariableDescriptorPreview::Shape() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::AI::MachineLearning::Preview::ITensorVariableDescriptorPreview)->get_Shape(&value)); return winrt::Windows::Foundation::Collections::IIterable{ value, take_ownership_from_abi }; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_BitmapPixelFormat(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BitmapPixelFormat()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Width(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Width()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Height(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Height()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_PreferredDeviceKind(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PreferredDeviceKind()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PreferredDeviceKind(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PreferredDeviceKind(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsTracingEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsTracingEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsTracingEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsTracingEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MaxBatchSize(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MaxBatchSize()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_MaxBatchSize(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().MaxBatchSize(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MinimizeMemoryAllocation(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MinimizeMemoryAllocation()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_MinimizeMemoryAllocation(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().MinimizeMemoryAllocation(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ReclaimMemoryAfterEvaluation(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ReclaimMemoryAfterEvaluation()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ReclaimMemoryAfterEvaluation(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ReclaimMemoryAfterEvaluation(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Bind(void* name, void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Bind(*reinterpret_cast(&name), *reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall BindWithProperties(void* name, void* value, void* metadata) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Bind(*reinterpret_cast(&name), *reinterpret_cast(&value), *reinterpret_cast(&metadata)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Clear() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Clear(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateFromModel(void* model, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateFromModel(*reinterpret_cast(&model))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Author(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Author()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Name(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Name()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Domain(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Domain()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Description(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Description()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Version(int64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Version()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Metadata(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Metadata()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_InputFeatures(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().InputFeatures()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_OutputFeatures(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().OutputFeatures()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_CorrelationId(void** correlationId) noexcept final try { clear_abi(correlationId); typename D::abi_guard guard(this->shim()); *correlationId = detach_from(this->shim().CorrelationId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Outputs(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Outputs()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall EvaluateAsync(void* binding, void* correlationId, void** evalOperation) noexcept final try { clear_abi(evalOperation); typename D::abi_guard guard(this->shim()); *evalOperation = detach_from>(this->shim().EvaluateAsync(*reinterpret_cast(&binding), *reinterpret_cast(&correlationId))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall EvaluateFeaturesAsync(void* features, void* correlationId, void** evalOperation) noexcept final try { clear_abi(evalOperation); typename D::abi_guard guard(this->shim()); *evalOperation = detach_from>(this->shim().EvaluateFeaturesAsync(*reinterpret_cast const*>(&features), *reinterpret_cast(&correlationId))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Description(void** returnValue) noexcept final try { clear_abi(returnValue); typename D::abi_guard guard(this->shim()); *returnValue = detach_from(this->shim().Description()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_InferencingOptions(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().InferencingOptions()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_InferencingOptions(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().InferencingOptions(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall LoadModelFromStorageFileAsync(void* modelFile, void** modelCreationOperation) noexcept final try { clear_abi(modelCreationOperation); typename D::abi_guard guard(this->shim()); *modelCreationOperation = detach_from>(this->shim().LoadModelFromStorageFileAsync(*reinterpret_cast(&modelFile))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LoadModelFromStreamAsync(void* modelStream, void** modelCreationOperation) noexcept final try { clear_abi(modelCreationOperation); typename D::abi_guard guard(this->shim()); *modelCreationOperation = detach_from>(this->shim().LoadModelFromStreamAsync(*reinterpret_cast(&modelStream))); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall get_Name(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Name()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Description(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Description()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ModelFeatureKind(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ModelFeatureKind()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsRequired(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsRequired()); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_KeyKind(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().KeyKind()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ValidStringKeys(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ValidStringKeys()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ValidIntegerKeys(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ValidIntegerKeys()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Fields(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Fields()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ElementType(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ElementType()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_DataType(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DataType()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Shape(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Shape()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::AI::MachineLearning::Preview { inline LearningModelBindingPreview::LearningModelBindingPreview(winrt::Windows::AI::MachineLearning::Preview::LearningModelPreview const& model) : LearningModelBindingPreview(impl::call_factory([&](ILearningModelBindingPreviewFactory const& f) { return f.CreateFromModel(model); })) { } inline auto LearningModelPreview::LoadModelFromStorageFileAsync(winrt::Windows::Storage::IStorageFile const& modelFile) { return impl::call_factory([&](ILearningModelPreviewStatics const& f) { return f.LoadModelFromStorageFileAsync(modelFile); }); } inline auto LearningModelPreview::LoadModelFromStreamAsync(winrt::Windows::Storage::Streams::IRandomAccessStreamReference const& modelStream) { return impl::call_factory([&](ILearningModelPreviewStatics const& f) { return f.LoadModelFromStreamAsync(modelStream); }); } } namespace std { #ifndef WINRT_LEAN_AND_MEAN template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; #endif #ifdef __cpp_lib_format #endif } #endif