Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::PartitionConverter< TypeA, TypeB > Class Template Reference

Conversion of an array of floats to an array of integers/longs. \abstract This class manages the scaling in the following way: [0,W_max] --> [1,EW_max] with Sum(EW) < "max". More...

#include <arcane/std/PartitionConverter.h>

Collaboration diagram for Arcane::PartitionConverter< TypeA, TypeB >:

Public Member Functions

 PartitionConverter (IParallelMng *pm=NULL, Real max=(2<< 30), bool check=false)
 PartitionConverter (IParallelMng *pm, Real max, ConstArrayView< TypeA > input, Integer ncon=1, bool check=false)
void reset (Integer ncon=1, bool check=false)
template<typename DataReal>
bool isBalancable (ConstArrayView< TypeA > input, ArrayView< DataReal > imb, int partnum)
void computeContrib (ConstArrayView< TypeA > input, Real multiplier=1.0)
void convertFromAToB (ConstArrayView< TypeA > input, ArrayView< TypeB > output)
void convertFromBToA (ConstArrayView< TypeB > input, ArrayView< TypeA > output)

Private Attributes

IParallelMngm_pm
Real m_maxAllowed
SharedArray< Realm_max
SharedArray< Realm_sum
SharedArray< Realm_zoomfactor
bool m_ready
bool m_check

Detailed Description

template<typename TypeA, typename TypeB>
class Arcane::PartitionConverter< TypeA, TypeB >

Conversion of an array of floats to an array of integers/longs. \abstract This class manages the scaling in the following way: [0,W_max] --> [1,EW_max] with Sum(EW) < "max".

Definition at line 36 of file PartitionConverter.h.

Constructor & Destructor Documentation

◆ PartitionConverter() [1/2]

template<typename TypeA, typename TypeB>
Arcane::PartitionConverter< TypeA, TypeB >::PartitionConverter ( IParallelMng * pm = NULL,
Real max = (2 << 30),
bool check = false )
inline

Definition at line 41 of file PartitionConverter.h.

◆ PartitionConverter() [2/2]

template<typename TypeA, typename TypeB>
Arcane::PartitionConverter< TypeA, TypeB >::PartitionConverter ( IParallelMng * pm,
Real max,
ConstArrayView< TypeA > input,
Integer ncon = 1,
bool check = false )
inline

Definition at line 54 of file PartitionConverter.h.

Member Function Documentation

◆ computeContrib()

template<typename TypeA, typename TypeB>
void Arcane::PartitionConverter< TypeA, TypeB >::computeContrib ( ConstArrayView< TypeA > input,
Real multiplier = 1.0 )
inline

Definition at line 99 of file PartitionConverter.h.

◆ convertFromAToB()

template<typename TypeA, typename TypeB>
void Arcane::PartitionConverter< TypeA, TypeB >::convertFromAToB ( ConstArrayView< TypeA > input,
ArrayView< TypeB > output )
inline

Definition at line 130 of file PartitionConverter.h.

◆ convertFromBToA()

template<typename TypeA, typename TypeB>
void Arcane::PartitionConverter< TypeA, TypeB >::convertFromBToA ( ConstArrayView< TypeB > input,
ArrayView< TypeA > output )
inline

Definition at line 143 of file PartitionConverter.h.

◆ isBalancable()

template<typename TypeA, typename TypeB>
template<typename DataReal>
bool Arcane::PartitionConverter< TypeA, TypeB >::isBalancable ( ConstArrayView< TypeA > input,
ArrayView< DataReal > imb,
int partnum )
inline

Definition at line 79 of file PartitionConverter.h.

◆ reset()

template<typename TypeA, typename TypeB>
void Arcane::PartitionConverter< TypeA, TypeB >::reset ( Integer ncon = 1,
bool check = false )
inline

Definition at line 66 of file PartitionConverter.h.

Member Data Documentation

◆ m_check

template<typename TypeA, typename TypeB>
bool Arcane::PartitionConverter< TypeA, TypeB >::m_check
private

Definition at line 157 of file PartitionConverter.h.

◆ m_max

template<typename TypeA, typename TypeB>
SharedArray<Real> Arcane::PartitionConverter< TypeA, TypeB >::m_max
private

Definition at line 153 of file PartitionConverter.h.

◆ m_maxAllowed

template<typename TypeA, typename TypeB>
Real Arcane::PartitionConverter< TypeA, TypeB >::m_maxAllowed
private

Definition at line 152 of file PartitionConverter.h.

◆ m_pm

template<typename TypeA, typename TypeB>
IParallelMng* Arcane::PartitionConverter< TypeA, TypeB >::m_pm
private

Definition at line 151 of file PartitionConverter.h.

◆ m_ready

template<typename TypeA, typename TypeB>
bool Arcane::PartitionConverter< TypeA, TypeB >::m_ready
private

Definition at line 156 of file PartitionConverter.h.

◆ m_sum

template<typename TypeA, typename TypeB>
SharedArray<Real> Arcane::PartitionConverter< TypeA, TypeB >::m_sum
private

Definition at line 154 of file PartitionConverter.h.

◆ m_zoomfactor

template<typename TypeA, typename TypeB>
SharedArray<Real> Arcane::PartitionConverter< TypeA, TypeB >::m_zoomfactor
private

Definition at line 155 of file PartitionConverter.h.


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