You have to call randEng.discard()
function to make the behavior random.
__device__ float operator () (int idx)
{
thrust::default_random_engine randEng;
thrust::uniform_real_distribution<float> uniDist(-3.2, 3.2);
randEng.discard(idx);
return uniDist(randEng);
}
P.S: Refer to this answer by talonmies.