Exemplo n.º 1
0
        public static void ParallelForBoundary69()
        {
            TestParameters parameters = new TestParameters(API.For, StartIndexBase.Int32, -100)
            {
                Count           = 5,
                WorkloadPattern = WorkloadPattern.Random,
            };
            ParallelForTest test = new ParallelForTest(parameters);

            test.RealRun();
        }
Exemplo n.º 2
0
        public static void TestFor_Boundary(API api, StartIndexBase startIndexBase, int startIndexOffset, int count, WorkloadPattern workloadPattern)
        {
            var parameters = new TestParameters(api, startIndexBase, startIndexOffset)
            {
                Count           = count,
                WorkloadPattern = workloadPattern,
            };
            var test = new ParallelForTest(parameters);

            test.RealRun();
        }
Exemplo n.º 3
0
        public static void ParallelForBoundary70()
        {
            TestParameters parameters = new TestParameters(API.For, StartIndexBase.Zero, 0)
            {
                Count           = 5,
                WorkloadPattern = WorkloadPattern.Similar,
            };
            ParallelForTest test = new ParallelForTest(parameters);

            test.RealRun();
        }
Exemplo n.º 4
0
        public static void ParallelForBoundary50()
        {
            TestParameters parameters = new TestParameters(API.For, StartIndexBase.Zero, 1000)
            {
                Count           = 1000,
                WorkloadPattern = WorkloadPattern.Decreasing,
            };
            ParallelForTest test = new ParallelForTest(parameters);

            test.RealRun();
        }
Exemplo n.º 5
0
        public static void ParallelForBoundary6()
        {
            TestParameters parameters = new TestParameters(API.For64, StartIndexBase.Int32, 0)
            {
                Count           = 1000,
                WorkloadPattern = WorkloadPattern.Increasing,
            };
            ParallelForTest test = new ParallelForTest(parameters);

            test.RealRun();
        }
Exemplo n.º 6
0
        public static void ParallelForBoundary24()
        {
            TestParameters parameters = new TestParameters(API.For64, StartIndexBase.Int64, -100)
            {
                Count           = 100,
                WorkloadPattern = WorkloadPattern.Similar,
            };
            ParallelForTest test = new ParallelForTest(parameters);

            test.RealRun();
        }
Exemplo n.º 7
0
        public static void ParallelForTest5()
        {
            TestParameters parameters = new TestParameters(API.For64, StartIndexBase.Int32)
            {
                Count          = 2,
                ParallelOption = WithParallelOption.None,
                StateOption    = ActionWithState.None,
                LocalOption    = ActionWithLocal.None,
            };
            ParallelForTest test = new ParallelForTest(parameters);

            test.RealRun();
        }
Exemplo n.º 8
0
        public static void ParallelForTest47()
        {
            TestParameters parameters = new TestParameters(API.Foreach, StartIndexBase.Zero)
            {
                Count          = 97,
                ParallelOption = WithParallelOption.WithDOP,
                StateOption    = ActionWithState.Stop,
                LocalOption    = ActionWithLocal.None,
            };
            ParallelForTest test = new ParallelForTest(parameters);

            test.RealRun();
        }
Exemplo n.º 9
0
        public static void ParallelForTest43()
        {
            TestParameters parameters = new TestParameters(API.Foreach, StartIndexBase.Zero)
            {
                Count          = 2,
                ParallelOption = WithParallelOption.None,
                StateOption    = ActionWithState.None,
                LocalOption    = ActionWithLocal.HasFinally,
            };
            ParallelForTest test = new ParallelForTest(parameters);

            test.RealRun();
        }
Exemplo n.º 10
0
        public static void ParallelForTest6()
        {
            TestParameters parameters = new TestParameters(API.For64, StartIndexBase.Int32)
            {
                Count          = 2,
                ParallelOption = WithParallelOption.WithDOP,
                StateOption    = ActionWithState.Stop,
                LocalOption    = ActionWithLocal.HasFinally,
            };
            ParallelForTest test = new ParallelForTest(parameters);

            test.RealRun();
        }
Exemplo n.º 11
0
        public static void ParrallelFor(API api, StartIndexBase startIndexBase, int count, WithParallelOption parallelOption, ActionWithState stateOption, ActionWithLocal localOption)
        {
            var parameters = new TestParameters(api, startIndexBase)
            {
                Count          = count,
                ParallelOption = parallelOption,
                StateOption    = stateOption,
                LocalOption    = localOption
            };
            var test = new ParallelForTest(parameters);

            test.RealRun();
        }
        public static void TestForeach_Partitioner(int count, int chunkSize, PartitionerType partitionerType, WithParallelOption parallelOption, ActionWithLocal localOption, ActionWithState stateOption)
        {
            var parameters = new TestParameters(API.Foreach, StartIndexBase.Zero)
            {
                Count           = count,
                ChunkSize       = chunkSize,
                PartitionerType = partitionerType,
                ParallelForeachDataSourceType = DataSourceType.Partitioner,
                ParallelOption = parallelOption,
                LocalOption    = localOption,
                StateOption    = stateOption,
            };
            var test = new ParallelForTest(parameters);

            test.RealRun();
        }
        public static void ParallelForeachPartitioner4()
        {
            TestParameters parameters = new TestParameters(API.Foreach, StartIndexBase.Zero)
            {
                Count           = 10,
                ChunkSize       = 97,
                PartitionerType = PartitionerType.RangePartitioner,
                ParallelForeachDataSourceType = DataSourceType.Partitioner,
                ParallelOption = WithParallelOption.None,
                LocalOption    = ActionWithLocal.HasFinally,
                StateOption    = ActionWithState.Stop,
            };
            ParallelForTest test = new ParallelForTest(parameters);

            test.RealRun();
        }
        public static void ParallelForeachPartitioner2()
        {
            TestParameters parameters = new TestParameters(API.Foreach, StartIndexBase.Zero)
            {
                Count           = 10,
                ChunkSize       = 1,
                PartitionerType = PartitionerType.ArrayBalancedOOB,
                ParallelForeachDataSourceType = DataSourceType.Partitioner,
                ParallelOption = WithParallelOption.None,
                LocalOption    = ActionWithLocal.None,
                StateOption    = ActionWithState.None,
            };
            ParallelForTest test = new ParallelForTest(parameters);

            test.RealRun();
        }
        public static void ParallelForeachPartitioner19()
        {
            TestParameters parameters = new TestParameters(API.Foreach, StartIndexBase.Zero)
            {
                Count           = 97,
                ChunkSize       = 3,
                PartitionerType = PartitionerType.ArrayBalancedOOB,
                ParallelForeachDataSourceType = DataSourceType.Partitioner,
                ParallelOption = WithParallelOption.WithDOP,
                LocalOption    = ActionWithLocal.HasFinally,
                StateOption    = ActionWithState.Stop,
            };
            ParallelForTest test = new ParallelForTest(parameters);

            test.RealRun();
        }
        public static void ParallelForeachPartitioner16()
        {
            TestParameters parameters = new TestParameters(API.Foreach, StartIndexBase.Zero)
            {
                Count           = 97,
                ChunkSize       = -1,
                PartitionerType = PartitionerType.IEnumerableOOB,
                ParallelForeachDataSourceType = DataSourceType.Partitioner,
                ParallelOption = WithParallelOption.WithDOP,
                LocalOption    = ActionWithLocal.None,
                StateOption    = ActionWithState.None,
            };
            ParallelForTest test = new ParallelForTest(parameters);

            test.RealRun();
        }