10 #include "ngraph/descriptor/tensor.hpp"
11 #include "ngraph/shape.hpp"
12 #include "ngraph/strides.hpp"
13 #include "ngraph/type/element_type.hpp"
22 Tensor(
const std::shared_ptr<ngraph::descriptor::Tensor>& descriptor)
23 : m_descriptor(descriptor)
54 NGRAPH_DEPRECATED(
"Only output ports have names")
55 const std::
string& get_name() const;
60 NGRAPH_DEPRECATED("This method is deprecated and will be removed in 2022.1 release")
61 bool get_stale() const;
65 NGRAPH_DEPRECATED("This method is deprecated and will be removed in 2022.1 release")
66 void set_stale(
bool val);
71 virtual
void write(const
void* p,
size_t n) = 0;
76 virtual
void read(
void* p,
size_t n) const = 0;
80 NGRAPH_DEPRECATED("This method is deprecated and will be removed in 2022.1 release")
81 virtual
void wait_for_read_ready() {}
84 NGRAPH_DEPRECATED(
"This method is deprecated and will be removed in 2022.1 release")
85 virtual
void wait_for_write_ready() {}
88 std::shared_ptr<ngraph::descriptor::Tensor> m_descriptor;
Class representing a shape that may be partially or totally dynamic.
Definition: partial_shape.hpp:34
Shape for a tensor.
Definition: shape.hpp:19
Definition: element_type.hpp:51
Definition: tensor.hpp:20
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:16