From f005fb21c073301a0d5035ffffb7525c41172469 Mon Sep 17 00:00:00 2001 From: Arash Date: Thu, 15 Sep 2016 13:27:52 +0430 Subject: [PATCH] Update benchmark.py Fixing CompilerWarning: : warning: double precision constant requires cl_khr_fp64, casting to single precision An application that wants to use double will need to include the directive before any double precision data type is declared in the kernel code. --- examples/benchmark.py | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/benchmark.py b/examples/benchmark.py index 3251a55c..0408fd28 100644 --- a/examples/benchmark.py +++ b/examples/benchmark.py @@ -54,6 +54,7 @@ for platform in cl.get_platforms(): dest_buf = cl.Buffer(ctx, mf.WRITE_ONLY, b.nbytes) prg = cl.Program(ctx, """ + #pragma OPENCL EXTENSION cl_khr_fp64 : enable __kernel void sum(__global const float *a, __global const float *b, __global float *c) { -- GitLab