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

SCM Repository

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

Annotation of /branches/vis12/src/include/Diderot/strands.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1716 - (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 : jhr 1714 typedef StrandStatus_t (*update_method_t)(void *inSt, void *outSt);
22 :     typedef void (*stabilize_method_t)(void *inSt, void *outSt);
23 :     typedef void (*convert_method_t)(void *st, void *);
24 :     typedef void (*output_method_t)(void *st, int i, void *dst); // copy i'th output
25 : jhr 1115
26 : jhr 1716 enum {
27 : jhr 1714 nrrdTypeLength = nrrdTypeLast+1 //!< nrrd typecode for dynamic sequence lengths
28 :     };
29 :    
30 : jhr 1692 /* description of an output */
31 :     typedef struct {
32 :     const char *name; //!< name of output variable
33 :     int nrrdType; //!< nrrd type code for elements
34 :     int nDims; //!< number of dimensions (order) of tensor/sequence types
35 :     int *dims; //!< array of dimension sizes in slowest to fastest; the
36 : jhr 1699 //!< value -1 is used for a dynamically sized dimension,
37 :     //!< which will always be the slowest dimension.
38 : jhr 1692 } OutputDesc_t;
39 :    
40 : jhr 1115 /* hooks generated by the compiler for the runtime */
41 : jhr 1716 struct struct_strand {
42 : jhr 1640 char *name; //!< name of strand
43 :     size_t stateSzb; //!< size of strand state in bytes
44 :     #if defined(DIDEROT_TARGET_CL)
45 :     size_t shadowStrandSzb; //!< shadow strand size
46 :     #endif
47 : jhr 1692 int nOutputs; //!< number of output variables
48 :     OutputDesc_t *outputs; //!< array of output descriptions
49 : jhr 1640 update_method_t update; //!< update method
50 :     stabilize_method_t stabilize; //!< stabilize method
51 :     #if defined(DIDEROT_TARGET_CL)
52 :     convert_method_t strandCopy; //!< method for copying
53 :     #endif
54 : jhr 1714 output_method_t output; //!< function for copying output state from the strand
55 :     //!< state to the output nrrd
56 : jhr 1716 };
57 : jhr 1115
58 :     #endif /* !_DIDEROT_STRANDS_H_ */

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