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

SCM Repository

[diderot] Diff of /branches/lamont/src/compiler/c-target/fragments/queryPool.in
ViewVC logotype

Diff of /branches/lamont/src/compiler/c-target/fragments/queryPool.in

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

revision 2201, Sun Feb 24 16:02:12 2013 UTC revision 2202, Sun Feb 24 17:22:25 2013 UTC
# Line 20  Line 20 
20  //! \return the query pool structure  //! \return the query pool structure
21  void Diderot_QueryAddToPool(@STRANDTY@ * strandPtr, QueryPool_t * queryPool)  void Diderot_QueryAddToPool(@STRANDTY@ * strandPtr, QueryPool_t * queryPool)
22  {  {
23      if(queryPool->handle < queryPool->size)      if(queryPool->handle >= queryPool->size)
24      {      {
25            queryPool->pool = CheckedReAlloc(queryPool->pool,sizeof(@STRANDTY@ *)* (QUERY_POOL_SIZE  + queryPool->size));
26            queryPool->size += QUERY_POOL_SIZE;
27        }
28          uint32_t newIdx = (queryPool->handle)++;          uint32_t newIdx = (queryPool->handle)++;
29          queryPool->pool[newIdx] = strandPtr;          queryPool->pool[newIdx] = strandPtr;
30      }      }
     else  
     {  
         // FIXME: You need to increase pool size if there's not enough space  
     }  
 }  

Legend:
Removed from v.2201  
changed lines
  Added in v.2202

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