DeviceMemory#
#include <DeviceMemory.h>
How to reference this class#
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`DeviceMemory <class-devicememory>`
[DeviceMemory](#class-devicememory)
Detailed description#
List of Public Methods#
List of Public Static Methods#
Complete Member Function Documentation#
DeviceMemory#
DeviceMemory::DeviceMemory()=delete
Detailed description
How to reference this method:
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`DeviceMemory::DeviceMemory()=delete <devicememory-public-devicememory-devicememory-equal-delete>`
[DeviceMemory::DeviceMemory()=delete](#devicememory-public-devicememory-devicememory-equal-delete)
add#
void DeviceMemory::add(void *ptr, void *device_ptr, trustIdType bytes)
Detailed description
Add a new line to the memory_map_ ptr should be non - null, device_ptr and size may be null
References
How to reference this method:
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`void DeviceMemory::add(void *ptr, void *device_ptr, trustIdType bytes) <devicememory-public-static-void-devicememory-add-void-ptr-ptr-void-ptr-device-ptr-trustidtype-bytes>`
[void DeviceMemory::add(void *ptr, void *device_ptr, trustIdType bytes)](#devicememory-public-static-void-devicememory-add-void-ptr-ptr-void-ptr-device-ptr-trustidtype-bytes)
addrOnDevice#
void * DeviceMemory::addrOnDevice(void *)
Detailed description
Return the device address of the host ptr Return nullptr if ptr null or map empty Fatal error if address not found on the device
References
How to reference this method:
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`void * DeviceMemory::addrOnDevice(void *) <devicememory-public-static-void-ptr-devicememory-addrondevice-void-ptr>`
[void * DeviceMemory::addrOnDevice(void *)](#devicememory-public-static-void-ptr-devicememory-addrondevice-void-ptr)
allocatedBytesOnDevice#
size_t DeviceMemory::allocatedBytesOnDevice()
Detailed description
References
Referenced By
How to reference this method:
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`size_t DeviceMemory::allocatedBytesOnDevice() <devicememory-public-static-size-t-devicememory-allocatedbytesondevice>`
[size_t DeviceMemory::allocatedBytesOnDevice()](#devicememory-public-static-size-t-devicememory-allocatedbytesondevice)
del#
void DeviceMemory::del(void *ptr)
Detailed description
Delete a line into the memory_map_
References
How to reference this method:
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`void DeviceMemory::del(void *ptr) <devicememory-public-static-void-devicememory-del-void-ptr-ptr>`
[void DeviceMemory::del(void *ptr)](#devicememory-public-static-void-devicememory-del-void-ptr-ptr)
deviceMemGetInfo#
size_t DeviceMemory::deviceMemGetInfo(bool)
Detailed description
References
Referenced By
How to reference this method:
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`size_t DeviceMemory::deviceMemGetInfo(bool) <devicememory-public-static-size-t-devicememory-devicememgetinfo-bool>`
[size_t DeviceMemory::deviceMemGetInfo(bool)](#devicememory-public-static-size-t-devicememory-devicememgetinfo-bool)
getMemoryMap#
static map_t & DeviceMemory::getMemoryMap()
Detailed description
How to reference this method:
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`static map_t & DeviceMemory::getMemoryMap() <devicememory-public-static-static-map-t-ref-devicememory-getmemorymap>`
[static map_t & DeviceMemory::getMemoryMap()](#devicememory-public-static-static-map-t-ref-devicememory-getmemorymap)
isAllocatedOnDevice#
bool DeviceMemory::isAllocatedOnDevice(void *)
Detailed description
Check if a chunk (even empty) is allocated on the device for the host ptr Return true/false
How to reference this method:
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`bool DeviceMemory::isAllocatedOnDevice(void *) <devicememory-public-static-bool-devicememory-isallocatedondevice-void-ptr>`
[bool DeviceMemory::isAllocatedOnDevice(void *)](#devicememory-public-static-bool-devicememory-isallocatedondevice-void-ptr)
printMemoryMap#
void DeviceMemory::printMemoryMap()
Detailed description
Print the memory map for debug
References
Referenced By
How to reference this method:
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`void DeviceMemory::printMemoryMap() <devicememory-public-static-void-devicememory-printmemorymap>`
[void DeviceMemory::printMemoryMap()](#devicememory-public-static-void-devicememory-printmemorymap)
warning#
bool DeviceMemory::warning(trustIdType nb_items)
Detailed description
References
How to reference this method:
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`bool DeviceMemory::warning(trustIdType nb_items) <devicememory-public-static-bool-devicememory-warning-trustidtype-nb-items>`
[bool DeviceMemory::warning(trustIdType nb_items)](#devicememory-public-static-bool-devicememory-warning-trustidtype-nb-items)
Attributes Documentation#
trustIdType DeviceMemory::internal_items_size_ = 1e9
int DeviceMemory::nb_pas_dt_ = - 1
size_t DeviceMemory::initial_free_ = 0
map_t DeviceMemory::memory_map_