HLIBpro  2.9.1
TUpdateAccumulator Class Reference

Handles updates for a single matrix block by accumulating direct updates and recursive (pending) updates.

#include <TUpdateAccumulator.hh>

Inheritance diagram for TUpdateAccumulator:

Public Member Functions

 ~TUpdateAccumulator ()
void init (const TMatrix *M)
 initialise matrix for accumulated updates
void apply_direct (const TTruncAcc &acc, TMatrix *dest=nullptr, const bool update_dest=false)
bool has_updates () const
 return true if accumulator holds any updates
auto accumulated_updates () -> TMatrix *
 access accumulated updates
auto pending_direct () -> direct_updates_t &
 access set of direct pending updates
auto pending_recursive () -> recursive_updates_t &
 access set of recursive pending updates
void add_update (const TMatrix *M, const TTruncAcc &acc, const TMatrix *dest=nullptr)
 add update matrix
void add_parent_update (const TMatrix *M, const TTruncAcc &acc)
 add update from parent matrix
void add_pending_direct (TDirectMatrixUpdate *U)
 add update U to set of recursive pending updates
void add_pending_recursive (TRecursiveMatrixUpdate *U)
 add update U to set of recursive pending updates
void clear_accumulated ()
 remove matrix with accumulated updates
void clear_pending ()
 remove list of pending updates
void clear_updates ()
 clear all updates
- Public Member Functions inherited from TLockable
TMutexmutex ()
 give access to internal mutex
void lock ()
 lock local mutex
void unlock ()
 unlock local mutex
size_t byte_size () const
 return size in bytes used by this object

Member Function Documentation

◆ apply_direct()

void apply_direct ( const TTruncAcc acc,
TMatrix dest = nullptr,
const bool  update_dest = false 

compute and apply local direct updates;

  • use dest as hint for destination type, e.g. to choose format of accumulator
  • directly update dest if update_dest == true (accumulator is zero afterwards)