lyblsgo
2023-04-24 6406616c2d3fd5eae0201cd4680258f7c4e937dd
funasr/runtime/onnxruntime/src/commonfunc.h
@@ -1,6 +1,5 @@
#pragma once 
#include <algorithm>
typedef struct
{
    std::string msg;
@@ -10,8 +9,6 @@
#ifdef _WIN32
#include <codecvt>
inline std::wstring string2wstring(const std::string& str, const std::string& locale)
{
@@ -28,8 +25,6 @@
}
#endif
inline void getInputName(Ort::Session* session, string& inputName,int nIndex=0) {
    size_t numInputNodes = session->GetInputCount();
@@ -54,3 +49,8 @@
        }
    }
}
template <class ForwardIterator>
inline static size_t argmax(ForwardIterator first, ForwardIterator last) {
    return std::distance(first, std::max_element(first, last));
}