star-gf

Compute Gebhart factors
git clone git://git.meso-star.fr/star-gf.git
Log | Files | Refs | README | LICENSE

commit a97d495ba9cd2e955143e23eeca3d7098471bc71
parent ec511244abaa94e779d70211e7a8e37af8ed4987
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Fri, 15 Oct 2021 16:14:52 +0200

Set the required version of Star-SamPling to 0.12

Older versins do not compilte with gcc 11

Diffstat:
Mcmake/CMakeLists.txt | 2+-
Msrc/test_sgf_cube.c | 6+++---
Msrc/test_sgf_estimator.c | 6+++---
Msrc/test_sgf_scene.c | 8++++----
Msrc/test_sgf_square.c | 6+++---
Msrc/test_sgf_tetrahedron.c | 6+++---
6 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt @@ -26,7 +26,7 @@ option(NO_TEST "Disable the test" OFF) ################################################################################ find_package(RCMake 0.2.3 REQUIRED) find_package(RSys 0.6 REQUIRED) -find_package(StarSP 0.7 REQUIRED) +find_package(StarSP 0.12 REQUIRED) find_package(Star3D 0.8 REQUIRED) find_package(Star2D 0.5 REQUIRED) find_package(OpenMP 1.2 REQUIRED) diff --git a/src/test_sgf_cube.c b/src/test_sgf_cube.c @@ -47,7 +47,7 @@ static const float vertices[] = { 0.f, 1.f, 1.f, 1.f, 1.f, 1.f }; -static const size_t nvertices = sizeof(vertices) / sizeof(float[3]); +static const size_t nvertices = sizeof(vertices) / (3*sizeof(float)); /* Front faces are CW. The normals point into the cube */ static const unsigned indices[] = { @@ -58,7 +58,7 @@ static const unsigned indices[] = { 2, 6, 3, 3, 6, 7, /* Top */ 0, 1, 4, 4, 1, 5 /* Bottom */ }; -static const size_t nprims = (int)(sizeof(indices) / sizeof(unsigned[3])); +static const size_t nprims = sizeof(indices) / (3*sizeof(unsigned)); static const double emissivity[] = { 0.6, 0.6, /* Front */ @@ -165,7 +165,7 @@ main(int argc, char** argv) mem_init_proxy_allocator(&allocator, &mem_default_allocator); nbuckets = (unsigned)omp_get_num_procs(); - CHK(ssp_rng_proxy_create(&allocator, &ssp_rng_threefry, nbuckets, &proxy) == RES_OK); + CHK(ssp_rng_proxy_create(&allocator, SSP_RNG_THREEFRY, nbuckets, &proxy) == RES_OK); CHK(sgf_device_create(NULL, &allocator, 1, &sgf) == RES_OK); CHK(sgf_scene_create(sgf, &scn) == RES_OK); diff --git a/src/test_sgf_estimator.c b/src/test_sgf_estimator.c @@ -34,7 +34,7 @@ static const float vertices[] = { 0.f, 1.f, 1.f, 1.f, 1.f, 1.f }; -static const size_t nvertices = sizeof(vertices) / sizeof(float[3]); +static const size_t nvertices = sizeof(vertices) / (3*sizeof(float)); /* Front faces are CW. The normals point into the cube */ static const unsigned indices[] = { @@ -45,7 +45,7 @@ static const unsigned indices[] = { 2, 6, 3, 3, 6, 7, /* Top */ 0, 1, 4, 4, 1, 5 /* Bottom */ }; -static const size_t nprims = (int)(sizeof(indices) / sizeof(unsigned[3])); +static const size_t nprims = sizeof(indices) / (3*sizeof(unsigned)); static const double emissivity[] = { 0.6, 0.6, /* Front */ @@ -80,7 +80,7 @@ main(int argc, char** argv) mem_init_proxy_allocator(&allocator, &mem_default_allocator); - CHK(ssp_rng_create(&allocator, &ssp_rng_threefry, &rng) == RES_OK); + CHK(ssp_rng_create(&allocator, SSP_RNG_THREEFRY, &rng) == RES_OK); CHK(sgf_device_create(NULL, &allocator, 1, &sgf) == RES_OK); CHK(sgf_scene_create(sgf, &scn) == RES_OK); diff --git a/src/test_sgf_scene.c b/src/test_sgf_scene.c @@ -26,9 +26,9 @@ static const float plane_verts[] = { 0.f, 1.f, 0.f, 1.f, 1.f, 0.f, }; -static const size_t plane_nverts = sizeof(plane_verts) / sizeof(float[3]); +static const size_t plane_nverts = sizeof(plane_verts) / (3*sizeof(float)); static const unsigned plane_ids[] = { 0, 2, 1, 1, 2, 3 }; -static const size_t plane_nprims = (int)(sizeof(plane_ids) / sizeof(unsigned[3])); +static const size_t plane_nprims = sizeof(plane_ids) / (3*sizeof(unsigned)); static const double plane_emi[] = { 0.6, 0.6 }; static const double plane_emi_bad[] = { 0.6, 1.1 }; static const double plane_spec[] = { 0.0, 0.0 }; @@ -45,14 +45,14 @@ static const float square_verts[] = { 0.f, 1.f, 1.f, 1.f }; -const unsigned square_nverts = sizeof(square_verts)/sizeof(float[2]); +const unsigned square_nverts = sizeof(square_verts)/(2*sizeof(float)); const unsigned square_ids[] = { 0, 1, /* Bottom */ 1, 2, /* Left */ 2, 3, /* Top */ 3, 0 /* Right */ }; -const unsigned square_nprims = sizeof(square_ids)/sizeof(unsigned[2]); +const unsigned square_nprims = sizeof(square_ids)/(2*sizeof(unsigned)); static const double square_emi[] = { 1.0, /* Bottom */ 1.0, /* Left */ diff --git a/src/test_sgf_square.c b/src/test_sgf_square.c @@ -31,7 +31,7 @@ static const float vertices[] = { 0.f, 1.f, 1.f, 1.f }; -const unsigned nverts = sizeof(vertices)/sizeof(float[2]); +const unsigned nverts = sizeof(vertices)/(2*sizeof(float)); const unsigned indices[] = { 0, 1, /* Bottom */ @@ -39,7 +39,7 @@ const unsigned indices[] = { 2, 3, /* Top */ 3, 0 /* Right */ }; -const unsigned nsegs = sizeof(indices)/sizeof(unsigned[2]); +const unsigned nsegs = sizeof(indices)/(2*sizeof(unsigned)); static const double emissivity[] = { 1.0, /* Bottom */ @@ -120,7 +120,7 @@ main(int argc, char** argv) mem_init_proxy_allocator(&allocator, &mem_default_allocator); - CHK(ssp_rng_create(&allocator, &ssp_rng_threefry, &rng) == RES_OK); + CHK(ssp_rng_create(&allocator, SSP_RNG_THREEFRY, &rng) == RES_OK); CHK(sgf_device_create(NULL, &allocator, 1, &sgf) == RES_OK); CHK(sgf_scene_create(sgf, &scn) == RES_OK); diff --git a/src/test_sgf_tetrahedron.c b/src/test_sgf_tetrahedron.c @@ -32,7 +32,7 @@ static const float vertices[] = { -0.28867513459481288225f, -0.5f, 0.f, 0.f, 0.f, 0.81649658092772603273f }; -static const size_t nvertices = sizeof(vertices) / sizeof(float[3]); +static const size_t nvertices = sizeof(vertices) / (3*sizeof(float)); /* Front faces are CW. The normals point into the cube */ static const unsigned indices[] = { @@ -41,7 +41,7 @@ static const unsigned indices[] = { 1, 2, 3, 0, 3, 2 }; -static const size_t nprims = sizeof(indices) / sizeof(unsigned[3]); +static const size_t nprims = sizeof(indices) / (3*sizeof(unsigned)); static const double emissivity[] = { 0.5, 1.0, 1.0, 1.0 }; static const double specularity[] = { 0.0, 0.0, 0.0, 0.0 }; @@ -64,7 +64,7 @@ main(int argc, char** argv) mem_init_proxy_allocator(&allocator, &mem_default_allocator); nbuckets = (unsigned)omp_get_num_procs(); - CHK(ssp_rng_proxy_create(&allocator, &ssp_rng_threefry, nbuckets, &proxy) == RES_OK); + CHK(ssp_rng_proxy_create(&allocator, SSP_RNG_THREEFRY, nbuckets, &proxy) == RES_OK); CHK(sgf_device_create(NULL, &allocator, 1, &sgf) == RES_OK); CHK(sgf_scene_create(sgf, &scn) == RES_OK);