SharedMemoryDGLGraph.recv(v='__ALL__', reduce_func='default', apply_node_func='default', inplace=True)[source]

Receive and reduce incoming messages and update the features of node(s) \(v\).

Optionally, apply a function to update the node features after receive.

In the graph store, all updates are written inplace.

  • reduce_func will be skipped for nodes with no incoming message.

  • If all v have no incoming message, this will downgrade to an apply_nodes().

  • If some v have no incoming message, their new feature value will be calculated by the column initializer (see set_n_initializer()). The feature shapes and dtypes will be inferred.

The node features will be updated by the result of the reduce_func.

Messages are consumed once received.

The provided UDF maybe called multiple times so it is recommended to provide function with no side effect.

  • v (node, container or tensor, optional) – The node to be updated. Default is receiving all the nodes.

  • reduce_func (callable, optional) – Reduce function on the node. The function should be a Node UDF.

  • apply_node_func (callable) – Apply function on the nodes. The function should be a Node UDF.

  • inplace (bool, optional) – The value is always True.