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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1811 - (hide annotations)
Thu Sep 25 23:11:13 2008 UTC (11 years, 4 months ago) by ksteube
File MIME type: text/plain
File size: 2307 byte(s)
Copyright updated in all files

1 ksteube 1313
2     /*******************************************************
3 ksteube 1811 *
4     * Copyright (c) 2003-2008 by University of Queensland
5     * Earth Systems Science Computational Center (ESSCC)
6     * http://www.uq.edu.au/esscc
7     *
8     * Primary Business: Queensland, Australia
9     * Licensed under the Open Software License version 3.0
10     * http://www.opensource.org/licenses/osl-3.0.php
11     *
12     *******************************************************/
13 ksteube 1313
14 ksteube 1811
15 ksteube 1313 /**************************************************************/
16    
17     /* Paso: coupler */
18    
19     /**************************************************************/
20    
21     /* Author: gross@access.edu.au */
22    
23     /**************************************************************/
24    
25     #ifndef INC_PASO_COUPLER
26     #define INC_PASO_COUPLER
27    
28     #include "SharedComponents.h"
29     /**************************************************************/
30    
31 gross 1552 typedef struct Paso_Connector {
32    
33     Paso_SharedComponents* send;
34     Paso_SharedComponents* recv;
35     dim_t reference_counter;
36     Paso_MPIInfo *mpi_info;
37    
38     } Paso_Connector;
39 ksteube 1313 typedef struct Paso_Coupler {
40    
41     dim_t block_size;
42    
43 gross 1552 Paso_Connector* connector;
44    
45 gross 1562 double *data; /* unmanaged pointer to data be send */
46 ksteube 1313 double *send_buffer;
47     double *recv_buffer;
48     #ifdef PASO_MPI
49     MPI_Request* mpi_requests;
50     MPI_Status* mpi_stati;
51     #else
52     void* mpi_requests;
53     void* mpi_stati;
54     #endif
55    
56     dim_t reference_counter;
57     Paso_MPIInfo *mpi_info;
58    
59     } Paso_Coupler;
60    
61    
62 gross 1552 Paso_Connector* Paso_Connector_alloc(Paso_SharedComponents * send, Paso_SharedComponents* recv);
63     Paso_Connector* Paso_Connector_getReference(Paso_Connector*);
64     Paso_Connector* Paso_Connector_unroll(Paso_Connector* in, index_t block_size);
65     Paso_Connector* Paso_Connector_copy(Paso_Connector* in);
66     void Paso_Connector_free(Paso_Connector*);
67    
68     Paso_Coupler* Paso_Coupler_alloc(Paso_Connector*, dim_t blockSize);
69 ksteube 1313 Paso_Coupler* Paso_Coupler_getReference(Paso_Coupler*);
70 gross 1639 void Paso_Coupler_startCollect(Paso_Coupler* self,const double* in);
71 ksteube 1313 double* Paso_Coupler_finishCollect(Paso_Coupler* self);
72 gross 1552 void Paso_Coupler_free(Paso_Coupler* in);
73 gross 1562 #define Paso_Coupler_borrowLocalData(_in_) (_in_)->data
74     #define Paso_Coupler_borrowRemoteData(_in_) (_in_)->recv_buffer
75     void Paso_Coupler_copyAll(const Paso_Coupler* src, Paso_Coupler* target);
76     dim_t Paso_Coupler_getLocalLength(const Paso_Coupler* in);
77 ksteube 1313 #endif

  ViewVC Help
Powered by ViewVC 1.1.26