/*
- * Copyright (c) 2016, 2017 ARM Limited.
+ * Copyright (c) 2016-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
#ifndef __ARM_COMPUTE_ITENSOR_H__
#define __ARM_COMPUTE_ITENSOR_H__
-#include "arm_compute/core/TensorInfo.h"
+#include "arm_compute/core/ITensorInfo.h"
#include <cstdint>
*
* @return A pointer to the tensor's metadata.
*/
- virtual TensorInfo *info() const = 0;
+ virtual ITensorInfo *info() const = 0;
/** Interface to be implemented by the child class to return the tensor's metadata
*
* @return A pointer to the tensor's metadata.
*/
- virtual TensorInfo *info() = 0;
+ virtual ITensorInfo *info() = 0;
/** Default virtual destructor */
virtual ~ITensor() = default;
/** Interface to be implemented by the child class to return a pointer to CPU memory
* @param[in] src Source tensor to copy from.
*/
void copy_from(const ITensor &src);
+
+ /** Print a tensor to a given stream using user defined formatting information
+ *
+ * @param s Output stream
+ * @param io_fmt Format information
+ */
+ void print(std::ostream &s, IOFormatInfo io_fmt = IOFormatInfo()) const;
+ /** Flags if the tensor is used or not
+ *
+ * @return True if it is used else false
+ */
+ bool is_used() const;
+ /** Marks a tensor as unused */
+ void mark_as_unused() const;
+
+private:
+ mutable bool _is_used = { true }; /**< Flag that marks if the tensor is used or not */
};
using IImage = ITensor;