Is it possible to use C++ templates with CUDA 3.0? I read something
that NVidia plans to integrate C++ templates but I don’t know
which version they are targeting.
It would be so nice to have some templated device functions :)
templates are already officially working in 2.3 and have been working since a long, long time.
Can you tell me whats wrong with the following approach?
Kernel definition:
template<typename T>
__global__
void render(T *pixels, float2 pixelOffset, unsigned int stillCameraFrames)
{
...
}
Kernel invokation:
render<float4><<<kernel.gridDimension, kernel.blockDimension>>>(kernel.pixels, make_float2(0.5f, 0.5f), 1);
Forget the question. My fault :)