star-4v_s

An invariant property of diffuse random walks
git clone git://git.meso-star.fr/star-4v_s.git
Log | Files | Refs | README | LICENSE

commit ad307473700803e533fac67ecf6640c38a3a456b
parent 7df5fbdca9919ef1debd4a6879c17d4b5ba274a3
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Sun,  4 Feb 2018 20:50:54 +0100

Bump the SMC version to 0.4

Fix the compilation issues due to the update of the SMC library.

Diffstat:
Mcmake/CMakeLists.txt | 6+++---
Msrc/s4vs.c | 2+-
Msrc/s4vs_realization.c | 4+++-
Msrc/s4vs_realization.h | 7++++++-
4 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt @@ -35,11 +35,11 @@ set(S4VS_SOURCE_DIR ${PROJECT_SOURCE_DIR}/../src/) # Check dependencies ################################################################################ find_package(RCMake 0.3 REQUIRED) -find_package(RSys 0.5 REQUIRED) +find_package(RSys 0.6 REQUIRED) find_package(Star3D 0.4.1 REQUIRED) find_package(Star3DAW 0.1.3 REQUIRED) -find_package(StarSP 0.5 REQUIRED) -find_package(StarMC 0.3 REQUIRED) +find_package(StarSP 0.7 REQUIRED) +find_package(StarMC 0.4 REQUIRED) include_directories( ${RSys_INCLUDE_DIR} diff --git a/src/s4vs.c b/src/s4vs.c @@ -83,7 +83,7 @@ compute_4v_s SMC(device_create(NULL, NULL, SMC_NTHREADS_DEFAULT, NULL, &smc)); integrator.integrand = &s4vs_realization; /* Realization function */ integrator.type = &smc_double; /* Type of the Monte Carlo weight */ - integrator.max_steps = max_realisations; /* Realization count */ + integrator.max_realisations = max_realisations; /* Realization count */ integrator.max_failures = max_realisations / 1000; /* Solve */ diff --git a/src/s4vs_realization.c b/src/s4vs_realization.c @@ -56,7 +56,8 @@ s4vs_discard_self_hit * 4V/S integrand ******************************************************************************/ res_T -s4vs_realization(void* out_length, struct ssp_rng* rng, void* context) +s4vs_realization + (void* out_length, struct ssp_rng* rng, const unsigned ithread, void* context) { struct s4vs_context* ctx = (struct s4vs_context*)context; struct s3d_attrib attrib; @@ -70,6 +71,7 @@ s4vs_realization(void* out_length, struct ssp_rng* rng, void* context) double sigma = 0; int keep_running = 0; float r0, r1, r2; + (void)ithread; /* Avoid "unused variable" warning */ /* Sample a surface location, i.e. primitive ID and parametric coordinates */ r0 = ssp_rng_canonical_float(rng); diff --git a/src/s4vs_realization.h b/src/s4vs_realization.h @@ -52,6 +52,11 @@ s4vs_discard_self_hit /******************************************************************************* * MC realization function ******************************************************************************/ -extern res_T s4vs_realization(void* length, struct ssp_rng* rng, void* context); +extern res_T +s4vs_realization + (void* length, + struct ssp_rng* rng, + const unsigned ithread, + void* context); #endif /* REALIZATION_H */