a simple example looks like this:
struct pi_
{
double operator()() const
{
return 3.141592653589793;
}
};
#include <iostream>
int main()
{
std::cout << pi_()();
return 0;
}
some more discussion can be found here http://stackoverflow.com/questions/14360558/why-nvcc-is-not-happy-with-functor