diff --git a/tensorflow/core/kernels/image_resizer_state.h b/tensorflow/core/kernels/image_resizer_state.h index 591acfb444a..1b1550fd47a 100644 --- a/tensorflow/core/kernels/image_resizer_state.h +++ b/tensorflow/core/kernels/image_resizer_state.h @@ -48,6 +48,7 @@ inline float CalculateResizeScale(int64 in_size, int64 out_size, // Half pixel scaler scales assuming that the pixel centers are at 0.5, i.e. the // floating point coordinates of the top,left pixel is 0.5,0.5. struct HalfPixelScaler { + HalfPixelScaler(){}; inline float operator()(const int x, const float scale) const { // Note that we subtract 0.5 from the return value, as the existing bilinear // sampling code etc assumes pixels are in the old coordinate system. @@ -59,6 +60,7 @@ struct HalfPixelScaler { // translation leading to inconsistent results. For example, a flip then a // resize gives different results then a resize then a flip. struct LegacyScaler { + LegacyScaler(){}; inline float operator()(const int x, const float scale) const { return static_cast(x) * scale; } diff --git a/tensorflow/core/kernels/redux_functor.h b/tensorflow/core/kernels/redux_functor.h index 05a867ab007..24dc876ef8e 100644 --- a/tensorflow/core/kernels/redux_functor.h +++ b/tensorflow/core/kernels/redux_functor.h @@ -37,6 +37,7 @@ namespace functor { // output: [Di, ... , DN] where i belongs to set [1,N] template struct ReduceOuterDimensions { + ReduceOuterDimensions(){}; template void operator()(const CPUDevice& device, const Eigen::DSizes& input_dims, @@ -198,6 +199,7 @@ struct ReduceOuterDimensions { // output: [Di, ... , Dj] where i & j belongs to set [1,N]. template struct ReduceMiddleDimensions { + ReduceMiddleDimensions(){}; template void operator()(const CPUDevice& device, const Eigen::DSizes& input_dims, @@ -256,7 +258,7 @@ struct ReduceMiddleDimensions { using Input = Eigen::TensorMap>; Eigen::array reduction_axis = {0}; - const Reducer reducer; + Reducer reducer; const BinaryFunctor binary_op; const auto compute = [inner_dim, middle_dim, input_data, buffer_data,