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

SCM Repository

[diderot] Annotation of /trunk/src/include/Diderot/strands.h
ViewVC logotype

Annotation of /trunk/src/include/Diderot/strands.h

Parent Directory Parent Directory | Revision Log Revision Log


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

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

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