| 655 | } |
| 656 | |
| 657 | void ROCmCompNode::foreach (thin_function<void(CompNode)> callback) { |
| 658 | auto sd = ROCmCompNodeImpl::sd; |
| 659 | if (!sd) |
| 660 | return; |
| 661 | |
| 662 | for (int i = 0;; ++i) { |
| 663 | CompNode cur; |
| 664 | { |
| 665 | MGB_LOCK_GUARD(sd->mtx); |
| 666 | if (i >= sd->nr_node) |
| 667 | return; |
| 668 | cur = make_comp_node_from_impl(&sd->node[i]); |
| 669 | } |
| 670 | callback(cur); |
| 671 | } |
| 672 | } |
| 673 | |
| 674 | size_t ROCmCompNode::get_device_count() { |
| 675 | static int cnt = -1; |
nothing calls this directly
no test coverage detected