| 1262 | } |
| 1263 | |
| 1264 | void ComputeAsync(OpKernelContext* c, DoneCallback done) final { |
| 1265 | UnbatchGradResource* ubr; |
| 1266 | std::function<Status(UnbatchGradResource**)> creator = |
| 1267 | [](UnbatchGradResource** r) { |
| 1268 | *r = new UnbatchGradResource(); |
| 1269 | return Status::OK(); |
| 1270 | }; |
| 1271 | OP_REQUIRES_OK_ASYNC(c, |
| 1272 | c->resource_manager()->LookupOrCreate( |
| 1273 | container_, shared_name_, &ubr, creator), |
| 1274 | done); |
| 1275 | Status status = ubr->Compute(c, done); |
| 1276 | ubr->Unref(); |
| 1277 | OP_REQUIRES_OK_ASYNC(c, status, done); |
| 1278 | // Assume ubr calls done, so nothing to do here. |
| 1279 | } |
| 1280 | |
| 1281 | private: |
| 1282 | string container_; |
nothing calls this directly
no test coverage detected