Accidentely replied privately only, reposting to the ml.

On Wed, Mar 02, 2011 at 10:59:16AM +0100, jeremy rosen wrote:
> > Since threading in general is tricky, I wonder how easy will it be
> > to
> > accidently break OMP due to seemingly unrelated changes?
>
> that's a good question, I'm not too worried for the animation part
> because it is well contained...
> I think OMP will only be used on a few well-contained area and not
> everywhere throughout the code, which should help quite a bit.

Ok.

> > Would it make
> > sense to document what code is depending on OMP and which
> > preconditions
> > it relies upon?
>
> I'm not really sure what to document

What expectations OMP makes. For example it expects a variable to be
read only during its execution, but if somebody changes that to be
read-write it will break OMP.

> and how to make sure people read that documentation...

That might be hard, but if there's no documentation it will be
impossible. (Realistically I fear it won't be read until something
breaks.)

> Usually it boils down to protecting a variable which means adding a
> #pragma omp criticall(varname) around all calls to that variable. So
> i'm not too afraid of people missing that...

Well as long as the OMP parts are in `well-contained areas' the problem
may not occur and when it does it should be easy to spot. My fear is
when larger parts are converted and suddenly break to a seemingly
unrelated change.

-- 
Regards,
Mark de Wever aka Mordante/SkeletonCrew

_______________________________________________
Wesnoth-dev mailing list
Wesnoth-dev@gna.org
https://mail.gna.org/listinfo/wesnoth-dev

Reply via email to