MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / add_layout_constraint

Method add_layout_constraint

src/core/impl/graph/var_node_mem_mgr.cpp:1233–1239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1231}
1232
1233void VarNodeMemManager::add_layout_constraint(
1234 VarNode* dest, VarNode::LayoutConstraintCallback callback) {
1235 auto&& trait = m_node_mem_trait[dest].layout_constraint;
1236 if (trait.level != LayoutConstraintLevel::CONTIG) {
1237 trait.custom.emplace_back(std::move(callback));
1238 }
1239}
1240
1241void VarNodeMemManager::add_layout_constraint_level(
1242 VarNode* dest, LayoutConstraintLevel level) {

Calls 1

emplace_backMethod · 0.80

Tested by

no test coverage detected