Advertisement

Inline functions

Started by July 14, 2000 08:11 AM
1 comment, last by dbrooking 24 years, 5 months ago
What exactly does making a function ''inline'' do? And when should I make a function ''inline''? I think it has something to do with speed but I''m not sure. Dan
Look around the threads, there''s been a couple of postings asking the same question yesterday.
Advertisement
When using "inline" with VectorC, it is the "intermediate representation" of the inline function that is copied into your new (calling) function. Then the optimizer is applied to the result. This means that inline functions are very similar to macros - except that arguments are guaranteed to be evaluated only once.

This means that separate inline calls can be vectorized in parallel.

Andrew Richards
CodePlay - http://www.codeplay.com
Andrew RichardsCodePlay - http://www.codeplay.com

This topic is closed to new replies.

Advertisement