@Namespace(value="ngraph") @NoOffset @Properties(inherit=ngraph.class) public class Node extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Modifier and Type | Field and Description |
---|---|
static long |
placement_invalid |
Constructor and Description |
---|
Node(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add_control_dependency(Node node)
This node cannot execute until node executes
|
void |
add_node_control_dependencies(Node source_node)
This node absorbs the control dependencies of source_node
|
void |
add_node_control_dependents(Node source_node)
This node becomes a dependent of every node dependent on source_node
|
void |
add_provenance_group_member(Node node)
\brief Add node to additional nodes that receive tags
|
Node |
add_provenance_group_members_above(NodeOutputVector base)
\brief Add all nodes between this node and nodes in base as additional nodes to receive
provenance tags.
|
void |
add_provenance_tag(BytePointer tag) |
void |
add_provenance_tag(String tag) |
void |
clear_control_dependencies()
Remove all dependencies from this node
|
void |
clear_control_dependents()
Remove this node as a dependency from all dependent nodes
|
Node |
copy_with_new_inputs(NodeOutputVector new_args) |
Node |
copy_with_new_inputs(NodeOutputVector inputs,
NodeVector control_dependencies) |
void |
delayed_validate_and_infer_types() |
BytePointer |
description()
\brief Get the string name for the type of the node, such as
Add or Multiply . |
Node |
get_argument(long index) |
NodeVector |
get_arguments() |
NodeVector |
get_control_dependencies()
Get control dependencies registered on the node
|
PointerPointer |
get_control_dependents()
Get nodes dependent on this node
|
Node |
get_default_value() |
Type |
get_element_type()
Checks that there is exactly one output and returns its element type
|
BytePointer |
get_friendly_name()
\brief Gets the friendly name for a node.
|
Type |
get_input_element_type(long i)
Returns the element type of input i
|
PartialShape |
get_input_partial_shape(long i)
Returns the partial shape of input i
|
Shape |
get_input_shape(long i)
Returns the shape of input i
|
long |
get_input_size()
Returns the number of inputs for the op
|
BytePointer |
get_input_tensor_name(long i)
Returns the tensor name for input i
|
long |
get_instance_id() |
BytePointer |
get_name()
\brief Get the unique name of the node.
|
Node |
get_output_as_single_output_node(long i) |
Node |
get_output_as_single_output_node(long i,
boolean for_get_output_element) |
Type |
get_output_element_type(long i)
Returns the element type for output i
|
DescriptorInputVector |
get_output_inputs(long i)
Returns the set of inputs using output i
|
PartialShape |
get_output_partial_shape(long i)
Returns the partial shape for output i
|
Shape |
get_output_shape(long i)
Returns the shape for output i
|
long |
get_output_size()
Returns the number of outputs from the node.
|
BytePointer |
get_output_tensor_name(long i)
Returns the tensor name for output i
|
DescriptorTensor |
get_output_tensor_ptr()
Checks that there is exactly one output and returns its tensor.
|
DescriptorTensor |
get_output_tensor_ptr(long i)
Returns the tensor of output i
|
DescriptorTensor |
get_output_tensor()
Checks that there is exactly one output and returns its tensor.
|
DescriptorTensor |
get_output_tensor(long i)
Returns the tensor for output i
|
long |
get_placement_index()
Get device placement
|
int |
get_placement()
Get device placement
|
Shape |
get_shape()
Checks that there is exactly one output and returns its shape
|
NodeVector |
get_users() |
NodeVector |
get_users(boolean check_is_used)
Get all the nodes that uses the current node
|
long |
get_version() |
boolean |
has_state() |
NodeOutput |
input_value(long input_index) |
NodeOutputVector |
input_values() |
NodeInput |
input(long input_index) |
NodeInputVector |
inputs() |
boolean |
is_commutative() |
boolean |
is_constant() |
boolean |
is_dynamic() |
boolean |
is_null() |
boolean |
is_op() |
boolean |
is_output() |
boolean |
is_parameter() |
boolean |
is_same_op_type(Node node)
Return true if this has the same implementing class as node.
|
boolean |
lessThan(Node other)
Use instance ids for comparison instead of memory addresses to improve determinism
|
void |
merge_provenance_tags_from(Node source) |
NodeOutput |
output(long output_index) |
NodeOutputVector |
outputs() |
static long |
placement_invalid() |
void |
remove_control_dependency(Node node)
Remove the dependency of this node on node
|
void |
remove_provenance_tag(BytePointer tag)
\brief Adds tag_set to this node and all intermediate nodes above base
|
void |
remove_provenance_tag(String tag) |
void |
revalidate_and_infer_types() |
void |
set_argument(long _position,
NodeOutput argument)
Sets/replaces the arguments with new arguments.
|
void |
set_arguments(NodeOutputVector arguments)
Sets/replaces the arguments with new arguments.
|
void |
set_arguments(NodeVector arguments)
Sets/replaces the arguments with new arguments.
|
void |
set_friendly_name(BytePointer name)
\brief Sets a friendly name for a node.
|
void |
set_friendly_name(String name) |
void |
set_input_is_relevant_to_shape(long i) |
void |
set_input_is_relevant_to_shape(long i,
boolean relevant)
\brief Marks an input as being relevant or irrelevant to the output shapes of this
node.
|
void |
set_input_is_relevant_to_value(long i) |
void |
set_input_is_relevant_to_value(long i,
boolean relevant)
\brief Marks an input as being relevant or irrelevant to the output values of this
node.
|
void |
set_output_size(long output_size)
Sets the number of outputs
|
void |
set_output_type(long i,
Type element_type,
PartialShape pshape) |
void |
set_placement_index(long placement)
Set device placement
|
void |
set_placement(int placement)
Set device placement
|
Pointer |
write_long_description(Pointer arg0) |
Pointer |
write_short_description(Pointer arg0) |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public Node(Pointer p)
Pointer(Pointer)
.public void set_arguments(@Const @ByRef NodeVector arguments)
public void set_arguments(@Cast(value="const ngraph::OutputVector*") @ByRef NodeOutputVector arguments)
public void set_argument(@Cast(value="size_t") long _position, @Const @ByRef NodeOutput argument)
public void set_output_size(@Cast(value="size_t") long output_size)
public void revalidate_and_infer_types()
public void delayed_validate_and_infer_types()
@StdString public BytePointer description()
Add
or Multiply
.
The class name, must not contain spaces as it is used for codegen.@StdString public BytePointer get_name()
public void set_friendly_name(@StdString BytePointer name)
name
- is the friendly name to setpublic void set_friendly_name(@StdString String name)
@StdString public BytePointer get_friendly_name()
@Cast(value="bool") public boolean is_same_op_type(@Const @SharedPtr @ByRef Node node)
public void set_input_is_relevant_to_shape(@Cast(value="size_t") long i, @Cast(value="bool") boolean relevant)
i
- The index of the input to mark as relevant or irrelevant.relevant
- true if the input is relevant to output shapes, false otherwise.
This is used by the shape specialization pass to know which nodes must be statically
evaluated in order to complete shape specialization. (For example, the shape input of
DynReshape must be evaluated statically in order for the output shape to be
determined.) By default, all inputs are marked as shape-irrelevant. Overrides of
validate_and_infer_types should call this function to mark shape-relevant inputs.public void set_input_is_relevant_to_shape(@Cast(value="size_t") long i)
public void set_input_is_relevant_to_value(@Cast(value="size_t") long i, @Cast(value="bool") boolean relevant)
i
- The index of the input to mark as relevant or irrelevant.relevant
- true if the input is relevant to output values, false otherwise.
This is used by the shape specialization pass to cut short evaluation in cases where
an input value does not actually have any effect on the output value of the node. (As
of this writing, the only example of this is ShapeOf.) By default, all inputs are
marked as value-relevant. Overrides of validate_and_infer_types should call this
function to mark value-irrelevant inputs.public void set_input_is_relevant_to_value(@Cast(value="size_t") long i)
public void set_output_type(@Cast(value="size_t") long i, @Const @ByRef Type element_type, @Const @ByRef PartialShape pshape)
@Cast(value="std::ostream*") @ByRef public Pointer write_short_description(@Cast(value="std::ostream*") @ByRef Pointer arg0)
@Cast(value="std::ostream*") @ByRef public Pointer write_long_description(@Cast(value="std::ostream*") @ByRef Pointer arg0)
@Const @ByRef public NodeVector get_control_dependencies()
@Cast(value="ngraph::Node**") @StdVector public PointerPointer get_control_dependents()
public void add_control_dependency(@SharedPtr @ByVal Node node)
public void remove_control_dependency(@SharedPtr @ByVal Node node)
public void clear_control_dependencies()
public void clear_control_dependents()
public void add_node_control_dependencies(@SharedPtr @ByVal Node source_node)
public void add_node_control_dependents(@SharedPtr @ByVal Node source_node)
@Cast(value="size_t") public long get_output_size()
@Const @ByRef public Type get_output_element_type(@Cast(value="size_t") long i)
@Const @ByRef public Type get_element_type()
@Const @ByRef public Shape get_output_shape(@Cast(value="size_t") long i)
@Const @ByRef public PartialShape get_output_partial_shape(@Cast(value="size_t") long i)
@SharedPtr @ByVal public Node get_output_as_single_output_node(@Cast(value="size_t") long i, @Cast(value="bool") boolean for_get_output_element)
@SharedPtr @ByVal public Node get_output_as_single_output_node(@Cast(value="size_t") long i)
@Const @ByRef public Shape get_shape()
@ByRef public DescriptorTensor get_output_tensor(@Cast(value="size_t") long i)
@StdString public BytePointer get_output_tensor_name(@Cast(value="size_t") long i)
@ByRef public DescriptorTensor get_output_tensor()
@SharedPtr @ByVal public DescriptorTensor get_output_tensor_ptr(@Cast(value="size_t") long i)
@SharedPtr @ByVal public DescriptorTensor get_output_tensor_ptr()
@Const @ByRef public DescriptorInputVector get_output_inputs(@Cast(value="size_t") long i)
@Cast(value="size_t") public long get_input_size()
@Const @ByRef public Type get_input_element_type(@Cast(value="size_t") long i)
@Const @ByRef public Shape get_input_shape(@Cast(value="size_t") long i)
@Const @ByRef public PartialShape get_input_partial_shape(@Cast(value="size_t") long i)
@StdString public BytePointer get_input_tensor_name(@Cast(value="size_t") long i)
@ByVal public NodeVector get_arguments()
@SharedPtr @ByVal public Node get_argument(@Cast(value="size_t") long index)
@SharedPtr @ByVal public Node copy_with_new_inputs(@Cast(value="const ngraph::OutputVector*") @ByRef NodeOutputVector new_args)
@SharedPtr @ByVal public Node copy_with_new_inputs(@Cast(value="const ngraph::OutputVector*") @ByRef NodeOutputVector inputs, @Const @ByRef NodeVector control_dependencies)
public void set_placement(@Cast(value="ngraph::Placement") int placement)
public void set_placement_index(@Cast(value="size_t") long placement)
public void add_provenance_tag(@StdString BytePointer tag)
public void add_provenance_tag(@StdString String tag)
public void remove_provenance_tag(@StdString BytePointer tag)
public void remove_provenance_tag(@StdString String tag)
public void add_provenance_group_member(@Const @SharedPtr @ByRef Node node)
@SharedPtr @ByVal public Node add_provenance_group_members_above(@Cast(value="const ngraph::OutputVector*") @ByRef NodeOutputVector base)
public void merge_provenance_tags_from(@Const @Cast(value="const ngraph::Node*") @SharedPtr @ByRef Node source)
@ByVal public NodeVector get_users(@Cast(value="bool") boolean check_is_used)
@ByVal public NodeVector get_users()
@SharedPtr @ByVal public Node get_default_value()
@Cast(value="bool") @Name(value="operator <") public boolean lessThan(@Const @ByRef Node other)
@MemberGetter @Cast(value="const size_t") public static long placement_invalid()
@ByVal public NodeInputVector inputs()
@ByVal public NodeOutputVector input_values()
@ByVal public NodeOutputVector outputs()
@ByVal public NodeInput input(@Cast(value="size_t") long input_index)
input_index
th input of this node.std::out_of_range
- if the node does not have at least input_index+1
inputs.@ByVal public NodeOutput input_value(@Cast(value="size_t") long input_index)
input_index
th input of this node.std::out_of_range
- if the node does not have at least input_index+1
inputs.@ByVal public NodeOutput output(@Cast(value="size_t") long output_index)
output_index
th output of this node.std::out_of_range
- if the node does not have at least output_index+1
outputs.Copyright © 2022. All rights reserved.