Hello,
This patch removes the gotos from bool_eval(). It should provide the exact same output.
I expect these branches to be as fast as the gotos with standard branch optimizations on.
The only actual code change is an extra variable assignment.
This is applied on the opencl branch yes? I can put it through some validation testing, unless there's a reason to hold off on it. All for eliminating the gotos spaghetti.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is applied on the opencl branch yes? I can put it through some
validation testing, unless there's a reason to hold off on it. All for
eliminating the gotos spaghetti.
No, it hasn't been applied yet. this should be the basis for a new
bool_eval() implementation for OpenCL assuming this change works without
bugs and does not impact performance in a negative way. We also have to
remove the dynamic stack growth and make the binary tree into a more
compact linear array to make this algorithm more amenable to the GPU. The
whole deal with the extra per thread memory for the tree rewrites is also
an issue but this can be accommodated since I believe this extra memory has
a fixed preallocated per thread size that is not tremendously huge.
So I would like you to please validate that this code change does not
impact either validity or performance negatively. I believe it should have
similar performance. But you have more experience with this sort of testing
and access to more test scenes than we have available.
Regards,
--
Vasco Alexandre da Silva Costa
PhD in Computer Engineering (Computer Graphics)
Instituto Superior Técnico/University of Lisbon, Portugal
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
https://en.wikipedia.org/wiki/Jump_threading
https://gcc.gnu.org/onlinedocs/gcc-3.4.5/gcc/Optimize-Options.html
i.e. -fthread-jumps on -O1
This is applied on the opencl branch yes? I can put it through some validation testing, unless there's a reason to hold off on it. All for eliminating the gotos spaghetti.
On Sun, Jul 30, 2017 at 7:19 PM, Sean Morrison brlcad@users.sf.net wrote:
So I would like you to please validate that this code change does not
impact either validity or performance negatively. I believe it should have
similar performance. But you have more experience with this sort of testing
and access to more test scenes than we have available.
Regards,
--
Vasco Alexandre da Silva Costa
PhD in Computer Engineering (Computer Graphics)
Instituto Superior Técnico/University of Lisbon, Portugal