commit 08051a445b4e0a211cc2e31dd89894f63ad3bd49
parent 0b10ce0b9f43417c143afd1b364b99bb07afd0be
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Wed, 4 Jan 2017 09:56:29 +0100
Remove the ssol_<device|scene> from the core
Diffstat:
5 files changed, 18 insertions(+), 81 deletions(-)
diff --git a/cmake/core/CMakeLists.txt b/cmake/core/CMakeLists.txt
@@ -33,8 +33,7 @@ include_directories(
################################################################################
set(CORE_FILES_SRC
solstice_core_device.c
- solstice_core_node.c
- solstice_core_solver.c)
+ solstice_core_node.c)
set(CORE_FILES_INC
solstice_core.h
diff --git a/src/core/solstice_core.h b/src/core/solstice_core.h
@@ -24,13 +24,12 @@ struct logger;
struct mem_allocator;
struct sanim_pivot;
struct sanim_tracking;
-struct ssol_vertex_data;
-struct ssol_object;
-struct ssol_instance;
-struct ssol_sun;
struct ssol_atmosphere;
struct ssol_estimator;
-struct ssol_device;
+struct ssol_instance;
+struct ssol_object;
+struct ssol_sun;
+struct ssol_vertex_data;
struct ssp_rng;
struct score_device;
@@ -56,10 +55,6 @@ extern LOCAL_SYM void
score_device_ref_put
(struct score_device* dev);
-extern LOCAL_SYM struct ssol_device*
-score_device_get_solver_device
- (struct score_device* dev);
-
/*******************************************************************************
* Node API
******************************************************************************/
@@ -161,13 +156,5 @@ score_update_simulation
(struct score_device* dev,
const double sun_dir[3]);
-extern LOCAL_SYM res_T
-score_solve
- (struct score_device* dev,
- struct ssp_rng* rng,
- const size_t realisations_count,
- FILE* output,
- struct ssol_estimator* estimator);
-
#endif /* SOLSTICE_CORE_H */
diff --git a/src/core/solstice_core_device.c b/src/core/solstice_core_device.c
@@ -48,10 +48,8 @@ device_release(ref_T* ref)
ASSERT(ref);
dev = CONTAINER_OF(ref, struct score_device, ref);
ASSERT(dev && dev->allocator);
- if (dev->solver) SSOL(scene_ref_put(dev->solver));
darray_nodes_release(&dev->instances);
darray_nodes_release(&dev->pivots);
- if (dev->ssol) ssol_device_ref_put(dev->ssol);
MEM_RM(dev->allocator, dev);
}
@@ -83,12 +81,6 @@ score_device_create
dev->allocator = allocator;
dev->verbose = verbose;
- res = ssol_device_create(logger, allocator, nthreads_hint, verbose, &dev->ssol);
- if (res != RES_OK) goto error;
-
- res = ssol_scene_create(dev->ssol, &dev->solver);
- if (res != RES_OK) goto error;
-
darray_nodes_init(dev->allocator, &dev->instances);
darray_nodes_init(dev->allocator, &dev->pivots);
@@ -117,13 +109,6 @@ score_device_ref_put(struct score_device* dev)
ref_put(&dev->ref, device_release);
}
-struct ssol_device*
-score_device_get_solver_device(struct score_device* dev)
-{
- ASSERT(dev);
- return dev->ssol;
-}
-
/*******************************************************************************
* Local functions
******************************************************************************/
diff --git a/src/core/solstice_core_device.h b/src/core/solstice_core_device.h
@@ -1,17 +1,17 @@
/* Copyright (C) CNRS 2016-2017
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, either version 3 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef SOLSTICE_CORE_DEVICE_H
#define SOLSTICE_CORE_DEVICE_H
@@ -28,11 +28,9 @@ struct score_device {
struct logger* logger;
struct mem_allocator* allocator;
int verbose;
- struct ssol_device* ssol;
struct darray_nodes instances;
struct darray_nodes pivots;
- struct ssol_scene* solver;
ref_T ref;
};
diff --git a/src/core/solstice_core_solver.c b/src/core/solstice_core_solver.c
@@ -1,31 +0,0 @@
-/* Copyright (C) CNRS 2016-2017
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, either version 3 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-#include "solstice_core.h"
-#include "solstice_core_device.h"
-
-#include <solstice/ssol.h>
-
-res_T
-score_solve
- (struct score_device* dev,
- struct ssp_rng* rng,
- const size_t realisations_count,
- FILE* output,
- struct ssol_estimator* estimator)
-{
- ASSERT(dev && rng && realisations_count && output && estimator);
- return ssol_solve(dev->solver, rng, realisations_count, output, estimator);
-}
-\ No newline at end of file