MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / AppendBlock

Method AppendBlock

paddle/fluid/framework/program_desc.cc:30–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28namespace paddle::framework {
29
30BlockDesc *ProgramDesc::AppendBlock(const BlockDesc &parent) {
31 auto *b = desc_.add_blocks();
32 b->set_parent_idx(parent.ID());
33 b->set_idx(desc_.blocks_size() - 1);
34 blocks_.emplace_back(new BlockDesc(this, b));
35 return blocks_.back().get();
36}
37
38void ProgramDesc::Flush() {
39 for (auto &block : blocks_) {

Callers 8

CreateTensorRTOpMethod · 0.80
TESTFunction · 0.80
TESTFunction · 0.80
CreateMultiGraphFunction · 0.80
TESTFunction · 0.80
TESTFunction · 0.80
TESTFunction · 0.80

Calls 5

set_idxMethod · 0.80
IDMethod · 0.45
emplace_backMethod · 0.45
getMethod · 0.45
backMethod · 0.45

Tested by 7

TESTFunction · 0.64
TESTFunction · 0.64
CreateMultiGraphFunction · 0.64
TESTFunction · 0.64
TESTFunction · 0.64
TESTFunction · 0.64