onnxruntime/winml/lib/Common/inc/common.h
Tiago Koji Castro Shibata 62c0d24340
Fix Windows Store build (#8753)
* Remove APIs unavailable in Store in #8349, #8178, #8065

* Add UWP stubs of C runtime functions

* Remove UWP incompatible tests from UWP build

* Remove incompatible tests from Store

* Use UWP stubs in store only

* Skip partition check outside of Windows

* Remove unused WRL include

* Workaround Windows header not including what it uses

* Fix precompiled header name clash

* Workaround SDK bugs

* DXCore workaround in Win7

* Fix warning

* Fix more warnings

* Bump WinML to target Windows 8

* Fix more warnings

* Remove unnecessary workarounds

* Remove Desktop only APIs from DML adapter
2021-08-23 11:19:03 -07:00

53 lines
No EOL
1.2 KiB
C++

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
// STL
#define _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING
#define _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING
#include <algorithm>
#include <cassert>
#include <codecvt>
#include <functional>
#include <iterator>
#include <locale>
#include <numeric>
#include <sstream>
#include <tuple>
#include <type_traits>
#include <unordered_map>
#include <utility>
#include <variant>
#include <vector>
#include <thread>
#include <tuple>
// WIL
#include <wil/cppwinrt.h>
#include <wil/result.h>
#include <wil/winrt.h>
// Windows pollutes with preprocessor that redefine OPTIONAL.
// Undefine OPTIONAL to get onnx macros to resolve correctly.
#ifdef OPTIONAL
#undef OPTIONAL
#endif
#pragma warning(disable : 4100)
// Telemetry
#include "WinMLTelemetryHelper.h"
// Declare global telemetry helper
extern WinMLTelemetryHelper telemetry_helper;
#ifndef WINML_TELEMETRY_DISABLED
// Declare TraceLogging provider
TRACELOGGING_DECLARE_PROVIDER(winml_trace_logging_provider);
#endif //WINML_TELEMETRY_DISABLED
// WinML
#include "errors.h"
#include "NamespaceAliases.h"
#include "StringHelpers.h"
#include "WinML_Lock.h"