/[escript]/trunk/paso/src/CommBuffer.c
ViewVC logotype

Diff of /trunk/paso/src/CommBuffer.c

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

revision 789 by bcumming, Tue Jul 18 00:47:47 2006 UTC revision 790 by bcumming, Wed Jul 26 23:12:34 2006 UTC
# Line 377  bool_t Paso_CommBuffer_waitRecv( Paso_Co Line 377  bool_t Paso_CommBuffer_waitRecv( Paso_Co
377  }  }
378    
379    
 /* return a pointer to the forward (send) buffer, so that the user can pack it directly */  
 /* TODO */  
 /* This function should not be allowed in the release library, it is better to use the auxillery pack  
    funcitonality provided by Passo_CommBuffer_pack/unpack() */  
 void *Paso_CommBuffer_getBufferForward( Paso_CommBuffer *in, index_t dom )  
 {  
   index_t position=0;  
   
   if( (position = Paso_CommBuffer_checkDomain( in, dom ))==-1 )  
     return NULL;  
   
   if( !Paso_CommBuffer_waitRecv( in, dom ) )  
     return NULL;    
   
   return in->bufferForward[position];  
 }  
   
380  /*  /*
381    pack information into a send buffer    pack information into a send buffer
382  */  */
# Line 429  void Paso_CommBuffer_pack( Paso_CommBuff Line 412  void Paso_CommBuffer_pack( Paso_CommBuff
412    {    {
413      /* pack the data according to index */      /* pack the data according to index */
414      for( i=0; i<in->numForward[position]; i++, to+=itemSize )      for( i=0; i<in->numForward[position]; i++, to+=itemSize )
415        memcpy( to , from + (i*itemSize), itemSize );        memcpy( to , from + (index[i]*itemSize), itemSize );
416    }    }
417  }  }
418    

Legend:
Removed from v.789  
changed lines
  Added in v.790

  ViewVC Help
Powered by ViewVC 1.1.26