// C++/WinRT v2.0.250303.1 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #ifndef WINRT_Windows_AI_MachineLearning_H #define WINRT_Windows_AI_MachineLearning_H #include "winrt/base.h" static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.250303.1"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.250303.1" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.Graphics.2.h" #include "winrt/impl/Windows.Graphics.DirectX.Direct3D11.2.h" #include "winrt/impl/Windows.Graphics.Imaging.2.h" #include "winrt/impl/Windows.Media.2.h" #include "winrt/impl/Windows.Storage.2.h" #include "winrt/impl/Windows.Storage.Streams.2.h" #include "winrt/impl/Windows.AI.MachineLearning.2.h" namespace winrt::impl { template auto consume_Windows_AI_MachineLearning_IImageFeatureDescriptor::BitmapPixelFormat() const { winrt::Windows::Graphics::Imaging::BitmapPixelFormat value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_BitmapPixelFormat(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_BitmapPixelFormat(reinterpret_cast(&value))); } return value; } template auto consume_Windows_AI_MachineLearning_IImageFeatureDescriptor::BitmapAlphaMode() const { winrt::Windows::Graphics::Imaging::BitmapAlphaMode value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_BitmapAlphaMode(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_BitmapAlphaMode(reinterpret_cast(&value))); } return value; } template auto consume_Windows_AI_MachineLearning_IImageFeatureDescriptor::Width() const { uint32_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Width(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Width(&value)); } return value; } template auto consume_Windows_AI_MachineLearning_IImageFeatureDescriptor::Height() const { uint32_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Height(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Height(&value)); } return value; } template auto consume_Windows_AI_MachineLearning_IImageFeatureDescriptor2::PixelRange() const { winrt::Windows::AI::MachineLearning::LearningModelPixelRange value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PixelRange(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PixelRange(reinterpret_cast(&value))); } return value; } template auto consume_Windows_AI_MachineLearning_IImageFeatureValue::VideoFrame() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_VideoFrame(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_VideoFrame(&value)); } return winrt::Windows::Media::VideoFrame{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_IImageFeatureValueStatics::CreateFromVideoFrame(winrt::Windows::Media::VideoFrame const& image) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromVideoFrame(*(void**)(&image), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromVideoFrame(*(void**)(&image), &result)); } return winrt::Windows::AI::MachineLearning::ImageFeatureValue{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ILearningModel::Author() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Author(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Author(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ILearningModel::Name() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Name(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Name(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ILearningModel::Domain() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Domain(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Domain(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ILearningModel::Description() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Description(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Description(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ILearningModel::Version() const { int64_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Version(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Version(&value)); } return value; } template auto consume_Windows_AI_MachineLearning_ILearningModel::Metadata() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Metadata(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Metadata(&value)); } return winrt::Windows::Foundation::Collections::IMapView{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ILearningModel::InputFeatures() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_InputFeatures(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_InputFeatures(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ILearningModel::OutputFeatures() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_OutputFeatures(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_OutputFeatures(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ILearningModelBinding::Bind(param::hstring const& name, winrt::Windows::Foundation::IInspectable const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Bind(*(void**)(&name), *(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Bind(*(void**)(&name), *(void**)(&value))); } } template auto consume_Windows_AI_MachineLearning_ILearningModelBinding::Bind(param::hstring const& name, winrt::Windows::Foundation::IInspectable const& value, winrt::Windows::Foundation::Collections::IPropertySet const& props) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->BindWithProperties(*(void**)(&name), *(void**)(&value), *(void**)(&props))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->BindWithProperties(*(void**)(&name), *(void**)(&value), *(void**)(&props))); } } template auto consume_Windows_AI_MachineLearning_ILearningModelBinding::Clear() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Clear()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Clear()); } } template auto consume_Windows_AI_MachineLearning_ILearningModelBindingFactory::CreateFromSession(winrt::Windows::AI::MachineLearning::LearningModelSession const& session) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromSession(*(void**)(&session), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromSession(*(void**)(&session), &value)); } return winrt::Windows::AI::MachineLearning::LearningModelBinding{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ILearningModelDevice::AdapterId() const { winrt::Windows::Graphics::DisplayAdapterId value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AdapterId(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AdapterId(put_abi(value))); } return value; } template auto consume_Windows_AI_MachineLearning_ILearningModelDevice::Direct3D11Device() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Direct3D11Device(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Direct3D11Device(&value)); } return winrt::Windows::Graphics::DirectX::Direct3D11::IDirect3DDevice{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ILearningModelDeviceFactory::Create(winrt::Windows::AI::MachineLearning::LearningModelDeviceKind const& deviceKind) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create(static_cast(deviceKind), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create(static_cast(deviceKind), &value)); } return winrt::Windows::AI::MachineLearning::LearningModelDevice{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ILearningModelDeviceStatics::CreateFromDirect3D11Device(winrt::Windows::Graphics::DirectX::Direct3D11::IDirect3DDevice const& device) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromDirect3D11Device(*(void**)(&device), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromDirect3D11Device(*(void**)(&device), &result)); } return winrt::Windows::AI::MachineLearning::LearningModelDevice{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ILearningModelEvaluationResult::CorrelationId() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CorrelationId(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CorrelationId(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ILearningModelEvaluationResult::ErrorStatus() const { int32_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ErrorStatus(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ErrorStatus(&value)); } return value; } template auto consume_Windows_AI_MachineLearning_ILearningModelEvaluationResult::Succeeded() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Succeeded(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Succeeded(&value)); } return value; } template auto consume_Windows_AI_MachineLearning_ILearningModelEvaluationResult::Outputs() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Outputs(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Outputs(&value)); } return winrt::Windows::Foundation::Collections::IMapView{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ILearningModelFeatureDescriptor::Name() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Name(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Name(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ILearningModelFeatureDescriptor::Description() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Description(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Description(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ILearningModelFeatureDescriptor::Kind() const { winrt::Windows::AI::MachineLearning::LearningModelFeatureKind value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Kind(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Kind(reinterpret_cast(&value))); } return value; } template auto consume_Windows_AI_MachineLearning_ILearningModelFeatureDescriptor::IsRequired() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsRequired(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsRequired(&value)); } return value; } template auto consume_Windows_AI_MachineLearning_ILearningModelFeatureValue::Kind() const { winrt::Windows::AI::MachineLearning::LearningModelFeatureKind value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Kind(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Kind(reinterpret_cast(&value))); } return value; } template auto consume_Windows_AI_MachineLearning_ILearningModelSession::Model() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Model(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Model(&value)); } return winrt::Windows::AI::MachineLearning::LearningModel{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ILearningModelSession::Device() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Device(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Device(&value)); } return winrt::Windows::AI::MachineLearning::LearningModelDevice{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ILearningModelSession::EvaluationProperties() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_EvaluationProperties(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_EvaluationProperties(&value)); } return winrt::Windows::Foundation::Collections::IPropertySet{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ILearningModelSession::EvaluateAsync(winrt::Windows::AI::MachineLearning::LearningModelBinding const& bindings, param::hstring const& correlationId) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->EvaluateAsync(*(void**)(&bindings), *(void**)(&correlationId), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->EvaluateAsync(*(void**)(&bindings), *(void**)(&correlationId), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ILearningModelSession::EvaluateFeaturesAsync(param::map const& features, param::hstring const& correlationId) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->EvaluateFeaturesAsync(*(void**)(&features), *(void**)(&correlationId), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->EvaluateFeaturesAsync(*(void**)(&features), *(void**)(&correlationId), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ILearningModelSession::Evaluate(winrt::Windows::AI::MachineLearning::LearningModelBinding const& bindings, param::hstring const& correlationId) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Evaluate(*(void**)(&bindings), *(void**)(&correlationId), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Evaluate(*(void**)(&bindings), *(void**)(&correlationId), &result)); } return winrt::Windows::AI::MachineLearning::LearningModelEvaluationResult{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ILearningModelSession::EvaluateFeatures(param::map const& features, param::hstring const& correlationId) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->EvaluateFeatures(*(void**)(&features), *(void**)(&correlationId), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->EvaluateFeatures(*(void**)(&features), *(void**)(&correlationId), &result)); } return winrt::Windows::AI::MachineLearning::LearningModelEvaluationResult{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ILearningModelSessionFactory::CreateFromModel(winrt::Windows::AI::MachineLearning::LearningModel const& model) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromModel(*(void**)(&model), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromModel(*(void**)(&model), &value)); } return winrt::Windows::AI::MachineLearning::LearningModelSession{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ILearningModelSessionFactory::CreateFromModelOnDevice(winrt::Windows::AI::MachineLearning::LearningModel const& model, winrt::Windows::AI::MachineLearning::LearningModelDevice const& deviceToRunOn) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromModelOnDevice(*(void**)(&model), *(void**)(&deviceToRunOn), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromModelOnDevice(*(void**)(&model), *(void**)(&deviceToRunOn), &value)); } return winrt::Windows::AI::MachineLearning::LearningModelSession{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ILearningModelSessionFactory2::CreateFromModelOnDeviceWithSessionOptions(winrt::Windows::AI::MachineLearning::LearningModel const& model, winrt::Windows::AI::MachineLearning::LearningModelDevice const& deviceToRunOn, winrt::Windows::AI::MachineLearning::LearningModelSessionOptions const& learningModelSessionOptions) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromModelOnDeviceWithSessionOptions(*(void**)(&model), *(void**)(&deviceToRunOn), *(void**)(&learningModelSessionOptions), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromModelOnDeviceWithSessionOptions(*(void**)(&model), *(void**)(&deviceToRunOn), *(void**)(&learningModelSessionOptions), &value)); } return winrt::Windows::AI::MachineLearning::LearningModelSession{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ILearningModelSessionOptions::BatchSizeOverride() const { uint32_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_BatchSizeOverride(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_BatchSizeOverride(&value)); } return value; } template auto consume_Windows_AI_MachineLearning_ILearningModelSessionOptions::BatchSizeOverride(uint32_t value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_BatchSizeOverride(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_BatchSizeOverride(value)); } } template auto consume_Windows_AI_MachineLearning_ILearningModelSessionOptions2::CloseModelOnSessionCreation() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CloseModelOnSessionCreation(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CloseModelOnSessionCreation(&value)); } return value; } template auto consume_Windows_AI_MachineLearning_ILearningModelSessionOptions2::CloseModelOnSessionCreation(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_CloseModelOnSessionCreation(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_CloseModelOnSessionCreation(value)); } } template auto consume_Windows_AI_MachineLearning_ILearningModelSessionOptions3::OverrideNamedDimension(param::hstring const& name, uint32_t dimension) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->OverrideNamedDimension(*(void**)(&name), dimension)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->OverrideNamedDimension(*(void**)(&name), dimension)); } } template auto consume_Windows_AI_MachineLearning_ILearningModelStatics::LoadFromStorageFileAsync(winrt::Windows::Storage::IStorageFile const& modelFile) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->LoadFromStorageFileAsync(*(void**)(&modelFile), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LoadFromStorageFileAsync(*(void**)(&modelFile), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ILearningModelStatics::LoadFromStreamAsync(winrt::Windows::Storage::Streams::IRandomAccessStreamReference const& modelStream) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->LoadFromStreamAsync(*(void**)(&modelStream), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LoadFromStreamAsync(*(void**)(&modelStream), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ILearningModelStatics::LoadFromFilePath(param::hstring const& filePath) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->LoadFromFilePath(*(void**)(&filePath), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LoadFromFilePath(*(void**)(&filePath), &result)); } return winrt::Windows::AI::MachineLearning::LearningModel{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ILearningModelStatics::LoadFromStream(winrt::Windows::Storage::Streams::IRandomAccessStreamReference const& modelStream) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->LoadFromStream(*(void**)(&modelStream), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LoadFromStream(*(void**)(&modelStream), &result)); } return winrt::Windows::AI::MachineLearning::LearningModel{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ILearningModelStatics::LoadFromStorageFileAsync(winrt::Windows::Storage::IStorageFile const& modelFile, winrt::Windows::AI::MachineLearning::ILearningModelOperatorProvider const& operatorProvider) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->LoadFromStorageFileWithOperatorProviderAsync(*(void**)(&modelFile), *(void**)(&operatorProvider), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LoadFromStorageFileWithOperatorProviderAsync(*(void**)(&modelFile), *(void**)(&operatorProvider), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ILearningModelStatics::LoadFromStreamAsync(winrt::Windows::Storage::Streams::IRandomAccessStreamReference const& modelStream, winrt::Windows::AI::MachineLearning::ILearningModelOperatorProvider const& operatorProvider) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->LoadFromStreamWithOperatorProviderAsync(*(void**)(&modelStream), *(void**)(&operatorProvider), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LoadFromStreamWithOperatorProviderAsync(*(void**)(&modelStream), *(void**)(&operatorProvider), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ILearningModelStatics::LoadFromFilePath(param::hstring const& filePath, winrt::Windows::AI::MachineLearning::ILearningModelOperatorProvider const& operatorProvider) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->LoadFromFilePathWithOperatorProvider(*(void**)(&filePath), *(void**)(&operatorProvider), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LoadFromFilePathWithOperatorProvider(*(void**)(&filePath), *(void**)(&operatorProvider), &result)); } return winrt::Windows::AI::MachineLearning::LearningModel{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ILearningModelStatics::LoadFromStream(winrt::Windows::Storage::Streams::IRandomAccessStreamReference const& modelStream, winrt::Windows::AI::MachineLearning::ILearningModelOperatorProvider const& operatorProvider) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->LoadFromStreamWithOperatorProvider(*(void**)(&modelStream), *(void**)(&operatorProvider), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LoadFromStreamWithOperatorProvider(*(void**)(&modelStream), *(void**)(&operatorProvider), &result)); } return winrt::Windows::AI::MachineLearning::LearningModel{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_IMapFeatureDescriptor::KeyKind() const { winrt::Windows::AI::MachineLearning::TensorKind value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_KeyKind(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_KeyKind(reinterpret_cast(&value))); } return value; } template auto consume_Windows_AI_MachineLearning_IMapFeatureDescriptor::ValueDescriptor() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ValueDescriptor(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ValueDescriptor(&value)); } return winrt::Windows::AI::MachineLearning::ILearningModelFeatureDescriptor{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ISequenceFeatureDescriptor::ElementDescriptor() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ElementDescriptor(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ElementDescriptor(&value)); } return winrt::Windows::AI::MachineLearning::ILearningModelFeatureDescriptor{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensor::TensorKind() const { winrt::Windows::AI::MachineLearning::TensorKind value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_TensorKind(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TensorKind(reinterpret_cast(&value))); } return value; } template auto consume_Windows_AI_MachineLearning_ITensor::Shape() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Shape(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Shape(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorBoolean::GetAsVectorView() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetAsVectorView(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetAsVectorView(&result)); } return winrt::Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorBooleanStatics::Create() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create(&result)); } return winrt::Windows::AI::MachineLearning::TensorBoolean{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorBooleanStatics::Create(param::iterable const& shape) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create2(*(void**)(&shape), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create2(*(void**)(&shape), &result)); } return winrt::Windows::AI::MachineLearning::TensorBoolean{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorBooleanStatics::CreateFromArray(param::iterable const& shape, array_view data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromArray(*(void**)(&shape), data.size(), get_abi(data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromArray(*(void**)(&shape), data.size(), get_abi(data), &result)); } return winrt::Windows::AI::MachineLearning::TensorBoolean{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorBooleanStatics::CreateFromIterable(param::iterable const& shape, param::iterable const& data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromIterable(*(void**)(&shape), *(void**)(&data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromIterable(*(void**)(&shape), *(void**)(&data), &result)); } return winrt::Windows::AI::MachineLearning::TensorBoolean{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorBooleanStatics2::CreateFromShapeArrayAndDataArray(array_view shape, array_view data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromShapeArrayAndDataArray(shape.size(), get_abi(shape), data.size(), get_abi(data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromShapeArrayAndDataArray(shape.size(), get_abi(shape), data.size(), get_abi(data), &result)); } return winrt::Windows::AI::MachineLearning::TensorBoolean{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorBooleanStatics2::CreateFromBuffer(array_view shape, winrt::Windows::Storage::Streams::IBuffer const& buffer) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromBuffer(shape.size(), get_abi(shape), *(void**)(&buffer), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromBuffer(shape.size(), get_abi(shape), *(void**)(&buffer), &result)); } return winrt::Windows::AI::MachineLearning::TensorBoolean{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorDouble::GetAsVectorView() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetAsVectorView(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetAsVectorView(&result)); } return winrt::Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorDoubleStatics::Create() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create(&result)); } return winrt::Windows::AI::MachineLearning::TensorDouble{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorDoubleStatics::Create(param::iterable const& shape) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create2(*(void**)(&shape), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create2(*(void**)(&shape), &result)); } return winrt::Windows::AI::MachineLearning::TensorDouble{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorDoubleStatics::CreateFromArray(param::iterable const& shape, array_view data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromArray(*(void**)(&shape), data.size(), get_abi(data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromArray(*(void**)(&shape), data.size(), get_abi(data), &result)); } return winrt::Windows::AI::MachineLearning::TensorDouble{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorDoubleStatics::CreateFromIterable(param::iterable const& shape, param::iterable const& data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromIterable(*(void**)(&shape), *(void**)(&data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromIterable(*(void**)(&shape), *(void**)(&data), &result)); } return winrt::Windows::AI::MachineLearning::TensorDouble{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorDoubleStatics2::CreateFromShapeArrayAndDataArray(array_view shape, array_view data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromShapeArrayAndDataArray(shape.size(), get_abi(shape), data.size(), get_abi(data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromShapeArrayAndDataArray(shape.size(), get_abi(shape), data.size(), get_abi(data), &result)); } return winrt::Windows::AI::MachineLearning::TensorDouble{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorDoubleStatics2::CreateFromBuffer(array_view shape, winrt::Windows::Storage::Streams::IBuffer const& buffer) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromBuffer(shape.size(), get_abi(shape), *(void**)(&buffer), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromBuffer(shape.size(), get_abi(shape), *(void**)(&buffer), &result)); } return winrt::Windows::AI::MachineLearning::TensorDouble{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorFeatureDescriptor::TensorKind() const { winrt::Windows::AI::MachineLearning::TensorKind value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_TensorKind(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TensorKind(reinterpret_cast(&value))); } return value; } template auto consume_Windows_AI_MachineLearning_ITensorFeatureDescriptor::Shape() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Shape(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Shape(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorFloat::GetAsVectorView() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetAsVectorView(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetAsVectorView(&result)); } return winrt::Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorFloat16Bit::GetAsVectorView() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetAsVectorView(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetAsVectorView(&result)); } return winrt::Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorFloat16BitStatics::Create() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create(&result)); } return winrt::Windows::AI::MachineLearning::TensorFloat16Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorFloat16BitStatics::Create(param::iterable const& shape) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create2(*(void**)(&shape), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create2(*(void**)(&shape), &result)); } return winrt::Windows::AI::MachineLearning::TensorFloat16Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorFloat16BitStatics::CreateFromArray(param::iterable const& shape, array_view data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromArray(*(void**)(&shape), data.size(), get_abi(data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromArray(*(void**)(&shape), data.size(), get_abi(data), &result)); } return winrt::Windows::AI::MachineLearning::TensorFloat16Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorFloat16BitStatics::CreateFromIterable(param::iterable const& shape, param::iterable const& data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromIterable(*(void**)(&shape), *(void**)(&data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromIterable(*(void**)(&shape), *(void**)(&data), &result)); } return winrt::Windows::AI::MachineLearning::TensorFloat16Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorFloat16BitStatics2::CreateFromShapeArrayAndDataArray(array_view shape, array_view data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromShapeArrayAndDataArray(shape.size(), get_abi(shape), data.size(), get_abi(data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromShapeArrayAndDataArray(shape.size(), get_abi(shape), data.size(), get_abi(data), &result)); } return winrt::Windows::AI::MachineLearning::TensorFloat16Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorFloat16BitStatics2::CreateFromBuffer(array_view shape, winrt::Windows::Storage::Streams::IBuffer const& buffer) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromBuffer(shape.size(), get_abi(shape), *(void**)(&buffer), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromBuffer(shape.size(), get_abi(shape), *(void**)(&buffer), &result)); } return winrt::Windows::AI::MachineLearning::TensorFloat16Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorFloatStatics::Create() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create(&result)); } return winrt::Windows::AI::MachineLearning::TensorFloat{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorFloatStatics::Create(param::iterable const& shape) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create2(*(void**)(&shape), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create2(*(void**)(&shape), &result)); } return winrt::Windows::AI::MachineLearning::TensorFloat{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorFloatStatics::CreateFromArray(param::iterable const& shape, array_view data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromArray(*(void**)(&shape), data.size(), get_abi(data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromArray(*(void**)(&shape), data.size(), get_abi(data), &result)); } return winrt::Windows::AI::MachineLearning::TensorFloat{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorFloatStatics::CreateFromIterable(param::iterable const& shape, param::iterable const& data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromIterable(*(void**)(&shape), *(void**)(&data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromIterable(*(void**)(&shape), *(void**)(&data), &result)); } return winrt::Windows::AI::MachineLearning::TensorFloat{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorFloatStatics2::CreateFromShapeArrayAndDataArray(array_view shape, array_view data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromShapeArrayAndDataArray(shape.size(), get_abi(shape), data.size(), get_abi(data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromShapeArrayAndDataArray(shape.size(), get_abi(shape), data.size(), get_abi(data), &result)); } return winrt::Windows::AI::MachineLearning::TensorFloat{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorFloatStatics2::CreateFromBuffer(array_view shape, winrt::Windows::Storage::Streams::IBuffer const& buffer) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromBuffer(shape.size(), get_abi(shape), *(void**)(&buffer), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromBuffer(shape.size(), get_abi(shape), *(void**)(&buffer), &result)); } return winrt::Windows::AI::MachineLearning::TensorFloat{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorInt16Bit::GetAsVectorView() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetAsVectorView(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetAsVectorView(&result)); } return winrt::Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorInt16BitStatics::Create() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create(&result)); } return winrt::Windows::AI::MachineLearning::TensorInt16Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorInt16BitStatics::Create(param::iterable const& shape) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create2(*(void**)(&shape), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create2(*(void**)(&shape), &result)); } return winrt::Windows::AI::MachineLearning::TensorInt16Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorInt16BitStatics::CreateFromArray(param::iterable const& shape, array_view data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromArray(*(void**)(&shape), data.size(), get_abi(data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromArray(*(void**)(&shape), data.size(), get_abi(data), &result)); } return winrt::Windows::AI::MachineLearning::TensorInt16Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorInt16BitStatics::CreateFromIterable(param::iterable const& shape, param::iterable const& data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromIterable(*(void**)(&shape), *(void**)(&data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromIterable(*(void**)(&shape), *(void**)(&data), &result)); } return winrt::Windows::AI::MachineLearning::TensorInt16Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorInt16BitStatics2::CreateFromShapeArrayAndDataArray(array_view shape, array_view data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromShapeArrayAndDataArray(shape.size(), get_abi(shape), data.size(), get_abi(data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromShapeArrayAndDataArray(shape.size(), get_abi(shape), data.size(), get_abi(data), &result)); } return winrt::Windows::AI::MachineLearning::TensorInt16Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorInt16BitStatics2::CreateFromBuffer(array_view shape, winrt::Windows::Storage::Streams::IBuffer const& buffer) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromBuffer(shape.size(), get_abi(shape), *(void**)(&buffer), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromBuffer(shape.size(), get_abi(shape), *(void**)(&buffer), &result)); } return winrt::Windows::AI::MachineLearning::TensorInt16Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorInt32Bit::GetAsVectorView() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetAsVectorView(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetAsVectorView(&result)); } return winrt::Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorInt32BitStatics::Create() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create(&result)); } return winrt::Windows::AI::MachineLearning::TensorInt32Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorInt32BitStatics::Create(param::iterable const& shape) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create2(*(void**)(&shape), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create2(*(void**)(&shape), &result)); } return winrt::Windows::AI::MachineLearning::TensorInt32Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorInt32BitStatics::CreateFromArray(param::iterable const& shape, array_view data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromArray(*(void**)(&shape), data.size(), get_abi(data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromArray(*(void**)(&shape), data.size(), get_abi(data), &result)); } return winrt::Windows::AI::MachineLearning::TensorInt32Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorInt32BitStatics::CreateFromIterable(param::iterable const& shape, param::iterable const& data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromIterable(*(void**)(&shape), *(void**)(&data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromIterable(*(void**)(&shape), *(void**)(&data), &result)); } return winrt::Windows::AI::MachineLearning::TensorInt32Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorInt32BitStatics2::CreateFromShapeArrayAndDataArray(array_view shape, array_view data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromShapeArrayAndDataArray(shape.size(), get_abi(shape), data.size(), get_abi(data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromShapeArrayAndDataArray(shape.size(), get_abi(shape), data.size(), get_abi(data), &result)); } return winrt::Windows::AI::MachineLearning::TensorInt32Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorInt32BitStatics2::CreateFromBuffer(array_view shape, winrt::Windows::Storage::Streams::IBuffer const& buffer) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromBuffer(shape.size(), get_abi(shape), *(void**)(&buffer), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromBuffer(shape.size(), get_abi(shape), *(void**)(&buffer), &result)); } return winrt::Windows::AI::MachineLearning::TensorInt32Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorInt64Bit::GetAsVectorView() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetAsVectorView(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetAsVectorView(&result)); } return winrt::Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorInt64BitStatics::Create() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create(&result)); } return winrt::Windows::AI::MachineLearning::TensorInt64Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorInt64BitStatics::Create(param::iterable const& shape) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create2(*(void**)(&shape), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create2(*(void**)(&shape), &result)); } return winrt::Windows::AI::MachineLearning::TensorInt64Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorInt64BitStatics::CreateFromArray(param::iterable const& shape, array_view data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromArray(*(void**)(&shape), data.size(), get_abi(data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromArray(*(void**)(&shape), data.size(), get_abi(data), &result)); } return winrt::Windows::AI::MachineLearning::TensorInt64Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorInt64BitStatics::CreateFromIterable(param::iterable const& shape, param::iterable const& data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromIterable(*(void**)(&shape), *(void**)(&data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromIterable(*(void**)(&shape), *(void**)(&data), &result)); } return winrt::Windows::AI::MachineLearning::TensorInt64Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorInt64BitStatics2::CreateFromShapeArrayAndDataArray(array_view shape, array_view data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromShapeArrayAndDataArray(shape.size(), get_abi(shape), data.size(), get_abi(data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromShapeArrayAndDataArray(shape.size(), get_abi(shape), data.size(), get_abi(data), &result)); } return winrt::Windows::AI::MachineLearning::TensorInt64Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorInt64BitStatics2::CreateFromBuffer(array_view shape, winrt::Windows::Storage::Streams::IBuffer const& buffer) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromBuffer(shape.size(), get_abi(shape), *(void**)(&buffer), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromBuffer(shape.size(), get_abi(shape), *(void**)(&buffer), &result)); } return winrt::Windows::AI::MachineLearning::TensorInt64Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorInt8Bit::GetAsVectorView() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetAsVectorView(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetAsVectorView(&result)); } return winrt::Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorInt8BitStatics::Create() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create(&result)); } return winrt::Windows::AI::MachineLearning::TensorInt8Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorInt8BitStatics::Create(param::iterable const& shape) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create2(*(void**)(&shape), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create2(*(void**)(&shape), &result)); } return winrt::Windows::AI::MachineLearning::TensorInt8Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorInt8BitStatics::CreateFromArray(param::iterable const& shape, array_view data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromArray(*(void**)(&shape), data.size(), get_abi(data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromArray(*(void**)(&shape), data.size(), get_abi(data), &result)); } return winrt::Windows::AI::MachineLearning::TensorInt8Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorInt8BitStatics::CreateFromIterable(param::iterable const& shape, param::iterable const& data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromIterable(*(void**)(&shape), *(void**)(&data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromIterable(*(void**)(&shape), *(void**)(&data), &result)); } return winrt::Windows::AI::MachineLearning::TensorInt8Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorInt8BitStatics2::CreateFromShapeArrayAndDataArray(array_view shape, array_view data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromShapeArrayAndDataArray(shape.size(), get_abi(shape), data.size(), get_abi(data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromShapeArrayAndDataArray(shape.size(), get_abi(shape), data.size(), get_abi(data), &result)); } return winrt::Windows::AI::MachineLearning::TensorInt8Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorInt8BitStatics2::CreateFromBuffer(array_view shape, winrt::Windows::Storage::Streams::IBuffer const& buffer) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromBuffer(shape.size(), get_abi(shape), *(void**)(&buffer), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromBuffer(shape.size(), get_abi(shape), *(void**)(&buffer), &result)); } return winrt::Windows::AI::MachineLearning::TensorInt8Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorString::GetAsVectorView() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetAsVectorView(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetAsVectorView(&result)); } return winrt::Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorStringStatics::Create() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create(&result)); } return winrt::Windows::AI::MachineLearning::TensorString{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorStringStatics::Create(param::iterable const& shape) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create2(*(void**)(&shape), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create2(*(void**)(&shape), &result)); } return winrt::Windows::AI::MachineLearning::TensorString{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorStringStatics::CreateFromArray(param::iterable const& shape, array_view data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromArray(*(void**)(&shape), data.size(), get_abi(data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromArray(*(void**)(&shape), data.size(), get_abi(data), &result)); } return winrt::Windows::AI::MachineLearning::TensorString{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorStringStatics::CreateFromIterable(param::iterable const& shape, param::iterable const& data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromIterable(*(void**)(&shape), *(void**)(&data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromIterable(*(void**)(&shape), *(void**)(&data), &result)); } return winrt::Windows::AI::MachineLearning::TensorString{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorStringStatics2::CreateFromShapeArrayAndDataArray(array_view shape, array_view data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromShapeArrayAndDataArray(shape.size(), get_abi(shape), data.size(), get_abi(data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromShapeArrayAndDataArray(shape.size(), get_abi(shape), data.size(), get_abi(data), &result)); } return winrt::Windows::AI::MachineLearning::TensorString{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorUInt16Bit::GetAsVectorView() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetAsVectorView(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetAsVectorView(&result)); } return winrt::Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorUInt16BitStatics::Create() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create(&result)); } return winrt::Windows::AI::MachineLearning::TensorUInt16Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorUInt16BitStatics::Create(param::iterable const& shape) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create2(*(void**)(&shape), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create2(*(void**)(&shape), &result)); } return winrt::Windows::AI::MachineLearning::TensorUInt16Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorUInt16BitStatics::CreateFromArray(param::iterable const& shape, array_view data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromArray(*(void**)(&shape), data.size(), get_abi(data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromArray(*(void**)(&shape), data.size(), get_abi(data), &result)); } return winrt::Windows::AI::MachineLearning::TensorUInt16Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorUInt16BitStatics::CreateFromIterable(param::iterable const& shape, param::iterable const& data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromIterable(*(void**)(&shape), *(void**)(&data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromIterable(*(void**)(&shape), *(void**)(&data), &result)); } return winrt::Windows::AI::MachineLearning::TensorUInt16Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorUInt16BitStatics2::CreateFromShapeArrayAndDataArray(array_view shape, array_view data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromShapeArrayAndDataArray(shape.size(), get_abi(shape), data.size(), get_abi(data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromShapeArrayAndDataArray(shape.size(), get_abi(shape), data.size(), get_abi(data), &result)); } return winrt::Windows::AI::MachineLearning::TensorUInt16Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorUInt16BitStatics2::CreateFromBuffer(array_view shape, winrt::Windows::Storage::Streams::IBuffer const& buffer) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromBuffer(shape.size(), get_abi(shape), *(void**)(&buffer), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromBuffer(shape.size(), get_abi(shape), *(void**)(&buffer), &result)); } return winrt::Windows::AI::MachineLearning::TensorUInt16Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorUInt32Bit::GetAsVectorView() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetAsVectorView(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetAsVectorView(&result)); } return winrt::Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorUInt32BitStatics::Create() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create(&result)); } return winrt::Windows::AI::MachineLearning::TensorUInt32Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorUInt32BitStatics::Create(param::iterable const& shape) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create2(*(void**)(&shape), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create2(*(void**)(&shape), &result)); } return winrt::Windows::AI::MachineLearning::TensorUInt32Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorUInt32BitStatics::CreateFromArray(param::iterable const& shape, array_view data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromArray(*(void**)(&shape), data.size(), get_abi(data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromArray(*(void**)(&shape), data.size(), get_abi(data), &result)); } return winrt::Windows::AI::MachineLearning::TensorUInt32Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorUInt32BitStatics::CreateFromIterable(param::iterable const& shape, param::iterable const& data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromIterable(*(void**)(&shape), *(void**)(&data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromIterable(*(void**)(&shape), *(void**)(&data), &result)); } return winrt::Windows::AI::MachineLearning::TensorUInt32Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorUInt32BitStatics2::CreateFromShapeArrayAndDataArray(array_view shape, array_view data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromShapeArrayAndDataArray(shape.size(), get_abi(shape), data.size(), get_abi(data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromShapeArrayAndDataArray(shape.size(), get_abi(shape), data.size(), get_abi(data), &result)); } return winrt::Windows::AI::MachineLearning::TensorUInt32Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorUInt32BitStatics2::CreateFromBuffer(array_view shape, winrt::Windows::Storage::Streams::IBuffer const& buffer) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromBuffer(shape.size(), get_abi(shape), *(void**)(&buffer), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromBuffer(shape.size(), get_abi(shape), *(void**)(&buffer), &result)); } return winrt::Windows::AI::MachineLearning::TensorUInt32Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorUInt64Bit::GetAsVectorView() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetAsVectorView(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetAsVectorView(&result)); } return winrt::Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorUInt64BitStatics::Create() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create(&result)); } return winrt::Windows::AI::MachineLearning::TensorUInt64Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorUInt64BitStatics::Create(param::iterable const& shape) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create2(*(void**)(&shape), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create2(*(void**)(&shape), &result)); } return winrt::Windows::AI::MachineLearning::TensorUInt64Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorUInt64BitStatics::CreateFromArray(param::iterable const& shape, array_view data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromArray(*(void**)(&shape), data.size(), get_abi(data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromArray(*(void**)(&shape), data.size(), get_abi(data), &result)); } return winrt::Windows::AI::MachineLearning::TensorUInt64Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorUInt64BitStatics::CreateFromIterable(param::iterable const& shape, param::iterable const& data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromIterable(*(void**)(&shape), *(void**)(&data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromIterable(*(void**)(&shape), *(void**)(&data), &result)); } return winrt::Windows::AI::MachineLearning::TensorUInt64Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorUInt64BitStatics2::CreateFromShapeArrayAndDataArray(array_view shape, array_view data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromShapeArrayAndDataArray(shape.size(), get_abi(shape), data.size(), get_abi(data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromShapeArrayAndDataArray(shape.size(), get_abi(shape), data.size(), get_abi(data), &result)); } return winrt::Windows::AI::MachineLearning::TensorUInt64Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorUInt64BitStatics2::CreateFromBuffer(array_view shape, winrt::Windows::Storage::Streams::IBuffer const& buffer) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromBuffer(shape.size(), get_abi(shape), *(void**)(&buffer), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromBuffer(shape.size(), get_abi(shape), *(void**)(&buffer), &result)); } return winrt::Windows::AI::MachineLearning::TensorUInt64Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorUInt8Bit::GetAsVectorView() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetAsVectorView(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetAsVectorView(&result)); } return winrt::Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorUInt8BitStatics::Create() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create(&result)); } return winrt::Windows::AI::MachineLearning::TensorUInt8Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorUInt8BitStatics::Create(param::iterable const& shape) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create2(*(void**)(&shape), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create2(*(void**)(&shape), &result)); } return winrt::Windows::AI::MachineLearning::TensorUInt8Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorUInt8BitStatics::CreateFromArray(param::iterable const& shape, array_view data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromArray(*(void**)(&shape), data.size(), get_abi(data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromArray(*(void**)(&shape), data.size(), get_abi(data), &result)); } return winrt::Windows::AI::MachineLearning::TensorUInt8Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorUInt8BitStatics::CreateFromIterable(param::iterable const& shape, param::iterable const& data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromIterable(*(void**)(&shape), *(void**)(&data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromIterable(*(void**)(&shape), *(void**)(&data), &result)); } return winrt::Windows::AI::MachineLearning::TensorUInt8Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorUInt8BitStatics2::CreateFromShapeArrayAndDataArray(array_view shape, array_view data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromShapeArrayAndDataArray(shape.size(), get_abi(shape), data.size(), get_abi(data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromShapeArrayAndDataArray(shape.size(), get_abi(shape), data.size(), get_abi(data), &result)); } return winrt::Windows::AI::MachineLearning::TensorUInt8Bit{ result, take_ownership_from_abi }; } template auto consume_Windows_AI_MachineLearning_ITensorUInt8BitStatics2::CreateFromBuffer(array_view shape, winrt::Windows::Storage::Streams::IBuffer const& buffer) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromBuffer(shape.size(), get_abi(shape), *(void**)(&buffer), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromBuffer(shape.size(), get_abi(shape), *(void**)(&buffer), &result)); } return winrt::Windows::AI::MachineLearning::TensorUInt8Bit{ result, 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_BitmapAlphaMode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BitmapAlphaMode()); 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_PixelRange(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PixelRange()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_VideoFrame(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().VideoFrame()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateFromVideoFrame(void* image, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromVideoFrame(*reinterpret_cast(&image))); 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 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* props) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Bind(*reinterpret_cast(&name), *reinterpret_cast(&value), *reinterpret_cast(&props)); 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 CreateFromSession(void* session, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateFromSession(*reinterpret_cast(&session))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AdapterId(struct struct_Windows_Graphics_DisplayAdapterId* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AdapterId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Direct3D11Device(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Direct3D11Device()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Create(int32_t deviceKind, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Create(*reinterpret_cast(&deviceKind))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateFromDirect3D11Device(void* device, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromDirect3D11Device(*reinterpret_cast(&device))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_CorrelationId(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CorrelationId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ErrorStatus(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ErrorStatus()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Succeeded(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Succeeded()); 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 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_Kind(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Kind()); 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(); } }; template struct produce : produce_base { int32_t __stdcall get_Kind(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Kind()); return 0; } catch (...) { return to_hresult(); } }; template struct produce : produce_base { }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Model(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Model()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Device(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Device()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_EvaluationProperties(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().EvaluationProperties()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall EvaluateAsync(void* bindings, void* correlationId, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().EvaluateAsync(*reinterpret_cast(&bindings), *reinterpret_cast(&correlationId))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall EvaluateFeaturesAsync(void* features, void* correlationId, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().EvaluateFeaturesAsync(*reinterpret_cast const*>(&features), *reinterpret_cast(&correlationId))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Evaluate(void* bindings, void* correlationId, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Evaluate(*reinterpret_cast(&bindings), *reinterpret_cast(&correlationId))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall EvaluateFeatures(void* features, void* correlationId, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().EvaluateFeatures(*reinterpret_cast const*>(&features), *reinterpret_cast(&correlationId))); 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(); } int32_t __stdcall CreateFromModelOnDevice(void* model, void* deviceToRunOn, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateFromModelOnDevice(*reinterpret_cast(&model), *reinterpret_cast(&deviceToRunOn))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateFromModelOnDeviceWithSessionOptions(void* model, void* deviceToRunOn, void* learningModelSessionOptions, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateFromModelOnDeviceWithSessionOptions(*reinterpret_cast(&model), *reinterpret_cast(&deviceToRunOn), *reinterpret_cast(&learningModelSessionOptions))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_BatchSizeOverride(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BatchSizeOverride()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_BatchSizeOverride(uint32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().BatchSizeOverride(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_CloseModelOnSessionCreation(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CloseModelOnSessionCreation()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_CloseModelOnSessionCreation(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CloseModelOnSessionCreation(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall OverrideNamedDimension(void* name, uint32_t dimension) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().OverrideNamedDimension(*reinterpret_cast(&name), dimension); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall LoadFromStorageFileAsync(void* modelFile, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().LoadFromStorageFileAsync(*reinterpret_cast(&modelFile))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LoadFromStreamAsync(void* modelStream, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().LoadFromStreamAsync(*reinterpret_cast(&modelStream))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LoadFromFilePath(void* filePath, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().LoadFromFilePath(*reinterpret_cast(&filePath))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LoadFromStream(void* modelStream, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().LoadFromStream(*reinterpret_cast(&modelStream))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LoadFromStorageFileWithOperatorProviderAsync(void* modelFile, void* operatorProvider, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().LoadFromStorageFileAsync(*reinterpret_cast(&modelFile), *reinterpret_cast(&operatorProvider))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LoadFromStreamWithOperatorProviderAsync(void* modelStream, void* operatorProvider, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().LoadFromStreamAsync(*reinterpret_cast(&modelStream), *reinterpret_cast(&operatorProvider))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LoadFromFilePathWithOperatorProvider(void* filePath, void* operatorProvider, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().LoadFromFilePath(*reinterpret_cast(&filePath), *reinterpret_cast(&operatorProvider))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LoadFromStreamWithOperatorProvider(void* modelStream, void* operatorProvider, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().LoadFromStream(*reinterpret_cast(&modelStream), *reinterpret_cast(&operatorProvider))); return 0; } catch (...) { return to_hresult(); } }; #endif #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_ValueDescriptor(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ValueDescriptor()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ElementDescriptor(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ElementDescriptor()); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall get_TensorKind(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TensorKind()); 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(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetAsVectorView(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetAsVectorView()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Create(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Create2(void* shape, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create(*reinterpret_cast const*>(&shape))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromArray(void* shape, uint32_t __dataSize, bool* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromArray(*reinterpret_cast const*>(&shape), array_view(reinterpret_cast(data), reinterpret_cast(data) + __dataSize))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromIterable(void* shape, void* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromIterable(*reinterpret_cast const*>(&shape), *reinterpret_cast const*>(&data))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateFromShapeArrayAndDataArray(uint32_t __shapeSize, int64_t* shape, uint32_t __dataSize, bool* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromShapeArrayAndDataArray(array_view(reinterpret_cast(shape), reinterpret_cast(shape) + __shapeSize), array_view(reinterpret_cast(data), reinterpret_cast(data) + __dataSize))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromBuffer(uint32_t __shapeSize, int64_t* shape, void* buffer, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromBuffer(array_view(reinterpret_cast(shape), reinterpret_cast(shape) + __shapeSize), *reinterpret_cast(&buffer))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetAsVectorView(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetAsVectorView()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Create(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Create2(void* shape, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create(*reinterpret_cast const*>(&shape))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromArray(void* shape, uint32_t __dataSize, double* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromArray(*reinterpret_cast const*>(&shape), array_view(reinterpret_cast(data), reinterpret_cast(data) + __dataSize))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromIterable(void* shape, void* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromIterable(*reinterpret_cast const*>(&shape), *reinterpret_cast const*>(&data))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateFromShapeArrayAndDataArray(uint32_t __shapeSize, int64_t* shape, uint32_t __dataSize, double* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromShapeArrayAndDataArray(array_view(reinterpret_cast(shape), reinterpret_cast(shape) + __shapeSize), array_view(reinterpret_cast(data), reinterpret_cast(data) + __dataSize))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromBuffer(uint32_t __shapeSize, int64_t* shape, void* buffer, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromBuffer(array_view(reinterpret_cast(shape), reinterpret_cast(shape) + __shapeSize), *reinterpret_cast(&buffer))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_TensorKind(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TensorKind()); 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 #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetAsVectorView(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetAsVectorView()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetAsVectorView(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetAsVectorView()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Create(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Create2(void* shape, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create(*reinterpret_cast const*>(&shape))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromArray(void* shape, uint32_t __dataSize, float* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromArray(*reinterpret_cast const*>(&shape), array_view(reinterpret_cast(data), reinterpret_cast(data) + __dataSize))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromIterable(void* shape, void* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromIterable(*reinterpret_cast const*>(&shape), *reinterpret_cast const*>(&data))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateFromShapeArrayAndDataArray(uint32_t __shapeSize, int64_t* shape, uint32_t __dataSize, float* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromShapeArrayAndDataArray(array_view(reinterpret_cast(shape), reinterpret_cast(shape) + __shapeSize), array_view(reinterpret_cast(data), reinterpret_cast(data) + __dataSize))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromBuffer(uint32_t __shapeSize, int64_t* shape, void* buffer, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromBuffer(array_view(reinterpret_cast(shape), reinterpret_cast(shape) + __shapeSize), *reinterpret_cast(&buffer))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Create(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Create2(void* shape, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create(*reinterpret_cast const*>(&shape))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromArray(void* shape, uint32_t __dataSize, float* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromArray(*reinterpret_cast const*>(&shape), array_view(reinterpret_cast(data), reinterpret_cast(data) + __dataSize))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromIterable(void* shape, void* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromIterable(*reinterpret_cast const*>(&shape), *reinterpret_cast const*>(&data))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateFromShapeArrayAndDataArray(uint32_t __shapeSize, int64_t* shape, uint32_t __dataSize, float* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromShapeArrayAndDataArray(array_view(reinterpret_cast(shape), reinterpret_cast(shape) + __shapeSize), array_view(reinterpret_cast(data), reinterpret_cast(data) + __dataSize))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromBuffer(uint32_t __shapeSize, int64_t* shape, void* buffer, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromBuffer(array_view(reinterpret_cast(shape), reinterpret_cast(shape) + __shapeSize), *reinterpret_cast(&buffer))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetAsVectorView(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetAsVectorView()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Create(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Create2(void* shape, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create(*reinterpret_cast const*>(&shape))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromArray(void* shape, uint32_t __dataSize, int16_t* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromArray(*reinterpret_cast const*>(&shape), array_view(reinterpret_cast(data), reinterpret_cast(data) + __dataSize))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromIterable(void* shape, void* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromIterable(*reinterpret_cast const*>(&shape), *reinterpret_cast const*>(&data))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateFromShapeArrayAndDataArray(uint32_t __shapeSize, int64_t* shape, uint32_t __dataSize, int16_t* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromShapeArrayAndDataArray(array_view(reinterpret_cast(shape), reinterpret_cast(shape) + __shapeSize), array_view(reinterpret_cast(data), reinterpret_cast(data) + __dataSize))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromBuffer(uint32_t __shapeSize, int64_t* shape, void* buffer, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromBuffer(array_view(reinterpret_cast(shape), reinterpret_cast(shape) + __shapeSize), *reinterpret_cast(&buffer))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetAsVectorView(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetAsVectorView()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Create(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Create2(void* shape, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create(*reinterpret_cast const*>(&shape))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromArray(void* shape, uint32_t __dataSize, int32_t* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromArray(*reinterpret_cast const*>(&shape), array_view(reinterpret_cast(data), reinterpret_cast(data) + __dataSize))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromIterable(void* shape, void* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromIterable(*reinterpret_cast const*>(&shape), *reinterpret_cast const*>(&data))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateFromShapeArrayAndDataArray(uint32_t __shapeSize, int64_t* shape, uint32_t __dataSize, int32_t* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromShapeArrayAndDataArray(array_view(reinterpret_cast(shape), reinterpret_cast(shape) + __shapeSize), array_view(reinterpret_cast(data), reinterpret_cast(data) + __dataSize))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromBuffer(uint32_t __shapeSize, int64_t* shape, void* buffer, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromBuffer(array_view(reinterpret_cast(shape), reinterpret_cast(shape) + __shapeSize), *reinterpret_cast(&buffer))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetAsVectorView(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetAsVectorView()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Create(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Create2(void* shape, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create(*reinterpret_cast const*>(&shape))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromArray(void* shape, uint32_t __dataSize, int64_t* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromArray(*reinterpret_cast const*>(&shape), array_view(reinterpret_cast(data), reinterpret_cast(data) + __dataSize))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromIterable(void* shape, void* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromIterable(*reinterpret_cast const*>(&shape), *reinterpret_cast const*>(&data))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateFromShapeArrayAndDataArray(uint32_t __shapeSize, int64_t* shape, uint32_t __dataSize, int64_t* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromShapeArrayAndDataArray(array_view(reinterpret_cast(shape), reinterpret_cast(shape) + __shapeSize), array_view(reinterpret_cast(data), reinterpret_cast(data) + __dataSize))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromBuffer(uint32_t __shapeSize, int64_t* shape, void* buffer, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromBuffer(array_view(reinterpret_cast(shape), reinterpret_cast(shape) + __shapeSize), *reinterpret_cast(&buffer))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetAsVectorView(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetAsVectorView()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Create(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Create2(void* shape, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create(*reinterpret_cast const*>(&shape))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromArray(void* shape, uint32_t __dataSize, uint8_t* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromArray(*reinterpret_cast const*>(&shape), array_view(reinterpret_cast(data), reinterpret_cast(data) + __dataSize))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromIterable(void* shape, void* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromIterable(*reinterpret_cast const*>(&shape), *reinterpret_cast const*>(&data))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateFromShapeArrayAndDataArray(uint32_t __shapeSize, int64_t* shape, uint32_t __dataSize, uint8_t* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromShapeArrayAndDataArray(array_view(reinterpret_cast(shape), reinterpret_cast(shape) + __shapeSize), array_view(reinterpret_cast(data), reinterpret_cast(data) + __dataSize))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromBuffer(uint32_t __shapeSize, int64_t* shape, void* buffer, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromBuffer(array_view(reinterpret_cast(shape), reinterpret_cast(shape) + __shapeSize), *reinterpret_cast(&buffer))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetAsVectorView(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetAsVectorView()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Create(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Create2(void* shape, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create(*reinterpret_cast const*>(&shape))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromArray(void* shape, uint32_t __dataSize, void** data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromArray(*reinterpret_cast const*>(&shape), array_view(reinterpret_cast(data), reinterpret_cast(data) + __dataSize))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromIterable(void* shape, void* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromIterable(*reinterpret_cast const*>(&shape), *reinterpret_cast const*>(&data))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateFromShapeArrayAndDataArray(uint32_t __shapeSize, int64_t* shape, uint32_t __dataSize, void** data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromShapeArrayAndDataArray(array_view(reinterpret_cast(shape), reinterpret_cast(shape) + __shapeSize), array_view(reinterpret_cast(data), reinterpret_cast(data) + __dataSize))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetAsVectorView(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetAsVectorView()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Create(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Create2(void* shape, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create(*reinterpret_cast const*>(&shape))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromArray(void* shape, uint32_t __dataSize, uint16_t* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromArray(*reinterpret_cast const*>(&shape), array_view(reinterpret_cast(data), reinterpret_cast(data) + __dataSize))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromIterable(void* shape, void* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromIterable(*reinterpret_cast const*>(&shape), *reinterpret_cast const*>(&data))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateFromShapeArrayAndDataArray(uint32_t __shapeSize, int64_t* shape, uint32_t __dataSize, uint16_t* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromShapeArrayAndDataArray(array_view(reinterpret_cast(shape), reinterpret_cast(shape) + __shapeSize), array_view(reinterpret_cast(data), reinterpret_cast(data) + __dataSize))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromBuffer(uint32_t __shapeSize, int64_t* shape, void* buffer, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromBuffer(array_view(reinterpret_cast(shape), reinterpret_cast(shape) + __shapeSize), *reinterpret_cast(&buffer))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetAsVectorView(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetAsVectorView()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Create(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Create2(void* shape, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create(*reinterpret_cast const*>(&shape))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromArray(void* shape, uint32_t __dataSize, uint32_t* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromArray(*reinterpret_cast const*>(&shape), array_view(reinterpret_cast(data), reinterpret_cast(data) + __dataSize))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromIterable(void* shape, void* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromIterable(*reinterpret_cast const*>(&shape), *reinterpret_cast const*>(&data))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateFromShapeArrayAndDataArray(uint32_t __shapeSize, int64_t* shape, uint32_t __dataSize, uint32_t* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromShapeArrayAndDataArray(array_view(reinterpret_cast(shape), reinterpret_cast(shape) + __shapeSize), array_view(reinterpret_cast(data), reinterpret_cast(data) + __dataSize))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromBuffer(uint32_t __shapeSize, int64_t* shape, void* buffer, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromBuffer(array_view(reinterpret_cast(shape), reinterpret_cast(shape) + __shapeSize), *reinterpret_cast(&buffer))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetAsVectorView(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetAsVectorView()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Create(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Create2(void* shape, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create(*reinterpret_cast const*>(&shape))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromArray(void* shape, uint32_t __dataSize, uint64_t* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromArray(*reinterpret_cast const*>(&shape), array_view(reinterpret_cast(data), reinterpret_cast(data) + __dataSize))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromIterable(void* shape, void* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromIterable(*reinterpret_cast const*>(&shape), *reinterpret_cast const*>(&data))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateFromShapeArrayAndDataArray(uint32_t __shapeSize, int64_t* shape, uint32_t __dataSize, uint64_t* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromShapeArrayAndDataArray(array_view(reinterpret_cast(shape), reinterpret_cast(shape) + __shapeSize), array_view(reinterpret_cast(data), reinterpret_cast(data) + __dataSize))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromBuffer(uint32_t __shapeSize, int64_t* shape, void* buffer, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromBuffer(array_view(reinterpret_cast(shape), reinterpret_cast(shape) + __shapeSize), *reinterpret_cast(&buffer))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetAsVectorView(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetAsVectorView()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Create(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Create2(void* shape, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create(*reinterpret_cast const*>(&shape))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromArray(void* shape, uint32_t __dataSize, uint8_t* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromArray(*reinterpret_cast const*>(&shape), array_view(reinterpret_cast(data), reinterpret_cast(data) + __dataSize))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromIterable(void* shape, void* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromIterable(*reinterpret_cast const*>(&shape), *reinterpret_cast const*>(&data))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateFromShapeArrayAndDataArray(uint32_t __shapeSize, int64_t* shape, uint32_t __dataSize, uint8_t* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromShapeArrayAndDataArray(array_view(reinterpret_cast(shape), reinterpret_cast(shape) + __shapeSize), array_view(reinterpret_cast(data), reinterpret_cast(data) + __dataSize))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromBuffer(uint32_t __shapeSize, int64_t* shape, void* buffer, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateFromBuffer(array_view(reinterpret_cast(shape), reinterpret_cast(shape) + __shapeSize), *reinterpret_cast(&buffer))); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::AI::MachineLearning { inline auto ImageFeatureValue::CreateFromVideoFrame(winrt::Windows::Media::VideoFrame const& image) { return impl::call_factory([&](IImageFeatureValueStatics const& f) { return f.CreateFromVideoFrame(image); }); } inline auto LearningModel::LoadFromStorageFileAsync(winrt::Windows::Storage::IStorageFile const& modelFile) { return impl::call_factory([&](ILearningModelStatics const& f) { return f.LoadFromStorageFileAsync(modelFile); }); } inline auto LearningModel::LoadFromStreamAsync(winrt::Windows::Storage::Streams::IRandomAccessStreamReference const& modelStream) { return impl::call_factory([&](ILearningModelStatics const& f) { return f.LoadFromStreamAsync(modelStream); }); } inline auto LearningModel::LoadFromFilePath(param::hstring const& filePath) { return impl::call_factory([&](ILearningModelStatics const& f) { return f.LoadFromFilePath(filePath); }); } inline auto LearningModel::LoadFromStream(winrt::Windows::Storage::Streams::IRandomAccessStreamReference const& modelStream) { return impl::call_factory([&](ILearningModelStatics const& f) { return f.LoadFromStream(modelStream); }); } inline auto LearningModel::LoadFromStorageFileAsync(winrt::Windows::Storage::IStorageFile const& modelFile, winrt::Windows::AI::MachineLearning::ILearningModelOperatorProvider const& operatorProvider) { return impl::call_factory([&](ILearningModelStatics const& f) { return f.LoadFromStorageFileAsync(modelFile, operatorProvider); }); } inline auto LearningModel::LoadFromStreamAsync(winrt::Windows::Storage::Streams::IRandomAccessStreamReference const& modelStream, winrt::Windows::AI::MachineLearning::ILearningModelOperatorProvider const& operatorProvider) { return impl::call_factory([&](ILearningModelStatics const& f) { return f.LoadFromStreamAsync(modelStream, operatorProvider); }); } inline auto LearningModel::LoadFromFilePath(param::hstring const& filePath, winrt::Windows::AI::MachineLearning::ILearningModelOperatorProvider const& operatorProvider) { return impl::call_factory([&](ILearningModelStatics const& f) { return f.LoadFromFilePath(filePath, operatorProvider); }); } inline auto LearningModel::LoadFromStream(winrt::Windows::Storage::Streams::IRandomAccessStreamReference const& modelStream, winrt::Windows::AI::MachineLearning::ILearningModelOperatorProvider const& operatorProvider) { return impl::call_factory([&](ILearningModelStatics const& f) { return f.LoadFromStream(modelStream, operatorProvider); }); } inline LearningModelBinding::LearningModelBinding(winrt::Windows::AI::MachineLearning::LearningModelSession const& session) : LearningModelBinding(impl::call_factory([&](ILearningModelBindingFactory const& f) { return f.CreateFromSession(session); })) { } inline LearningModelDevice::LearningModelDevice(winrt::Windows::AI::MachineLearning::LearningModelDeviceKind const& deviceKind) : LearningModelDevice(impl::call_factory([&](ILearningModelDeviceFactory const& f) { return f.Create(deviceKind); })) { } inline auto LearningModelDevice::CreateFromDirect3D11Device(winrt::Windows::Graphics::DirectX::Direct3D11::IDirect3DDevice const& device) { return impl::call_factory([&](ILearningModelDeviceStatics const& f) { return f.CreateFromDirect3D11Device(device); }); } inline LearningModelSession::LearningModelSession(winrt::Windows::AI::MachineLearning::LearningModel const& model) : LearningModelSession(impl::call_factory([&](ILearningModelSessionFactory const& f) { return f.CreateFromModel(model); })) { } inline LearningModelSession::LearningModelSession(winrt::Windows::AI::MachineLearning::LearningModel const& model, winrt::Windows::AI::MachineLearning::LearningModelDevice const& deviceToRunOn) : LearningModelSession(impl::call_factory([&](ILearningModelSessionFactory const& f) { return f.CreateFromModelOnDevice(model, deviceToRunOn); })) { } inline LearningModelSession::LearningModelSession(winrt::Windows::AI::MachineLearning::LearningModel const& model, winrt::Windows::AI::MachineLearning::LearningModelDevice const& deviceToRunOn, winrt::Windows::AI::MachineLearning::LearningModelSessionOptions const& learningModelSessionOptions) : LearningModelSession(impl::call_factory([&](ILearningModelSessionFactory2 const& f) { return f.CreateFromModelOnDeviceWithSessionOptions(model, deviceToRunOn, learningModelSessionOptions); })) { } inline LearningModelSessionOptions::LearningModelSessionOptions() : LearningModelSessionOptions(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline auto TensorBoolean::Create() { return impl::call_factory_cast([](ITensorBooleanStatics const& f) { return f.Create(); }); } inline auto TensorBoolean::Create(param::iterable const& shape) { return impl::call_factory([&](ITensorBooleanStatics const& f) { return f.Create(shape); }); } inline auto TensorBoolean::CreateFromArray(param::iterable const& shape, array_view data) { return impl::call_factory([&](ITensorBooleanStatics const& f) { return f.CreateFromArray(shape, data); }); } inline auto TensorBoolean::CreateFromIterable(param::iterable const& shape, param::iterable const& data) { return impl::call_factory([&](ITensorBooleanStatics const& f) { return f.CreateFromIterable(shape, data); }); } inline auto TensorBoolean::CreateFromShapeArrayAndDataArray(array_view shape, array_view data) { return impl::call_factory([&](ITensorBooleanStatics2 const& f) { return f.CreateFromShapeArrayAndDataArray(shape, data); }); } inline auto TensorBoolean::CreateFromBuffer(array_view shape, winrt::Windows::Storage::Streams::IBuffer const& buffer) { return impl::call_factory([&](ITensorBooleanStatics2 const& f) { return f.CreateFromBuffer(shape, buffer); }); } inline auto TensorDouble::Create() { return impl::call_factory_cast([](ITensorDoubleStatics const& f) { return f.Create(); }); } inline auto TensorDouble::Create(param::iterable const& shape) { return impl::call_factory([&](ITensorDoubleStatics const& f) { return f.Create(shape); }); } inline auto TensorDouble::CreateFromArray(param::iterable const& shape, array_view data) { return impl::call_factory([&](ITensorDoubleStatics const& f) { return f.CreateFromArray(shape, data); }); } inline auto TensorDouble::CreateFromIterable(param::iterable const& shape, param::iterable const& data) { return impl::call_factory([&](ITensorDoubleStatics const& f) { return f.CreateFromIterable(shape, data); }); } inline auto TensorDouble::CreateFromShapeArrayAndDataArray(array_view shape, array_view data) { return impl::call_factory([&](ITensorDoubleStatics2 const& f) { return f.CreateFromShapeArrayAndDataArray(shape, data); }); } inline auto TensorDouble::CreateFromBuffer(array_view shape, winrt::Windows::Storage::Streams::IBuffer const& buffer) { return impl::call_factory([&](ITensorDoubleStatics2 const& f) { return f.CreateFromBuffer(shape, buffer); }); } inline auto TensorFloat::Create() { return impl::call_factory_cast([](ITensorFloatStatics const& f) { return f.Create(); }); } inline auto TensorFloat::Create(param::iterable const& shape) { return impl::call_factory([&](ITensorFloatStatics const& f) { return f.Create(shape); }); } inline auto TensorFloat::CreateFromArray(param::iterable const& shape, array_view data) { return impl::call_factory([&](ITensorFloatStatics const& f) { return f.CreateFromArray(shape, data); }); } inline auto TensorFloat::CreateFromIterable(param::iterable const& shape, param::iterable const& data) { return impl::call_factory([&](ITensorFloatStatics const& f) { return f.CreateFromIterable(shape, data); }); } inline auto TensorFloat::CreateFromShapeArrayAndDataArray(array_view shape, array_view data) { return impl::call_factory([&](ITensorFloatStatics2 const& f) { return f.CreateFromShapeArrayAndDataArray(shape, data); }); } inline auto TensorFloat::CreateFromBuffer(array_view shape, winrt::Windows::Storage::Streams::IBuffer const& buffer) { return impl::call_factory([&](ITensorFloatStatics2 const& f) { return f.CreateFromBuffer(shape, buffer); }); } inline auto TensorFloat16Bit::Create() { return impl::call_factory_cast([](ITensorFloat16BitStatics const& f) { return f.Create(); }); } inline auto TensorFloat16Bit::Create(param::iterable const& shape) { return impl::call_factory([&](ITensorFloat16BitStatics const& f) { return f.Create(shape); }); } inline auto TensorFloat16Bit::CreateFromArray(param::iterable const& shape, array_view data) { return impl::call_factory([&](ITensorFloat16BitStatics const& f) { return f.CreateFromArray(shape, data); }); } inline auto TensorFloat16Bit::CreateFromIterable(param::iterable const& shape, param::iterable const& data) { return impl::call_factory([&](ITensorFloat16BitStatics const& f) { return f.CreateFromIterable(shape, data); }); } inline auto TensorFloat16Bit::CreateFromShapeArrayAndDataArray(array_view shape, array_view data) { return impl::call_factory([&](ITensorFloat16BitStatics2 const& f) { return f.CreateFromShapeArrayAndDataArray(shape, data); }); } inline auto TensorFloat16Bit::CreateFromBuffer(array_view shape, winrt::Windows::Storage::Streams::IBuffer const& buffer) { return impl::call_factory([&](ITensorFloat16BitStatics2 const& f) { return f.CreateFromBuffer(shape, buffer); }); } inline auto TensorInt16Bit::Create() { return impl::call_factory_cast([](ITensorInt16BitStatics const& f) { return f.Create(); }); } inline auto TensorInt16Bit::Create(param::iterable const& shape) { return impl::call_factory([&](ITensorInt16BitStatics const& f) { return f.Create(shape); }); } inline auto TensorInt16Bit::CreateFromArray(param::iterable const& shape, array_view data) { return impl::call_factory([&](ITensorInt16BitStatics const& f) { return f.CreateFromArray(shape, data); }); } inline auto TensorInt16Bit::CreateFromIterable(param::iterable const& shape, param::iterable const& data) { return impl::call_factory([&](ITensorInt16BitStatics const& f) { return f.CreateFromIterable(shape, data); }); } inline auto TensorInt16Bit::CreateFromShapeArrayAndDataArray(array_view shape, array_view data) { return impl::call_factory([&](ITensorInt16BitStatics2 const& f) { return f.CreateFromShapeArrayAndDataArray(shape, data); }); } inline auto TensorInt16Bit::CreateFromBuffer(array_view shape, winrt::Windows::Storage::Streams::IBuffer const& buffer) { return impl::call_factory([&](ITensorInt16BitStatics2 const& f) { return f.CreateFromBuffer(shape, buffer); }); } inline auto TensorInt32Bit::Create() { return impl::call_factory_cast([](ITensorInt32BitStatics const& f) { return f.Create(); }); } inline auto TensorInt32Bit::Create(param::iterable const& shape) { return impl::call_factory([&](ITensorInt32BitStatics const& f) { return f.Create(shape); }); } inline auto TensorInt32Bit::CreateFromArray(param::iterable const& shape, array_view data) { return impl::call_factory([&](ITensorInt32BitStatics const& f) { return f.CreateFromArray(shape, data); }); } inline auto TensorInt32Bit::CreateFromIterable(param::iterable const& shape, param::iterable const& data) { return impl::call_factory([&](ITensorInt32BitStatics const& f) { return f.CreateFromIterable(shape, data); }); } inline auto TensorInt32Bit::CreateFromShapeArrayAndDataArray(array_view shape, array_view data) { return impl::call_factory([&](ITensorInt32BitStatics2 const& f) { return f.CreateFromShapeArrayAndDataArray(shape, data); }); } inline auto TensorInt32Bit::CreateFromBuffer(array_view shape, winrt::Windows::Storage::Streams::IBuffer const& buffer) { return impl::call_factory([&](ITensorInt32BitStatics2 const& f) { return f.CreateFromBuffer(shape, buffer); }); } inline auto TensorInt64Bit::Create() { return impl::call_factory_cast([](ITensorInt64BitStatics const& f) { return f.Create(); }); } inline auto TensorInt64Bit::Create(param::iterable const& shape) { return impl::call_factory([&](ITensorInt64BitStatics const& f) { return f.Create(shape); }); } inline auto TensorInt64Bit::CreateFromArray(param::iterable const& shape, array_view data) { return impl::call_factory([&](ITensorInt64BitStatics const& f) { return f.CreateFromArray(shape, data); }); } inline auto TensorInt64Bit::CreateFromIterable(param::iterable const& shape, param::iterable const& data) { return impl::call_factory([&](ITensorInt64BitStatics const& f) { return f.CreateFromIterable(shape, data); }); } inline auto TensorInt64Bit::CreateFromShapeArrayAndDataArray(array_view shape, array_view data) { return impl::call_factory([&](ITensorInt64BitStatics2 const& f) { return f.CreateFromShapeArrayAndDataArray(shape, data); }); } inline auto TensorInt64Bit::CreateFromBuffer(array_view shape, winrt::Windows::Storage::Streams::IBuffer const& buffer) { return impl::call_factory([&](ITensorInt64BitStatics2 const& f) { return f.CreateFromBuffer(shape, buffer); }); } inline auto TensorInt8Bit::Create() { return impl::call_factory_cast([](ITensorInt8BitStatics const& f) { return f.Create(); }); } inline auto TensorInt8Bit::Create(param::iterable const& shape) { return impl::call_factory([&](ITensorInt8BitStatics const& f) { return f.Create(shape); }); } inline auto TensorInt8Bit::CreateFromArray(param::iterable const& shape, array_view data) { return impl::call_factory([&](ITensorInt8BitStatics const& f) { return f.CreateFromArray(shape, data); }); } inline auto TensorInt8Bit::CreateFromIterable(param::iterable const& shape, param::iterable const& data) { return impl::call_factory([&](ITensorInt8BitStatics const& f) { return f.CreateFromIterable(shape, data); }); } inline auto TensorInt8Bit::CreateFromShapeArrayAndDataArray(array_view shape, array_view data) { return impl::call_factory([&](ITensorInt8BitStatics2 const& f) { return f.CreateFromShapeArrayAndDataArray(shape, data); }); } inline auto TensorInt8Bit::CreateFromBuffer(array_view shape, winrt::Windows::Storage::Streams::IBuffer const& buffer) { return impl::call_factory([&](ITensorInt8BitStatics2 const& f) { return f.CreateFromBuffer(shape, buffer); }); } inline auto TensorString::Create() { return impl::call_factory_cast([](ITensorStringStatics const& f) { return f.Create(); }); } inline auto TensorString::Create(param::iterable const& shape) { return impl::call_factory([&](ITensorStringStatics const& f) { return f.Create(shape); }); } inline auto TensorString::CreateFromArray(param::iterable const& shape, array_view data) { return impl::call_factory([&](ITensorStringStatics const& f) { return f.CreateFromArray(shape, data); }); } inline auto TensorString::CreateFromIterable(param::iterable const& shape, param::iterable const& data) { return impl::call_factory([&](ITensorStringStatics const& f) { return f.CreateFromIterable(shape, data); }); } inline auto TensorString::CreateFromShapeArrayAndDataArray(array_view shape, array_view data) { return impl::call_factory([&](ITensorStringStatics2 const& f) { return f.CreateFromShapeArrayAndDataArray(shape, data); }); } inline auto TensorUInt16Bit::Create() { return impl::call_factory_cast([](ITensorUInt16BitStatics const& f) { return f.Create(); }); } inline auto TensorUInt16Bit::Create(param::iterable const& shape) { return impl::call_factory([&](ITensorUInt16BitStatics const& f) { return f.Create(shape); }); } inline auto TensorUInt16Bit::CreateFromArray(param::iterable const& shape, array_view data) { return impl::call_factory([&](ITensorUInt16BitStatics const& f) { return f.CreateFromArray(shape, data); }); } inline auto TensorUInt16Bit::CreateFromIterable(param::iterable const& shape, param::iterable const& data) { return impl::call_factory([&](ITensorUInt16BitStatics const& f) { return f.CreateFromIterable(shape, data); }); } inline auto TensorUInt16Bit::CreateFromShapeArrayAndDataArray(array_view shape, array_view data) { return impl::call_factory([&](ITensorUInt16BitStatics2 const& f) { return f.CreateFromShapeArrayAndDataArray(shape, data); }); } inline auto TensorUInt16Bit::CreateFromBuffer(array_view shape, winrt::Windows::Storage::Streams::IBuffer const& buffer) { return impl::call_factory([&](ITensorUInt16BitStatics2 const& f) { return f.CreateFromBuffer(shape, buffer); }); } inline auto TensorUInt32Bit::Create() { return impl::call_factory_cast([](ITensorUInt32BitStatics const& f) { return f.Create(); }); } inline auto TensorUInt32Bit::Create(param::iterable const& shape) { return impl::call_factory([&](ITensorUInt32BitStatics const& f) { return f.Create(shape); }); } inline auto TensorUInt32Bit::CreateFromArray(param::iterable const& shape, array_view data) { return impl::call_factory([&](ITensorUInt32BitStatics const& f) { return f.CreateFromArray(shape, data); }); } inline auto TensorUInt32Bit::CreateFromIterable(param::iterable const& shape, param::iterable const& data) { return impl::call_factory([&](ITensorUInt32BitStatics const& f) { return f.CreateFromIterable(shape, data); }); } inline auto TensorUInt32Bit::CreateFromShapeArrayAndDataArray(array_view shape, array_view data) { return impl::call_factory([&](ITensorUInt32BitStatics2 const& f) { return f.CreateFromShapeArrayAndDataArray(shape, data); }); } inline auto TensorUInt32Bit::CreateFromBuffer(array_view shape, winrt::Windows::Storage::Streams::IBuffer const& buffer) { return impl::call_factory([&](ITensorUInt32BitStatics2 const& f) { return f.CreateFromBuffer(shape, buffer); }); } inline auto TensorUInt64Bit::Create() { return impl::call_factory_cast([](ITensorUInt64BitStatics const& f) { return f.Create(); }); } inline auto TensorUInt64Bit::Create(param::iterable const& shape) { return impl::call_factory([&](ITensorUInt64BitStatics const& f) { return f.Create(shape); }); } inline auto TensorUInt64Bit::CreateFromArray(param::iterable const& shape, array_view data) { return impl::call_factory([&](ITensorUInt64BitStatics const& f) { return f.CreateFromArray(shape, data); }); } inline auto TensorUInt64Bit::CreateFromIterable(param::iterable const& shape, param::iterable const& data) { return impl::call_factory([&](ITensorUInt64BitStatics const& f) { return f.CreateFromIterable(shape, data); }); } inline auto TensorUInt64Bit::CreateFromShapeArrayAndDataArray(array_view shape, array_view data) { return impl::call_factory([&](ITensorUInt64BitStatics2 const& f) { return f.CreateFromShapeArrayAndDataArray(shape, data); }); } inline auto TensorUInt64Bit::CreateFromBuffer(array_view shape, winrt::Windows::Storage::Streams::IBuffer const& buffer) { return impl::call_factory([&](ITensorUInt64BitStatics2 const& f) { return f.CreateFromBuffer(shape, buffer); }); } inline auto TensorUInt8Bit::Create() { return impl::call_factory_cast([](ITensorUInt8BitStatics const& f) { return f.Create(); }); } inline auto TensorUInt8Bit::Create(param::iterable const& shape) { return impl::call_factory([&](ITensorUInt8BitStatics const& f) { return f.Create(shape); }); } inline auto TensorUInt8Bit::CreateFromArray(param::iterable const& shape, array_view data) { return impl::call_factory([&](ITensorUInt8BitStatics const& f) { return f.CreateFromArray(shape, data); }); } inline auto TensorUInt8Bit::CreateFromIterable(param::iterable const& shape, param::iterable const& data) { return impl::call_factory([&](ITensorUInt8BitStatics const& f) { return f.CreateFromIterable(shape, data); }); } inline auto TensorUInt8Bit::CreateFromShapeArrayAndDataArray(array_view shape, array_view data) { return impl::call_factory([&](ITensorUInt8BitStatics2 const& f) { return f.CreateFromShapeArrayAndDataArray(shape, data); }); } inline auto TensorUInt8Bit::CreateFromBuffer(array_view shape, winrt::Windows::Storage::Streams::IBuffer const& buffer) { return impl::call_factory([&](ITensorUInt8BitStatics2 const& f) { return f.CreateFromBuffer(shape, buffer); }); } } 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 {}; 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 {}; 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 {}; 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