Alien  1.3.0
Developer documentation
Loading...
Searching...
No Matches
Alien::IndexManager Class Reference
Collaboration diagram for Alien::IndexManager:

Classes

class  Iterator
class  ConstIterator
struct  InternalEntryIndex
struct  EntryLocalId
struct  EntrySendRequest
struct  EntryRecvRequest
struct  ParallelRequests

Public Types

enum  eKeepAlive { Clone , DontClone }
typedef UniqueArray< ScalarIndexSetVectorIndexSet
typedef std::vector< ScalarIndexSet * > ScalarIndexSetVector

Public Member Functions

 IndexManager (Alien::IMessagePassingMng *parallelMng, Alien::ITraceMng *traceMng=nullptr)
void init ()
 Initialisation.
bool isPrepared () const
void setVerboseMode (bool verbose)
template<typename T>
void prepare (T &&t)
void prepare ()
void stats (Integer &globalSize, Integer &minLocalIndex, Integer &localSize) const
Integer globalSize () const
Integer minLocalIndex () const
Integer localSize () const
ScalarIndexSet buildScalarIndexSet (const String &name, ConstArrayView< Integer > localIds, const IAbstractFamily &family, Integer kind, eKeepAlive alive=DontClone)
ScalarIndexSet buildScalarIndexSet (const String &name, const IAbstractFamily &family, Integer kind, eKeepAlive alive=DontClone)
VectorIndexSet buildVectorIndexSet (const String &name, ConstArrayView< Integer > localIds, const IAbstractFamily &family, const UniqueArray< Integer > &kind, eKeepAlive alive=DontClone)
VectorIndexSet buildVectorIndexSet (const String &name, const IAbstractFamily &family, const UniqueArray< Integer > &kind, eKeepAlive alive=DontClone)
void removeIndex (const ScalarIndexSet &entry, ConstArrayView< Integer > localIds)
UniqueArray< Integer > getIndexes (const ScalarIndexSet &entry) const
 Give a translation table, indexed by items.
UniqueArray2< Integer > getIndexes (const VectorIndexSet &entries) const
 Give a vector translation table, indexed by items then by entries.
ConstArrayView< Integer > getOwnIndexes (const ScalarIndexSet &entry) const
ConstArrayView< Integer > getOwnLocalIds (const ScalarIndexSet &entry) const
ConstArrayView< Integer > getAllIndexes (const ScalarIndexSet &entry) const
ConstArrayView< Integer > getAllLocalIds (const ScalarIndexSet &entry) const
const IAbstractFamilygetFamily (const ScalarIndexSet &entry) const
IMessagePassingMng * parallelMng () const
 Parallel Manager used for the index computation.
void setMaxNullIndexOpt (bool flag)
 define null index : default = -1, if true null_index = max_index+1
Integer nullIndex () const
Iterator begin ()
Iterator end ()
ConstIterator begin () const
ConstIterator end () const

Protected Attributes

std::map< Integer, std::shared_ptr< EntryLocalId > > m_entry_local_ids
std::shared_ptr< ParallelRequestsparallel

Private Types

enum  State { Undef , Initialized , Prepared }
typedef std::vector< InternalEntryIndexEntryIndexMap

Private Member Functions

ScalarIndexSet buildEntry (const String &name, const IAbstractFamily *itemFamily, Integer kind)
void defineIndex (const ScalarIndexSet &entry, ConstArrayView< Integer > localIds)
void begin_prepare (EntryIndexMap &entry_index)
void begin_parallel_prepare (EntryIndexMap &entry_index)
void end_parallel_prepare (EntryIndexMap &entry_index)
void sequential_prepare (EntryIndexMap &entry_index)
void end_prepare (EntryIndexMap &entryIndex)
const IAbstractFamilyaddNewAbstractFamily (const IAbstractFamily *family, eKeepAlive alive)

Private Attributes

Alien::IMessagePassingMng * m_parallel_mng = nullptr
Alien::ITraceMng * m_trace_mng = nullptr
Integer m_local_owner
 current owner.
enum Alien::IndexManager::State m_state
bool m_verbose
Integer m_local_entry_count
Integer m_global_entry_count
Integer m_global_entry_offset
Integer m_local_removed_entry_count
Integer m_global_removed_entry_count
bool m_max_null_index_opt
ScalarIndexSetVector m_entries
 Table des Entry connues localement.
std::map< const IAbstractFamily *, std::shared_ptr< IAbstractFamily > > m_abstract_families
 Abstract families and associated clones (if handled).
std::map< Integer, UniqueArray< Integer > > m_entry_all_items
 Local ids, sorted by owned then ghosts. By entry.
std::map< Integer, UniqueArray< Integer > > m_entry_all_indices
 Unique ids, sorted by owned then ghosts. By entry.
std::map< Integer, ConstArrayView< Integer > > m_entry_own_items
 Local ids, only for owned, by entry.
std::map< Integer, ConstArrayView< Integer > > m_entry_own_indices
 Unique ids, only for owned, by entry.
std::map< Integer, const IAbstractFamily * > m_entry_families
 Family, by entry.

Detailed Description

Definition at line 38 of file IndexManager.h.

Member Typedef Documentation

◆ ScalarIndexSetVector

typedef std::vector<ScalarIndexSet*> Alien::IndexManager::ScalarIndexSetVector

Definition at line 43 of file IndexManager.h.

◆ VectorIndexSet

typedef UniqueArray<ScalarIndexSet> Alien::IndexManager::VectorIndexSet

Definition at line 41 of file IndexManager.h.

Member Enumeration Documentation

◆ eKeepAlive

enum Alien::IndexManager::eKeepAlive

Definition at line 45 of file IndexManager.h.

Constructor & Destructor Documentation

◆ IndexManager()

Alien::IndexManager::IndexManager ( Alien::IMessagePassingMng * parallelMng,
Alien::ITraceMng * traceMng = nullptr )
explicit

Definition at line 120 of file IndexManager.cc.

◆ ~IndexManager()

Alien::IndexManager::~IndexManager ( )
virtual

Definition at line 140 of file IndexManager.cc.

Member Function Documentation

◆ globalSize()

Integer Alien::IndexManager::globalSize ( ) const

Definition at line 845 of file IndexManager.cc.

◆ init()

void Alien::IndexManager::init ( )

Initialisation.

Definition at line 147 of file IndexManager.cc.

References m_abstract_families, m_entries, and m_local_owner.

◆ isPrepared()

bool Alien::IndexManager::isPrepared ( ) const
inline

Definition at line 105 of file IndexManager.h.

◆ localSize()

Integer Alien::IndexManager::localSize ( ) const

Definition at line 867 of file IndexManager.cc.

◆ minLocalIndex()

Integer Alien::IndexManager::minLocalIndex ( ) const

Definition at line 856 of file IndexManager.cc.

◆ prepare() [1/2]

void Alien::IndexManager::prepare ( )

Prepare Compute all indices, using default algorithm.

Definition at line 269 of file IndexManager.cc.

◆ prepare() [2/2]

template<typename T>
void Alien::IndexManager::prepare ( T && t)

Prepare Compute all indices, using the specified sorting algorithm.

Definition at line 306 of file IndexManager.h.

◆ setVerboseMode()

void Alien::IndexManager::setVerboseMode ( bool verbose)

Definition at line 170 of file IndexManager.cc.

◆ stats()

void Alien::IndexManager::stats ( Integer & globalSize,
Integer & minLocalIndex,
Integer & localSize ) const

Definition at line 832 of file IndexManager.cc.


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