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

SCM Repository

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

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

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

revision 3225, Thu Jul 23 11:25:15 2015 UTC revision 3226, Thu Jul 23 11:33:34 2015 UTC
# Line 80  Line 80 
80  \end{lstlisting}%  \end{lstlisting}%
81  \end{quote}%  \end{quote}%
82    
83  The next step in intialization is to allocate the computational resources  The next step in initialization is to allocate the computational resources
84  needed to support the program's execution, which is done using the \texttt{Init}  needed to support the program's execution, which is done using the \texttt{Init}
85  function.  function.
86  \begin{quote}  \begin{quote}
# Line 88  Line 88 
88  if (NS_Init (wrld)) { /* error */ }  if (NS_Init (wrld)) { /* error */ }
89  \end{lstlisting}%  \end{lstlisting}%
90  \end{quote}%  \end{quote}%
   
91  Once the world is initialized, we can then set program inputs using the  Once the world is initialized, we can then set program inputs using the
92  generated functions.  generated functions as described in \secref{sec:communication}.
93    
94  The final step of initialization is to create the initial grid or collection  The final step of initialization is to create the initial grid or collection
95  of strands.  of strands.
# Line 109  Line 108 
108  % getting outputs  % getting outputs
109  % shutdown  % shutdown
110    
111  \subsection{Types}  \subsection{Running the program}
112    After initialization, the program can be run using the \texttt{Run} function.
113    \begin{quote}
114    \begin{lstlisting}[language=C]
115    uint32_t nSteps = NS_Run (wrld, 0);
116    \end{lstlisting}%
117    \end{quote}%
118    The second argument to this function is a limit on the number of steps to execute the
119    Diderot program; specifying \texttt{0} means no limit (\ie{}, run the program to completion).
120    Using the step mechanism plus snapshots of the Diderot state, one can animate the progress of
121    the program.
122    
123    \subsection{Communicating with the Diderot program}
124    \label{sec:communication}
125    
126  \begin{center}  \begin{center}
127    \begin{tabular}{|c|c|p{2.5in}|}    \begin{tabular}{|c|c|p{2.5in}|}
128      \hline      \hline

Legend:
Removed from v.3225  
changed lines
  Added in v.3226

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