public override void UpdateMemoryBlocks()
        {
            if (RandomSeed > 0)
            {
                m_rnd = new Random(RandomSeed);
                MyKernelFactory.Instance.GetRandDevice(this).SetPseudoRandomGeneratorSeed((ulong)RandomSeed);   // set random seed defining the sequence
                MyKernelFactory.Instance.GetRandDevice(this).SetOffset(0);                                      // and offset in this random sequence
            }
            else
            {
                m_rnd = new Random(DateTime.Now.Millisecond);
            }

            RandomNumbers.Count = Output.Count + 1;

            if (UniformRNG.Enabled)
            {
                UniformRNG.UpdateValueHints();
            }
            else if (NormalRNG.Enabled)
            {
                NormalRNG.UpdateValueHints();
            }
            else if (ConstantRNG.Enabled)
            {
                ConstantRNG.UpdateValueHints();
            }
            else if (CombinationRNG.Enabled)
            {
                CombinationRNG.UpdateValueHints();
            }
        }
Beispiel #2
0
        public override void UpdateMemoryBlocks()
        {
            RandomNumbers.Count = Output.Count + 1;

            if (UniformRNG.Enabled)
            {
                UniformRNG.UpdateValueHints();
            }
            else if (NormalRNG.Enabled)
            {
                NormalRNG.UpdateValueHints();
            }
            else if (ConstantRNG.Enabled)
            {
                ConstantRNG.UpdateValueHints();
            }
            else if (CombinationRNG.Enabled)
            {
                CombinationRNG.UpdateValueHints();
            }
        }