std::bind that works for device code