PS: a Simulator for Heterogeneous Computing Environments