CURAND performance CURAND low performance

Can anyone tell me why generating random numbers with CURAND is much slower (100times) than MATLAB’s randn? Or am I doing something wrong?
Thank you.
My code:
curandGenerator_t gen;


for(int j=0;j<100;j++) {
    curandSetPseudoRandomGeneratorSeed(gen, (unsigned long int)j*1000);
    curandGenerateNormal(gen, q, N2, 0.0, 1.0);



Take a look at the CURAND documentation. If you want to generate 100 numbers, you can set the generator once and then generate 100 in one call to CURAND API. That will be faster as setting up the generator is expensive