From 585c0cee3a6b6734766dcaf1899b34e9c66ed784 Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 29 Mar 2018 14:35:35 +0800 Subject: [PATCH] cpplint check --- mace/kernels/eltwise.h | 12 ++++++------ mace/kernels/opencl/depth_to_space_opencl.cc | 3 --- mace/kernels/opencl/eltwise_opencl.cc | 2 +- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/mace/kernels/eltwise.h b/mace/kernels/eltwise.h index 09e3d9ea..15f81a3c 100644 --- a/mace/kernels/eltwise.h +++ b/mace/kernels/eltwise.h @@ -41,7 +41,7 @@ struct EltwiseFunctor : EltwiseFunctorBase { StatsFuture *future) { Tensor::MappingGuard input0_guard(input0); Tensor::MappingGuard input1_guard(input1); - Tensor::MappingGuard output_guard(output); + Tensor::MappingGuard output_guard(output); const T *input0_ptr = input0->data(); const T *input1_ptr = input1->data(); @@ -56,12 +56,12 @@ struct EltwiseFunctor : EltwiseFunctorBase { } break; case SUM: - if (coeff_.empty()) { + if (coeff_.empty()) { #pragma omp parallel for - for (index_t i = 0; i < size; ++i) { + for (index_t i = 0; i < size; ++i) { output_ptr[i] = input0_ptr[i] + input1_ptr[i]; } - } else { + } else { #pragma omp parallel for for (index_t i = 0; i < size; ++i) { output_ptr[i] = @@ -69,13 +69,13 @@ struct EltwiseFunctor : EltwiseFunctorBase { } } break; - case MAX: + case MAX: #pragma omp parallel for for (index_t i = 0; i < size; ++i) { output_ptr[i] = std::max(input0_ptr[i], input1_ptr[i]); } break; - case MIN: + case MIN: #pragma omp parallel for for (index_t i = 0; i < size; ++i) { output_ptr[i] = std::min(input0_ptr[i], input1_ptr[i]); diff --git a/mace/kernels/opencl/depth_to_space_opencl.cc b/mace/kernels/opencl/depth_to_space_opencl.cc index 6d752642..c22a6e4c 100644 --- a/mace/kernels/opencl/depth_to_space_opencl.cc +++ b/mace/kernels/opencl/depth_to_space_opencl.cc @@ -21,7 +21,6 @@ void DepthToSpaceOpFunctor::operator()( const index_t input_depth = input->dim(3); const char *kernel_name = nullptr; - index_t kernel_width = input_width; index_t output_height, output_width, output_depth; if (d2s_) { @@ -29,13 +28,11 @@ void DepthToSpaceOpFunctor::operator()( output_width = input_width * block_size_; output_depth = input_depth / (block_size_ * block_size_); kernel_name = "depth_to_space"; - kernel_width = output_width; } else { output_height = input_height / block_size_; output_width = input_width / block_size_; output_depth = input_depth * block_size_ * block_size_; kernel_name = "space_to_depth"; - kernel_width = input_width; } const index_t input_depth_blocks = RoundUpDiv4(input_depth); const index_t output_depth_blocks = RoundUpDiv4(output_depth); diff --git a/mace/kernels/opencl/eltwise_opencl.cc b/mace/kernels/opencl/eltwise_opencl.cc index 132549a3..c23534bb 100644 --- a/mace/kernels/opencl/eltwise_opencl.cc +++ b/mace/kernels/opencl/eltwise_opencl.cc @@ -22,7 +22,7 @@ void EltwiseFunctor::operator()(const Tensor *input0, const index_t channel_blocks = RoundUpDiv4(channels); const index_t width_pixels = channel_blocks * width; - const index_t batch_height_pixels = batch * height; + const index_t batch_height_pixels = batch * height; const uint32_t gws[2] = {static_cast(width_pixels), static_cast(batch_height_pixels)}; -- GitLab