24 #ifndef ARM_COMPUTE_GRAPH_EDGE_H 25 #define ARM_COMPUTE_GRAPH_EDGE_H 52 : _id(id), _producer(producer), _consumer(consumer), _producer_idx(producer_idx), _consumer_idx(consumer_idx), _tensor(tensor)
70 return (_producer ==
nullptr) ?
EmptyNodeID : _producer->
id();
78 return (_consumer ==
nullptr) ?
EmptyNodeID : _consumer->
id();
102 return _producer_idx;
110 return _consumer_idx;
136 _tensor = (tensor !=
nullptr) ? tensor : _tensor;
146 unsigned int _producer_idx;
147 unsigned int _consumer_idx;
unsigned int consumer_idx() const
Returns the index of the input that consumes the result in the consumer node.
INode * consumer() const
Returns consumer node.
void update_bound_tensor(Tensor *tensor)
Bind the edge to another tensor.
Tensor * tensor() const
Returns the tensor associated with this edge.
TensorID tensor_id() const
Returns the tensor id associated with this edge.
unsigned int producer_idx() const
Returns the index of the output that produces the result in the producer node.
EdgeID id() const
Returns edge id.
Copyright (c) 2017-2021 Arm Limited.
Edge(EdgeID id, INode *producer, unsigned int producer_idx, INode *consumer, unsigned int consumer_idx, Tensor *tensor)
Default Constructor.
NodeID id() const
Returns node's ID.
NodeID producer_id() const
Returns producer node id.
TensorID id() const
Tensor ID accessor.
constexpr NodeID EmptyNodeID
Constant EdgeID specifying an equivalent of null edge.
NodeID consumer_id() const
Returns sink node id.
constexpr TensorID NullTensorID
Constant NodeID specifying an equivalent of null node.
INode * producer() const
Returns producer node.