Class ngraph::runtime::Tensor¶
-
class Tensor¶
Subclassed by ngraph::runtime::HostTensor
Public Functions
-
virtual const ngraph::Shape &get_shape() const¶
Get tensor shape.
- Returns
const reference to a Shape
-
const ngraph::PartialShape &get_partial_shape() const¶
Get tensor partial shape.
- Returns
const reference to a PartialShape
-
virtual const element::Type &get_element_type() const¶
Get tensor element type.
- Returns
element::Type
-
virtual size_t get_element_count() const¶
Get number of elements in the tensor.
- Returns
number of elements in the tensor
-
virtual size_t get_size_in_bytes() const¶
Get the size in bytes of the tensor.
- Returns
number of bytes in tensor’s allocation
-
virtual void write(const void *p, size_t n) = 0¶
Write bytes directly into the tensor.
- Parameters
p – Pointer to source of data
n – Number of bytes to write, must be integral number of elements.
-
virtual void read(void *p, size_t n) const = 0¶
Read bytes directly from the tensor.
- Parameters
p – Pointer to destination for data
n – Number of bytes to read, must be integral number of elements.
-
virtual const ngraph::Shape &get_shape() const¶