| 248 | } |
| 249 | |
| 250 | Status DoFind(const Tensor& key, Tensor* value, |
| 251 | const Tensor& default_value) override { |
| 252 | const V default_val = default_value.flat<V>()(0); |
| 253 | const auto key_values = key.flat<K>(); |
| 254 | auto value_values = value->flat<V>(); |
| 255 | |
| 256 | for (int64 i = 0; i < key_values.size(); ++i) { |
| 257 | value_values(i) = gtl::FindWithDefault( |
| 258 | *table_, SubtleMustCopyIfIntegral(key_values(i)), default_val); |
| 259 | } |
| 260 | return Status::OK(); |
| 261 | } |
| 262 | |
| 263 | int64 MemoryUsed() const override { |
| 264 | if (table_) { |
nothing calls this directly
no test coverage detected