summaryrefslogtreecommitdiff
path: root/cmdutils_opencl.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmdutils_opencl.c')
-rw-r--r--cmdutils_opencl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmdutils_opencl.c b/cmdutils_opencl.c
index d9095b61be..dd21344a05 100644
--- a/cmdutils_opencl.c
+++ b/cmdutils_opencl.c
@@ -206,7 +206,9 @@ end:
static int compare_ocl_device_desc(const void *a, const void *b)
{
- return ((const OpenCLDeviceBenchmark*)a)->runtime - ((const OpenCLDeviceBenchmark*)b)->runtime;
+ const OpenCLDeviceBenchmark* va = (const OpenCLDeviceBenchmark*)a;
+ const OpenCLDeviceBenchmark* vb = (const OpenCLDeviceBenchmark*)b;
+ return FFDIFFSIGN(va->runtime , vb->runtime);
}
int opt_opencl_bench(void *optctx, const char *opt, const char *arg)