Exemple #1
0
		/// <summary>
		/// Creates a new random number generator of type Type
		/// </summary>
		/// <param name="Type">Generator type</param>
		public CudaRandHost(GeneratorType Type)
		{
			_generator = new CurandGenerator();
			_status = CudaRandNativeMethods.curandCreateGeneratorHost(ref _generator, Type);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "curandCreateGeneratorHost", _status));
			if (_status != CurandStatus.Success) throw new CudaRandException(_status);
		}
Exemple #2
0
 /// <summary>
 /// Creates a new random number generator of type Type
 /// </summary>
 /// <param name="Type">Generator type</param>
 public CudaRandDevice(GeneratorType Type)
 {
     _generator = new CurandGenerator();
     _status    = CudaRandNativeMethods.curandCreateGenerator(ref _generator, Type);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "curandCreateGenerator", _status));
     if (_status != CurandStatus.Success)
     {
         throw new CudaRandException(_status);
     }
 }
Exemple #3
0
 public static extern CurandStatus curandGenerateNormalDouble(CurandGenerator generator, [Out] double[] outputPtr, SizeT n, double mean, double stddev);
Exemple #4
0
 public static extern CurandStatus curandGenerateUniformDouble(CurandGenerator generator, CUdeviceptr outputPtr, SizeT num);
Exemple #5
0
 public static extern CurandStatus curandGenerateUniform(CurandGenerator generator, [Out] float[] outputPtr, SizeT num);
Exemple #6
0
 public static extern CurandStatus curandGenerateLongLong(CurandGenerator generator, [Out] ulong[] outputPtr, SizeT num);
Exemple #7
0
 public static extern CurandStatus curandSetQuasiRandomGeneratorDimensions(CurandGenerator generator, uint num_dimensions);
Exemple #8
0
 public static extern CurandStatus curandGeneratePoisson(CurandGenerator generator, uint[] outputPtr, SizeT n, double lambda);
 public static extern CurandStatus curandGenerateNormalDouble(CurandGenerator generator, CUdeviceptr outputPtr, SizeT n, double mean, double stddev);
 public static extern CurandStatus curandGenerateNormal(CurandGenerator generator, CUdeviceptr outputPtr, SizeT n, float mean, float stddev);
 public static extern CurandStatus curandGenerateNormal(CurandGenerator generator, [Out] float[] outputPtr, SizeT n, float mean, float stddev);
 public static extern CurandStatus curandGenerateLongLong(CurandGenerator generator, CUdeviceptr outputPtr, SizeT num);
 public static extern CurandStatus curandGenerateLongLong(CurandGenerator generator, [Out] ulong[] outputPtr, SizeT num);
 public static extern CurandStatus curandGenerateLogNormalDouble(CurandGenerator generator, double[] outputPtr, SizeT n, double mean, double stddev);
 public static extern CurandStatus curandGenerate(CurandGenerator generator, [Out] uint[] outputPtr, SizeT num);
Exemple #16
0
 public static extern CurandStatus curandGenerateLogNormalDouble(CurandGenerator generator, CUdeviceptr outputPtr, SizeT n, double mean, double stddev);
Exemple #17
0
 public static extern CurandStatus curandCreateGeneratorHost(ref CurandGenerator generator, GeneratorType rng_type);
 public static extern CurandStatus curandGeneratePoisson(CurandGenerator generator, uint[] outputPtr, SizeT n, double lambda);
Exemple #19
0
 public static extern CurandStatus curandSetPseudoRandomGeneratorSeed(CurandGenerator generator, ulong seed);
 public static extern CurandStatus curandGenerateSeeds(CurandGenerator generator);
Exemple #21
0
 public static extern CurandStatus curandSetGeneratorOrdering(CurandGenerator generator, Ordering order);
 public static extern CurandStatus curandGenerateUniform(CurandGenerator generator, [Out] float[] outputPtr, SizeT num);
Exemple #23
0
 public static extern CurandStatus curandGenerate(CurandGenerator generator, [Out] uint[] outputPtr, SizeT num);
 public static extern CurandStatus curandGenerateUniformDouble(CurandGenerator generator, [Out] double[] outputPtr, SizeT num);
Exemple #25
0
 public static extern CurandStatus curandGenerateLongLong(CurandGenerator generator, CUdeviceptr outputPtr, SizeT num);
 public static extern CurandStatus curandGenerateUniformDouble(CurandGenerator generator, CUdeviceptr outputPtr, SizeT num);
Exemple #27
0
 public static extern CurandStatus curandGenerateUniformDouble(CurandGenerator generator, [Out] double[] outputPtr, SizeT num);
 public static extern CurandStatus curandSetGeneratorOffset(CurandGenerator generator, ulong offset);
Exemple #29
0
 public static extern CurandStatus curandGenerateNormal(CurandGenerator generator, [Out] float[] outputPtr, SizeT n, float mean, float stddev);
 public static extern CurandStatus curandSetGeneratorOrdering(CurandGenerator generator, Ordering order);
Exemple #31
0
 public static extern CurandStatus curandGenerateLogNormal(CurandGenerator generator, CUdeviceptr outputPtr, SizeT n, float mean, float stddev);
 public static extern CurandStatus curandSetPseudoRandomGeneratorSeed(CurandGenerator generator, ulong seed);
Exemple #33
0
 public static extern CurandStatus curandGenerateSeeds(CurandGenerator generator);
 public static extern CurandStatus curandSetQuasiRandomGeneratorDimensions(CurandGenerator generator, uint num_dimensions);
Exemple #35
0
 public static extern CurandStatus curandDestroyGenerator(CurandGenerator generator);
 public static extern CurandStatus curandSetStream(CurandGenerator generator, CUstream stream);
Exemple #37
0
 public static extern CurandStatus curandSetStream(CurandGenerator generator, CUstream stream);
 public static extern CurandStatus curandCreateGeneratorHost(ref CurandGenerator generator, GeneratorType rng_type);
Exemple #39
0
 public static extern CurandStatus curandSetGeneratorOffset(CurandGenerator generator, ulong offset);
 public static extern CurandStatus curandDestroyGenerator(CurandGenerator generator);