aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/graph/ITensorHandle.h
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2018-05-03 20:47:16 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:51:50 +0000
commit3d1489de593574e65ef1e64a7ae64e4e56c2978b (patch)
treef87f3df521cb5ed8bd383dad89cbeb92c49670ac /arm_compute/graph/ITensorHandle.h
parent54d6fae4dbb4f556cc5ec484c51681ad84c015a7 (diff)
downloadComputeLibrary-3d1489de593574e65ef1e64a7ae64e4e56c2978b.tar.gz
COMPMID-605: Transition buffer memory manager
Change-Id: Ide7c6124eb19f13f15f517e62d705646a0cd1ecd Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/130184 Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'arm_compute/graph/ITensorHandle.h')
-rw-r--r--arm_compute/graph/ITensorHandle.h29
1 files changed, 25 insertions, 4 deletions
diff --git a/arm_compute/graph/ITensorHandle.h b/arm_compute/graph/ITensorHandle.h
index cc7132e316..261ebf5474 100644
--- a/arm_compute/graph/ITensorHandle.h
+++ b/arm_compute/graph/ITensorHandle.h
@@ -25,9 +25,13 @@
#define __ARM_COMPUTE_GRAPH_ITENSORHANDLE_H__
#include "arm_compute/core/ITensor.h"
+#include "arm_compute/graph/Types.h"
namespace arm_compute
{
+// Forward declarations
+class IMemoryGroup;
+
namespace graph
{
/** Tensor handle interface object */
@@ -38,10 +42,13 @@ public:
virtual ~ITensorHandle() = default;
/** Allocates backend memory for the handle */
virtual void allocate() = 0;
- /** Backend tensor object accessor */
- virtual arm_compute::ITensor &tensor() = 0;
- /** Backend tensor object const accessor */
- virtual const arm_compute::ITensor &tensor() const = 0;
+ /** Allocates backend memory for the handle */
+ virtual void free() = 0;
+ /** Set backend tensor to be managed by a memory group
+ *
+ * @param[in] mg Memory group
+ */
+ virtual void manage(IMemoryGroup *mg) = 0;
/** Maps backend tensor object
*
* @param[in] blocking Flags if the mapping operations should be blocking
@@ -58,11 +65,25 @@ public:
* on the other hand if a sub-tensor is marked as unused then the parent tensor won't be released
*/
virtual void release_if_unused() = 0;
+ /** Backend tensor object accessor */
+ virtual arm_compute::ITensor &tensor() = 0;
+ /** Backend tensor object const accessor */
+ virtual const arm_compute::ITensor &tensor() const = 0;
+ /** Return the parent tensor handle if is a subtensor else this
+ *
+ * @return Parent tensor handle
+ */
+ virtual ITensorHandle *parent_handle() = 0;
/** Checks if a backing tensor is a sub-tensor object or not
*
* @return True if the backend tensor is a sub-tensor else false
*/
virtual bool is_subtensor() const = 0;
+ /** Returns target type
+ *
+ * @return Target type
+ */
+ virtual Target target() const = 0;
};
} // namespace graph
} // namespace arm_compute