From 1d0b8c007b8bc7f77dd63c74f02d87185071f038 Mon Sep 17 00:00:00 2001 From: Peter Hawkins Date: Tue, 9 May 2017 09:14:16 -0700 Subject: Remove unnecessary copies of value parameters. PiperOrigin-RevId: 155511618 --- tensorflow/contrib/batching/kernels/batch_kernels.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tensorflow/contrib/batching') diff --git a/tensorflow/contrib/batching/kernels/batch_kernels.cc b/tensorflow/contrib/batching/kernels/batch_kernels.cc index 7f9fc447b1..1e0957298b 100644 --- a/tensorflow/contrib/batching/kernels/batch_kernels.cc +++ b/tensorflow/contrib/batching/kernels/batch_kernels.cc @@ -817,7 +817,8 @@ class UnbatchGradResource : public ResourceBase { // Flushes the information for one batch, given its context and done // callback. Clears all information about it from the available_tensors_. - Status OutputBatch(OpKernelContext* context, AsyncOpKernel::DoneCallback done) + Status OutputBatch(OpKernelContext* context, + const AsyncOpKernel::DoneCallback& done) EXCLUSIVE_LOCKS_REQUIRED(mu_) { const Tensor& batch_index_t = context->input(1); auto batch_index = @@ -848,7 +849,8 @@ class UnbatchGradResource : public ResourceBase { } // Ingests data from one invocation of the op. - Status Compute(OpKernelContext* context, AsyncOpKernel::DoneCallback done) { + Status Compute(OpKernelContext* context, + const AsyncOpKernel::DoneCallback& done) { const Tensor& data_t = context->input(0); const Tensor& batch_index_t = context->input(1); const Tensor& grad_t = context->input(2); -- cgit v1.2.3