Mathematical Problems in Engineering / 2015 / Article / Alg 2

Research Article

A Fading Channel Simulator Implementation Based on GPU Computing Techniques

Algorithm 2

Pseudorandom noise generation code.
_global_ void setup_kernel(curandState  state)
{ int id = threadIdx.x + blockIdx.x  6;
   curand_init(1234blockIdx.x, id, 0,  &state[id]);
_global_ void generate_normal_kernel(curandState  state, int n, float  result)
{ int id = threadIdx.x + blockIdx.x  6;
   float2 x;
   curandState localState = state[id];
   for(int i=0; i<n; i++)
   { /  Generate pseudorandom normals  /
      x=curand_normal2(&localState);
      result[id]= x.x;
   }
/  Copy state back to global memory  /
   state[id] = localState;

We are committed to sharing findings related to COVID-19 as quickly and safely as possible. Any author submitting a COVID-19 paper should notify us at help@hindawi.com to ensure their research is fast-tracked and made available on a preprint server as soon as possible. We will be providing unlimited waivers of publication charges for accepted articles related to COVID-19.