/[escript]/trunk/paso/src/Coupler.h
ViewVC logotype

Diff of /trunk/paso/src/Coupler.h

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

revision 1313 by ksteube, Tue Sep 25 01:44:26 2007 UTC revision 1639 by gross, Mon Jul 14 08:55:25 2008 UTC
# Line 29  Line 29 
29  #include "SharedComponents.h"  #include "SharedComponents.h"
30  /**************************************************************/  /**************************************************************/
31    
32    typedef struct Paso_Connector {
33    
34      Paso_SharedComponents* send;
35      Paso_SharedComponents* recv;
36      dim_t reference_counter;
37      Paso_MPIInfo *mpi_info;
38    
39    } Paso_Connector;
40  typedef struct Paso_Coupler {  typedef struct Paso_Coupler {
41    
42    dim_t block_size;    dim_t block_size;
43    
44    Paso_SharedComponents* send;    Paso_Connector* connector;
45    
46      double *data; /* unmanaged pointer to data be send */
47    double *send_buffer;    double *send_buffer;
   Paso_SharedComponents* recv;  
48    double *recv_buffer;    double *recv_buffer;
49    #ifdef PASO_MPI    #ifdef PASO_MPI
50      MPI_Request* mpi_requests;      MPI_Request* mpi_requests;
# Line 51  typedef struct Paso_Coupler { Line 60  typedef struct Paso_Coupler {
60  } Paso_Coupler;  } Paso_Coupler;
61    
62    
63  Paso_Coupler* Paso_Coupler_alloc(Paso_SharedComponents * send,  Paso_Connector* Paso_Connector_alloc(Paso_SharedComponents * send, Paso_SharedComponents* recv);
64                                   Paso_SharedComponents* recv);  Paso_Connector* Paso_Connector_getReference(Paso_Connector*);
65    Paso_Connector* Paso_Connector_unroll(Paso_Connector* in, index_t block_size);
66    Paso_Connector* Paso_Connector_copy(Paso_Connector* in);
67    void Paso_Connector_free(Paso_Connector*);
68    
69    Paso_Coupler* Paso_Coupler_alloc(Paso_Connector*, dim_t blockSize);
70  Paso_Coupler* Paso_Coupler_getReference(Paso_Coupler*);  Paso_Coupler* Paso_Coupler_getReference(Paso_Coupler*);
71  void Paso_Coupler_free(Paso_Coupler*);  void Paso_Coupler_startCollect(Paso_Coupler* self,const double* in);
 void Paso_Coupler_startCollect(Paso_Coupler* self, double* in);  
72  double* Paso_Coupler_finishCollect(Paso_Coupler* self);  double* Paso_Coupler_finishCollect(Paso_Coupler* self);
73  void Paso_Coupler_freeBuffer(Paso_Coupler* coupler);  void Paso_Coupler_free(Paso_Coupler* in);
74  void Paso_Coupler_allocBuffer(Paso_Coupler* coupler,dim_t blockSize);  #define Paso_Coupler_borrowLocalData(_in_) (_in_)->data
75  Paso_Coupler* Paso_Coupler_unroll(Paso_Coupler* in, index_t block_size);  #define Paso_Coupler_borrowRemoteData(_in_) (_in_)->recv_buffer
76    void Paso_Coupler_copyAll(const Paso_Coupler* src, Paso_Coupler* target);
77    dim_t Paso_Coupler_getLocalLength(const Paso_Coupler* in);
78  #endif  #endif

Legend:
Removed from v.1313  
changed lines
  Added in v.1639

  ViewVC Help
Powered by ViewVC 1.1.26