Browse Source

drand48 returns values between 0 and 1

Samuel Thibault 12 years ago
parent
commit
87d37383dd
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tests/sched_policies/prio.c

+ 1 - 1
tests/sched_policies/prio.c

@@ -79,7 +79,7 @@ run(struct starpu_sched_policy *policy)
 	for (i = 0; i < NTASKS; i++) {
 		struct starpu_task *task = starpu_task_create();
 
-		if (((int)starpu_drand48())%2) {
+		if (((int)(starpu_drand48()*2))%2) {
 			task->cl = &clA;
 			task->priority=STARPU_MIN_PRIO;
 		} else {