1#ifndef included_AMP_VectorDataDevice
2#define included_AMP_VectorDataDevice
4#include "AMP/vectors/data/VectorDataDefault.h"
15template<
typename TYPE =
double,
class Allocator = AMP::HostAllocator<
void>>
21 typename std::allocator_traits<Allocator>::template rebind_alloc<TYPE>;
22 using idxAllocator_t =
typename std::allocator_traits<Allocator>::template rebind_alloc<size_t>;
60 const size_t *indices,
62 const typeID &
id )
override;
76 const size_t *indices,
78 const typeID &
id )
override;
92 const size_t *indices,
94 const typeID &
id )
const override;
98 std::shared_ptr<VectorData>
cloneData(
const std::string &name =
"" )
const override;
124 const size_t *indices_,
Class to manage reading/writing restart data.
A class used to hold vector data.
A class used to hold vector data.
idxAllocator_t d_idx_alloc
void addValuesByLocalID(size_t num, const size_t *indices, const void *vals, const typeID &id) override
Add values to vector entities by their local offset.
void fillGhosts(const Scalar &) override
Zero all ghost data (does not modify consistent status)
void setScratchSpace(size_t N) const
bool allGhostIndices(size_t N, const size_t *ndx) const override
void registerChildObjects(AMP::IO::RestartManager *manager) const override
Register any child objects.
void putRawData(const void *buf, const typeID &id) override
Copy data into this vector.
VectorDataDevice(size_t start, size_t localSize, size_t globalSize)
size_t * d_idx_map_scratch
void writeRestart(int64_t) const override
Write restart data to file.
void setMapScratchSpace(size_t N) const
typename std::allocator_traits< Allocator >::template rebind_alloc< TYPE > scalarAllocator_t
size_t * d_idx_req_scratch
void addGhostValuesByGlobalID(size_t, const size_t *, const void *, const typeID &) override
Add shared values using global identifier.
std::string VectorDataName() const override
Get the type name.
std::tuple< bool, size_t *, void * > copyToScratchSpace(size_t num, const size_t *indices_, const void *vals_, const typeID &id) const
void getGhostAddValuesByGlobalID(size_t, const size_t *, void *, const typeID &) const override
get ghosted values to add to off-proc elements
bool containsGlobalElement(size_t) const override
void getValuesByLocalID(size_t num, const size_t *indices, void *vals, const typeID &id) const override
Get values to vector entities by their local offset.
VectorDataDevice(const VectorDataDevice &)=delete
void getGhostValuesByGlobalID(size_t, const size_t *, void *, const typeID &) const override
Get ghost values in the vector by their global offset.
void setValuesByLocalID(size_t num, const size_t *indices, const void *vals, const typeID &id) override
Set values in the vector by their local offset.
void getRawData(void *buf, const typeID &id) const override
Copy data out of this vector.
typename std::allocator_traits< Allocator >::template rebind_alloc< size_t > idxAllocator_t
virtual ~VectorDataDevice()
Virtual destructor.
VectorDataDevice(int64_t, AMP::IO::RestartManager *)
scalarAllocator_t d_scalar_alloc
void setGhostValuesByGlobalID(size_t, const size_t *, const void *, const typeID &) override
Set ghost values using global identifier.
std::shared_ptr< VectorData > cloneData(const std::string &name="") const override
Clone the data.
void getGhostAddValuesByGlobalID(size_t num, const size_t *indices, TYPE *vals) const
get ghosted values to add to off-proc elements
void addGhostValuesByGlobalID(size_t num, const size_t *indices, const TYPE *vals)
Add shared values using global identifier.
void setGhostValuesByGlobalID(size_t num, const size_t *indices, const TYPE *vals)
Set ghost values using global identifier.
void getGhostValuesByGlobalID(size_t num, const size_t *indices, TYPE *vals) const
Get ghost values in the vector by their global offset.
Scalar is a class used to store a scalar variable that may be different types/precision.
Class to store type info.