有没有人在任何光线追踪碰撞测试内核(Cuda、Opencl)中尝试过用于 GPU 计算的自定义分支预测算法?
我是否应该担心低深度(2-5)的性能?
例子:
trace for the first group of rays
check for previous ray depth predictor, if zero, guess zero.
if gt one, guess d>=1
go one level deeper in tracing kernel.(with pseudo stack & recursivity)
recursively repeat
go out of one depth after saving guess state
recursively go out of depths.
这可以击败硬件级别的预测吗?这甚至可以使总跟踪时间更好吗?
此伪代码中的 "if" 语句不应包含任何 "if" 。所以它只是根据预测值计算零值或实际值。
谢谢。