Do you know if method overloading is expected in a future version of OpenCL.
For now I have to create several methods, like this :
float fresnell(float f1, float f2);
float fresnell2(float f1, float f2, float4 f3);
float fresnell3(float f1, float f2, float3 f3);
When, on the other side, all the native methods use overloading !!! Like "normalize" (double, float, floatn, doublen) ...
Do you think that I can use something like this ?
#define my_fresnel(A) fresnel1(A)
#define my_fresnel(A,B) fresnel2((float2)(A,B))
I have try, but the compiler doesn't replace with the right "fresnelX" method based on the parameters. Is it normal ?
Definetely my most missed feature. Sadly I see no hope for it to appear, as it would require some kind of name mangling as used in C++, definetly no longer C99. Only chance would be if there would be a move towards allowing the C-Subset of C++ instead of C99 as language basis.