commit 9af25aa613f4f20c9596409cd40ae808cce0ebb0
parent 00a867bc704ef1aa020f5620809c1b53e78343c7
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date: Mon, 20 Aug 2018 16:33:38 +0200
add missing get on atomic values
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/senc_scene_analyze.c b/src/senc_scene_analyze.c
@@ -518,7 +518,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(t, 0, scn->nutris) {
struct triangle_comp* trg_comp =
@@ -526,7 +526,7 @@ extract_connex_components
ASSERT(trg_comp->component[SIDE_FRONT] != COMPONENT_NULL__);
ASSERT(trg_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 &&
@@ -687,14 +687,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;