mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 13:50:33 +05:00
atomic workaround
This commit is contained in:
parent
5f211234d1
commit
4fe9abcc0e
@ -350,10 +350,18 @@ namespace netgen
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// add lock-free to list
|
// add lock-free to list
|
||||||
|
/*
|
||||||
surfelements[sei].next = facedecoding[el.index-1].firstelement;
|
surfelements[sei].next = facedecoding[el.index-1].firstelement;
|
||||||
auto & head = reinterpret_cast<atomic<SurfaceElementIndex>&> (facedecoding[el.index-1].firstelement);
|
auto & head = reinterpret_cast<atomic<SurfaceElementIndex>&> (facedecoding[el.index-1].firstelement);
|
||||||
while (!head.compare_exchange_weak (surfelements[sei].next, sei))
|
while (!head.compare_exchange_weak (surfelements[sei].next, sei))
|
||||||
;
|
;
|
||||||
|
*/
|
||||||
|
surfelements[sei].next = facedecoding[el.index-1].firstelement;
|
||||||
|
auto & head = reinterpret_cast<atomic<int>&> (facedecoding[el.index-1].firstelement);
|
||||||
|
auto & next = reinterpret_cast<int&> (surfelements[sei].next);
|
||||||
|
while (!head.compare_exchange_weak (next, sei))
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if (SurfaceArea().Valid())
|
if (SurfaceArea().Valid())
|
||||||
|
Loading…
Reference in New Issue
Block a user