| 937 | } |
| 938 | |
| 939 | void OpKernelContext::set_output_ref(int index, mutex* mu, |
| 940 | Tensor* tensor_for_ref) { |
| 941 | CHECK_GE(index, 0); |
| 942 | CHECK_LT(index, outputs_.size()); |
| 943 | CHECK(IsRefType(params_->op_kernel->output_type(index))); |
| 944 | record_tensor_reference(*tensor_for_ref); |
| 945 | outputs_[index] = TensorValue(mu, tensor_for_ref); |
| 946 | } |
| 947 | |
| 948 | Status OpKernelContext::set_output_ref(StringPiece name, mutex* mu, |
| 949 | Tensor* tensor_for_ref) { |