MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / generic_get_unused_modules

Function generic_get_unused_modules

src/program.cpp:1234–1246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1232
1233template <class Map, class T, class OutputIterator>
1234static void generic_get_unused_modules(Map& m, const std::vector<T*>& mods, OutputIterator out)
1235{
1236 std::unordered_set<std::string> used;
1237 std::transform(mods.begin(), mods.end(), std::inserter(used, used.end()), [](auto&& mod) {
1238 return mod->name();
1239 });
1240 transform_if(
1241 m.begin(),
1242 m.end(),
1243 out,
1244 [&](auto&& pp) { return not contains(used, pp.first); },
1245 [](auto&& pp) { return &pp.second; });
1246}
1247
1248std::vector<const module*> program::get_modules() const
1249{

Callers 3

get_modulesMethod · 0.85
is_unused_moduleFunction · 0.85
remove_unused_modulesMethod · 0.85

Calls 6

transform_ifFunction · 0.85
containsFunction · 0.85
transformFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected