Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::ReduceSumOfRealHelper Class Reference

Class managing a reduction of a sum of values. More...

#include <arcane/core/parallel/IMultiReduce.h>

Collaboration diagram for Arcane::ReduceSumOfRealHelper:

Public Member Functions

 ReduceSumOfRealHelper (bool is_strict)
void add (Real v)
 Adds the value v.
void clear ()
 Clears the accumulated values.
RealConstArrayView values () const
 List of accumulated values.
Real reducedValue () const
 Reduced value.
void setReducedValue (Real v)
 Positions the reduced value.

Private Attributes

SharedArray< Realm_values
Real m_reduced_value
bool m_is_strict

Detailed Description

Class managing a reduction of a sum of values.

Instances of this class must be created via IMultiReduce::getSumOfReal(). The user must accumulate values via the call to add(). After execution of the reduction via IMultiReduce::execute(), it is possible to retrieve the reduced value via reducedValue().

See also
IMultiReduce

Definition at line 37 of file IMultiReduce.h.

Constructor & Destructor Documentation

◆ ReduceSumOfRealHelper()

Arcane::ReduceSumOfRealHelper::ReduceSumOfRealHelper ( bool is_strict)
inline

Definition at line 41 of file IMultiReduce.h.

Member Function Documentation

◆ add()

void Arcane::ReduceSumOfRealHelper::add ( Real v)
inline

Adds the value v.

Definition at line 52 of file IMultiReduce.h.

◆ clear()

void Arcane::ReduceSumOfRealHelper::clear ( )
inline

Clears the accumulated values.

Definition at line 61 of file IMultiReduce.h.

◆ reducedValue()

Real Arcane::ReduceSumOfRealHelper::reducedValue ( ) const
inline

Reduced value.

Definition at line 70 of file IMultiReduce.h.

◆ setReducedValue()

void Arcane::ReduceSumOfRealHelper::setReducedValue ( Real v)
inline

Positions the reduced value.

Definition at line 73 of file IMultiReduce.h.

◆ values()

RealConstArrayView Arcane::ReduceSumOfRealHelper::values ( ) const
inline

List of accumulated values.

Definition at line 67 of file IMultiReduce.h.

Member Data Documentation

◆ m_is_strict

bool Arcane::ReduceSumOfRealHelper::m_is_strict
private

Definition at line 79 of file IMultiReduce.h.

◆ m_reduced_value

Real Arcane::ReduceSumOfRealHelper::m_reduced_value
private

Definition at line 78 of file IMultiReduce.h.

◆ m_values

SharedArray<Real> Arcane::ReduceSumOfRealHelper::m_values
private

Definition at line 77 of file IMultiReduce.h.


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