Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/vis12/doc/report/api.tex
ViewVC logotype

Diff of /branches/vis12/doc/report/api.tex

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1820, Wed Apr 11 10:53:15 2012 UTC revision 1821, Wed Apr 11 11:37:59 2012 UTC
# Line 8  Line 8 
8  also use the ``\texttt{--exec}'' command-line option to generate a standalone executable.  also use the ``\texttt{--exec}'' command-line option to generate a standalone executable.
9  In this chapter, we describe the interface to a Diderot program in both of these modes.  In this chapter, we describe the interface to a Diderot program in both of these modes.
10    
11    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12  \section{The Library API}  \section{The Library API}
13    
14  % namespace  \subsection{Namespace prefix}
15    To allow multiple Diderot programs to be embedded in a single application, the Diderot compiler
16    prefixes external symbols with a ``namespace'' tag.
17    The default value of this tag is \texttt{Diderot} but this value can be specified using
18    the \texttt{--namespace} command-line option.
19    In this chapter, we use \texttt{\textit{NS}} to represent the specified namespace.
20    
21    \subsection{Preprocessor definitions}
22    The generated header file will include definitions for three C preprocessor symbols, which
23    encode information about the target that was specified on the command line.
24    The following table describes which symbols are defined based on the command-line options:
25    \begin{center}
26      \begin{tabular}{|l|c|c|}
27        \hline
28        Floating-point precision & \textit{default} & \texttt{DIDEROT\char`\_FLOAT\char`\_PRECISION} \\
29          & \texttt{--double} & \texttt{DIDEROT\char`\_DOUBLE\char`\_PRECISION} \\\hline
30        Integer precision & \textit{default} & \texttt{DIDEROT\char`\_LONGINT} \\
31          & \texttt{--longint} & \texttt{DIDEROT\char`\_LONGINT} \\\hline
32        Target & \texttt{--target=c} (\textit{default}) & \texttt{DIDEROT\char`\_TARGET\char`\_C} \\
33               & \texttt{--target=pthread} & \texttt{DIDEROT\char`\_TARGET\char`\_PARALLEL} \\
34               & \texttt{--target=cl} & \texttt{DIDEROT\char`\_TARGET\char`\_CL} \\
35               & \texttt{--target=cuda} & \texttt{DIDEROT\char`\_TARGET\char`\_CUDA} \\\hline
36      \end{tabular}%
37    \end{center}%
38    \NOTE{should we use the namespace qualifier for these symbols?}
39    
40  % structure of header file  % structure of header file
41  % world creation  % world creation
42  % initializing inputs; descriptions; defaults  % initializing inputs; descriptions; defaults
# Line 19  Line 45 
45  % getting outputs  % getting outputs
46  % shutdown  % shutdown
47    
48    \subsection{Types}
49    
50    
51    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
52  \section{Standalone executables}  \section{Standalone executables}
53    
54  % inputs map to command-line options  % inputs map to command-line options

Legend:
Removed from v.1820  
changed lines
  Added in v.1821

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0