| 168 | } |
| 169 | |
| 170 | std::pair<bool, HeuristicTree *> MLGOHeuristics::get_heuristic_tree(HeuristicTree::TreeID id) |
| 171 | { |
| 172 | if (_indices.find(id) == _indices.end()) |
| 173 | { |
| 174 | ARM_COMPUTE_LOG_INFO_MSG_WITH_FORMAT_CORE("Cannot find tree with id %zu", id); |
| 175 | return std::make_pair(false, nullptr); |
| 176 | } |
| 177 | const auto index = _indices[id]; |
| 178 | |
| 179 | if (_trees.find(index) == _trees.end()) |
| 180 | { |
| 181 | ARM_COMPUTE_LOG_INFO_MSG_CORE("Cannot find tree index"); |
| 182 | return std::make_pair(false, nullptr); |
| 183 | } |
| 184 | auto &t = _trees[index]; |
| 185 | |
| 186 | return std::make_pair(true, &t); |
| 187 | } |
| 188 | |
| 189 | bool MLGOHeuristics::add_heuristic_tree(HeuristicTree &&t) |
| 190 | { |
no test coverage detected