Two algorithms of irregular scatter/gather operations for heterogeneous platforms