tfel
Loading...
Searching...
No Matches
mfront::gpmp::StatisticsHandler Struct Reference

handler of the statistics of the material properties, given to the primitives of the backends (see MFront/GenericParallel/Batch.hxx). The statistics are analysed by the report function of the material property, which names the check retained at the reported point. More...

#include </home/runner/work/tfel/tfel/mfront/include/MFront/GenericParallelMaterialProperty/Evaluate.hxx>

Public Types

using OutputStatus = ::mfront::gpmp::OutputStatus
 a simple alias
using Statistics = ::mfront::gpmp::Statistics
 a simple alias

Public Member Functions

constexpr BatchStatistics initial () const noexcept
constexpr bool hasEvents () const noexcept
void initialize (Statistics &s) const noexcept
 initialize the statistics updated by the devices
int report (OutputStatus &s, const Statistics &r) const noexcept
 report the statistics updated by the devices, once the computations are completed
int report (OutputStatus &s, Statistics *const given, const BatchStatistics &r) const noexcept
 report the statistics of a batch combined by a reduction or, if the calling code gave statistics, accumulate them in those statistics (see mfront_gpmp_BatchData)

Public Attributes

ReportFunction report_function
 report function of the material property
bool runtime_checks
 if false, the runtime checks are disabled

Detailed Description

handler of the statistics of the material properties, given to the primitives of the backends (see MFront/GenericParallel/Batch.hxx). The statistics are analysed by the report function of the material property, which names the check retained at the reported point.

Member Function Documentation

◆ hasEvents()

bool mfront::gpmp::StatisticsHandler::hasEvents ( ) const
inlineconstexprnoexcept
Returns
false if the evaluation at one point never reports an event, which is the case if the runtime checks are disabled: the primitives then neither combine nor report the statistics

◆ initial()

BatchStatistics mfront::gpmp::StatisticsHandler::initial ( ) const
inlineconstexprnoexcept
Returns
the statistics of a batch without event

◆ report() [1/2]

int mfront::gpmp::StatisticsHandler::report ( OutputStatus & s,
const Statistics & r ) const
inlinenoexcept

report the statistics updated by the devices, once the computations are completed

Returns
the status
Parameters
[out]soutput status
[in]rstatistics, read on the host

◆ report() [2/2]

int mfront::gpmp::StatisticsHandler::report ( OutputStatus & s,
Statistics *const given,
const BatchStatistics & r ) const
inlinenoexcept

report the statistics of a batch combined by a reduction or, if the calling code gave statistics, accumulate them in those statistics (see mfront_gpmp_BatchData)

Returns
the status
Parameters
[in,out]soutput status
[in]givenstatistics given by the calling code, or null
[in]rstatistics of the batch

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