cgal/Manual/doc_tex/Introduction_ref/inlining.tex

29 lines
1.2 KiB
TeX

\section{Compile-time Flags to Control Inlining}
\ccIndexMainItem{code optimization}
\ccIndexMainItem{inlining}
\ccIndexMainItem{\tt inline}
Making funcitons inlined can, at times, improve the efficiency of your code.
However this is not always the case and it can differ for a single function
depending on the application in which it is used. Thus \cgal\ defines a set
of compile-time macros that can be used to control whether certain functions
are designated as inlined functions or not. The following table lists the
macros and their default values, which are set in one of the \cgal\ include
files.
\begin{tabular}{l|l}
macro name & default \\ \hline
\ccc{CGAL_KERNEL_INLINE} & inline \\
\ccc{CGAL_KERNEL_MEDIUM_INLINE} & \\
\ccc{CGAL_KERNEL_LARGE_INLINE} & \\
\ccc{CGAL_MEDIUM_INLINE} & inline \\
\ccc{CGAL_LARGE_INLINE} & \\
\ccc{CGAL_HUGE_INLINE} &
\end{tabular}
If you wish to change the value of one or more of these macros,
you can simply give it a new value when compiling. For example, to make
functions that use the macro \ccc{CGAL_KERNEL_MEDIUM_INLINE} inline functions,
you should set the value of this macro to \texttt{inline} instead of the
default blank.