You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Replace Boost.MPL with Boost.MP11 in extension/dynamic_image/reduce.hpp #281
I would like to vote in favour of removing this header file first reason is as you mentioned it is compiled on demand and the second reason would it is actually not mentioned anywhere in the official GIL(at least I could not find it anywhere) documentation so there are fewer chances of people using it.
TL;TR: Yes, I'm inclined to remove it. If anyone arrives asking for it, it can be recovered from the history, but given it is 1) unused, 2) seems unfinished and 3) purpose is unclear, I don't think we can promise any reliable support for it.
//// Color space unary reduce operation. Reduce a color space to a base with the same number of channels
The reduction seems like composing an image/view type common to all types of variant image/view (e.g. find image type that all the possible types can be converted into, and back to original type, without any losses, perhaps?)
However, large chunks of the reduce.hpp are commented, so it feels like a work in progress.
For the records, this academic paper explains the how and the why of reduce.hpp. Personally, I have never used BOOST_GIL_REDUCE_CODE_BLOAT=1. Does it really reduce code bloat with modern compilers?
@sdebionne What a finding, thank you! I archived the reference in d664a4a
From MinimizingCodeBloat.pdf
Our test bed, GIL, is deployed in a real world industrial setting (...)
That could explain undocumented and untested or experimental status of the reduce.hpp :)
3.2 Dynamic dispatching in GIL
(...)
3.3 Template bloat originating from GIL’s dynamic dispatching
(...)
4. Reducing the Number of Instantiations
Our strategy for reducing the number of instantiations is based on decomposing a complex type into a set of orthogonal parameter dimensions (such as color space, channel depth, constness) and identifying which dimensions are important for a given operation.
(...)
We call this process type reduction.
Type reduction is implemented with metafunctions which map a given data type and a particular algorithm to the class representative of that data type for the given algorithm.
I think it, especially the section titles, makes the role of the reduce.hpp clearer now.
Conclusion
Since there is the "type reductions for GIL image types" are not used anywhere in the current GIL and there seem to be no one interested in picking it up to verify the technique for the modern compilers (newer than VS2005 (8.0) or GCC 4), I'm also voting to remove it completely (as @lpranam in #281 (comment)).
If no objections arrive soon from @stefanseefeld, @chhenning or anyone else active/interested in GIL, then let's remove.
Activity
lpranam commentedon Mar 18, 2020
I would like to vote in favour of removing this header file first reason is as you mentioned it is compiled on demand and the second reason would it is actually not mentioned anywhere in the official GIL(at least I could not find it anywhere) documentation so there are fewer chances of people using it.
mloskot commentedon Mar 18, 2020
TL;TR: Yes, I'm inclined to remove it. If anyone arrives asking for it, it can be recovered from the history, but given it is 1) unused, 2) seems unfinished and 3) purpose is unclear, I don't think we can promise any reliable support for it.
/cc @stefanseefeld
I have no idea what was the exact rationale and purpose of this code, but I can only deduce it was added to workaround some MPL limitations or issues:
gil/include/boost/gil/extension/dynamic_image/reduce.hpp
Line 41 in 78b7dcf
gil/include/boost/gil/extension/dynamic_image/reduce.hpp
Line 68 in 78b7dcf
and then there are some algorithms to reduce elements of type lists (elements of any image/view variants)
gil/include/boost/gil/extension/dynamic_image/reduce.hpp
Line 68 in 78b7dcf
based on reducibility and other properties of color bases of the views/images:
gil/include/boost/gil/extension/dynamic_image/reduce.hpp
Line 521 in 78b7dcf
The reduction seems like composing an image/view type common to all types of variant image/view (e.g. find image type that all the possible types can be converted into, and back to original type, without any losses, perhaps?)
However, large chunks of the
reduce.hppare commented, so it feels like a work in progress.sdebionne commentedon Mar 19, 2020
For the records, this academic paper explains the how and the why of
reduce.hpp. Personally, I have never usedBOOST_GIL_REDUCE_CODE_BLOAT=1. Does it really reduce code bloat with modern compilers?Add comment in dynamic_image/reduce.hpp with link to MinimizingCodeBl…
mloskot commentedon Mar 19, 2020
@sdebionne What a finding, thank you! I archived the reference in d664a4a
From MinimizingCodeBloat.pdf
That could explain undocumented and untested or experimental status of the
reduce.hpp:)I think it, especially the section titles, makes the role of the
reduce.hppclearer now.Conclusion
Since there is the "type reductions for GIL image types" are not used anywhere in the current GIL and there seem to be no one interested in picking it up to verify the technique for the modern compilers (newer than VS2005 (8.0) or GCC 4), I'm also voting to remove it completely (as @lpranam in #281 (comment)).
If no objections arrive soon from @stefanseefeld, @chhenning or anyone else active/interested in GIL, then let's remove.
mloskot commentedon Mar 24, 2020
Anyone fancy a PR removing the
reduce.hpp?Removed reduce.hpp
Removed extension/dynamic_image/reduce.hpp as unused (#466)