aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/batching
diff options
context:
space:
mode:
authorGravatar Peter Hawkins <phawkins@google.com>2017-05-09 09:14:16 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-05-10 16:29:47 -0700
commit1d0b8c007b8bc7f77dd63c74f02d87185071f038 (patch)
treeb72df4064224d66c62bb4a126efb06fa214fa439 /tensorflow/contrib/batching
parentb9845c6d0d5dc601fb3b58206a7070aa8937af4f (diff)
Remove unnecessary copies of value parameters.
PiperOrigin-RevId: 155511618
Diffstat (limited to 'tensorflow/contrib/batching')
-rw-r--r--tensorflow/contrib/batching/kernels/batch_kernels.cc6
1 files changed, 4 insertions, 2 deletions
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);