diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-05-11 19:38:48 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-05-11 19:41:29 -0700 |
commit | 52e2698ac969a0f82c6ce901f80f04818ca8ac4e (patch) | |
tree | 5b89fa879c61cac2f3b64d5edbf405ad616edde5 /tensorflow/contrib/lite/kernels/select.cc | |
parent | 84b5938aaee991d6909e16e56c66bf88e8843fbb (diff) |
Making GetInput from kernel_util.h return a pointer to const data.
PiperOrigin-RevId: 196340200
Diffstat (limited to 'tensorflow/contrib/lite/kernels/select.cc')
-rw-r--r-- | tensorflow/contrib/lite/kernels/select.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tensorflow/contrib/lite/kernels/select.cc b/tensorflow/contrib/lite/kernels/select.cc index 029ad9a709..9bc8a1a34a 100644 --- a/tensorflow/contrib/lite/kernels/select.cc +++ b/tensorflow/contrib/lite/kernels/select.cc @@ -33,10 +33,10 @@ TfLiteStatus SelectPrepare(TfLiteContext* context, TfLiteNode* node) { TF_LITE_ENSURE_EQ(context, NumInputs(node), 3); TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1); - TfLiteTensor* input_condition = + const TfLiteTensor* input_condition = GetInput(context, node, kInputTensorCondition); - TfLiteTensor* input_x = GetInput(context, node, kInputTensorX); - TfLiteTensor* input_y = GetInput(context, node, kInputTensorY); + const TfLiteTensor* input_x = GetInput(context, node, kInputTensorX); + const TfLiteTensor* input_y = GetInput(context, node, kInputTensorY); TfLiteTensor* output = GetOutput(context, node, kOutputTensor); // Input must be bool. @@ -62,10 +62,10 @@ TfLiteStatus SelectPrepare(TfLiteContext* context, TfLiteNode* node) { } TfLiteStatus SelectEval(TfLiteContext* context, TfLiteNode* node) { - TfLiteTensor* input_condition = + const TfLiteTensor* input_condition = GetInput(context, node, kInputTensorCondition); - TfLiteTensor* input_x = GetInput(context, node, kInputTensorX); - TfLiteTensor* input_y = GetInput(context, node, kInputTensorY); + const TfLiteTensor* input_x = GetInput(context, node, kInputTensorX); + const TfLiteTensor* input_y = GetInput(context, node, kInputTensorY); TfLiteTensor* output = GetOutput(context, node, kOutputTensor); bool is_rank_one = !HaveSameShapes(input_condition, input_x); |