Created unified vector functions for host/device