#include <device_allocations_cu.h>
Public Member Functions | |
| void | addAllocation (void *datapointer, MemPointerBase *device_mem_pointer, int deviceid) |
| void | removeAllocation (void *datapointer, MemPointerBase *device_mem_pointer, int deviceid) |
| bool | freeAllocation (size_t minsize, int deviceid) |
| void | printList (int deviceid) |
Static Public Member Functions | |
| static DeviceAllocations_CU * | getInstance () |
Protected Member Functions | |
| DeviceAllocations_CU () | |
| virtual | ~DeviceAllocations_CU () |
singleton class keeping track of all skepu containers and their device memory allocations
|
protected |
The constructor initializes the devices.
|
protectedvirtual |
Destructor
| void skepu::DeviceAllocations_CU< T >::addAllocation | ( | void * | datapointer, |
| MemPointerBase * | device_mem_pointer, | ||
| int | deviceid | ||
| ) |
Add a device memory allocation to the list
| datapointer | Pointer to device memory |
| device_mem_pointer | DeviceMemPointer_CU object related to the memory allocation |
| deviceid | ID of device where the allocation resides |
Referenced by skepu::DeviceMemPointer_CU< T >::DeviceMemPointer_CU().
| bool skepu::DeviceAllocations_CU< T >::freeAllocation | ( | size_t | minsize, |
| int | deviceid | ||
| ) |
Attempts to free up memory on the device Called when memory allocation fails due to lack of memory
| minsize | The amount of memory required by the failed malloc call |
| deviceid | The device to free up memory on |
|
static |
Gets pointer to first instance, at first call a new instance is created.
Referenced by skepu::DeviceMemPointer_CU< T >::DeviceMemPointer_CU(), skepu::DeviceMemPointer_CU< T >::markCopyInvalid(), and skepu::DeviceMemPointer_CU< T >::~DeviceMemPointer_CU().
| void skepu::DeviceAllocations_CU< T >::printList | ( | int | deviceid | ) |
Print information regarding device allocations
| deviceid | ID of device for which to print information |
| void skepu::DeviceAllocations_CU< T >::removeAllocation | ( | void * | datapointer, |
| MemPointerBase * | device_mem_pointer, | ||
| int | deviceid | ||
| ) |
Remove a device memory allocation from the list
| datapointer | Pointer to device memory used to identify which object should be removed |
| device_mem_pointer | DeviceMemPointer_CU object related to the memory allocation |
| deviceid | ID of device where the allocation resides |
Referenced by skepu::DeviceMemPointer_CU< T >::markCopyInvalid(), and skepu::DeviceMemPointer_CU< T >::~DeviceMemPointer_CU().
1.8.5