commit bae7bb34948532e34ae7f4393af81fef11b9a278
parent 62d0ba10b65920ecc3a3fa0410a7dea3189a1823
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Mon, 23 Jan 2017 15:56:38 +0100
Update the ssol_solver comportment
The output stream is optional. If not defined, the per hit receiver
data are no more written.
Diffstat:
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/ssol.h b/src/ssol.h
@@ -798,7 +798,7 @@ ssol_solve
(struct ssol_scene* scn,
struct ssp_rng* rng,
const size_t realisations_count,
- FILE* output,
+ FILE* output, /* May be NULL <=> does not ouput ssol_receiver_data */
struct ssol_estimator* estimator);
SSOL_API res_T
diff --git a/src/ssol_solver.c b/src/ssol_solver.c
@@ -254,6 +254,8 @@ point_dump
struct ssol_receiver_data out;
size_t n;
+ if(!stream) return RES_OK;
+
out.realization_id = irealisation;
out.date = 0; /* TODO */
out.segment_id = (uint32_t)isegment;
@@ -330,7 +332,7 @@ ssol_solve
ATOMIC res = RES_OK;
ASSERT(nrealisations <= INT_MAX);
- if(!scn || !rng_state || !realisations_count || !output || !estimator) {
+ if(!scn || !rng_state || !realisations_count || !estimator) {
res = RES_BAD_ARG;
goto error;
}