Library/ManagedCuda/CudaRand/CudaRandDevice.cs
/// <summary>
/// Use generator to generate num float results into the device memory at
/// outputPtr. The device memory must have been previously allocated and be
/// large enough to hold all the results. Launches are done with the stream
/// set using curandSetStream(), or the null stream if no stream has been set.
/// <para/>
/// Results are 32-bit floating point values with mean  mean and standard
/// deviation stddev.
/// <para/>
/// Normally distributed results are generated from pseudorandom generators
/// with a Box-Muller transform, and so require num to be even.
/// Quasirandom generators use an inverse cumulative distribution 
/// function to preserve dimensionality.
/// <para/>
/// There may be slight numerical differences between results generated
/// on the GPU with generators created with curandCreateGenerator()
/// and results calculated on the CPU with generators created with
/// curandCreateGeneratorHost(). These differences arise because of
/// differences in results for transcendental functions.  In addition,
/// future versions of CURAND may use newer versions of the CUDA math
/// library, so different versions of CURAND may give slightly different
/// numerical values.
/// </summary>
/// <param name="output">DevicePtr of type float*</param>
/// <param name="size">Number of random elements to create</param>
/// <param name="mean"></param>
/// <param name="stddev"></param>
Use generator to generate num float results into the device memory at
outputPtr. The device memory must have been previously allocated and be
large enough to hold all the results. Launches are done with the stream
set using curandSetStream(), or the null stream if no stream has been set.

Results are 32-bit floating point values with mean  mean and standard
deviation stddev.

Normally distributed results are generated from pseudorandom generators
with a Box-Muller transform, and so require num to be even.
Quasirandom generators use an inverse cumulative distribution
function to preserve dimensionality.

There may be slight numerical differences between results generated
on the GPU with generators created with curandCreateGenerator()
and results calculated on the CPU with generators created with
curandCreateGeneratorHost(). These differences arise because of
differences in results for transcendental functions.  In addition,
future versions of CURAND may use newer versions of the CUDA math
library, so different versions of CURAND may give slightly different
numerical values.
Use generator to generate num float results into the device memory at outputPtr . The device memory must have been previously allocated and be large enough to hold all the results . Launches are done with the stream set using curandSetStream () or the null stream if no stream has been set . Results are 32 - bit floating point values with mean mean and standard deviation stddev . Normally distributed results are generated from pseudorandom generators with a Box - Muller transform and so require num to be even . Quasirandom generators use an inverse cumulative distribution function to preserve dimensionality . There may be slight numerical differences between results generated on the GPU with generators created with curandCreateGenerator () and results calculated on the CPU with generators created with curandCreateGeneratorHost () . These differences arise because of differences in results for transcendental functions . In addition future versions of CURAND may use newer versions of the CUDA math library so different versions of CURAND may give slightly different numerical values .
public void GenerateNormal32(CUdeviceptr output, SizeT size, float mean, float stddev)
		{
			_status = CudaRandNativeMethods.curandGenerateNormal(_generator, output, size, mean, stddev);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "curandGenerateNormal", _status));
			if (_status != CurandStatus.Success) throw new CudaRandException(_status);
		}
public void GenerateNormal32 ( CUdeviceptr output , SizeT size , float mean , float stddev ) { _status = CudaRandNativeMethods . curandGenerateNormal ( _generator , output , size , mean , stddev ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , _status ) ) ; if ( _status != CurandStatus . Success ) throw new CudaRandException ( _status ) ; }
Use generator to generate num float results into the device memory at
outputPtr.
Use generator to generate num float results into the device memory at outputPtr .
output
CUdeviceptr
DevicePtr of type float
DevicePtr of type float
size
SizeT
Number of random elements to create
Number of random elements to create
mean
float
None
stddev
float
None