Hi Christian,
2013/4/29 Christian Henning
I can't see why you prefer dimensions (2 ints) to capacity (1 size_t), seems to me that using capacity has both space & time efficiency (i.e. no need to recompute total_allocated_size_in_bytes);
For some reasons I was thinking about int overflow but I realized that doesn't make much sense. So, I changed the code to your suggestion.
I'm a bit worries of breaking too much code when
introducing into boost. What do you think?
It'd be better not to break the API (not sure if ABI matters) so I didn't propose the change, instead, we could have another one as I did for
myself.
Yes, ABI changes matter since gil has been part of boost for a couple of years now.
I made it note for the next gil version.
I think the code may have align problem in 2 respects: 1) line 336: _memory is not the aligned address which is previously returned by align-function. 2) In 'recreate': You have to update _align_in_bytes before calling create_view BTW, why is the 3rd overload of recreate kept unmodified?