Hi Mario,

As always, thank you for all the updates.  Here are some responses to questions 
you posted last week.

> I'm passing two arguments to my segment_density, which are inhit and outhit 
> points. 
> I now realize that these are pointers and could change unexpectedly within 
> the call if we run multiple threads.

The in/out hit point pointers shouldn’t be changing within the call.  I suspect 
something else is going on...

>  How can I make this safe? Should I BU_GET safe heap memory to store the 
> points for the call, or pass the coordinates one by one as actual numbers?

In general, the calling code should pass structures to functions (which can be 
on the heap or on the stack) and those functions should just fill them in or 
read from them (but not both, separate functions for reading and writing).

> For debugging purposes I would like to set only one thread for rtweight, how 
> can I do that? The fact that I get 4 or more threads running my 
> segment_density at the same time makes it difficult to track down issues.

Check out rtweight’s manual page (run "brlman rtweight” outside mged), it’s the 
-P# option.

Cheers!
Sean

------------------------------------------------------------------------------
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

Reply via email to