Here is the implementation for Single pass LBVH based on the paper "Fast and Simple Agglomerative
LBVH Construction" : https://github.com/Niravaana/HIP-BVH-Construction/blob/main/src/SinglePassLbvh.cpp

You can also find two traversal methods there if/if and while/while based method as discussed in research paper "Understanding the Efficiency of Ray Traversal on GPUs". More methods from this paper will be added along the way.

HIP-BVH-Construction/src/SinglePassLbvh.cpp at main · Niravaana/HIP-BVH-Construction

This is reference implementation for research paper ero Karras, "Maximizing Parallelism in the Construction of BVHs, Octrees, and k-d Trees", High Performance Graphics (2012) - Niravaana/...

GitHub