24.02.1
|
Go to the documentation of this file.
63 _common_params = std::move(common_params);
68 _common_params.
target = target;
73 _assigned_target = target;
78 if (tid !=
NullTensorID && (idx < _outputs.size()) && (_graph->
tensor(tid) !=
nullptr))
85 for (
auto &output_edge_id : _output_edges)
87 auto output_edge = _graph->
edge(output_edge_id);
88 if (output_edge !=
nullptr)
91 auto current_output_tensor = output_edge->
tensor();
92 current_output_tensor->
unbind_edge(output_edge->id());
95 output_edge->update_bound_tensor(updated_tensor);
96 updated_tensor->
bind_edge(output_edge->id());
109 return _common_params.
name;
134 return _output_edges;
140 Edge *e = _graph->
edge(_input_edges[idx]);
147 return _outputs[idx];
154 Edge *e = _graph->
edge(_input_edges[idx]);
155 return (e !=
nullptr) ? e->
tensor() :
nullptr;
162 return _graph->
tensor(_outputs[idx]);
168 return _input_edges[idx];
175 return _graph->
edge(_input_edges[idx]);
180 return _input_edges.size();
185 return _outputs.size();
190 return _common_params;
195 return _common_params.
target;
200 return _assigned_target;
virtual Status validate() const
Validate node.
const Edge * edge(EdgeID id) const
Get edge object given its id.
NodeParams common_node_params() const
Returns common node parameters.
void set_output_tensor(TensorID tid, size_t idx)
Sets the output tensor of at a given index.
EdgeID input_edge_id(size_t idx) const
Returns the edge ID of a given input of the node.
TensorID input_id(size_t idx) const
Returns the tensor ID of a given input of the node.
Tensor * output(size_t idx) const
Returns the tensor of a given output of the node.
size_t num_inputs() const
Returns number of inputs of the node.
const std::vector< TensorID > & outputs() const
Returns outputs of the node.
const std::set< EdgeID > & output_edges() const
Returns output edge set.
std::string name
Node name.
void set_assigned_target(Target target)
Sets the final execution target.
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
Tensor * tensor() const
Returns the tensor associated with this edge.
@ UNSPECIFIED
Unspecified Target.
void bind_edge(EdgeID eid)
Binds the tensor with an edge.
std::string name() const
Returns node's name.
void unbind_edge(EdgeID eid)
Unbinds an edge from a tensor.
Edge * input_edge(size_t idx) const
Returns the edge of a given input of the node.
Target requested_target() const
Returns requested target for this node.
void set_graph(Graph *g)
Sets the graph that this node is registered to.
const std::vector< EdgeID > & input_edges() const
Returns input edge set.
Copyright (c) 2017-2024 Arm Limited.
const Tensor * tensor(TensorID id) const
Get tensor object given its id.
Tensor * input(size_t idx) const
Returns the tensor of a given input of the node.
const Graph * graph() const
Returns node's Graph.
TensorID output_id(size_t idx) const
Returns the tensor ID of a given output of the node.
size_t num_outputs() const
Returns number of outputs of the node.
Target assigned_target() const
Returns assigned target for this node.
constexpr TensorID NullTensorID
Constant NodeID specifying an equivalent of null node.
void set_requested_target(Target target)
Sets target preference.
NodeID id() const
Returns node's ID.
constexpr NodeID EmptyNodeID
Constant EdgeID specifying an equivalent of null edge.
void set_id(NodeID id)
Sets the node id.
TensorID tensor_id() const
Returns the tensor id associated with this edge.
void set_common_node_parameters(NodeParams common_params)
Sets common node parameters.
Target target
Node target.