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:70:
index = GraphNodeIdIndex(node_id);
generation = GraphNodeIdGeneration(node_id);
if (!generation) {- In
Graph.c:271:
if (graph_slot_is_occupied(slot) && !graph_slot_is_marked(slot) &&
(slot->generation == GraphNodeIdGeneration(neighbor_id))) {
idx += 1;
} else {- In
Graph.c:636:
index = GraphNodeIdIndex(node_id);
generation = GraphNodeIdGeneration(node_id);
if (!generation || ((u64)index >= VecLen(&graph->slots))) {- In
Graph.Type.c:46:
bool result = GraphAllocator(&graph)->alignment == 32 && GraphNodeIdIndex(node_id) == 0 &&
GraphNodeIdGeneration(node_id) == 1;
result = result && GraphNodeGetId(node) == node_id;
result = result && GraphNodeIndex(node) == 0;- In
Graph.Ops.c:71:
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:303:
result = result && (GraphNodeIdIndex(reused) == GraphNodeIdIndex(b));
result = result && (GraphNodeIdGeneration(reused) == (GraphNodeIdGeneration(b) + 1));
result = result && (counts[GraphNodeIdIndex(reused)] == 29);- In
Graph.Init.c:27:
u64 slot_count = VecLen(&graph.slots);
size slot_capacity = VecCapacity(&graph.slots);
u32 first_generation = GraphNodeIdGeneration(first_id);
u32 second_generation = GraphNodeIdGeneration(second_id);
u32 third_generation = GraphNodeIdGeneration(third_id);- In
Graph.Init.c:28:
size slot_capacity = VecCapacity(&graph.slots);
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:29:
u32 first_generation = GraphNodeIdGeneration(first_id);
u32 second_generation = GraphNodeIdGeneration(second_id);
u32 third_generation = GraphNodeIdGeneration(third_id);
u64 slot_index; 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