Interface for managing classes that need to know when managed data has changed. More...
#include <DataChangeListener.h>

Public Member Functions | |
| DataChangeListener () | |
| Construct the DataChangeListener. | |
| virtual void | receiveDataChanged ()=0 |
| The method called when a data change event occurs. | |
| virtual | ~DataChangeListener () |
| Destroy the DataChangeListener. | |
Private Member Functions | |
| void | deregisterFromFirer (DataChangeFirer *firer) |
| Deregister this DataChangeListener with a DataChangeFirer. | |
| void | registerWithFirer (DataChangeFirer *firer) |
| Register this DataChangeListener with a DataChangeFirer. | |
Private Attributes | |
| std::vector< DataChangeFirer * > | d_firers |
Friends | |
| class | DataChangeFirer |
Interface for managing classes that need to know when managed data has changed.
Some linear algebra packages, such as PETSc, use sophisticated caching schemes to reduce the amount of communication necessary to perform some computations. For instance, unless the values of a vector change, the L1 norm will remain constant. Since computing the L1 norm requires communication for parallel vectors, communication can be reduced by caching this value and invalidating the cache when the data changes. To pass these messages around, a set of classes are provided which allow for the invalidation of the cache. These classes are used when AMP managed data is changed by some linear algebra packages to inform other packages that their cache needs to be invalidated. These classes implement a callback mechansim in an environment of reference counted pointers.
The DataChangeListener provides a mechanism to register and de-register itself with a DataChangeFirer. It is a list of DataChangeFirers with which it is registered. It implements a receiveDataChanged() method used by the DataChangeFirer to indicate managed data has changed.
Definition at line 34 of file DataChangeListener.h.
| AMP::LinearAlgebra::DataChangeListener::DataChangeListener | ( | ) |
Construct the DataChangeListener.
When constructed, a DataChangeListener object is empty. It has no default firers.
|
virtual |
Destroy the DataChangeListener.
On destruction, the DataChangeListener will deregister itself with all DataChangeFirers it is registered with.
|
private |
Deregister this DataChangeListener with a DataChangeFirer.
| firer | the data change firer this object will no longer listen for |
This method will erase firer from the list. This method is only used by the DataChangeFirer
|
pure virtual |
The method called when a data change event occurs.
The method called when a data change event occurs
Implemented in AMP::LinearAlgebra::ManagedVectorData, and AMP::LinearAlgebra::MultiVectorData.
|
private |
Register this DataChangeListener with a DataChangeFirer.
| firer | the data change firer this object will listen for |
This method will push firer onto the list. This method is only used by the DataChangeFirer
|
friend |
Definition at line 53 of file DataChangeListener.h.
|
private |
Definition at line 80 of file DataChangeListener.h.
|
Advanced Multi-Physics (AMP) Oak Ridge National Laboratory Idaho National Laboratory Los Alamos National Laboratory |
This page automatically produced from the source code by Last updated: Tue Mar 10 2026 13:06:42. Comments on this page |