On Sat, Jul 22, 2017 at 2:59 PM, Marco Domingues <marcodomingue...@gmail.com
> wrote:
> Well, the ‘rt -z1 -l5’ command takes 8,103 seconds for the havoc.g scene
> when rendering with the GPU, and this same scene renders in 0,558 seconds
> when using the ANSI C code. Despite that, when I comment the call to the
> ‘build_regiontable’ function, the OpenCl code only takes 0,14 seconds. So
> the process of building the regiontable, evaluating partitions and
> resolving overlaps is causing a major bottleneck for this scene.
>
> The operators.g scene takes 0,027 seconds when using the ‘rt -z1 -l5’
> command, and 0,054 when using the ‘rt’ command.
>
So I looked at your code and yes the major bottleneck seems to be the
build_regiontable() function. The ANSI C code precomputes the list of
regions each solid is in before starting the boolean evaluation, around the
time it parses and optimizes the boolean tree, this is stored in
stp->st_regions. It means this is precomputed once, instead of being
computed for every partition like what you're doing on your code. This
should be the main cause for the slowdown.
Regards,
--
Vasco Alexandre da Silva Costa
PhD in Computer Engineering (Computer Graphics)
Instituto Superior Técnico/University of Lisbon, Portugal
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel