aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/runtime/CL/CLTensorAllocator.h
diff options
context:
space:
mode:
Diffstat (limited to 'arm_compute/runtime/CL/CLTensorAllocator.h')
-rw-r--r--arm_compute/runtime/CL/CLTensorAllocator.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/arm_compute/runtime/CL/CLTensorAllocator.h b/arm_compute/runtime/CL/CLTensorAllocator.h
index 067c391489..fde8e9c43a 100644
--- a/arm_compute/runtime/CL/CLTensorAllocator.h
+++ b/arm_compute/runtime/CL/CLTensorAllocator.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2020 Arm Limited.
+ * Copyright (c) 2016-2021 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,14 +24,14 @@
#ifndef ARM_COMPUTE_CLTENSORALLOCATOR_H
#define ARM_COMPUTE_CLTENSORALLOCATOR_H
+#include "arm_compute/core/CL/CLTypes.h"
+#include "arm_compute/core/CL/OpenCL.h"
#include "arm_compute/runtime/CL/CLArray.h"
#include "arm_compute/runtime/CL/CLMemory.h"
+#include "arm_compute/runtime/IAllocator.h"
#include "arm_compute/runtime/ITensorAllocator.h"
#include "arm_compute/runtime/MemoryGroup.h"
-#include "arm_compute/core/CL/CLTypes.h"
-#include "arm_compute/core/CL/OpenCL.h"
-
#include <cstdint>
namespace arm_compute
@@ -127,6 +127,13 @@ public:
*/
void set_associated_memory_group(IMemoryGroup *associated_memory_group);
+ /** Sets global allocator that will be used by all CLTensor objects
+ *
+ *
+ * @param[in] allocator Allocator to be used as a global allocator
+ */
+ static void set_global_allocator(IAllocator *allocator);
+
protected:
/** Call map() on the OpenCL buffer.
*
@@ -140,7 +147,7 @@ private:
static const cl::Buffer _empty_buffer;
private:
- CLRuntimeContext *_ctx;
+ CLRuntimeContext *_ctx;
IMemoryManageable *_owner; /**< Memory manageable object that owns the allocator */
IMemoryGroup *_associated_memory_group; /**< Registered memory manager */
CLMemory _memory; /**< OpenCL memory */