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

SCM Repository

[diderot] Diff of /branches/vis12/src/include/Diderot/world.h
ViewVC logotype

Diff of /branches/vis12/src/include/Diderot/world.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1714, Sat Mar 10 00:00:50 2012 UTC revision 1716, Sat Mar 10 17:08:11 2012 UTC
# Line 15  Line 15 
15  #include "types.h"  #include "types.h"
16  #endif  #endif
17    
 typedef struct struct_world Diderot_World_t;  
   
18  //! the integer typed used to represent the strand status array.  //! the integer typed used to represent the strand status array.
19  #if defined(DIDEROT_TARGET_CL)  #if defined(DIDEROT_TARGET_CL)
20  typedef uint32_t StatusInt_t;  typedef uint32_t StatusInt_t;
# Line 30  Line 28 
28      bool                isArray;        /*!< are the strands in an array or collection? */      \      bool                isArray;        /*!< are the strands in an array or collection? */      \
29      int32_t             nStrandTys;     /*!< number of strand types in the program. */          \      int32_t             nStrandTys;     /*!< number of strand types in the program. */          \
30      Strand_t            *strandDesc;    /*!< nStrandTys array of strand descriptors */          \      Strand_t            *strandDesc;    /*!< nStrandTys array of strand descriptors */          \
31      uint32_t            nDims;          /*!< depth of iteration nesting */                      \      uint32_t            nAxes;          /*!< depth of iteration nesting */                      \
32      int32_t             *base;          /*!< nDims array of base indices */                     \      int32_t             *base;          /*!< nDims array of base indices */                     \
33      uint32_t            *size;          /*!< nDims array of iteration sizes */                  \      uint32_t            *size;          /*!< nDims array of iteration sizes */                  \
34      uint32_t            numStrands;     /*!< number of strands in the world */                  \      uint32_t            numStrands;     /*!< number of strands in the world */
     size_t              outputSzb;      /*!< the output size of the strands */                  \  
     StatusInt_t         *status;        /*!< array of strand status flags */  
35    
36  /*! \brief a structure type for accessing the common fields of a world. */  /*! \brief a structure type for accessing the common fields of a world. */
37  typedef struct {  typedef struct {
38      STRUCT_WORLD_PREFIX      STRUCT_WORLD_PREFIX
39  } WorldPrefix_t;  } WorldPrefix_t;
40    
 /*! \brief get the strand in state.  
  *  \param wrld the world pointer.  
  *  \param i the strand index  
  *  \return a pointer to the strand's state.  
  */  
 extern void *Diderot_InState (Diderot_World_t *wrld, uint32_t i);  
   
 /*! \brief get the strand out state.  
  *  \param wrld the world pointer.  
  *  \param i the strand index  
  *  \return a pointer to the strand's state.  
  */  
 extern void *Diderot_OutState (Diderot_World_t *wrld, uint32_t i);  
   
 /*! \brief is a strand active?  
  *  \param wrld the world pointer.  
  *  \param i the strand index  
  *  \return true if the strand is active.  
  */  
 STATIC_INLINE bool Diderot_IsActive (Diderot_World_t *wrld, uint32_t i)  
 {  
     WorldPrefix_t *hdr = (WorldPrefix_t *)wrld;  
     assert (i < hdr->numStrands);  
     return !hdr->status[i];  
 }  
   
41  #endif /* !_DIDEROT_WORLD_H_ */  #endif /* !_DIDEROT_WORLD_H_ */

Legend:
Removed from v.1714  
changed lines
  Added in v.1716

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