GitHub Viewer
// Copyright Sebastian Jeckel 2014.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//#define REACT_ENABLE_LOGGING
#include "tbb/tick_count.h"
#include "tbb/tbbmalloc_proxy.h"
//#include "ittnotify.h"
#include "BenchmarkGrid.h"
#include "BenchmarkRandom.h"
#include "BenchmarkFanout.h"
#include "BenchmarkSequence.h"
#include "BenchmarkLifeSim.h"
#include "react/Domain.h"
#include "react/Signal.h"
#include "react/Algorithm.h"
#include "react/common/Util.h"
#include "react/logging/EventLog.h"
#include "react/engine/ToposortEngine.h"
#include "react/engine/PulsecountEngine.h"
#include "react/engine/SubtreeEngine.h"
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace {
using namespace react;
REACTIVE_DOMAIN(ToposortSTDomain, sequential, ToposortEngine)
REACTIVE_DOMAIN(ToposortDomain, parallel, ToposortEngine)
REACTIVE_DOMAIN(PulsecountDomain, parallel, PulsecountEngine)
REACTIVE_DOMAIN(SubtreeDomain, parallel, SubtreeEngine)
void runBenchmarkGrid(std::ostream& out)
{
RUN_BENCHMARK(out, 5, Benchmark_Grid, BenchmarkParams_Grid(20, 10000),
ToposortSTDomain, ToposortDomain, PulsecountDomain);
RUN_BENCHMARK(out, 5, Benchmark_Grid, BenchmarkParams_Grid(30, 10000),
ToposortSTDomain, ToposortDomain, PulsecountDomain);
RUN_BENCHMARK(out, 5, Benchmark_Grid, BenchmarkParams_Grid(40, 10000),
ToposortSTDomain, ToposortDomain, PulsecountDomain);
RUN_BENCHMARK(out, 5, Benchmark_Grid, BenchmarkParams_Grid(50, 10000),
ToposortSTDomain, ToposortDomain, PulsecountDomain);
}
void runBenchmarkRandom(std::ostream& out)
{
const auto w = 20;
const auto h = 11;
int seed1 = 41556;
int seed2 = 21624;
for (int j=1; j