|
| PetscMemory () |
|
void | SetHostValid () const |
|
void | SetDeviceValid () const |
|
void | SetHostInvalid () const |
|
void | SetDeviceInvalid () const |
|
bool | IsAliasForSync () const |
|
void | MakeAliasForSync (const Memory< double > &base_, int offset_, int size_, bool usedev_) |
|
void | MakeAliasForSync (Memory< double > &base_, int offset_, int size_, bool read_, bool write_, bool usedev_) |
|
void | SyncBase () |
|
void | SyncBaseAndReset () |
|
bool | ReadRequested () const |
|
bool | WriteRequested () const |
|
bool | DeviceRequested () const |
|
const double * | GetHostPointer () const |
|
const double * | GetDevicePointer () const |
|
| Memory () |
|
| Memory (const Memory &orig)=default |
| Copy constructor: default. More...
|
|
| Memory (Memory &&orig)=default |
| Move constructor: default. More...
|
|
| Memory (int size) |
| Allocate host memory for size entries. More...
|
|
| Memory (int size, MemoryType mt) |
| Allocate memory for size entries with the given MemoryType mt. More...
|
|
| Memory (int size, MemoryType h_mt, MemoryType d_mt) |
| Allocate memory for size entries with the given host MemoryType h_mt and device MemoryType d_mt. More...
|
|
| Memory (double *ptr, int size, bool own) |
| Wrap an externally allocated host pointer, ptr with the current host memory type returned by MemoryManager::GetHostMemoryType(). More...
|
|
| Memory (double *ptr, int size, MemoryType mt, bool own) |
| Wrap an externally allocated pointer, ptr, of the given MemoryType. More...
|
|
| Memory (const Memory &base, int offset, int size) |
| Alias constructor. Create a Memory object that points inside the Memory object base. More...
|
|
Memory & | operator= (const Memory &orig)=default |
| Copy-assignment operator: default. More...
|
|
Memory & | operator= (Memory &&orig)=default |
| Move-assignment operator: default. More...
|
|
| ~Memory ()=default |
| Destructor: default. More...
|
|
bool | OwnsHostPtr () const |
| Return true if the host pointer is owned. Ownership indicates whether the pointer will be deleted by the method Delete(). More...
|
|
void | SetHostPtrOwner (bool own) const |
| Set/clear the ownership flag for the host pointer. Ownership indicates whether the pointer will be deleted by the method Delete(). More...
|
|
bool | OwnsDevicePtr () const |
| Return true if the device pointer is owned. Ownership indicates whether the pointer will be deleted by the method Delete(). More...
|
|
void | SetDevicePtrOwner (bool own) const |
| Set/clear the ownership flag for the device pointer. Ownership indicates whether the pointer will be deleted by the method Delete(). More...
|
|
void | ClearOwnerFlags () const |
| Clear the ownership flags for the host and device pointers, as well as any internal data allocated by the Memory object. More...
|
|
bool | UseDevice () const |
| Read the internal device flag. More...
|
|
void | UseDevice (bool use_dev) const |
| Set the internal device flag. More...
|
|
int | Capacity () const |
| Return the size of the allocated memory. More...
|
|
void | Reset () |
| Reset the memory to be empty, ensuring that Delete() will be a no-op. More...
|
|
void | Reset (MemoryType host_mt) |
| Reset the memory and set the host memory type. More...
|
|
bool | Empty () const |
| Return true if the Memory object is empty, see Reset(). More...
|
|
void | New (int size) |
| Allocate host memory for size entries with the current host memory type returned by MemoryManager::GetHostMemoryType(). More...
|
|
void | New (int size, MemoryType mt) |
| Allocate memory for size entries with the given MemoryType. More...
|
|
void | New (int size, MemoryType h_mt, MemoryType d_mt) |
| Allocate memory for size entries with the given host MemoryType h_mt and device MemoryType d_mt. More...
|
|
void | Wrap (double *ptr, int size, bool own) |
| Wrap an externally allocated host pointer, ptr with the current host memory type returned by MemoryManager::GetHostMemoryType(). More...
|
|
void | Wrap (double *ptr, int size, MemoryType mt, bool own) |
| Wrap an externally allocated pointer, ptr, of the given MemoryType. More...
|
|
void | Wrap (double *h_ptr, double *d_ptr, int size, MemoryType h_mt, bool own) |
|
void | MakeAlias (const Memory &base, int offset, int size) |
| Create a memory object that points inside the memory object base. More...
|
|
void | SetDeviceMemoryType (MemoryType d_mt) |
| Set the device MemoryType to be used by the Memory object. More...
|
|
void | Delete () |
| Delete the owned pointers and reset the Memory object. More...
|
|
void | DeleteDevice (bool copy_to_host=true) |
| Delete the device pointer, if owned. If copy_to_host is true and the data is valid only on device, move it to host before deleting. Invalidates the device memory. More...
|
|
double & | operator[] (int idx) |
| Array subscript operator for host memory. More...
|
|
const double & | operator[] (int idx) const |
| Array subscript operator for host memory, const version. More...
|
|
| operator double * () |
| Direct access to the host memory as T* (implicit conversion). More...
|
|
| operator const double * () const |
| Direct access to the host memory as const T* (implicit conversion). More...
|
|
| operator U * () |
| Direct access to the host memory via explicit typecast. More...
|
|
| operator const U * () const |
| Direct access to the host memory via explicit typecast, const version. More...
|
|
double * | ReadWrite (MemoryClass mc, int size) |
| Get read-write access to the memory with the given MemoryClass. More...
|
|
const double * | Read (MemoryClass mc, int size) const |
| Get read-only access to the memory with the given MemoryClass. More...
|
|
double * | Write (MemoryClass mc, int size) |
| Get write-only access to the memory with the given MemoryClass. More...
|
|
void | Sync (const Memory &other) const |
| Copy the host/device pointer validity flags from other to *this. More...
|
|
void | SyncAlias (const Memory &base, int alias_size) const |
| Update the alias Memory *this to match the memory location (all valid locations) of its base Memory, base. More...
|
|
MemoryType | GetMemoryType () const |
| Return a MemoryType that is currently valid. If both the host and the device pointers are currently valid, then the device memory type is returned. More...
|
|
MemoryType | GetHostMemoryType () const |
| Return the host MemoryType of the Memory object. More...
|
|
MemoryType | GetDeviceMemoryType () const |
| Return the device MemoryType of the Memory object. If the device MemoryType is not set, return MemoryType::DEFAULT. More...
|
|
bool | HostIsValid () const |
| Return true if host pointer is valid. More...
|
|
bool | DeviceIsValid () const |
| Return true if device pointer is valid. More...
|
|
void | CopyFrom (const Memory &src, int size) |
| Copy size entries from src to *this. More...
|
|
void | CopyFromHost (const double *src, int size) |
| Copy size entries from the host pointer src to *this. More...
|
|
void | CopyTo (Memory &dest, int size) const |
| Copy size entries from *this to dest. More...
|
|
void | CopyToHost (double *dest, int size) const |
| Copy size entries from *this to the host pointer dest. More...
|
|
void | PrintFlags () const |
| Print the internal flags. More...
|
|
int | CompareHostAndDevice (int size) const |
| If both the host and the device data are valid, compare their contents. More...
|
|
Wrapper for synching PETSc's vector memory.
Definition at line 84 of file petsc.hpp.