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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1716 - (download) (as text) (annotate)
Sat Mar 10 17:08:11 2012 UTC (7 years, 6 months ago) by jhr
File size: 2115 byte(s)
  Working on library support
/*! \file strands.h
 *
 * \author John Reppy
 */

/*
 * COPYRIGHT (c) 2011 The Diderot Project (http://diderot-language.cs.uchicago.edu)
 * All rights reserved.
 */

#ifndef _DIDEROT_STRANDS_H_
#define _DIDEROT_STRANDS_H_

#ifndef _DIDEROT_TYPES_H_
#  include "Diderot/types.h"
#endif
#ifndef _DIDEROT_WORLD_H_
#  include "Diderot/world.h"
#endif

typedef StrandStatus_t (*update_method_t)(void *inSt, void *outSt);
typedef void (*stabilize_method_t)(void *inSt, void *outSt);
typedef void (*convert_method_t)(void *st, void *); 
typedef void (*output_method_t)(void *st, int i, void *dst);	// copy i'th output 

enum {
    nrrdTypeLength = nrrdTypeLast+1	//!< nrrd typecode for dynamic sequence lengths
};

/* description of an output */
typedef struct {
    const char          *name;          //!< name of output variable
    int                 nrrdType;       //!< nrrd type code for elements
    int                 nDims;          //!< number of dimensions (order) of tensor/sequence types
    int                 *dims;          //!< array of dimension sizes in slowest to fastest; the
                                        //!< value -1 is used for a dynamically sized dimension,
					//!< which will always be the slowest dimension.
} OutputDesc_t;

/* hooks generated by the compiler for the runtime */
struct struct_strand {
    char                *name;          //!< name of strand
    size_t              stateSzb;       //!< size of strand state in bytes
#if defined(DIDEROT_TARGET_CL)
    size_t              shadowStrandSzb; //!< shadow strand size
#endif
    int                 nOutputs;       //!< number of output variables
    OutputDesc_t        *outputs;       //!< array of output descriptions
    update_method_t     update;         //!< update method
    stabilize_method_t  stabilize;      //!< stabilize method
#if defined(DIDEROT_TARGET_CL)
    convert_method_t    strandCopy;     //!< method for copying 
#endif
    output_method_t     output;         //!< function for copying output state from the strand
					//!< state to the output nrrd
};

#endif /* !_DIDEROT_STRANDS_H_ */

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