mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-27 20:02:15 +00:00
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<const Dml::NameAndIndex>)': 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
This commit is contained in:
parent
1128bf282d
commit
2fb03769bc
1 changed files with 3 additions and 3 deletions
|
|
@ -70,6 +70,8 @@ namespace Dml
|
|||
uint32_t index;
|
||||
};
|
||||
|
||||
std::optional<uint32_t> TryMapStringToIndex(std::string_view mode, gsl::span<const NameAndIndex> nameAndIndexList);
|
||||
|
||||
template<typename T>
|
||||
std::optional<T> TryMapStringToIndex(std::string_view mode, gsl::span<const NameAndIndex> nameAndIndexList)
|
||||
{
|
||||
|
|
@ -78,10 +80,8 @@ namespace Dml
|
|||
return *reinterpret_cast<std::optional<T>*>(std::addressof(result));
|
||||
}
|
||||
|
||||
std::optional<uint32_t> TryMapStringToIndex(std::string_view mode, gsl::span<const NameAndIndex> nameAndIndexList);
|
||||
|
||||
DML_INTERPOLATION_MODE MapStringToInteropolationMode(std::string_view mode);
|
||||
|
||||
DML_DEPTH_SPACE_ORDER MapStringToDepthSpaceMode(std::string_view mode);
|
||||
|
||||
} // namespace Dml
|
||||
} // namespace Dml
|
||||
|
|
|
|||
Loading…
Reference in a new issue