commit c858f7e1f07146001874689b0bd8b94f232b1e8d
parent c19650d0f759cb715ea84ec37e809ab824cfd143
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Wed, 25 Nov 2015 12:14:12 +0100
Fix compilation errors with CL
The type of the index in the OpenMP parallel loop must be signed while a size_t
was used instead.
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/sschiff_estimator.c b/src/sschiff_estimator.c
@@ -564,6 +564,7 @@ sschiff_integrate
struct ssp_rng** rngs = NULL;
struct ssp_rng_proxy* rng_proxy = NULL;
size_t i;
+ int igeom;
ATOMIC res = (ATOMIC)RES_OK;
(void)nangles;
@@ -678,7 +679,7 @@ sschiff_integrate
/* Paralell Schiff integration */
#pragma omp parallel for schedule(dynamic)
- for(i=0; i< ngeoms; ++i) {
+ for(igeom=0; igeom < ngeoms; ++igeom) {
const double* wlengths = estimator->wavelengths;
struct sschiff_material material = SSCHIFF_NULL_MATERIAL;
size_t iwavelength;
@@ -705,7 +706,7 @@ sschiff_integrate
S3D(scene_begin_session(scenes[ithread], S3D_TRACE));
/* Schiff Estimation */
- res_local = radiative_properties(dev, rngs[ithread], (int)i, wlengths,
+ res_local = radiative_properties(dev, rngs[ithread], igeom, wlengths,
nwavelengths, ndirs, scenes[ithread], mtls[ithread], mc_accums[ithread],
accums[ithread]);
if(res != RES_OK) ATOMIC_SET(&res, res_local);