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

status of the evaluation of a material property at a point, computed by the kernels. With atomic operations, it is merged in the statistics of the evaluation only if an event occurred, so that the cost of the reporting is null when the evaluation succeeds. The reductions merge the statuses of all the points. More...

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

Public Member Functions

TFEL_HOST_DEVICE constexpr void report (const atomic_size_type c, const bool f) noexcept
 report a violated bound
TFEL_HOST_DEVICE constexpr void reportInvalidResult (const atomic_size_type c) noexcept
 report an invalid result
TFEL_HOST_DEVICE constexpr bool hasEvent () const noexcept
TFEL_HOST_DEVICE constexpr bool isFailure () const noexcept

Public Attributes

int status = 0
 status of the point, with the meaning of the status of the generic interface: 0 (success), 1 (bound violated with the warning policy), -1 (physical bound, or bound with the strict policy) or -4 (invalid result)
atomic_size_type check = no_event
 identifier of the check retained at this point

Detailed Description

status of the evaluation of a material property at a point, computed by the kernels. With atomic operations, it is merged in the statistics of the evaluation only if an event occurred, so that the cost of the reporting is null when the evaluation succeeds. The reductions merge the statuses of all the points.

The status and the retained check follow the generic interface: the first check which makes the evaluation fail ends it, and, otherwise, the last bound violated with the warning policy is retained.

Member Function Documentation

◆ hasEvent()

TFEL_HOST_DEVICE constexpr bool mfront::gpmp::PointStatus::hasEvent ( ) const
inlinenodiscardconstexprnoexcept
Returns
true if an event occurred

◆ isFailure()

TFEL_HOST_DEVICE constexpr bool mfront::gpmp::PointStatus::isFailure ( ) const
inlinenodiscardconstexprnoexcept
Returns
true if the evaluation failed

◆ report()

TFEL_HOST_DEVICE constexpr void mfront::gpmp::PointStatus::report ( const atomic_size_type c,
const bool f )
inlineconstexprnoexcept

report a violated bound

Parameters
[in]cidentifier of the check
[in]ftrue if the evaluation fails, false if the result is computed but must be used with caution

◆ reportInvalidResult()

TFEL_HOST_DEVICE constexpr void mfront::gpmp::PointStatus::reportInvalidResult ( const atomic_size_type c)
inlineconstexprnoexcept

report an invalid result

Parameters
[in]cidentifier of the check

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