diff --git a/examples/benchmark.py b/examples/benchmark.py index 0408fd28fc3917364eb208421f58ec8bec074835..30c0b8fba137f7ef16331f877659fbeb0eb0cae3 100644 --- a/examples/benchmark.py +++ b/examples/benchmark.py @@ -54,7 +54,6 @@ 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) { @@ -68,7 +67,7 @@ for platform in cl.get_platforms(): c_temp = a_temp+b_temp; // sum of my elements c_temp = c_temp * c_temp; // product of sums - c_temp = c_temp * (a_temp/2.0); // times 1/2 my a + c_temp = c_temp * (a_temp/2.0f); // times 1/2 my a c[gid] = c_temp; // store result in global memory }