| 57 | } |
| 58 | |
| 59 | ScopedAllocator* ScopedAllocatorContainer::GetAllocator(int32 scope_id) { |
| 60 | mutex_lock l(mu_); |
| 61 | auto it = allocators_.find(scope_id); |
| 62 | if (it != allocators_.end()) { |
| 63 | CHECK_EQ(ScopedAllocator::kBackingIndex, it->second.field_index); |
| 64 | return it->second.scoped_allocator; |
| 65 | } else { |
| 66 | LOG(ERROR) << "Failed to find ScopedAllocator for " << scope_id |
| 67 | << " in container for step " << step_id_ << " on " |
| 68 | << mgr_->device_name(); |
| 69 | return nullptr; |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | ScopedAllocatorInstance* ScopedAllocatorContainer::GetInstance(int32 scope_id) { |
| 74 | VLOG(2) << "GetInstance " << scope_id << " step " << step_id_ << " on " |
nothing calls this directly
no test coverage detected