removed cuda dependence in sim_util.c