SCM Repository
Annotation of /branches/pure-cfg/src/include/Diderot/strands.h
Parent Directory
|
Revision Log
Revision 3349 - (view) (download) (as text)
1 : | jhr | 710 | /*! \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 | 710 | * All rights reserved. |
11 : | */ | ||
12 : | |||
13 : | #ifndef _DIDEROT_STRANDS_H_ | ||
14 : | #define _DIDEROT_STRANDS_H_ | ||
15 : | |||
16 : | #ifndef _DIDEROT_TYPES_H_ | ||
17 : | jhr | 1519 | # include "Diderot/types.h" |
18 : | jhr | 710 | #endif |
19 : | jhr | 1519 | #ifndef _DIDEROT_WORLD_H_ |
20 : | # include "Diderot/world.h" | ||
21 : | #endif | ||
22 : | jhr | 710 | |
23 : | typedef StrandStatus_t (*update_method_t)(void *, void *); | ||
24 : | jhr | 1448 | typedef void (*stabilize_method_t)(void *, void *); |
25 : | jhr | 1475 | typedef void (*convert_method_t)(void *, void *); |
26 : | jhr | 710 | typedef void (*print_method_t)(FILE *, void *); |
27 : | jhr | 1475 | typedef void (*output_method_t)(void *, void *); |
28 : | jhr | 710 | |
29 : | /* hooks generated by the compiler for the runtime */ | ||
30 : | typedef struct { | ||
31 : | jhr | 1448 | char *name; //!< name of strand |
32 : | size_t stateSzb; //!< size of strand state in bytes | ||
33 : | jhr | 1475 | #if defined(DIDEROT_TARGET_CL) |
34 : | size_t shadowStrandSzb; //!< shadow strand size | ||
35 : | #endif | ||
36 : | jhr | 1650 | size_t nrrdSzb; //!< size of strand output in bytes |
37 : | jhr | 1475 | size_t outputSzb; //!< size of strand output in bytes |
38 : | int nrrdType; //!< nrrd type tag for output | ||
39 : | jhr | 1448 | update_method_t update; //!< update method |
40 : | stabilize_method_t stabilize; //!< stabilize method | ||
41 : | jhr | 1475 | #if defined(DIDEROT_TARGET_CL) |
42 : | convert_method_t strandCopy; //!< method for copying | ||
43 : | #endif | ||
44 : | jhr | 1448 | print_method_t print; //!< function for printing output state |
45 : | jhr | 1475 | output_method_t output; //!< function for outputing output state |
46 : | lamonts | 1346 | } Strand_t; |
47 : | |||
48 : | jhr | 1448 | extern int Diderot_NumStrands; //!< the number of strands in the program |
49 : | extern Strand_t *Diderot_Strands[]; //!< array of NumStrands strand descriptors | ||
50 : | jhr | 710 | |
51 : | jhr | 1262 | extern void Diderot_InitGlobals (); |
52 : | lamonts | 1271 | |
53 : | jhr | 710 | extern Diderot_World_t *Diderot_Initially (); |
54 : | jhr | 1214 | extern void Diderot_Shutdown (Diderot_World_t *wrld); |
55 : | jhr | 710 | |
56 : | /* Diderot library functions */ | ||
57 : | |||
58 : | // block allocation of an initial collection of strands | ||
59 : | extern Diderot_World_t *Diderot_AllocInitially ( | ||
60 : | jhr | 1280 | const char *name, // the name of the program |
61 : | jhr | 1342 | 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 | 710 | |
67 : | #endif /* !_DIDEROT_STRANDS_H_ */ |
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |