MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / WalkToLeaf

Method WalkToLeaf

source/opt/tree_iterator.h:225–232  ·  view source on GitHub ↗

Moves the iterator to the next node in the tree. If we are at the end, do nothing, otherwise if our current node has children, use the children iterator and push the current node into the stack. If we reach the end of the local iterator, pop it.

Source from the content-addressed store, hash-verified

223 // current node into the stack.
224 // If we reach the end of the local iterator, pop it.
225 inline void WalkToLeaf() {
226 while (current_->begin() != current_->end()) {
227 NodeIterator next = ++current_->begin();
228 parent_iterators_.emplace(make_pair(current_, next));
229 // Set the first child as the new node.
230 current_ = *current_->begin();
231 }
232 }
233
234 // The current node of the tree.
235 NodePtr current_;

Callers

nothing calls this directly

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected