c++pointersmemorycuda

Smaller pointers... possible? (without a lower spec system)


In this 2010 paper[1] on raycasting sparse voxel octrees (SVOs), section 3 indicates an interesting memory setup to save space on voxel data, which almost invariably is very large.

They specify a 15-bit relative pointer, with a 1-bit flag to specify whether a far pointer is needed (if the volume data is too large, the flag is set, and the 15-bit pointer is considered to point to a secondary, far pointer).

What's being done to achieve this? Is this something to do with CUDA / the GPU? Is it done through a custom allocator of some sort, in C++ code?

How would this be done in C++, if at all?

[1]Efficient Sparse Voxel Octrees: Samuli Laine, Tero Karras; NVIDIA Research


Solution

  • Well, you can always manually store the memory in an array and use integer indexes as "pointers".