From 4c4ebb87ead363d6d6e11a8b95b07a0f93af5c88 Mon Sep 17 00:00:00 2001 From: pants Date: Tue, 6 Sep 2016 15:05:27 -0400 Subject: finished implementing embedded systems, refactored a bunch --- src/coursegrain.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/coursegrain.c') diff --git a/src/coursegrain.c b/src/coursegrain.c index bd84e1c..1e0d5a7 100644 --- a/src/coursegrain.c +++ b/src/coursegrain.c @@ -1,17 +1,17 @@ #include "fracture.h" -finst *coursegrain_square(finst *instance, fnet *network_p, cholmod_common *c) { - unsigned int width = sqrt(instance->network->num_edges); +net_t *coursegrain_square(net_t *instance, graph_t *network_p, cholmod_common *c) { + unsigned int width = sqrt(instance->graph->ne); assert(width % 4 == 0); - finst *instance_p = create_instance(network_p, instance->inf, + net_t *instance_p = create_instance(network_p, instance->inf, instance->voltage_bound, true, c); unsigned int width_p = width / 2; bool *fuses = instance->fuses; - for (unsigned int i = 0; i < network_p->num_edges; i++) { + for (unsigned int i = 0; i < network_p->ne; i++) { int xp = i / width_p; int yp = i % width_p; unsigned int x1 = 2 * xp; -- cgit v1.2.3-70-g09d2