Seems OpenCL doesn't support Polymorphism?

In my Kernel file .cl, I define several functions with the same name, but have different numbers and types of parameters. The excecution always failed until I named those functions differently. Doesn't anyone have the same experience?

I wonder if OpenCL support "class" and "derived class", which are very popular in C++.

In my Kernel file .cl, I define several functions with the same name, but have different numbers and types of parameters. The excecution always failed until I named those functions differently. Doesn't anyone have the same experience?

I wonder if OpenCL support "class" and "derived class", which are very popular in C++.

when you will bound OpenCL kernel with cl_kernel object in your C++ code you will provide only kernel name, not kernel name decorated with its parameters and return type. From this fact it's obvious that same kernel names will not go.

Those things together with templates reminds me each day why C is really awful and why OpenCL 2.0 should support C++.

<Rant>

Funny that. After trying everything from Assembler to .NET and back, I've rediscovered the beauty and simplicity of C. And guess what's occupying the other end of my preference list. It's that overgrown, one-language-to-rule-them-all (and then some), Mess++ we all love so much.

The last thing, I'd like to see, is GPUs burried in layers and layers of templates, inheritance, polymorphism, constructor chains and virtual function tables.