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

SCM Repository

[diderot] Annotation of /branches/vis15/src/compiler/codegen/fragments/lib-h-body.in
ViewVC logotype

Annotation of /branches/vis15/src/compiler/codegen/fragments/lib-h-body.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5501 - (view) (download)

1 : jhr 3899
2 :     /***** World query operations *****/
3 :    
4 :     //! Return the total number of strands (active+stable) in the world
5 : jhr 3992 uint32_t @PREFIX@_num_strands (@PREFIX@_world_t *wrld);
6 : jhr 3899
7 :     //! Return the total number of active strands
8 : jhr 3992 uint32_t @PREFIX@_num_active_strands (@PREFIX@_world_t *wrld);
9 : jhr 3899
10 :     //! Return the total number of stable strands
11 : jhr 3992 uint32_t @PREFIX@_num_stable_strands (@PREFIX@_world_t *wrld);
12 : jhr 3899
13 :     //! Return true if there are any recorded error conditions
14 : jhr 3992 bool @PREFIX@_any_errors (@PREFIX@_world_t *wrld);
15 : jhr 3899
16 :     //! Return the pending error message (if any). This call clears the pending error
17 :     //! state.
18 : jhr 3992 char *@PREFIX@_get_errors (@PREFIX@_world_t *wrld);
19 : jhr 3899
20 :     /***** Program running operations *****/
21 :    
22 :     //! Allocate the program's world
23 :     //! \return the new world or NULL if there are any errors
24 : jhr 3992 @PREFIX@_world_t *@PREFIX@_new_world ();
25 : jhr 3899
26 :     //! Initialize the execution state for the world. This includes allocating processor
27 :     //! and GPU resources for parallel execution.
28 :     //! \param wrld the world-state of the Diderot program
29 :     //! \return true if there are any errors
30 : jhr 3992 bool @PREFIX@_init_world (@PREFIX@_world_t *wrld);
31 : jhr 3899
32 :     //! Initiaize the globals and create the initial set of strands
33 :     //! \param wrld the world-state of the Diderot program
34 :     //! \return true if there are any errors
35 : jhr 4418 bool @PREFIX@_create_strands (@PREFIX@_world_t *wrld);
36 : jhr 3899
37 :     //! Run the Diderot program
38 :     //! \param wrld the world-state of the Diderot program
39 :     //! \param maxNSteps the limit on the number of super steps; 0 means unlimited
40 :     //! \return the number of steps taken.
41 : jhr 3992 uint32_t @PREFIX@_run (@PREFIX@_world_t *wrld, uint32_t maxNSteps);
42 : jhr 3899
43 :     //! shutdown and deallocate the world
44 : jhr 5454 //! \param wrld the world-state of the Diderot program
45 : jhr 3992 void @PREFIX@_shutdown (@PREFIX@_world_t *wrld);
46 : jhr 3899
47 :     /***** Runtime options *****/
48 :    
49 :     //! Set verbose mode
50 : jhr 5454 //! \param wrld the world-state of the Diderot program
51 :     //! \param mode the mode value to set; true means verbose
52 : jhr 3992 void @PREFIX@_set_verbose (@PREFIX@_world_t *wrld, bool mode);
53 : jhr 3899
54 :     //! Get verbose mode
55 : jhr 5454 //! \return true if there are any errors
56 : jhr 3992 bool @PREFIX@_get_verbose (@PREFIX@_world_t *wrld);
57 : jhr 5454
58 :     //! Register a callback function for Diderot print() calls
59 :     //! \param wrld the world-state of the Diderot program
60 :     //! \param pr the printing callback function
61 :     //! \param data an opaque data value that will be passed to the
62 :     //! printer
63 :     //! \return true if there are any errors
64 : jhr 5501 bool @PREFIX@_set_printer_cb (@PREFIX@_world_t *wrld, bool (*pr)(void *, char *), void *data);

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