Tomographer  v5.2
Tomographer C++ Framework Documentation
Tomographer::MHRWTasks::MHRandomWalkTask< MHRandomWalkTaskCData, Rng > Struct Template Reference

Random Walk task, collecting statistics. More...

#include <tomographer/mhrwtasks.h>

Public Types

typedef MHRandomWalkTaskCData::IterCountIntType IterCountIntType
 The type used to count iterations (see MHRWParams)
 
typedef MHRandomWalkTaskCData::MHWalkerParams MHWalkerParams
 The type used to describe a step size (see MHRWParams)
 
typedef MHRWParams< MHWalkerParams, IterCountIntTypeMHRWParamsType
 Type to stores the parameters of the random walk.
 
typedef MHRandomWalkTaskResult< typename MHRandomWalkTaskCData::MHRWStatsResultsType, IterCountIntType, MHWalkerParamsResultType
 Result type of a single task run. More...
 
typedef MHRWStatusReport< MHRWParamsTypeStatusReportType
 Typedef for MHRWStatusReport. This is needed by, e.g. MultiProc::OMP::TaskDispatcher.
 

Public Member Functions

template<typename LoggerType >
 MHRandomWalkTask (typename Rng::result_type inputseed, const MHRandomWalkTaskCData *, LoggerType &logger)
 Constructs the MHRandomWalkTask. More...
 
template<typename LoggerType , typename TaskManagerIface >
void run (const MHRandomWalkTaskCData *pcdata, LoggerType &baselogger, TaskManagerIface *tmgriface)
 Run this task. More...
 
ResultType getResult () const
 
ResultType stealResult ()
 

Detailed Description

template<typename MHRandomWalkTaskCData, typename Rng = std::mt19937>
struct Tomographer::MHRWTasks::MHRandomWalkTask< MHRandomWalkTaskCData, Rng >

Random Walk task, collecting statistics.

This class can be used with MultiProc::OMP::TaskDispatcher, for example.

Template Parameters
MHRandomWalkTaskCDatamust comply with the MHRandomWalkTaskCData Interface and inherit from CDataBase with appropriate types as required. The parameters to the random walk, as well as types to use, stats collector etc. are specified using this class.

Definition at line 345 of file mhrwtasks.h.

Member Typedef Documentation

§ ResultType

template<typename MHRandomWalkTaskCData, typename Rng = std::mt19937>
typedef MHRandomWalkTaskResult<typename MHRandomWalkTaskCData::MHRWStatsResultsType, IterCountIntType, MHWalkerParams> Tomographer::MHRWTasks::MHRandomWalkTask< MHRandomWalkTaskCData, Rng >::ResultType

Result type of a single task run.

See MHRandomWalkTaskResult.

Definition at line 360 of file mhrwtasks.h.

Constructor & Destructor Documentation

§ MHRandomWalkTask()

template<typename MHRandomWalkTaskCData, typename Rng = std::mt19937>
template<typename LoggerType >
Tomographer::MHRWTasks::MHRandomWalkTask< MHRandomWalkTaskCData, Rng >::MHRandomWalkTask ( typename Rng::result_type  inputseed,
const MHRandomWalkTaskCData *  ,
LoggerType &  logger 
)
inline

Constructs the MHRandomWalkTask.

You should never need to call this directly, except if you're writing a task manager/dispatcher (e.g. MultiProc::OMP::TaskDispatcher)

Definition at line 389 of file mhrwtasks.h.

Member Function Documentation

§ run()

template<typename MHRandomWalkTaskCData, typename Rng = std::mt19937>
template<typename LoggerType , typename TaskManagerIface >
void Tomographer::MHRWTasks::MHRandomWalkTask< MHRandomWalkTaskCData, Rng >::run ( const MHRandomWalkTaskCData *  pcdata,
LoggerType &  baselogger,
TaskManagerIface *  tmgriface 
)
inline

Run this task.

Runs this task, i.e. instantiates a MHRandomWalk with the provided inputs and data, and runs it.

This also takes care to call the task manager interface's statusReportRequested() and submits a status report if required. See e.g. MultiProc::OMP::TaskDispatcher::requestStatusReport().

Definition at line 493 of file mhrwtasks.h.


The documentation for this struct was generated from the following file: