commit 600e34b1673dc5a0daa41c95b156663e72cd19af
parent 7a7232f676612edadc921a163796c4ef865a694d
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date: Sun, 28 Apr 2019 11:34:06 +0200
Linux build
Diffstat:
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/src/senc_scene_analyze.c b/src/senc_scene_analyze.c
@@ -335,7 +335,7 @@ extract_connex_components
* cancel them again and again */
sz = darray_side_id_size_get(¤t_component);
FOR_EACH(ii, 0, sz) {
- enum side_id_t used_side
+ side_id_t used_side
= darray_side_id_cdata_get(¤t_component)[ii];
trg_id_t used_trg_id = TRGSIDE_2_TRG(used_side);
enum side_flag used_side_flag
@@ -1170,7 +1170,7 @@ senc_scene_analyze(struct senc_scene* scn, struct senc_descriptor** out_desc)
/* Atomic counters to share beetwen threads */
ATOMIC component_count = 0;
ATOMIC next_enclosure_id = 1;
- char msg[128], dump[64];
+ char dump[64];
struct time t0, t1;
res_T res = RES_OK;
res_T res2 = RES_OK;
@@ -1259,9 +1259,8 @@ senc_scene_analyze(struct senc_scene* scn, struct senc_descriptor** out_desc)
time_sub(&t1, time_current(&t1), &t0);
time_current(&t0);
time_dump(&t1, TIME_MSEC | TIME_SEC | TIME_MIN, NULL, dump, sizeof(dump));
- sprintf(msg,
+ log_info(scn->dev,
"senc_scene_analyze: collect_and_link_neighbours step in %s\n", dump);
- log_info(scn->dev, msg);
}
/* Step 2: extract triangle connex components */
@@ -1296,9 +1295,8 @@ senc_scene_analyze(struct senc_scene* scn, struct senc_descriptor** out_desc)
time_sub(&t1, time_current(&t1), &t0);
time_current(&t0);
time_dump(&t1, TIME_MSEC | TIME_SEC | TIME_MIN, NULL, dump, sizeof(dump));
- sprintf(msg,
+ log_info(scn->dev,
"senc_scene_analyze: extract_connex_components step in %s\n", dump);
- log_info(scn->dev, msg);
}
/* Step 3: group components */
@@ -1329,9 +1327,8 @@ senc_scene_analyze(struct senc_scene* scn, struct senc_descriptor** out_desc)
time_sub(&t1, time_current(&t1), &t0);
time_current(&t0);
time_dump(&t1, TIME_MSEC | TIME_SEC | TIME_MIN, NULL, dump, sizeof(dump));
- sprintf(msg,
+ log_info(scn->dev,
"senc_scene_analyze: group_connex_components step in %s\n", dump);
- log_info(scn->dev, msg);
}
/* Step 4: Build result */
@@ -1367,13 +1364,12 @@ senc_scene_analyze(struct senc_scene* scn, struct senc_descriptor** out_desc)
} /* No barrier here */
#pragma omp single nowait
- {
+ if(scn->dev->verbose) {
time_sub(&t1, time_current(&t1), &t0);
time_current(&t0);
time_dump(&t1, TIME_MSEC | TIME_SEC | TIME_MIN, NULL, dump, sizeof(dump));
- sprintf(msg,
+ log_info(scn->dev,
"senc_scene_analyze: build_result step in %s\n", dump);
- log_info(scn->dev, msg);
}
error_: