modernize DeviceBuffer and GPU memory management - Redmine #3020
Currently, the management of the allocated and actual sizes of the buffers on the GPU is handled by the consumers of the allocate/reallocate/freeDeviceBuffer(…). This should be change in favor of the proper DeviceBuffer class that will have the integer/size_t fields to manage the size of the buffer as well as the pointer to the buffer.
Along these changes, we should clarify and modernize the “buffered” memory allocation. Options:
- make allocation size match the host-side vectors’ reserved size; pro: consistency; con: will significantly limit max simulation size (due to running out of GPU memory)
- use custom extra buffer reservation (possibly with additional customization features to set this to zero for memory that does not need it).
(from redmine: issue id 3020, created on 2019-07-03 by artemzhmurov)
Related to #2967 (closed)
Edited by Artem Zhmurov