|
|
@ -182,6 +182,7 @@ void prune_impl(const proto::ProgramDesc& input, proto::ProgramDesc* output,
|
|
|
|
// TODO(fengjiayi): Prune() could be inplaced to avoid unnecessary copies
|
|
|
|
// TODO(fengjiayi): Prune() could be inplaced to avoid unnecessary copies
|
|
|
|
void Prune(const proto::ProgramDesc& input, proto::ProgramDesc* output) {
|
|
|
|
void Prune(const proto::ProgramDesc& input, proto::ProgramDesc* output) {
|
|
|
|
std::set<std::string> dependent_vars;
|
|
|
|
std::set<std::string> dependent_vars;
|
|
|
|
|
|
|
|
output->clear_blocks();
|
|
|
|
prune_impl(input, output, 0, -1, dependent_vars);
|
|
|
|
prune_impl(input, output, 0, -1, dependent_vars);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|