PHoToNs–A parallel heterogeneous and threads oriented code for cosmological N-body simulation