Esempio n. 1
0
        public TestStructSmall GetRandInstance(RandHelper helper, params int[] lengths)
        {
            TestStructSmall res = new TestStructSmall();

            helper.GetRand(out res.i1);
            helper.GetRand(out res.i2);
            helper.GetRand(out res.b1);
            helper.GetRand(out res.l1);
            return(res);
        }
Esempio n. 2
0
        public TestStructLarge GetRandInstance(RandHelper helper, params int[] lengths)
        {
            TestStructLarge res = new TestStructLarge();

            helper.GetRand(out res.b1);
            helper.GetRand(out res.t1);
            helper.GetRand(out res.dt1);
            res.ss1 = new TestStructSmall().GetRandInstance(helper);
            res.ss2 = new TestStructSmall2().GetRandInstance(helper);
            helper.GetRand(out res.i1);
            helper.GetRand(out res.l1);
            return(res);
        }
Esempio n. 3
0
        public TestClassSmall GetRandInstance(RandHelper helper, params int[] lengths)
        {
            TestClassSmall res = new TestClassSmall();

            helper.GetRand(out res.b1);
            res.ss1 = new TestStructSmall().GetRandInstance(helper);
            res.ia1 = new int[lengths[0]];
            for (int i = 0; i < res.ia1.Length; i++)
            {
                helper.GetRand(out res.ia1[i]);
            }
            helper.GetRand(out res.l1);
            return(res);
        }
Esempio n. 4
0
        public TestClassSmallParallel GetRandInstance(RandHelper helper, params int[] lengths)
        {
            int len1     = lengths[0];
            int arrayLen = lengths[1];
            var res      = new Frame <TestClassSmall> [arrayLen];

            for (int f = 0; f < arrayLen; f++)
            {
                res[f] = new TestClassSmall().GetRandInstance(helper, len1);
            }
            return(new TestClassSmallParallel()
            {
                arr = res
            });
        }
Esempio n. 5
0
        public TestClassLargeBaseline GetRandInstance(RandHelper helper, params int[] lengths)
        {
            int len1     = lengths[0];
            int arrayLen = lengths[1];
            var res      = new TestClassLarge[arrayLen];

            for (int f = 0; f < arrayLen; f++)
            {
                res[f] = new TestClassLarge().GetRandInstance(helper, len1);
            }
            return(new TestClassLargeBaseline()
            {
                arr = res
            });
        }
Esempio n. 6
0
        public TestClassLarge GetRandInstance(RandHelper helper, params int[] lengths)
        {
            TestClassLarge res = new TestClassLarge();

            helper.GetRand(out res.b1);
            res.ssa1 = new TestStructSmall2[lengths[0]];
            for (int i = 0; i < res.ssa1.Length; i++)
            {
                res.ssa1[i] = new TestStructSmall2().GetRandInstance(helper);
            }
            helper.GetRand(out res.i1);
            res.sla1 = new TestStructLarge[lengths[0]];
            for (int i = 0; i < res.sla1.Length; i++)
            {
                res.sla1[i] = new TestStructLarge().GetRandInstance(helper);
            }
            helper.GetRand(out res.l1);
            res.ia1 = new int[lengths[0]];
            for (int i = 0; i < res.ia1.Length; i++)
            {
                helper.GetRand(out res.ia1[i]);
            }
            return(res);
        }