1#include "taichi/program/function_key.h"
2
3namespace taichi::lang {
4
5FunctionKey::FunctionKey(const std::string &func_name,
6 int func_id,
7 int instance_id)
8 : func_name(func_name), func_id(func_id), instance_id(instance_id) {
9}
10
11bool FunctionKey::operator==(const FunctionKey &other_key) const {
12 return func_id == other_key.func_id && instance_id == other_key.instance_id;
13}
14
15std::string FunctionKey::get_full_name() const {
16 return func_name + "_" + std::to_string(func_id) + "_" +
17 std::to_string(instance_id);
18}
19
20} // namespace taichi::lang
21