mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-31 23:27:43 +00:00
* Add suspend handler with new telemetry event * Fix build warning * Use cppwinrt from nuget * Restore nuget packages * add dependencies * Add nuget_helpers * Cleaned up * Clean up * Comment * Add dependencies for the rest * Remove unused line * Update activation string * PR comment to remove ALL
31 lines
No EOL
659 B
C++
31 lines
No EOL
659 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) |