Ejemplo n.º 1
0
        internal static VslStream NewStream(this BRNG brng, uint seed = 0, int index = 0)
        {
            IntPtr stream = IntPtr.Zero;

            VSL.vslNewStream(ref stream, brng + index, seed).ThrowOnError();
            return(stream);
        }
Ejemplo n.º 2
0
Archivo: rng.cs Proyecto: 0xCM/arrows
 public static MklRng stream(BRNG generator, uint seed = 0, int index = 0)
 => MklRng.Define(generator, seed, index);
Ejemplo n.º 3
0
Archivo: rng.cs Proyecto: 0xCM/arrows
 /// <summary>
 /// Describes stream partitioning capabilies of an identifed generator
 /// </summary>
 /// <param name="sub">Indicates whether stream independed substream creation (Leapfrogging) is suppored</param>
 /// <param name="skip">Indicates whether elements can be skipped</param>
 public static (bool sub, bool skip) capabilities(BRNG brng)
 => brng switch
Ejemplo n.º 4
0
 internal static RngKind ToRngKind(this BRNG src)
 => (RngKind)src;
Ejemplo n.º 5
0
 internal MklRng(BRNG brng, uint seed = 0, int index = 0)
 {
     this.Source = brng.NewStream(seed, index);
 }
Ejemplo n.º 6
0
 public static MklRng Define(BRNG brng, uint seed = 0, int index = 0)
 => new MklRng(brng, seed, index);
Ejemplo n.º 7
0
 public static extern VslRngStatus vslNewStreamEx(ref IntPtr stream, BRNG brng, int argLen, ref uint args);
Ejemplo n.º 8
0
 public static extern VslRngStatus vslNewStreamEx(ref IntPtr stream, BRNG brng, ref uint parameters);
Ejemplo n.º 9
0
 public static extern VslRngStatus vslNewStream(ref IntPtr stream, BRNG brng, uint seed);