22 #include "ngraph/descriptor/tensor.hpp"
23 #include "ngraph/shape.hpp"
24 #include "ngraph/strides.hpp"
25 #include "ngraph/type/element_type.hpp"
34 Tensor(
const std::shared_ptr<ngraph::descriptor::Tensor>& descriptor)
35 : m_descriptor(descriptor)
66 NGRAPH_DEPRECATED(
"Only output ports have names")
67 const std::
string& get_name() const;
72 bool get_stale() const;
76 void set_stale(
bool val);
81 virtual
void write(const
void* p,
size_t n) = 0;
86 virtual
void read(
void* p,
size_t n) const = 0;
90 virtual
void wait_for_read_ready() {}
95 std::shared_ptr<ngraph::descriptor::Tensor> m_descriptor;
Class representing a shape that may be partially or totally dynamic.
Definition: partial_shape.hpp:46
Shape for a tensor.
Definition: shape.hpp:31
Definition: element_type.hpp:61
Definition: tensor.hpp:32
virtual void wait_for_write_ready()
notify tensor of new data, call may block. backends may use this as indication of new data in tensor.
Definition: tensor.hpp:93
const ngraph::PartialShape & get_partial_shape() const
Get tensor partial shape.
virtual size_t get_size_in_bytes() const
Get the size in bytes of the tensor.
virtual const element::Type & get_element_type() const
Get tensor element type.
virtual size_t get_element_count() const
Get number of elements in the tensor.
virtual const ngraph::Shape & get_shape() const
Get tensor shape.
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:28