• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: inline functions always inlined?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >inline functions always inlined? (From: email@hidden)

  • Prev by Date: Re: inline functions always inlined?
  • Next by Date: Re: Setting thread name for debugger
  • Previous by thread: Re: inline functions always inlined?
  • Next by thread: Re: inline functions always inlined?
  • Index(es):
    • Date
    • Thread