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

SCM Repository

[diderot] Annotation of /branches/pure-cfg/src/include/Diderot/strands.h
ViewVC logotype

Annotation of /branches/pure-cfg/src/include/Diderot/strands.h

Parent Directory Parent Directory | Revision Log Revision Log


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

1 : jhr 710 /*! \file strands.h
2 :     *
3 :     * \author John Reppy
4 :     */
5 :    
6 :     /*
7 :     * COPYRIGHT (c) 2011 The Diderot Project (http://diderot-language.cs.uchicago.edu)
8 :     * All rights reserved.
9 :     */
10 :    
11 :     #ifndef _DIDEROT_STRANDS_H_
12 :     #define _DIDEROT_STRANDS_H_
13 :    
14 :     #ifndef _DIDEROT_TYPES_H_
15 :     #include "Diderot/types.h"
16 :     #endif
17 :    
18 :     typedef StrandStatus_t (*update_method_t)(void *, void *);
19 : jhr 1448 typedef void (*stabilize_method_t)(void *, void *);
20 : jhr 710 typedef void (*print_method_t)(FILE *, void *);
21 : nseltzer 1449 typedef void (*out_method_t)(void *, void *);
22 : jhr 710
23 :     /* hooks generated by the compiler for the runtime */
24 :     typedef struct {
25 : jhr 1448 char *name; //!< name of strand
26 :     size_t stateSzb; //!< size of strand state in bytes
27 : nseltzer 1449 size_t outputSzb; // sze of strand output
28 :     int nrrdType; // nrrdType enum for output
29 : jhr 1448 update_method_t update; //!< update method
30 :     stabilize_method_t stabilize; //!< stabilize method
31 :     print_method_t print; //!< function for printing output state
32 : nseltzer 1449 out_method_t out; // function for outputing output state
33 : lamonts 1346 } Strand_t;
34 :    
35 : jhr 1448 extern int Diderot_NumStrands; //!< the number of strands in the program
36 :     extern Strand_t *Diderot_Strands[]; //!< array of NumStrands strand descriptors
37 : jhr 710
38 :     typedef struct struct_world Diderot_World_t;
39 :    
40 : jhr 1262 extern void Diderot_InitGlobals ();
41 : lamonts 1271
42 : jhr 710 extern Diderot_World_t *Diderot_Initially ();
43 : jhr 1214 extern void Diderot_Shutdown (Diderot_World_t *wrld);
44 : jhr 710
45 :     /* Diderot library functions */
46 :    
47 :     // block allocation of an initial collection of strands
48 :     extern Diderot_World_t *Diderot_AllocInitially (
49 : jhr 1280 const char *name, // the name of the program
50 : jhr 1342 Strand_t *strand, // the type of strands being allocated
51 :     bool isArray, // is the initialization an array or collection?
52 :     uint32_t nDims, // depth of iteration nesting
53 :     int32_t *base, // nDims array of base indices
54 :     uint32_t *size); // nDims array of iteration sizes
55 : jhr 710
56 :     // get strand state pointers
57 :     extern void *Diderot_InState (Diderot_World_t *wrld, uint32_t i);
58 :     extern void *Diderot_OutState (Diderot_World_t *wrld, uint32_t i);
59 :     extern bool Diderot_IsActive (Diderot_World_t *wrld, uint32_t i);
60 :    
61 :     // strand allocation (no initializtion)
62 :     extern void *Diderot_AllocStrand (Strand_t *strand);
63 :    
64 :     #endif /* !_DIDEROT_STRANDS_H_ */

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