On Tue, Jun 20, 2017 at 6:03 PM, Christopher Sean Morrison <brl...@mac.com>
wrote:
> It contains a bit vector of 32 bits to represent the segments in each
> partition and the respective assertion on the host code to ensure that
> there aren’t more than 32 segments per ray.
> Would appreciate some feedback on the patch.
>
>
> Where in the patch is the 32-bit limit exactly? I glanced quickly, but
> didn't see a comment. Please at least leave a comment about it even if the
> limit is type-based. Also, curious why you disabled all of the coloring
> code in rt.cl Presumably just for testing, but did something not work
> right? Also curious that your cl partition structure still contains
> pointers (instead of SoA) -- that intentional?
>
Like Marco said there's a 32-bit (uint) bitvector on the partition which
states which ray segment(s) are contained in that partition. This assumes
there aren't more than 32 segments per ray. Which I think is a reasonable
assumption considering most scenes don't have a lot of depth complexity. If
this becomes a problem for whatever reason, it's possible to use a dynamic
bitvector, by checking the max amount of segments per ray before allocating
the partitions at the expense of more cache trashing.
I don't know about this case in particular but I didn't find much advantage
in using a SoA (structure-of-arrays) storage scheme to store the primitives
on a GPU either. This seems to be more of an issue in vector architectures
like SSE which had a lot of memory alignment issues and the like.
--
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