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

SCM Repository

[diderot] Annotation of /branches/vis12-cl/src/include/Diderot/world.h
ViewVC logotype

Annotation of /branches/vis12-cl/src/include/Diderot/world.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3349 - (view) (download) (as text)

1 : jhr 1640 /*! \file world.h
2 :     *
3 :     * \author John Reppy
4 :     */
5 :    
6 :     /*
7 : jhr 3349 * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
8 :     *
9 :     * COPYRIGHT (c) 2015 The University of Chicago
10 : jhr 1640 * All rights reserved.
11 :     */
12 :    
13 :     #ifndef _DIDEROT_WORLD_H_
14 :     #define _DIDEROT_WORLD_H_
15 :    
16 : jhr 3081 #ifndef _DIDEROT_TYPES_H_
17 :     #include "types.h"
18 :     #endif
19 :    
20 : jhr 3135 /* stages of execution of a program */
21 :     typedef enum {
22 : jhr 3201 POST_NEW = 0, /* world allocated, but not initialized */
23 :     POST_INIT = 1, /* Init function has been called */
24 :     POST_INITIALLY = 2, /* globals and strands have been initialized */
25 :     RUNNING = 3, /* program is running */
26 :     DONE = 4 /* program has terminated */
27 : jhr 3135 } ExecutionState_t;
28 :    
29 : jhr 1640 /* The World_t structure type varies across targets, but all targets share the same prefix. */
30 :     #define STRUCT_WORLD_PREFIX \
31 :     const char *name; /*!< the program name */ \
32 : jhr 3118 biffMsg *errors; /*!< holds error messages (if any) */ \
33 : jhr 3135 ExecutionState_t stage; /*!< current stage of program execution */ \
34 : jhr 3118 bool verboseFlg; /*!< true if running in verbose mode */ \
35 :     bool isArray; /*!< are the strands in an array or collection? */ \
36 :     uint32_t nStrandTys; /*!< number of strand types in the program. */ \
37 :     Strand_t *strandDesc; /*!< nStrandTys array of strand descriptors */ \
38 : jhr 1716 uint32_t nAxes; /*!< depth of iteration nesting */ \
39 : jhr 1717 uint32_t *base; /*!< nAxes array of base indices */ \
40 :     uint32_t *size; /*!< nAxes array of iteration sizes */ \
41 : jhr 3118 uint32_t numStrands; /*!< number of strands in the world */ \
42 :     double runTime; /*!< total time in seconds spent running Diderot code */
43 : jhr 1640
44 :     /*! \brief a structure type for accessing the common fields of a world. */
45 :     typedef struct {
46 :     STRUCT_WORLD_PREFIX
47 :     } WorldPrefix_t;
48 :    
49 : jhr 1978 extern void Diderot_Error (WorldPrefix_t *wrld, const char *fmt, ...);
50 :    
51 : jhr 1640 #endif /* !_DIDEROT_WORLD_H_ */

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