Shortcuts

Struct NodeInfo

Struct Documentation

struct ripple::NodeInfo

This class defines extra infromation for a node which may be useful for the construction of graphs, but which is not necessary for execution.

We store it separately to reduce the memory footprint of the node so that on the fast path (node execution) this information does not result in a performance hit.

Public Types

using Name = std::string

Defines the type used for the node name.

using IdType = uint64_t

Defines the type used for the node id.

using Friends = std::vector<IdType>

Defines the type of the friends container.

Public Functions

NodeInfo() = default

Default constructor for node info.

NodeInfo(ExecutionKind exec_kind_) noexcept

Constructor to set the execution kind for the node.

Parameters
  • exec_kind_: The execution kind for the node.

NodeInfo(NodeKind kind_, ExecutionKind exec_kind_) noexcept

Constructor to set the kind and execution kind for the node.

Parameters
  • kind_: The kind of teh node.

  • exec_kind_: The execution kind for the node.

NodeInfo(Name name_) noexcept

Constructor for node info which sets the name for the node.

Parameters
  • name_: The name of the node.

NodeInfo(Name name_, IdType id_) noexcept

Constructor to set the node name and id.

Parameters
  • name_: The name of the node.

  • id_: The id of the node.

NodeInfo(Name name_, IdType id_, NodeKind kind_) noexcept

Constructor to set the node name , id, and kind.

Parameters
  • name_: The name of the node.

  • id_: The id of the node.

  • kind_: The kind of the node.

NodeInfo(Name name_, IdType id_, NodeKind kind_, ExecutionKind exec_) noexcept

Constructor to set the node name, id, kind, and execution target for the node.

Parameters
  • name_: The name of the node.

  • id_: The id of the node.

  • kind_: The kind of the node.

  • exec_: The execution kind of the node.

NodeInfo(const NodeInfo &other) = default

Copy constructor deleted.

NodeInfo(NodeInfo &&other) = default

Move constructor deleted.

auto operator=(const NodeInfo&) = delete

Move assignment deleted.

auto operator=(NodeInfo&&) = delete

Copy assignment deleted.

Public Members

Name name = default_name

The name of the node.

Friends friends = {}

Siblings for the node.

IdType id = default_id

Id of the node.

NodeKind kind = NodeKind::normal

The kind of the node.

ExecutionKind exec = ExecutionKind::gpu

Execution kind of the node.

Public Static Functions

template<size_t Size>
auto id_from_indices(const std::array<uint32_t, Size> &indices) -> uint64_t

Creates an id for a node from the given indices, using hash combining.

Return

The id of the node.

Parameters
  • indices: The indices to create an id from.

Template Parameters
  • Size: The number of ids.

template<size_t Size>
auto name_from_indices(const std::array<uint32_t, Size> &indices) noexcept -> Name

Creates a name for a node from the indices.

Return

The name of the node.

Parameters
  • indices: The indices to create a name from.

Template Parameters
  • Size: The number of ids.

Public Static Attributes

constexpr IdType default_id = std::numeric_limits<IdType>::max()

Default id of the node.

constexpr auto default_name = ""

Default name of the node.

Docs

Access comprehensive developer documentation for Ripple

View Docs

Tutorials

Get tutorials to help with understand all features

View Tutorials

Examples

Find examples to help get started

View Examples