Add include guard around functional.hpp...

Add `__device__ __host__` keywords to functional functors.