Subject: Re: [boost] [GIL] Can image::recreate reuse the memory?
From: TONGARI (tongari95_at_[hidden])
Date: 2013-04-29 12:23:36
2013/4/29 Christian Henning <chhenning_at_[hidden]>
> > 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
> 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
BTW, why is the 3rd overload of recreate kept unmodified?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk