From 2fb03769bc5a8b53c9850d4562953ec1def8e4ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gin=C3=A9s=20Hidalgo?= Date: Thu, 4 Nov 2021 17:04:32 -0400 Subject: [PATCH] Updated OperatorUtility to avoid C2672 and C2783 (#9651) Updated OperatorUtility to avoid compiler error errors C2672 and C2783. - Error C2672: 'TryMapStringToIndex': no matching overloaded function found - Error C2783: 'std::optional<_Ty> Dml::TryMapStringToIndex(std::string_view,gsl::span)': could not deduce template argument for 'T'. note: see declaration of 'Dml::TryMapStringToIndex'. 'TryMapStringToIndex': function declaration must be available as none of the arguments depend on a template parameter --- .../DmlExecutionProvider/src/Operators/OperatorUtility.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/onnxruntime/core/providers/dml/DmlExecutionProvider/src/Operators/OperatorUtility.h b/onnxruntime/core/providers/dml/DmlExecutionProvider/src/Operators/OperatorUtility.h index a0e5d8aaeb..3893bc0019 100644 --- a/onnxruntime/core/providers/dml/DmlExecutionProvider/src/Operators/OperatorUtility.h +++ b/onnxruntime/core/providers/dml/DmlExecutionProvider/src/Operators/OperatorUtility.h @@ -70,6 +70,8 @@ namespace Dml uint32_t index; }; + std::optional TryMapStringToIndex(std::string_view mode, gsl::span nameAndIndexList); + template std::optional TryMapStringToIndex(std::string_view mode, gsl::span nameAndIndexList) { @@ -78,10 +80,8 @@ namespace Dml return *reinterpret_cast*>(std::addressof(result)); } - std::optional TryMapStringToIndex(std::string_view mode, gsl::span nameAndIndexList); - DML_INTERPOLATION_MODE MapStringToInteropolationMode(std::string_view mode); DML_DEPTH_SPACE_ORDER MapStringToDepthSpaceMode(std::string_view mode); -} // namespace Dml \ No newline at end of file +} // namespace Dml