3 #include "exahype2/dg/DGUtils.h"
4 #include "repositories/SolverRepository.h"
5 #include "tarch/timing/Measurement.h"
6 #include "tarch/timing/Watch.h"
12 namespace kernelbenchmarks {
14 = (AderSolver::Order + 1) * (AderSolver::Order + 1)
16 * (AderSolver::Order + 1)
18 * (AderSolver::NumberOfUnknowns + AderSolver::NumberOfAuxiliaryVariables);
32 const tarch::la::Vector<DIMENSIONS, double>
CellCenter,
33 const tarch::la::Vector<DIMENSIONS, double>
CellSize
39 int linearisedIndex = 0;
40 dfor(index, AderSolver::Order + 1) {
41 repositories::instanceOfAderSolver.initialCondition(
43 ::exahype2::dg::getQuadraturePoint(
47 repositories::instanceOfAderSolver.Order + 1,
48 kernels::AderSolver::Quadrature<SolverPrecision>::nodes
54 linearisedIndex += AderSolver::NumberOfUnknowns + AderSolver::NumberOfAuxiliaryVariables;
69 const std::string& kernelIdentificator,
71 const tarch::timing::Measurement& timingKernelLaunch,
74 tarch::logging::Log
_log
78 ss << kernelIdentificator <<
":\n\t";
80 ss <<
"average compute time per cell: " << (
timingComputeKernel.getValue() / numberOfCells) <<
" |\n\t";
85 logInfo(
"reportRuntime()", ss.str());
87 std::ostringstream snapshotFileName;
88 snapshotFileName <<
"ader-benchmarks-prec-"
89 <<
typeid(SolverPrecision).
name()
91 std::ofstream file( snapshotFileName.str(), std::ios_base::app );
92 file << kernelIdentificator <<
","
93 << numberOfThreads <<
","
94 << numberOfCells <<
","
96 << timingKernelLaunch.getValue() <<
","
const tarch::la::Vector< DIMENSIONS, double > CellCenter
tarch::timing::Measurement timingComputeKernel
const tarch::la::Vector< DIMENSIONS, double > CellSize
constexpr int NumberOfInputEntriesPerCell
void reportRuntime(const std::string &kernelIdentificator, const tarch::timing::Measurement &timingComputeKernel, const tarch::timing::Measurement &timingKernelLaunch, int numberOfCells, int numberOfThreads, tarch::logging::Log _log)
Reports the runtime and throughput of the benchmarks.
constexpr int NumberOfOutputEntriesPerCell
void initInputData(SolverPrecision *Q, const tarch::la::Vector< DIMENSIONS, double > CellCenter, const tarch::la::Vector< DIMENSIONS, double > CellSize)
Set input data.
tarch::logging::Log _log
This is variant 1 of the fused kernels.