| 530 | |
| 531 | protected: |
| 532 | void ComputeAsync(OpKernelContext* ctx, Barrier* barrier, |
| 533 | DoneCallback callback) override { |
| 534 | OP_REQUIRES_ASYNC( |
| 535 | ctx, component_index_ < barrier->num_components(), |
| 536 | errors::InvalidArgument("The component ID is out of range ", |
| 537 | component_index_, " > num_components", |
| 538 | " (= ", barrier->num_components(), ")"), |
| 539 | callback); |
| 540 | OP_REQUIRES_OK_ASYNC( |
| 541 | ctx, |
| 542 | ctx->MatchSignature({DT_STRING_REF, DT_STRING, |
| 543 | barrier->component_type(component_index_)}, |
| 544 | {}), |
| 545 | callback); |
| 546 | |
| 547 | const Tensor* keys; |
| 548 | const Tensor* values; |
| 549 | OP_REQUIRES_OK_ASYNC(ctx, ctx->input("keys", &keys), callback); |
| 550 | OP_REQUIRES_OK_ASYNC(ctx, ctx->input("values", &values), callback); |
| 551 | barrier->TryInsertMany<T>(*keys, component_index_, *values, ctx, callback); |
| 552 | } |
| 553 | |
| 554 | private: |
| 555 | int component_index_; |
nothing calls this directly
no test coverage detected