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 1519 - (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 : jhr 1519 # include "Diderot/types.h"
16 : jhr 710 #endif
17 : jhr 1519 #ifndef _DIDEROT_WORLD_H_
18 :     # include "Diderot/world.h"
19 :     #endif
20 : jhr 710
21 :     typedef StrandStatus_t (*update_method_t)(void *, void *);
22 : jhr 1448 typedef void (*stabilize_method_t)(void *, void *);
23 : jhr 1475 typedef void (*convert_method_t)(void *, void *);
24 : jhr 710 typedef void (*print_method_t)(FILE *, void *);
25 : jhr 1475 typedef void (*output_method_t)(void *, void *);
26 : jhr 710
27 :     /* hooks generated by the compiler for the runtime */
28 :     typedef struct {
29 : jhr 1448 char *name; //!< name of strand
30 :     size_t stateSzb; //!< size of strand state in bytes
31 : jhr 1475 #if defined(DIDEROT_TARGET_CL)
32 :     size_t shadowStrandSzb; //!< shadow strand size
33 :     #endif
34 :     size_t outputSzb; //!< size of strand output in bytes
35 :     int nrrdType; //!< nrrd type tag for output
36 : jhr 1448 update_method_t update; //!< update method
37 :     stabilize_method_t stabilize; //!< stabilize method
38 : jhr 1475 #if defined(DIDEROT_TARGET_CL)
39 :     convert_method_t strandCopy; //!< method for copying
40 :     #endif
41 : jhr 1448 print_method_t print; //!< function for printing output state
42 : jhr 1475 output_method_t output; //!< function for outputing output state
43 : lamonts 1346 } Strand_t;
44 :    
45 : jhr 1448 extern int Diderot_NumStrands; //!< the number of strands in the program
46 :     extern Strand_t *Diderot_Strands[]; //!< array of NumStrands strand descriptors
47 : jhr 710
48 : jhr 1262 extern void Diderot_InitGlobals ();
49 : lamonts 1271
50 : jhr 710 extern Diderot_World_t *Diderot_Initially ();
51 : jhr 1214 extern void Diderot_Shutdown (Diderot_World_t *wrld);
52 : jhr 710
53 :     /* Diderot library functions */
54 :    
55 :     // block allocation of an initial collection of strands
56 :     extern Diderot_World_t *Diderot_AllocInitially (
57 : jhr 1280 const char *name, // the name of the program
58 : jhr 1342 Strand_t *strand, // the type of strands being allocated
59 :     bool isArray, // is the initialization an array or collection?
60 :     uint32_t nDims, // depth of iteration nesting
61 :     int32_t *base, // nDims array of base indices
62 :     uint32_t *size); // nDims array of iteration sizes
63 : jhr 710
64 :     #endif /* !_DIDEROT_STRANDS_H_ */

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