mirror of https://github.com/CGAL/cgal
added section on inlining macros
This commit is contained in:
parent
9a2824654e
commit
88dfafa579
|
|
@ -0,0 +1,29 @@
|
|||
\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_FRIEND_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.
|
||||
|
|
@ -16,4 +16,5 @@ include \ccc{CGAL/basic.h} first).
|
|||
|
||||
\input{Introduction_ref/checks}
|
||||
|
||||
\input{Introduction_ref/inlining}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue