1#include "taichi/ir/snode_types.h"
2
3#include "taichi/common/logging.h"
4
5namespace taichi::lang {
6
7std::string snode_type_name(SNodeType t) {
8 switch (t) {
9#define PER_SNODE(i) \
10 case SNodeType::i: \
11 return #i;
12
13#include "taichi/inc/snodes.inc.h"
14
15#undef PER_SNODE
16 default:
17 TI_NOT_IMPLEMENTED;
18 }
19}
20
21bool is_gc_able(SNodeType t) {
22 return (t == SNodeType::pointer || t == SNodeType::dynamic);
23}
24
25} // namespace taichi::lang
26