Modify vector on device
Permutation on device