gpu: add functions for traversing the tree branch that is mapped to blocks