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 3349 - (view) (download) (as text)

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

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