| 402 | } |
| 403 | |
| 404 | comm::RetCode TopicConfig::GetNQueue(const int queue_info_id, int &nqueue) const { |
| 405 | auto &&it(impl_->queue_info_id2ranges.find(queue_info_id)); |
| 406 | if (it == impl_->queue_info_id2ranges.end()) return comm::RetCode::RET_ERR_RANGE_QUEUE_INFO; |
| 407 | auto &&ranges = it->second; |
| 408 | |
| 409 | nqueue = 0; |
| 410 | for (auto &&range : ranges) { |
| 411 | nqueue += range.second - range.first + 1; |
| 412 | } |
| 413 | return comm::RetCode::RET_OK; |
| 414 | } |
| 415 | |
| 416 | comm::RetCode TopicConfig::GetQueueByRank(const int queue_info_id, const uint64_t rank, int &queue) const { |
| 417 | auto &&it = impl_->queue_info_id2ranges.find(queue_info_id); |
no outgoing calls