I have a structure like this:
struct CSGNode
{
int type;
int index;
int parentIndex;
int leftChild,rightChild;
int sphereIndex;
Interval * intervals;
int intervalsCount;
BoundingBox bbox;
};
which stores infos about csg intervals;
I can do in parallel section things like:
definitions:
firstprivate(csgTree)
Interval it;
CSGNode * csgTree
CSGNode el;
content:
csgTree[el.index].sphereIndex = el.sphereIndex;
it.sphereIndex = el.sphereIndex;
int ind = csgTree[el.index].intervalsCount;
csgTree[el.index].intervals[ind] = it;
but cannot do:
csgTree[el.index].intervalsCount++;
because the program crushes while runtime. Can anyone give me a hint why postincrementation on struct element is not possible and program crushes? If I tried to do
csgTree[el.index].intervalsCount = ind +1; it also crushes ! I don't know why. What is going wrong with struct management in open mp?
Thanks in advance,
Greg
