aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/cpu/operators/CpuPooling.h
diff options
context:
space:
mode:
authorMichele Di Giorgio <michele.digiorgio@arm.com>2021-05-11 17:41:32 +0100
committerMichele Di Giorgio <michele.digiorgio@arm.com>2021-05-17 09:33:02 +0000
commit0c19cbd5800e830fa67cdd3b725efe796b211899 (patch)
tree450f5e33d482207d77355aa094d27e148588f42e /src/runtime/cpu/operators/CpuPooling.h
parent538a076aae14dbc1940c52057e135f8a1872aa11 (diff)
downloadComputeLibrary-0c19cbd5800e830fa67cdd3b725efe796b211899.tar.gz
Move memory management out of CpuPooling
Change-Id: Idae4fc687942f61a1f63f23c9e5538df28888d93 Signed-off-by: Michele Di Giorgio <michele.digiorgio@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5632 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/runtime/cpu/operators/CpuPooling.h')
-rw-r--r--src/runtime/cpu/operators/CpuPooling.h23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/runtime/cpu/operators/CpuPooling.h b/src/runtime/cpu/operators/CpuPooling.h
index b1647ea689..bc30adf762 100644
--- a/src/runtime/cpu/operators/CpuPooling.h
+++ b/src/runtime/cpu/operators/CpuPooling.h
@@ -26,8 +26,7 @@
#include "src/runtime/cpu/ICpuOperator.h"
-#include "arm_compute/runtime/IMemoryManager.h"
-#include "src/runtime/cpu/operators/CpuPoolingAssemblyDispatch.h"
+#include "arm_compute/core/experimental/Types.h"
#include <memory>
@@ -38,19 +37,17 @@ struct PoolingLayerInfo;
namespace cpu
{
-// Forward Declarations
-class CpuPoolingAssemblyDispatch;
/** Basic function to simulate a pooling layer with the specified pooling operation. This function calls the following kernels:
*
* -# @ref NEFillBorderKernel (executed if padding size is different from zero)
* -# @ref kernels::CpuPoolingKernel
- * -# @ref CpuPoolingAssemblyDispatch
+ * -# @ref kernels::CpuPoolingAssemblyWrapperKernel
*/
class CpuPooling : public ICpuOperator
{
public:
/** Constructor */
- CpuPooling(std::shared_ptr<IMemoryManager> memory_manager = nullptr);
+ CpuPooling();
/** Prevent instances of this class from being copied (As this class contains pointers) */
CpuPooling(const CpuPooling &) = delete;
/** Prevent instances of this class from being copied (As this class contains pointers) */
@@ -86,16 +83,16 @@ public:
// Inherited methods overridden:
void run(ITensorPack &tensors) override;
+ experimental::MemoryRequirements workspace() const override;
private:
- std::shared_ptr<IMemoryManager> _memory_manager;
-
- std::unique_ptr<INEKernel> _pooling_layer_kernel;
- std::unique_ptr<INEKernel> _border_handler;
- std::unique_ptr<CpuPoolingAssemblyDispatch> _asm_glue;
+ std::unique_ptr<INEKernel> _pooling_layer_kernel;
+ std::unique_ptr<INEKernel> _border_handler;
+ std::unique_ptr<INEKernel> _asm_glue;
- bool _is_global_pooling_layer;
- DataLayout _data_layout;
+ bool _is_global_pooling_layer;
+ DataLayout _data_layout;
+ experimental::MemoryRequirements _mem_req;
};
} // namespace cpu
} // namespace arm_compute