star-enclosures-2d

Extract enclosures from 2D geometry
git clone git://git.meso-star.fr/star-enclosures-2d.git
Log | Files | Refs | README | LICENSE

commit d63d9621865eed644204a84a3b56d5a8397d1241
parent 9469b448621f3c0d682029b2976b4dd67f30c759
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Fri, 13 Jul 2018 17:41:09 +0200

add missing get on atomic values

Diffstat:
Msrc/senc2d_scene_analyze.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/senc2d_scene_analyze.c b/src/senc2d_scene_analyze.c @@ -511,7 +511,7 @@ extract_connex_components if(*res != RES_OK) return; #pragma omp single { - ASSERT(*component_count == + ASSERT(ATOMIC_GET(component_count) == (int)darray_ptr_component_descriptor_size_get(connex_components)); FOR_EACH(s_, 0, scn->nusegs) { struct segment_comp* seg_comp = @@ -519,7 +519,7 @@ extract_connex_components ASSERT(seg_comp->component[SIDE_FRONT] != COMPONENT_NULL__); ASSERT(seg_comp->component[SIDE_BACK] != COMPONENT_NULL__); } - FOR_EACH(c, 0, *component_count) { + FOR_EACH(c, 0, ATOMIC_GET(component_count)) { struct cc_descriptor** components = darray_ptr_component_descriptor_data_get(connex_components); ASSERT(components[c] != NULL && @@ -680,14 +680,14 @@ group_connex_components } } /* Implicit barrier here */ - ASSERT(*next_enclosure_id < ENCLOSURE_MAX__); + ASSERT(ATOMIC_GET(next_enclosure_id) < ENCLOSURE_MAX__); if(*res != RES_OK) return; /* One thread post-processes links to group connex components */ #pragma omp single { res_T tmp_res = RES_OK; - desc->enclosures_count = (enclosure_id_t)*next_enclosure_id; + desc->enclosures_count = (enclosure_id_t)ATOMIC_GET(next_enclosure_id); tmp_res = darray_enclosure_resize(&desc->enclosures, desc->enclosures_count); if(tmp_res != RES_OK) { *res = tmp_res;