On Wed, Jul 26, 2017 at 6:54 AM, Vasco Alexandre da Silva Costa <
vasco.co...@gmail.com> wrote:
> ...
> As for struct partition, we could use pointers to hits or indices to hits
> instead of storing the actual hits. like:
> idx = (seg_idx << 1) + (in|out)bit .
> ...
> To put it short: my advice is that you change struct partition from
> storing copies of the struct hits to having pointers to the struct hits.
> i.e.
>
> struct partition {
> global struct hit *inhit;
> global struct hit *outhit;
> uint inseg;
> uint outseg;
> ...
> };
>
>
Bah. I forgot this isn't CUDA. Basically because you cannot be sure that
the pointer size in the device is smaller or equal to the size of the host
(although it usually is) you need to use indices, like the 'idx' I
mentioned above, instead of pointers.
--
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