|
@@ -14,6 +14,7 @@
|
|
|
* See the GNU Lesser General Public License in COPYING.LGPL for more details.
|
|
|
*/
|
|
|
|
|
|
+#include <math.h>
|
|
|
#include <unistd.h>
|
|
|
|
|
|
#include <starpu.h>
|
|
@@ -104,7 +105,7 @@ run(struct starpu_sched_policy *p)
|
|
|
|
|
|
pi = tasks[i]->profiling_info;
|
|
|
task_len = starpu_timing_timespec_delay_us(&pi->start_time, &pi->end_time);
|
|
|
- if (task_len - 1e6 > 1000) /* That's 1ms, should be good. */
|
|
|
+ if (fabs(task_len - 1e6) > 1000) /* That's 1ms, should be good. */
|
|
|
return 1;
|
|
|
|
|
|
starpu_task_destroy(tasks[i]);
|