Brahma.FSharp
Brahma.FSharp copied to clipboard
Ambiguous call of OpenCL math functions in some cases
Describe the bug
OpenCL's compilation fails with error: call to 'max' is ambiguous on kernel
<@
fun (range: Range1D) (buf: int16 clarray) ->
buf.[0] <- max buf.[0] 1s
@>
which translates to
__kernel void brahmaKernel (__global short * buf)
{buf [0] = max (buf [0], 1) ;}
Expected behavior Compilation is successful.
Looks like we should carefully translate constant literals.