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

SCM Repository

[diderot] Diff of /branches/pure-cfg/src/lib/c-target/main.c
ViewVC logotype

Diff of /branches/pure-cfg/src/lib/c-target/main.c

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

revision 1447, Tue Jul 12 13:19:04 2011 UTC revision 1448, Tue Jul 12 13:25:08 2011 UTC
# Line 18  Line 18 
18  static bool     TimingFlg = false;  static bool     TimingFlg = false;
19    
20  struct struct_world {  struct struct_world {
21      const char          *name;          // the program name      const char          *name;          //!< the program name
22      bool                isArray;        // is the initialization an array or collection?      bool                isArray;        //!< is the initialization an array or collection?
23      uint32_t            nDims;          // depth of iteration nesting      uint32_t            nDims;          //!< depth of iteration nesting
24      int32_t             *base;          // nDims array of base indices      int32_t             *base;          //!< nDims array of base indices
25      uint32_t            *size;          // nDims array of iteration sizes      uint32_t            *size;          //!< nDims array of iteration sizes
26      uint32_t            numStrands;     // number of strands in the world      uint32_t            numStrands;     //!< number of strands in the world
27      void                **inState;      void                **inState;
28      void                **outState;      void                **outState;
29      uint8_t             *status;        // array of strand status flags      uint8_t             *status;        //!< array of strand status flags
30  };  };
31    
32  extern float getOutf (void *self);  extern float getOutf (void *self);
# Line 85  Line 85 
85              for (int i = 0;  i < wrld->numStrands;  i++) {              for (int i = 0;  i < wrld->numStrands;  i++) {
86  // NOTE: we may want to compact the array of strands  // NOTE: we may want to compact the array of strands
87                  if (wrld->status[i] == DIDEROT_STABILIZE) {                  if (wrld->status[i] == DIDEROT_STABILIZE) {
88    #ifdef STABILIZE_FIXED
89                      // stabilize the strand's state.  Note that the outState has been set by
90                      // the last call to update, so we make the inState be the target of the
91                      // stabilize method.  This call also has the effect of copying out to in.
92                        Diderot_Strands[0]->stabilize(wrld->outState[i], wrld->inState[i]);
93    #endif
94                    // copy out to in so that both copies are the stable state                    // copy out to in so that both copies are the stable state
95                      memcpy (wrld->inState[i], wrld->outState[i], Diderot_Strands[0]->stateSzb);                      memcpy (wrld->inState[i], wrld->outState[i], Diderot_Strands[0]->stateSzb);
96                      wrld->status[i] = DIDEROT_STABLE;                      wrld->status[i] = DIDEROT_STABLE;
# Line 185  Line 191 
191    
192      return wrld;      return wrld;
193    
   
194  }  }
195    
196  // get strand state pointers  // get strand state pointers

Legend:
Removed from v.1447  
changed lines
  Added in v.1448

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