14#include <unordered_map>
19 class EnclaveBookkeeping;
49 Entry(
int numberOfResultValues_,
double* data_,
double maxEigenvalue_ );
75 std::map<int, ::peano4::datamanagement::CellMarker > _taskToMarkerMapping;
155 double& maxEigenvalue,
195 int numberOfResultValues,
197 double maxEigenvalue,
209 void registerTask(
int taskNumber, const ::peano4::datamanagement::CellMarker& marker );
Entry waitForTaskToTerminateAndReturnResult(int number, const tarch::la::Vector< Dimensions, double > &x, const tarch::la::Vector< Dimensions, double > &h)
Wait for a task result to become available.
std::unordered_map< int, Entry > FinishedTaskMap
void waitForTaskToTerminateAndCopyResultOver(int number, double *destination, double &maxEigenvalue, const tarch::la::Vector< Dimensions, double > &x, const tarch::la::Vector< Dimensions, double > &h)
Wait for a task and copy outcome into destination.
static tarch::logging::Log _log
std::set< int > _tasksThatHaveToBeCancelled
void waitForTaskAndDiscardResult(int number, const tarch::la::Vector< Dimensions, double > &x, const tarch::la::Vector< Dimensions, double > &h)
Wait for a task and copy outcome into destination.
void dumpStatistics()
For debugging only.
void registerTask(int taskNumber, const ::peano4::datamanagement::CellMarker &marker)
This one is only there for debugging purposes.
FinishedTaskMap _finishedTasks
Plain map onto ouput array.
void finishedTask(int taskNumber, int numberOfResultValues, double *data, double maxEigenvalue, const tarch::la::Vector< Dimensions, double > &x, const tarch::la::Vector< Dimensions, double > &h)
Usually called directly by EnclaveTask.
static const std::string MemoryAllocationsInLookupTableIdentifier
EnclaveBookkeeping()=default
static constexpr int SkeletonTask
Skeletons are not really tasks in the traditional sense.
EnclaveBookkeeping(const EnclaveBookkeeping &)=delete
tarch::multicore::BooleanSemaphore _finishedTasksSemaphore
static constexpr int NoEnclaveTaskNumber
static EnclaveBookkeeping & getInstance()
This file is part of the multigrid project within Peano 4.
Entry(int numberOfResultValues_, double *data_, double maxEigenvalue_)
~Entry()=default
We do not delete data.
Entry(const Entry ©)=default
std::string toString() const