Re: inline functions always inlined?
Re: inline functions always inlined?
- Subject: Re: inline functions always inlined?
- From: Ivan Cavero Belaunde <email@hidden>
- Date: Wed, 24 Feb 2010 13:51:05 -0800
- Acceptlanguage: en-US
- Thread-topic: inline functions always inlined?
Google around for GCC's always_inline attribute.
If you need cross-platformness, the GIL_FORCEINLINE macro in boost::gil defines it for you in both Visual Studio- and GCC-friendly ways.
Even that might not be enough, though. There are hard limits on how much code GCC will inline, which you can control. Read up on -Winline and the various inlining-related --params. Also, the default -Os setting disables inlining.
Iván
---
Iván Cavero Belaunde(email@hidden)
Senior Computer Scientist, Creative Technology Lab
On Feb 24, 2010, at 1:30 PM, <email@hidden> wrote:
> Hi,
>
> I have heard that when you define a function as inline, it's the
> compiler's choice whether to actually inline it or create function call
> based on how much code there is. Is there a way to force it to inline
> no matter how big the function is?
>
> thanks
> Jeff
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden