'In-place shuffle the data in self.data.'

def ShuffleData(self):

    indices = np.arange(self.datasize)
    np.random.shuffle(indices)
    indices1 = indices[:(self.datasize / 2)]
    indices2 = indices[(self.datasize / 2):(2 * (self.datasize / 2))]
    indices1_gpu = cm.CUDAMatrix(indices1.reshape(1, (-1)))
    indices2_gpu = cm.CUDAMatrix(indices2.reshape(1, (-1)))
    for d in self.data:
        d.swap_columns(indices1_gpu, indices2_gpu, target=d)
    indices1_gpu.free_device_memory()
    indices2_gpu.free_device_memory()
