Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update benchmark.py
Fixing CompilerWarning: <program source>: 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.
  • Loading branch information
arashthk committed Sep 15, 2016
1 parent bff206a commit f005fb2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/benchmark.py
Expand Up @@ -54,6 +54,7 @@
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)
{
Expand Down

0 comments on commit f005fb2

Please sign in to comment.