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

Method get_sub_modules

src/module.cpp:1509–1527  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1507}
1508
1509std::vector<module_ref> module::get_sub_modules(bool shallow) const
1510{
1511 std::vector<module_ref> vec_modules;
1512 for(auto ins : iterator_for(*this))
1513 {
1514 const auto& mod_args = ins->module_inputs();
1515 vec_modules.insert(vec_modules.end(), mod_args.begin(), mod_args.end());
1516 if(not shallow)
1517 {
1518 for(const auto& smod : mod_args)
1519 {
1520 auto sub_mods = smod->get_sub_modules();
1521 vec_modules.insert(vec_modules.end(), sub_mods.begin(), sub_mods.end());
1522 }
1523 }
1524 }
1525
1526 return vec_modules;
1527}
1528
1529module& module::sort()
1530{

Callers 8

TEST_CASEFunction · 0.80
generic_get_modulesFunction · 0.80
program.cppFile · 0.80
rename_moduleMethod · 0.80
run_passesFunction · 0.80
print_modulesMethod · 0.80

Calls 4

iterator_forFunction · 0.85
insertMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by 1

TEST_CASEFunction · 0.64