hnluo
2023-06-29 c2dee5e3c29eba79e591d9e9caebaef15ea4e56b
funasr/runtime/onnxruntime/src/util.cpp
@@ -1,6 +1,7 @@
#include "precomp.h"
namespace funasr {
float *LoadParams(const char *filename)
{
@@ -178,3 +179,14 @@
        }
    }
}
bool is_target_file(const std::string& filename, const std::string target) {
    std::size_t pos = filename.find_last_of(".");
    if (pos == std::string::npos) {
        return false;
    }
    std::string extension = filename.substr(pos + 1);
    return (extension == target);
}
} // namespace funasr