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

SCM Repository

[diderot] View of /branches/vis12-cl/src/include/Diderot/world.h
ViewVC logotype

View of /branches/vis12-cl/src/include/Diderot/world.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3349 - (download) (as text) (annotate)
Tue Oct 27 15:16:36 2015 UTC (3 years, 5 months ago) by jhr
File size: 2306 byte(s)
making copyrights consistent for all code in the repository
/*! \file world.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.
 */

#ifndef _DIDEROT_WORLD_H_
#define _DIDEROT_WORLD_H_

#ifndef _DIDEROT_TYPES_H_
#include "types.h"
#endif

/* stages of execution of a program */
typedef enum {
  POST_NEW = 0,         /* world allocated, but not initialized */
  POST_INIT = 1,        /* Init function has been called */
  POST_INITIALLY = 2,   /* globals and strands have been initialized */
  RUNNING = 3,          /* program is running */
  DONE = 4              /* program has terminated */
} ExecutionState_t;

/* The World_t structure type varies across targets, but all targets share the same prefix. */
#define STRUCT_WORLD_PREFIX                                                                     \
    const char          *name;          /*!< the program name */                                \
    biffMsg             *errors;        /*!< holds error messages (if any) */                   \
    ExecutionState_t    stage;          /*!< current stage of program execution */              \
    bool                verboseFlg;     /*!< true if running in verbose mode */                 \
    bool                isArray;        /*!< are the strands in an array or collection? */      \
    uint32_t            nStrandTys;     /*!< number of strand types in the program. */          \
    Strand_t            *strandDesc;    /*!< nStrandTys array of strand descriptors */          \
    uint32_t            nAxes;          /*!< depth of iteration nesting */                      \
    uint32_t            *base;          /*!< nAxes array of base indices */                     \
    uint32_t            *size;          /*!< nAxes array of iteration sizes */                  \
    uint32_t            numStrands;     /*!< number of strands in the world */                  \
    double              runTime;        /*!< total time in seconds spent running Diderot code */

/*! \brief a structure type for accessing the common fields of a world. */
typedef struct {
    STRUCT_WORLD_PREFIX
} WorldPrefix_t;

extern void Diderot_Error (WorldPrefix_t *wrld, const char *fmt, ...);

#endif /* !_DIDEROT_WORLD_H_ */

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