Boost logo

Boost Users :

Subject: Re: [Boost-users] [GIL] Performance warning...
From: Christian Henning (chhenning_at_[hidden])
Date: 2009-11-27 20:03:25


Hi guys, I'll look into the call_traits metafunction tomorrow. I can
also write a simple test that would measure potential overhead.

Thanks for the input!

Christian

2009/11/27 Agustín K-ballo Bergé <kaballo86_at_[hidden]>:
> Lubomir Bourdev escribió:
>> While some channel types are classes, a built-in type such as ‘unsigned
>> char’ is a valid channel. We have to be careful so we don’t slow down
>> operations on common 8-bit images. I think it is safe to replace
>> “Channel” with “const Channel” but “const Channel&” has a size of a
>> pointer and this is far bigger than unsigned char.
>>
>> Perhaps to do this right one needs to create a metafunction that returns
>> the type by value or by const reference, whichever is faster.
>>
>> Lubomir
>>
>
> call_traits< T >::param_type does that.
>
> "Defines a type that represents the "best" way to pass a parameter of
> type T to a function."
> http://www.boost.org/doc/libs/1_41_0/libs/utility/call_traits.htm
>
> Agustín K-ballo Bergé.-
> http://talesofcpp.blogspot.com
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net