Made MPZ code runnable on both CPU and GPU