Example #1
0
        private void benchmark(double minSequentialExecutionTime)
        {
            rounds        = 5;
            warmup_rounds = 5;

            print = false;



            foreach (ExampleBase example in examples())
            {
                double sizeFactor = 0.0;
                try
                {
                    sizeFactor = SystemCharacteristics.GetScale(example, minSequentialExecutionTime);
                }
                catch (Exception exception)
                {
                    logWriteLine(exception.StackTrace);
                    logWriteLine(example.Name + "is skipped due to a scale error.");
                    continue;
                }
                runExample(example, sizeFactor);
                //runExampleGpuAndAutomaticOnly(example, minSequentialExecutionTime);
            }
        }
Example #2
0
        private void RunBenchmark()
        {
            csv = evaluationLog();
            log = errorLog();
            try
            {
                logWriteLine(SystemCharacteristics.ToString());

                //for (int i = 3; i < 10; i++)
                //    benchmark(4);
                benchmark(10);
            }
            catch (TypeInitializationException e)
            {
                Exception handledException = e;
                while (handledException.InnerException != null)
                {
                    handledException = handledException.InnerException;
                }
                logWriteLine(handledException.GetType().ToString() + ":" + handledException.Message);
            }
            csv.Close();
            log.Close();
        }