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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1552 - (show annotations)
Thu May 8 08:52:41 2008 UTC (11 years, 9 months ago) by gross
File MIME type: text/plain
File size: 2080 byte(s)
some changes to make the implementatiopn of a upwind MPI version easier
1
2 /* $Id: Coupler.h 1306 2007-09-18 05:51:09Z ksteube $ */
3
4 /*******************************************************
5 *
6 * Copyright 2003-2007 by ACceSS MNRF
7 * Copyright 2007 by University of Queensland
8 *
9 * http://esscc.uq.edu.au
10 * Primary Business: Queensland, Australia
11 * Licensed under the Open Software License version 3.0
12 * http://www.opensource.org/licenses/osl-3.0.php
13 *
14 *******************************************************/
15
16 /**************************************************************/
17
18 /* Paso: coupler */
19
20 /**************************************************************/
21
22 /* Author: gross@access.edu.au */
23
24 /**************************************************************/
25
26 #ifndef INC_PASO_COUPLER
27 #define INC_PASO_COUPLER
28
29 #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 {
41
42 dim_t block_size;
43
44 Paso_Connector* connector;
45
46 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 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 Paso_Coupler* Paso_Coupler_getReference(Paso_Coupler*);
70 void Paso_Coupler_startCollect(Paso_Coupler* self,const double* in);
71 double* Paso_Coupler_finishCollect(Paso_Coupler* self);
72 void Paso_Coupler_free(Paso_Coupler* in);
73
74 #endif

  ViewVC Help
Powered by ViewVC 1.1.26