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

SCM Repository

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

Diff of /branches/pure-cfg/src/lib/common/output.c

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

revision 1517, Fri Oct 7 19:52:25 2011 UTC revision 1518, Sat Oct 8 02:39:41 2011 UTC
# Line 36  Line 36 
36      uint8_t *strandPtr = (uint8_t *)args->inState;      uint8_t *strandPtr = (uint8_t *)args->inState;
37      for (int i = 0;  i < args->numStrands;  i++, strandPtr += args->outputSzb) {      for (int i = 0;  i < args->numStrands;  i++, strandPtr += args->outputSzb) {
38    
39          if ((args->isStatusInt && (args->status[i * 4] == DIDEROT_STABLE))          if (args->status[i] == DIDEROT_STABLE) {
         || (args->status[i] == DIDEROT_STABLE)) {  
         /*if (args->status[i] == DIDEROT_STABLE) {*/  
40              Diderot_Strands[0]->print (outS, strandPtr);              Diderot_Strands[0]->print (outS, strandPtr);
41          }          }
42      }      }
# Line 64  Line 62 
62    // allocate the correct amount of space for output    // allocate the correct amount of space for output
63      int numStabilized = 0;      int numStabilized = 0;
64      for (int i = 0;  i < args->numStrands;  i++) {      for (int i = 0;  i < args->numStrands;  i++) {
65  // FIXME: this conditional is not portable because of endianess issues.          if (args->status[i] == DIDEROT_STABLE)
         if ((args->isStatusInt && (args->status[i * 4] == DIDEROT_STABLE))  
         || (args->status[i] == DIDEROT_STABLE))  
66              numStabilized++;              numStabilized++;
67      }      }
68      void *outData = CheckedAlloc(numStabilized * args->outputSzb);      void *outData = CheckedAlloc(numStabilized * args->outputSzb);
# Line 76  Line 72 
72    // copy data into outData    // copy data into outData
73      void *outPos = outData;      void *outPos = outData;
74      for (int i = 0;  i < args->numStrands;  i++) {      for (int i = 0;  i < args->numStrands;  i++) {
75          if ((args->isStatusInt && (args->status[i * 4] == DIDEROT_STABLE))          if (args->status[i] == DIDEROT_STABLE) {
         || (args->status[i] == DIDEROT_STABLE)) {  
76              Diderot_Strands[0]->output (outPos, &args->inState[i]);              Diderot_Strands[0]->output (outPos, &args->inState[i]);
77              outPos += args->outputSzb;              outPos += args->outputSzb;
78          }          }

Legend:
Removed from v.1517  
changed lines
  Added in v.1518

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