friend void swap(SimpleTensor< U > &tensor1, SimpleTensor< U > &tensor2)
Swaps the content of the provided tensors.
size_t element_size() const override
Size of each element in the tensor in bytes.
Subclass of SimpleTensor using uint8_t as value type.
RawTensor & operator=(RawTensor tensor)
Copy the given tensor.
Format format() const override
Image format of the tensor.
DataType data_type() const override
Data type of the tensor.
TensorShape shape() const override
Shape of the tensor.
const void * operator()(const Coordinates &coord) const override
Read only access to the specified element.
Copyright (c) 2017-2021 Arm Limited.
int coord2index(const TensorShape &shape, const Coordinates &coord)
Linearise the given coordinate.
Format
Image colour formats.
Simple tensor object that stores elements in a consecutive chunk of memory.
int num_channels() const override
Number of channels of the tensor.
int num_elements() const override
Number of elements of the tensor.
RawTensor(TensorShape shape, Format format)
Create an uninitialised tensor of the given shape and format.
DataType
Available data types.
const T * data() const
Constant pointer to the underlying buffer.