mc-imperial / gpuverify

GPUVerify: a Verifier for GPU Kernels
http://multicore.doc.ic.ac.uk/tools/GPUVerify/
Other
58 stars 15 forks source link

fdim is not implemented #6

Closed VincentSC closed 8 years ago

VincentSC commented 8 years ago

When fdim is used in a kernel, it complaints about a redefenition.

jeroenk commented 8 years ago

@VincentSC It complains about a missing definition in my case, is that what you mean?

kernel.cl:5:25: error: implicit declaration of function 'fdim' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
  A[get_global_id(0)] = fdim(A[get_global_id(0)], B[get_global_id(0)]);
                        ^
1 error generated.

If not, then I would more details on how to reproduce the problem.

VincentSC commented 8 years ago

Yes, that's what I meant.

jeroenk commented 8 years ago

I've added the float versions of fdim. To get it you need to update the bugle component of GPUVerify, or more precisely, you'll need to get the latest version of the opencl_builtins.h that comes with it: https://github.com/mc-imperial/bugle/blob/master/include-blang/opencl_builtins.h

The underlying OpenCL runtime library that we're using is incomplete. I'm generally adding builtins when there is a demand for them; there are so many that I cannot added all at once. I'll happily add more if you need them, please let us know.