stgeke
stgeke
Suggested fix: ``` namespace occa { template occa::memory memoryPool::reserve(const dim_t entries) { if (std::is_void::value) return reserve(entries, occa::dtype::byte); return reserve(entries, occa::dtype::get()); } } ```
The current implementation uses 'modeMemory' for both the new and old pool. While this method allows for fast data copying, it also results in high memory usage. This can be...
I think https://github.com/libocca/occa/blob/main/src/occa/internal/core/memoryPool.cpp#L131 should be changed to: ``` } else { - resize(reserved + alignedBytes); + resize(offset + alignedBytes); return slice(reserved, bytes); } ```
- Serial: [`mallinfo2`](https://www.man7.org/linux/man-pages/man3/mallinfo.3.html)? - OpenMP: - CUDA: cudaMemGetInfo - HIP: hipMemGetInfo - dpc++: Device info descript [`ext::intel::info::device::free_memory`](https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/supported/sycl_ext_intel_device_info.md#free-global-memory) - See this [related issue](https://github.com/intel/llvm/issues/5713) - openCL: ?