Esempio n. 1
0
 /// <summary>
 /// Generates random seeds using the native cuRand API.
 /// </summary>
 public static void GenerateRandomSeeds <TICuRand>(this TICuRand rand)
     where TICuRand : ICuRand =>
 CuRandException.ThrowIfFailed(
     rand.API.GenerateSeeds(rand.GeneratorPtr));
Esempio n. 2
0
 /// <summary>
 /// Sets the underlying native cuRand seed.
 /// </summary>
 public static void SetSeed <TICuRand>(this TICuRand rand, long seed)
     where TICuRand : ICuRand =>
 CuRandException.ThrowIfFailed(
     rand.API.SetSeed(rand.GeneratorPtr, seed));