Jump to content

Multithreaded Ops?

Recommended Posts

I wonder is there standard interface (in API) for development of multithreaded operators? I know people did it in their software (say multithreaded SOP's in 5x5) but is it more like hack or a legal way? Should you fork processes using system calls or use some HDK functions?

Link to comment
Share on other sites

  • 2 months later...

I agree should be big difference between modifying of topology or modifying of attributes in general. But can be no difference for HDK... What do you think Edward?

Another question is how to write into GDP using multiple threads? An easiest solution for me is to divide existing geometry into several pieces (i.e. create new GDPs) and each thread will modify it's own independent piece. Then merge those GDPs into one piece using just one thread. But is it good idea?

Link to comment
Share on other sites

There's no magic bullet here. The data structures in GEO_Detail aren't thread-safe. Without intrinsic knowledge of what GEO_Detail does, the best policy is to use locks before writing into the same gdp. Once you have all the GEO_Point and GEO_Primitive objects created, one can conceivably write into different objects from different threads. However, do so at your own discretion because I've warned you. :)

I can imagine that modifications to the positions of points and values of (non-string) attributes would be far more forgiving than changes to to the topology or vertex count of the gdp, right?

I don't see how that matters. If two threads write into the same point's x position, that's bad news whichever way you cut it. :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...