ierror = vslNewStreamEx(&stream, iRandNumGenerator, iSeedNum, &seed);
you can also use
ierror = vslNewStream(&stream, iRandNumGenerator,seed);
2.You might want to use method VSL_RNG_METHOD_UNIFORMBITS_STD instead of VSL_METHOD_SUNIFORM_STD for generation of random numbers withthe functionviRngUniformBits. The2nd method isintended for generation of single precision variates uniformly distributed on the interval [a,b) (starting with MKL v 10.3 this method is replaced with VSL_RNG_METHOD_UNIFORM_STD)
3. What are the reasons for which you first generate integer output of MT19937 by means of the routine viRngUniformBits and then scale it to the interval [0,1)?As the option, you might want touse vdRngUniform generator which returns the variates uniformly distributed on the interval [a,b).
Please, let me know if this helps to address your questions.