onnxruntime/winml/lib/Api.Ort/OnnxruntimeEnvironment.h
Justin Chu eeef157888
Format c++ code under winml/ (#16660)
winml/ was previously excluded from lintrunner config. This change
includes the directory and adds the clang-format config file specific to
winml/ that fits existing style.

---------

Signed-off-by: Justin Chu <justinchu@microsoft.com>
2023-07-25 21:56:50 -07:00

31 lines
660 B
C++

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#pragma warning(push)
#pragma warning(disable : 4505)
namespace _winml {
class OnnxruntimeEnvironment {
public:
OnnxruntimeEnvironment(const OrtApi* ort_api);
~OnnxruntimeEnvironment();
HRESULT GetOrtEnvironment(_Out_ OrtEnv** ert_env);
HRESULT EnableDebugOutput(bool is_enabled);
private:
void RegisterSuspendHandler();
private:
UniqueOrtEnv ort_env_;
winrt::event_token suspend_token_;
};
const OrtApi* GetVersionedOrtApi();
const WinmlAdapterApi* GetVersionedWinmlAdapterApi();
} // namespace _winml
#pragma warning(pop)