| 174 | HashTable(OpKernelContext* ctx, OpKernel* kernel) {} |
| 175 | |
| 176 | size_t size() const override { |
| 177 | // return the size of the table only if it's initialized, otherwise 0. |
| 178 | if (!is_initialized_) { |
| 179 | return 0; |
| 180 | } |
| 181 | std::atomic_thread_fence(std::memory_order_acquire); |
| 182 | return table_ ? table_->size() : 0; |
| 183 | } |
| 184 | |
| 185 | Status ExportValues(OpKernelContext* context) override { |
| 186 | if (!is_initialized_) { |
no outgoing calls