pull out function to get map function from cpu argument