Some procedures perform absolutely the same steps except calling different function in some places.
For example dilation and errosion are the same except one needs to call max while another needs to call min.
The following template declarations were working fine for this purpose:
template<int op(int, int)>
global void morph(…)
v = op(i1, i2);
#define dilate morph
#define erode morph
Unfortunately nvcc 2.3 compiler gives me the following error: …kernel.cudafe1.stub.c(362) : error C2563: mismatch in formal parameter list
It is always ashame when working functionality gets broken. Any idea how to make the approach above work with cuda 2.3?