Change copy semantics of Grid to reference semantics
Closed this issue · 2 comments
holgerschmitz commented
Grids are rarely copied but we often need references to the same data.
Currently, implementations have to use smart pointers to exchange grids between blocks. We want to change this, so that grid objects can be copied but the underlying data is shared.
For most storage types, we need to wrap the pointer to the data in a shared_ptr. We should still retain the raw pointer for fast access if it is needed.
holgerschmitz commented
Pull Request #53
holgerschmitz commented
There is an issue when resizing a grid. The other copies of the grid do not update their metadata, i.e. range
or the data_fast
pointer.