Compute Library
18.05
|
Node interface. More...
#include <INode.h>
Public Member Functions | |
INode () | |
Constructor. More... | |
virtual | ~INode ()=default |
Destructor. More... | |
INode (const INode &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
INode & | operator= (const INode &)=delete |
Prevent instances of this class from being copy assigned (As this class contains pointers) More... | |
INode (INode &&)=default | |
Allow instances of this class to be moved. More... | |
INode & | operator= (INode &&)=default |
Allow instances of this class to be move assigned. More... | |
virtual Status | validate () const |
Validate node. More... | |
virtual NodeType | type () const =0 |
Returns node's type. More... | |
virtual void | accept (INodeVisitor &v)=0 |
Accepts a node visitor. More... | |
virtual bool | forward_descriptors ()=0 |
Forwards descriptor information to outputs if possible. More... | |
virtual TensorDescriptor | configure_output (size_t idx) const =0 |
Calculates output configuration. More... | |
std::string | name () const |
Returns node's name. More... | |
NodeID | id () const |
Returns node's ID. More... | |
const Graph * | graph () const |
Returns node's Graph. More... | |
Graph * | graph () |
Returns node's Graph. More... | |
void | set_graph (Graph *g) |
Sets the graph that this node is registered to. More... | |
void | set_id (NodeID id) |
Sets the node id. More... | |
void | set_common_node_parameters (NodeParams common_params) |
Sets common node parameters. More... | |
void | set_requested_target (Target target) |
Sets target preference. More... | |
void | set_assigned_target (Target target) |
Sets the final execution target. More... | |
void | set_output_tensor (TensorID tid, size_t idx) |
Sets the output tensor of at a given index. More... | |
const std::vector< TensorID > & | inputs () const |
Returns inputs of the node. More... | |
const std::vector< TensorID > & | outputs () const |
Returns outputs of the node. More... | |
const std::vector< EdgeID > & | input_edges () const |
Returns input edge set. More... | |
const std::set< EdgeID > & | output_edges () const |
Returns output edge set. More... | |
TensorID | input_id (size_t idx) const |
Returns the tensor ID of a given input of the node. More... | |
TensorID | output_id (size_t idx) const |
Returns the tensor ID of a given output of the node. More... | |
Tensor * | input (size_t idx) const |
Returns the tensor of a given input of the node. More... | |
Tensor * | output (size_t idx) const |
Returns the tensor of a given output of the node. More... | |
EdgeID | input_edge_id (size_t idx) const |
Returns the edge ID of a given input of the node. More... | |
Edge * | input_edge (size_t idx) const |
Returns the edge of a given input of the node. More... | |
size_t | num_inputs () const |
Returns number of inputs of the node. More... | |
size_t | num_outputs () const |
Returns number of outputs of the node. More... | |
Target | requested_target () const |
Returns requested target for this node. More... | |
Target | assigned_target () const |
Returns assigned target for this node. More... | |
Friends | |
class | Graph |
INode | ( | ) |
Constructor.
|
virtualdefault |
Destructor.
Prevent instances of this class from being copied (As this class contains pointers)
|
pure virtual |
Accepts a node visitor.
[in] | v | Visitor to accept |
Implemented in ConvolutionLayerNode, DepthwiseConvolutionLayerNode, SplitLayerNode, DepthConcatenateLayerNode, FullyConnectedLayerNode, EltwiseLayerNode, BatchNormalizationLayerNode, PoolingLayerNode, ActivationLayerNode, NormalizationLayerNode, SoftmaxLayerNode, ConstNode, InputNode, ReshapeLayerNode, FlattenLayerNode, and OutputNode.
Target assigned_target | ( | ) | const |
Returns assigned target for this node.
|
pure virtual |
Calculates output configuration.
[in] | idx | Output index to configure |
Implemented in ConvolutionLayerNode, DepthwiseConvolutionLayerNode, SplitLayerNode, DepthConcatenateLayerNode, FullyConnectedLayerNode, EltwiseLayerNode, BatchNormalizationLayerNode, PoolingLayerNode, ActivationLayerNode, NormalizationLayerNode, SoftmaxLayerNode, ConstNode, InputNode, ReshapeLayerNode, FlattenLayerNode, and OutputNode.
|
pure virtual |
Forwards descriptor information to outputs if possible.
Implemented in ConvolutionLayerNode, DepthwiseConvolutionLayerNode, SplitLayerNode, DepthConcatenateLayerNode, FullyConnectedLayerNode, EltwiseLayerNode, BatchNormalizationLayerNode, PoolingLayerNode, ActivationLayerNode, NormalizationLayerNode, SoftmaxLayerNode, ConstNode, InputNode, ReshapeLayerNode, FlattenLayerNode, and OutputNode.
Referenced by Graph::add_node().
const Graph* graph | ( | ) | const |
Returns node's Graph.
Referenced by arm_compute::graph::detail::all_inputs_are_visited().
NodeID id | ( | ) | const |
Returns node's ID.
Referenced by Edge::consumer_id(), Edge::producer_id(), arm_compute::graph::backends::detail::validate_convolution_layer(), and arm_compute::graph::backends::detail::validate_depthwise_convolution_layer().
Tensor* input | ( | size_t | idx | ) | const |
Returns the tensor of a given input of the node.
[in] | idx | Index of the node input |
Referenced by arm_compute::graph::backends::detail::validate_convolution_layer(), and arm_compute::graph::backends::detail::validate_depthwise_convolution_layer().
Edge* input_edge | ( | size_t | idx | ) | const |
Returns the edge of a given input of the node.
[in] | idx | Index of the node input |
EdgeID input_edge_id | ( | size_t | idx | ) | const |
Returns the edge ID of a given input of the node.
[in] | idx | Index of the node input |
const std::vector<EdgeID>& input_edges | ( | ) | const |
Returns input edge set.
Referenced by arm_compute::graph::detail::all_inputs_are_visited().
TensorID input_id | ( | size_t | idx | ) | const |
Returns the tensor ID of a given input of the node.
[in] | idx | Index of the node input |
const std::vector<TensorID>& inputs | ( | ) | const |
Returns inputs of the node.
std::string name | ( | ) | const |
Returns node's name.
Referenced by arm_compute::graph::backends::detail::validate_convolution_layer(), and arm_compute::graph::backends::detail::validate_depthwise_convolution_layer().
size_t num_inputs | ( | ) | const |
Returns number of inputs of the node.
Referenced by arm_compute::graph::backends::detail::validate_convolution_layer(), and arm_compute::graph::backends::detail::validate_depthwise_convolution_layer().
size_t num_outputs | ( | ) | const |
Returns number of outputs of the node.
Referenced by arm_compute::graph::backends::detail::validate_convolution_layer(), and arm_compute::graph::backends::detail::validate_depthwise_convolution_layer().
Prevent instances of this class from being copy assigned (As this class contains pointers)
Tensor* output | ( | size_t | idx | ) | const |
Returns the tensor of a given output of the node.
[in] | idx | Index of the node output |
Referenced by arm_compute::graph::backends::detail::validate_convolution_layer().
const std::set<EdgeID>& output_edges | ( | ) | const |
TensorID output_id | ( | size_t | idx | ) | const |
Returns the tensor ID of a given output of the node.
[in] | idx | Index of the node output |
const std::vector<TensorID>& outputs | ( | ) | const |
Returns outputs of the node.
Target requested_target | ( | ) | const |
Returns requested target for this node.
void set_assigned_target | ( | Target | target | ) |
Sets the final execution target.
[in] | target | Final execution target |
void set_common_node_parameters | ( | NodeParams | common_params | ) |
Sets common node parameters.
[in] | common_params | Common node parameters to set |
void set_graph | ( | Graph * | g | ) |
Sets the graph that this node is registered to.
[in] | g | Back reference to graph |
Referenced by Graph::add_node().
void set_id | ( | NodeID | id | ) |
void set_output_tensor | ( | TensorID | tid, |
size_t | idx | ||
) |
Sets the output tensor of at a given index.
[in] | tid | Tensor ID |
[in] | idx | Output index |
void set_requested_target | ( | Target | target | ) |
Sets target preference.
[in] | target | Target preference |
|
pure virtual |
Returns node's type.
Implemented in ConvolutionLayerNode, DepthwiseConvolutionLayerNode, SplitLayerNode, DepthConcatenateLayerNode, FullyConnectedLayerNode, EltwiseLayerNode, BatchNormalizationLayerNode, PoolingLayerNode, ActivationLayerNode, NormalizationLayerNode, SoftmaxLayerNode, ConstNode, InputNode, ReshapeLayerNode, FlattenLayerNode, and OutputNode.
Referenced by Graph::add_node().
|
virtual |