diff options
Diffstat (limited to 'src/runtime/GLES_COMPUTE/functions/GCPoolingLayer.cpp')
-rw-r--r-- | src/runtime/GLES_COMPUTE/functions/GCPoolingLayer.cpp | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/runtime/GLES_COMPUTE/functions/GCPoolingLayer.cpp b/src/runtime/GLES_COMPUTE/functions/GCPoolingLayer.cpp index ff03effd3f..dcbb39d87d 100644 --- a/src/runtime/GLES_COMPUTE/functions/GCPoolingLayer.cpp +++ b/src/runtime/GLES_COMPUTE/functions/GCPoolingLayer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -25,10 +25,17 @@ #include "arm_compute/core/GLES_COMPUTE/IGCTensor.h" #include "arm_compute/core/GLES_COMPUTE/kernels/GCPoolingLayerKernel.h" +#include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h" + #include "support/ToolchainSupport.h" using namespace arm_compute; +GCPoolingLayer::GCPoolingLayer() + : _kernel(nullptr), _border_handler(), _shift_handler() +{ +} + void GCPoolingLayer::configure(IGCTensor *input, IGCTensor *output, const PoolingLayerInfo &pool_info) { // Configure pooling kernel @@ -39,9 +46,20 @@ void GCPoolingLayer::configure(IGCTensor *input, IGCTensor *output, const Poolin // Configure border depending on operation required BorderMode border_mode = (PoolingType::MAX == pool_info.pool_type()) ? BorderMode::REPLICATE : BorderMode::CONSTANT; _border_handler.configure(input, _kernel->border_size(), border_mode, PixelValue(0.0f)); + + _shift_handler.configure(input); } Status GCPoolingLayer::validate(const ITensorInfo *input, const ITensorInfo *output, const PoolingLayerInfo &pool_info) { return GCPoolingLayerKernel::validate(input, output, pool_info); -}
\ No newline at end of file +} + +void GCPoolingLayer::run() +{ + GCScheduler::get().dispatch(_shift_handler, false); + GCScheduler::get().memory_barrier(); + GCScheduler::get().dispatch(_border_handler, false); + GCScheduler::get().memory_barrier(); + GCScheduler::get().dispatch(*_kernel); +} |