curandGenerateLongLong() private method

private curandGenerateLongLong ( ManagedCuda.CudaRand.CurandGenerator generator, ManagedCuda.BasicTypes.CUdeviceptr outputPtr, ManagedCuda.BasicTypes.SizeT num ) : CurandStatus
generator ManagedCuda.CudaRand.CurandGenerator
outputPtr ManagedCuda.BasicTypes.CUdeviceptr
num ManagedCuda.BasicTypes.SizeT
return CurandStatus
Exemplo n.º 1
0
 /// <summary>
 /// Use generator to generate num 64-bit results into the device memory at
 /// output. 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 <see cref="SetStream(CUstream)"/>, or the null stream if no stream has been set.
 /// <para/>
 /// Results are 64-bit values with every bit random.
 /// </summary>
 /// <param name="output">DevicePtr of type ulong*</param>
 /// <param name="size">Number of random elements to create</param>
 public void Generate64(CUdeviceptr output, SizeT size)
 {
     _status = CudaRandNativeMethods.curandGenerateLongLong(_generator, output, size);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "curandGenerateLongLong", _status));
     if (_status != CurandStatus.Success)
     {
         throw new CudaRandException(_status);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Use generator to generate num 64-bit results into the device memory at
 /// output. 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 <see cref="SetStream(CUstream)"/>, or the null stream if no stream has been set.
 /// <para/>
 /// Results are 64-bit values with every bit random.
 /// </summary>
 /// <param name="output">CudaDeviceVariable</param>
 public void Generate(CudaDeviceVariable <ulong> output)
 {
     _status = CudaRandNativeMethods.curandGenerateLongLong(_generator, output.DevicePointer, output.Size);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "curandGenerateLongLong", _status));
     if (_status != CurandStatus.Success)
     {
         throw new CudaRandException(_status);
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Use generator to generate num 64-bit results into the device memory at
 /// output. The device memory must have been previously allocated and be
 /// large enough to hold all the results.
 /// <para/>
 /// Results are 64-bit values with every bit random.
 /// </summary>
 /// <param name="output">CudaDeviceVariable</param>
 public void Generate(ulong[] output)
 {
     _status = CudaRandNativeMethods.curandGenerateLongLong(_generator, output, output.LongLength);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "curandGenerateLongLong", _status));
     if (_status != CurandStatus.Success)
     {
         throw new CudaRandException(_status);
     }
 }