Hi there,

I am working with the OpenCL 1.1 beta drivers on Linux 64bits (Ubuntu). I am getting some errors because the compiler does not seem to properly differentiate fmin or fmax based on the 2 parameters passed.

I have a line like this one:

rhsad[ip2-1 + rhsad_s1*(1-1)] = rhsad[ip2-1 + rhsad_s1*(1-1)]+fmax(c00,-rhsed[iedge-1 + rhsed_s1*(1-1)]);

where c00 is double

rhsed etc. are __global double *

I am getting the following error:

Build Error : :1011:64: error: call to ‘fmax’ is ambiguous

rhsad[ip2-1 + rhsad_s1*(1-1)] = rhsad[ip2-1 + rhsad_s1*(1-1)]+fmax(c00,-rhsed[iedge-1 + rhsed_s1*(1-1)]);

^~~~

:3353:27: note: candidate function

double16 **OVERLOADABLE** fmax(double16, double16);

^

:3352:26: note: candidate function

double8 **OVERLOADABLE** fmax(double8, double8);

^

:3351:26: note: candidate function

double4 **OVERLOADABLE** fmax(double4, double4);

^

:3349:26: note: candidate function

double3 **OVERLOADABLE** fmax(double3, double3);

^

:3347:26: note: candidate function

double2 **OVERLOADABLE** fmax(double2, double2);

^

:3344:26: note: candidate function

float16 **OVERLOADABLE** fmax(float16, float16);

^

:3343:25: note: candidate function

float8 **OVERLOADABLE** fmax(float8, float8);

^

:3342:25: note: candidate function

float4 **OVERLOADABLE** fmax(float4, float4);

^

:3340:25: note: candidate function

float3 **OVERLOADABLE** fmax(float3, float3);

^

:3338:25: note: candidate function

float2 **OVERLOADABLE** fmax(float2, float2);

Do not pay attention to the weird (1-1) etc. as this is the result of python script that automatically translate from OpenMP to OpenCL sections of the code.

Does anybody have a clue as to what is happening?

Would appreciate any help.

Thanks

Eric