KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
Public Types | Public Member Functions | Public Attributes | List of all members
Kratos::SumReduction< TDataType, TReturnType > Class Template Reference

utility function to do a sum reduction More...

#include <reduction_utilities.h>

Collaboration diagram for Kratos::SumReduction< TDataType, TReturnType >:

Public Types

typedef TDataType value_type
 
typedef TReturnType return_type
 

Public Member Functions

TReturnType GetValue () const
 access to reduced value More...
 
void LocalReduce (const TDataType value)
 NON-THREADSAFE (fast) value of reduction, to be used within a single thread. More...
 
void ThreadSafeReduce (const SumReduction< TDataType, TReturnType > &rOther)
 THREADSAFE (needs some sort of lock guard) reduction, to be used to sync threads. More...
 

Public Attributes

TReturnType mValue = Internals::NullInitialized<TReturnType>::Get()
 

Detailed Description

template<class TDataType, class TReturnType = TDataType>
class Kratos::SumReduction< TDataType, TReturnType >

utility function to do a sum reduction

Member Typedef Documentation

◆ return_type

template<class TDataType , class TReturnType = TDataType>
typedef TReturnType Kratos::SumReduction< TDataType, TReturnType >::return_type

◆ value_type

template<class TDataType , class TReturnType = TDataType>
typedef TDataType Kratos::SumReduction< TDataType, TReturnType >::value_type

Member Function Documentation

◆ GetValue()

template<class TDataType , class TReturnType = TDataType>
TReturnType Kratos::SumReduction< TDataType, TReturnType >::GetValue ( ) const
inline

access to reduced value

◆ LocalReduce()

template<class TDataType , class TReturnType = TDataType>
void Kratos::SumReduction< TDataType, TReturnType >::LocalReduce ( const TDataType  value)
inline

NON-THREADSAFE (fast) value of reduction, to be used within a single thread.

◆ ThreadSafeReduce()

template<class TDataType , class TReturnType = TDataType>
void Kratos::SumReduction< TDataType, TReturnType >::ThreadSafeReduce ( const SumReduction< TDataType, TReturnType > &  rOther)
inline

THREADSAFE (needs some sort of lock guard) reduction, to be used to sync threads.

Member Data Documentation

◆ mValue

template<class TDataType , class TReturnType = TDataType>
TReturnType Kratos::SumReduction< TDataType, TReturnType >::mValue = Internals::NullInitialized<TReturnType>::Get()

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