1#ifndef included_AMP_ManagedVectorData
2#define included_AMP_ManagedVectorData
4#include "AMP/vectors/Vector.h"
5#include "AMP/vectors/data/DataChangeListener.h"
6#include "AMP/vectors/data/GhostDataHelper.hpp"
7#include "AMP/vectors/data/VectorData.h"
81 std::shared_ptr<VectorData>
cloneData(
const std::string &name =
"" )
const override;
virtual void fireDataChange()
Notify all listeners of a data change event.
Interface for managing classes that need to know when managed data has changed.
Class used to control data and kernels of various vector libraries.
void addGhostValuesByGlobalID(size_t, const size_t *, const void *, const typeID &) override
Add shared values using global identifier.
virtual ~ManagedVectorData()
Destructor.
std::shared_ptr< const Vector > getVectorEngine() const
void * getRawDataBlockAsVoid(size_t i) override
Return a pointer to a particular block of memory in the vector.
void setValuesByLocalID(size_t, const size_t *, const void *, const typeID &) override
Set values in the vector by their local offset.
size_t getAllGhostValues(void *, const typeID &) const override
Get all ghost values in the vector.
const void * getRawDataBlockAsVoid(size_t i) const override
Return a pointer to a particular block of memory in the vector.
void addValuesByLocalID(size_t, const size_t *, const void *, const typeID &) override
Add values to vector entities by their local offset.
std::shared_ptr< Vector > d_Engine
The underlying vector.
void getRawData(void *, const typeID &) const override
Copy data out of this vector.
void setGhostValuesByGlobalID(size_t, const size_t *, const void *, const typeID &) override
Set ghost values using global identifier.
uint64_t getDataID() const override
A unique id for the underlying data allocation.
void assemble() override
This method is used to implement the assemble interface of PETSc.
typeID getType(size_t) const override
Return the typeid of the given block.
bool hasContiguousData() const override
returns whether all data for the vector on a single process is contiguous
size_t sizeofDataBlockType(size_t) const override
Return the result of sizeof(TYPE) for the given data block.
void setUpdateStatus(UpdateState state) override
Sets the current update state of the Vector.
size_t sizeOfDataBlock(size_t) const override
Number of elements in a data block.
UpdateState getLocalUpdateStatus() const override
Return the current update state of the Vector.
void putRawData(const void *, const typeID &) override
Copy data into this vector.
ManagedVectorData(std::shared_ptr< Vector > vec)
Construct a ManagedVector from a set of parameters.
void makeConsistent(ScatterType t) override
Update shared values on entire communicator.
std::string VectorDataName() const override
Get the type name.
void swapData(VectorData &) override
Swap the data with another VectorData object.
ManagedVectorData(std::shared_ptr< VectorData > alias)
Construct a view of an AMP vector.
size_t numberOfDataBlocks() const override
Number of blocks of contiguous data in the Vector.
std::shared_ptr< Vector > getVectorEngine()
Return the engine associated with this ManagedVector.
void getGhostValuesByGlobalID(size_t, const size_t *, void *, const typeID &) const override
Get ghost values in the vector by their global offset.
std::shared_ptr< VectorData > cloneData(const std::string &name="") const override
Clone the data.
bool isAnAliasOf(const VectorData &rhs) const override
Check if the two VectorData objects are alias of each other.
void getValuesByLocalID(size_t, const size_t *, void *, const typeID &) const override
Get local values in the vector by their global offset.
void dataChanged() override
Notify listeners that data has changed in this vector.
void receiveDataChanged() override
The method called when a data change event occurs.
A class used to hold vector data.
virtual void makeConsistent()
Update shared values on entire communicator.
UpdateState
The four states a Vector can be in.
ScatterType
Flag to choose algorithm for makeConsistent.
Class to store type info.