From be009de76ce5080ca0bbc491a302cdf25c86fca6 Mon Sep 17 00:00:00 2001 From: aidan <aidan@64cores.dur.ac.uk> Date: Wed, 9 Dec 2015 14:47:48 +0000 Subject: [PATCH] Potential fix to the queue_task_overlap function --- src/queue.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/queue.c b/src/queue.c index 191500f..6cc9411 100644 --- a/src/queue.c +++ b/src/queue.c @@ -59,13 +59,13 @@ float queue_task_overlap ( struct qsched *s , qsched_task_t a , qsched_task_t b if (nr_res_a == 0 || nr_res_b == 0) return nr_res_a == nr_res_b ? 1.0f : 0.0f; struct res *res_a[nr_res_a], *res_b[nr_res_b]; for (int k = 0; k < ta->nr_locks; k++) - res_a[k] = &s->res[s->locks[ta->locks[k]]]; + res_a[k] = &s->res[ta->locks[k]]; for (int k = 0; k < ta->nr_uses; k++) - res_a[ta->nr_locks + k] = &s->res[s->locks[ta->uses[k]]]; + res_a[ta->nr_locks + k] = &s->res[ta->uses[k]]; for (int k = 0; k < tb->nr_locks; k++) - res_b[k] = &s->res[s->locks[tb->locks[k]]]; + res_b[k] = &s->res[tb->locks[k]]; for (int k = 0; k < tb->nr_uses; k++) - res_b[tb->nr_locks + k] = &s->res[s->locks[tb->uses[k]]]; + res_b[tb->nr_locks + k] = &s->res[tb->uses[k]]; /* Compute the resource union, which is just the sum of the resource sizes. */ -- GitLab