| 460 | } |
| 461 | |
| 462 | void AtlasCompNode::foreach (thin_function<void(CompNode)> callback) { |
| 463 | auto sd = AtlasCompNodeImpl::sd; |
| 464 | if (!sd) |
| 465 | return; |
| 466 | |
| 467 | for (int i = 0;; ++i) { |
| 468 | CompNode cur; |
| 469 | { |
| 470 | MGB_LOCK_GUARD(sd->mtx); |
| 471 | if (i >= sd->nr_node) |
| 472 | return; |
| 473 | cur = make_comp_node_from_impl(&sd->node[i]); |
| 474 | } |
| 475 | callback(cur); |
| 476 | } |
| 477 | } |
| 478 | |
| 479 | size_t AtlasCompNode::get_device_count() { |
| 480 | static uint32_t cnt = 0; |
nothing calls this directly
no test coverage detected