24 #ifndef ARM_COMPUTE_ITENSOR_H 25 #define ARM_COMPUTE_ITENSOR_H 55 virtual uint8_t *
buffer()
const = 0;
97 mutable bool _is_used = {
true };
void mark_as_used() const
Marks a tensor as used.
uint8_t * ptr_to_element(const Coordinates &id) const
Return a pointer to the element at the passed coordinates.
virtual int32_t offset_element_in_bytes(const Coordinates &pos) const =0
The offset in bytes from the beginning of the memory allocation to access the element at position (x...
bool is_used() const
Flags if the tensor is used or not.
Store the tensor's metadata.
Interface for CPU tensor.
virtual ~ITensor()=default
Default virtual destructor.
SimpleTensor< float > src
Copyright (c) 2017-2023 Arm Limited.
void mark_as_unused() const
Marks a tensor as unused.
virtual uint8_t * buffer() const =0
Interface to be implemented by the child class to return a pointer to CPU memory. ...
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor's metadata.
void copy_from(const ITensor &src)
Copy the content of another tensor.
void print(std::ostream &s, IOFormatInfo io_fmt=IOFormatInfo()) const
Print a tensor to a given stream using user defined formatting information.