| 32 | } |
| 33 | |
| 34 | Status SessionState::AddTensor(const string& handle, const Tensor& tensor) { |
| 35 | mutex_lock l(state_lock_); |
| 36 | if (!tensors_.insert({handle, tensor}).second) { |
| 37 | return errors::InvalidArgument("Failed to add a tensor with handle '", |
| 38 | handle, "' to the session store."); |
| 39 | } |
| 40 | return Status::OK(); |
| 41 | } |
| 42 | |
| 43 | Status SessionState::DeleteTensor(const string& handle) { |
| 44 | mutex_lock l(state_lock_); |
no test coverage detected