POV-Ray : Newsgroups : povray.programming : isosurf.cpp / inline & gcc : Re: isosurf.cpp / inline & gcc Server Time
20 Sep 2024 19:07:30 EDT (-0400)
  Re: isosurf.cpp / inline & gcc  
From: Thorsten Froehlich
Date: 18 Mar 2003 17:14:55
Message: <3e779a5f$1@news.povray.org>
In article <3e778de3@news.povray.org> , "Mael" <mae### [at] hotmailcom> wrote:

> A little remark after looking at the (nice) isosurface code :
> Vector_IsoSurface_Function, Float_IsoSurface_Function, Evaluate_Function are
> declared as inline functions but only defined at the end of isosurf.cpp. It
> seems gcc(g++) will not inline the function if the call is before the
> definition. If you want gcc to actually inline those functions they should
> be moved at the top of the file (with Evaluate_Function first)
> A quick test with scene isosurfaces.pov on a x86 linux (and gcc3.2) gives
> 114s vs 116s only by moving the functions

Indeed, some compilers cannot inline such functions for odd reasons.  Apart
from a workaround, I would suggest to send a feature request to the compiler
maker because in the end "inline" is just a guide and not a requirement for
the compiler to make the function inline.

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.