| 51 | } |
| 52 | |
| 53 | Status MakeResourceHandleToOutput(OpKernelContext* context, int output_index, |
| 54 | const string& container, const string& name, |
| 55 | const TypeIndex& type_index) { |
| 56 | Tensor* handle; |
| 57 | TF_RETURN_IF_ERROR( |
| 58 | context->allocate_output(output_index, TensorShape({}), &handle)); |
| 59 | handle->scalar<ResourceHandle>()() = |
| 60 | MakeResourceHandle(container, name, *context->device(), type_index); |
| 61 | return Status::OK(); |
| 62 | } |
| 63 | |
| 64 | namespace internal { |
| 65 |