MarcoAttene / CDT

47 stars 13 forks source link

Calling code in parallel seems to bring conflicts #7

Open LiJunfeng000000000000 opened 5 months ago

LiJunfeng000000000000 commented 5 months ago

Thank you very much for your code, it has quite high stability and robustness! But in my use, calling code in parallel seems to bring conflicts, which may be caused by static variables in the code.

For example:

void TetMesh::VT(uint32_t v, std::vector &vt) const { static std::vector vt_queue; // Static to avoid reallocation at each call uint64_t t = inc_tet[v];

vt_queue.push_back(tetCornerAtVertex(t << 2, v)); mark_Tet_31(t);

LiJunfeng000000000000 commented 5 months ago

remove static in delaunay.cpp in multi-threaded programs will work.