Skip to main content

Module wire

Module wire 

Source
Expand description

Vocabulary of the NIR HDF5 wire format.

Everything here is pure Rust and always compiled, with or without the hdf5 feature: it is the shared agreement between the reader and the writer, and it is useful on its own to tooling that inspects .nir files without going through crate::io::read.

The structural layout these names describe:

/version                 scalar string, e.g. "0.2.0"
/node                    group — the root NIRGraph
  type                   scalar string "NIRGraph"
  edges                  (E, 2) string dataset
  nodes/<name>/          one group per node
    type                 scalar string, e.g. "LIF"
    <field>              one dataset per wire field
    metadata/            group; omitted when empty
  metadata/              group; omitted when empty

Constants§

KEY_EDGES
Dataset holding a graph’s (E, 2) edge list.
KEY_METADATA
Group holding free-form metadata; omitted from the file when empty.
KEY_NODE
Group holding the root graph.
KEY_NODES
Group holding a graph’s named nodes.
KEY_TYPE
Dataset holding a node’s wire type string.
KEY_VERSION
Dataset holding the NIR format version at the root of the file.
WIRE_TYPES
Every node type string that can appear in a .nir file.

Functions§

check_hdf5_string
Check that value can be stored in an HDF5 string dataset.
check_link_name
Check that name can be used as an HDF5 link name.
is_wire_type
Whether name is a NIR wire node type this crate understands.
padding_as_wire_str
Wire spelling of the symbolic padding modes.
padding_from_wire_str
Parse a symbolic padding mode from its wire spelling.