From e7d7acc96975ac47038fb7215925d4324b20aa86 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Tue, 17 Dec 2019 11:53:05 +0100 Subject: [PATCH] use global round function --- tensorflow/lite/kernels/internal/reference/concatenation.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tensorflow/lite/kernels/internal/reference/concatenation.h b/tensorflow/lite/kernels/internal/reference/concatenation.h index f587cfd1c9..3767112738 100644 --- a/tensorflow/lite/kernels/internal/reference/concatenation.h +++ b/tensorflow/lite/kernels/internal/reference/concatenation.h @@ -19,6 +19,7 @@ limitations under the License. #include "tensorflow/lite/kernels/internal/common.h" #include "tensorflow/lite/kernels/internal/compatibility.h" #include "tensorflow/lite/kernels/internal/types.h" +#include "tensorflow/lite/kernels/internal/round.h" namespace tflite { namespace reference_ops { @@ -122,7 +123,7 @@ inline void ConcatenationWithScaling(const ConcatenationParams& params, const float bias = -input_zeropoint[i] * scale; for (int j = 0; j < copy_size; ++j) { const int32_t value = - static_cast(std::round(input_ptr[j] * scale + bias)) + + static_cast(tflite::TfLiteRound(input_ptr[j] * scale + bias)) + output_zeropoint; output_ptr[j] = static_cast( std::max(std::min(255, value), 0)); -- 2.20.1