You can't do a partial specialization for a template function, because C++ doesn't define such a thing. You just can do a class template partial specialization [§14.5.5 / temp.class.spec]
Class partial specialization -- A little ugly but maybe it helps you.
enum MyEnum
{
E1, E2
};
template<typename T, MyEnum K>
struct MyKernel
{
void operator()(const T a[])
{
// ...
}
};
template<typename T>
struct MyKernel<T, E1>
{
void operator()(const T a[])
{
// ...
}
};
int main()
{
MyKernel<int, E1>()( ... ); // <--- To call
}