Boost logo

Boost :

Subject: [boost] [GIL] compile time concerning apply_operation and explicit instantiation
From: Philipp Reh (sefi_at_[hidden])
Date: 2008-10-04 08:42:19


Hi,

I'm using GIL's dynamic image extension, namely any_image_views in certain
places.
However on every occasion where an any_image_view is used I have to include
apply_operation.hpp so the operations can be instantiated.
On gcc-4.3.2 the inclusion of this header raises the compilation time at
least tenfold.
Somewhere on this list I found the claim that gil::variant is supposed to
reduce compilation time over boost::variant but for at least gcc-4.3.2 this
is untrue. There are several places in which I use boost::variant and even
with binary visitation the compilation time is barely unnoticable.

To work around this problem, I tried to explicitly instantiate the functions
generated for my any_image_view. Trying this technique with apply_operation
and detail::destructor_op failed. Looking at nm's output told me that what I
explicitly instantiated and what the binary needs had at least its
mpl::vector elements reversed.

So, I basically have two questions:
1) Wouldn't it be nicer to use boost::variant for gil, too? As far as I can
see it does everything that is needed plus it compiles a lot faster (at
least on gcc).
2) Is it possible to explicitly instantiate the apply_operation function
with the needed operations and if how so? If someone needs the code I tried
and the error messages, I can post them.

Philipp

-- 
View this message in context: http://www.nabble.com/-GIL--compile-time-concerning-apply_operation-and-explicit-instantiation-tp19811670p19811670.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk