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

SCM Repository

[diderot] View of /branches/pure-cfg/src/include/Diderot/strands.h
ViewVC logotype

View of /branches/pure-cfg/src/include/Diderot/strands.h

Parent Directory Parent Directory | Revision Log Revision Log

Revision 3349 - (download) (as text) (annotate)
Tue Oct 27 15:16:36 2015 UTC (6 years, 8 months ago) by jhr
File size: 2470 byte(s)
making copyrights consistent for all code in the repository
/*! \file strands.h
 * \author John Reppy

 * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
 * COPYRIGHT (c) 2015 The University of Chicago
 * All rights reserved.


#  include "Diderot/types.h"
#  include "Diderot/world.h"

typedef StrandStatus_t (*update_method_t)(void *, void *);
typedef void (*stabilize_method_t)(void *, void *);
typedef void (*convert_method_t)(void *, void *); 
typedef void (*print_method_t)(FILE *, void *);
typedef void (*output_method_t)(void *, void *);

/* hooks generated by the compiler for the runtime */
typedef struct {
    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
    size_t              nrrdSzb;        //!< size of strand output in bytes
    size_t              outputSzb;      //!< size of strand output in bytes
    int                 nrrdType;       //!< nrrd type tag for output
    update_method_t     update;         //!< update method
    stabilize_method_t  stabilize;      //!< stabilize method
#if defined(DIDEROT_TARGET_CL)
    convert_method_t    strandCopy;     //!< method for copying 
    print_method_t      print;          //!< function for printing output state
    output_method_t     output;         //!< function for outputing output state
} Strand_t;

extern int Diderot_NumStrands;          //!< the number of strands in the program
extern Strand_t *Diderot_Strands[];     //!< array of NumStrands strand descriptors

extern void Diderot_InitGlobals ();

extern Diderot_World_t *Diderot_Initially ();
extern void Diderot_Shutdown (Diderot_World_t *wrld);

/* Diderot library functions */

// block allocation of an initial collection of strands
extern Diderot_World_t *Diderot_AllocInitially (
    const char *name,           // the name of the program
    Strand_t *strand,           // the type of strands being allocated
    bool isArray,               // is the initialization an array or collection?
    uint32_t nDims,             // depth of iteration nesting
    int32_t *base,              // nDims array of base indices
    uint32_t *size);            // nDims array of iteration sizes

#endif /* !_DIDEROT_STRANDS_H_ */

ViewVC Help
Powered by ViewVC 1.0.0