1// Codegen for the hierarchical data structure
2
3#include "struct.h"
4
5namespace taichi::lang {
6
7void StructCompiler::collect_snodes(SNode &snode) {
8 snodes.push_back(&snode);
9 for (int ch_id = 0; ch_id < (int)snode.ch.size(); ch_id++) {
10 auto &ch = snode.ch[ch_id];
11 collect_snodes(*ch);
12 }
13}
14
15} // namespace taichi::lang
16