Menu

#473 Eliminate gotos from bool_eval()

Untested
open
None
5
2017-07-30
2017-07-29
No

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.

1 Attachments

Discussion

  • Sean Morrison

    Sean Morrison - 2017-07-30

    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.

     
    • Vasco Alexandre da Silva Costa

      On Sun, Jul 30, 2017 at 7:19 PM, Sean Morrison brlcad@users.sf.net wrote:

      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

       

Log in to post a comment.