GraphNodeIdGeneration
Description
Extract the generation encoded in a node id.
Parameters
| Name | Direction | Description |
|---|---|---|
id |
in | Graph node id. |
Success
High 32-bit generation encoded in id.
Failure
Function cannot fail.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Graph.c:91:
index = GraphNodeIdIndex(node_id);
generation = GraphNodeIdGeneration(node_id);
if (!generation) {- In
Graph.c:308:
slot = graph_slot_ptr_const_raw(graph, GraphNodeIdIndex(neighbor_id));
if (graph_slot_is_occupied(slot) && !graph_slot_is_marked(slot) && (slot->generation == GraphNodeIdGeneration(neighbor_id))) {
idx += 1;
} else {- In
Graph.c:613:
index = GraphNodeIdIndex(node_id);
generation = GraphNodeIdGeneration(node_id);
if (!generation || ((u64)index >= graph->slots.length)) {- In
Graph.Ops.c:65:
result = result && (GraphNodeIdIndex(d) == GraphNodeIdIndex(b));
result = result && (GraphNodeIdGeneration(d) == (GraphNodeIdGeneration(b) + 1));
result = result && (GraphNodeData(&graph, GraphGetNode(&graph, d)) == 40);
result = result && !GraphNodeVisited(GraphGetNode(&graph, d));- In
Graph.Ops.c:276:
result = result && (GraphNodeIdIndex(reused) == GraphNodeIdIndex(b));
result = result && (GraphNodeIdGeneration(reused) == (GraphNodeIdGeneration(b) + 1));
result = result && (counts[GraphNodeIdIndex(reused)] == 29);- In
Graph.Init.c:22:
u64 slot_count = graph.slots.length;
size slot_capacity = graph.slots.capacity;
u32 first_generation = GraphNodeIdGeneration(first_id);
u32 second_generation = GraphNodeIdGeneration(second_id);
u32 third_generation = GraphNodeIdGeneration(third_id);- In
Graph.Init.c:23:
size slot_capacity = graph.slots.capacity;
u32 first_generation = GraphNodeIdGeneration(first_id);
u32 second_generation = GraphNodeIdGeneration(second_id);
u32 third_generation = GraphNodeIdGeneration(third_id);
u64 slot_index;- In
Graph.Init.c:24:
u32 first_generation = GraphNodeIdGeneration(first_id);
u32 second_generation = GraphNodeIdGeneration(second_id);
u32 third_generation = GraphNodeIdGeneration(third_id);
u64 slot_index;- In
Graph.Type.c:33:
GraphNode node = GraphGetNode(&graph, node_id);
bool result = graph.alignment == 32 && GraphNodeIdIndex(node_id) == 0 && GraphNodeIdGeneration(node_id) == 1;
result = result && GraphNodeGetId(node) == node_id;
result = result && GraphNodeIndex(node) == 0; GraphNodeId id1 = GraphAddNodeR(&graph, shared);
bool result = GraphNodeIdIndex(id0) == 0 && GraphNodeIdGeneration(id0) == 1 && GraphNodeIdIndex(id1) == 1;
result = result && owned == 0 && shared == 7;
result = result && GraphNodeAt(&graph, id0) == 42;
Last updated on