MALOC  0.1
vmp.h
1 /*
2  * ***************************************************************************
3  * MALOC = < Minimal Abstraction Layer for Object-oriented C >
4  * Copyright (C) 1994--2006 Michael Holst
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License as published by the
8  * Free Software Foundation; either version 2 of the License, or (at your
9  * option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14  * See the GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 675 Mass Ave, Cambridge, MA 02139, USA.
19  *
20  * rcsid="$Id: vmp.h,v 1.10 2006/06/03 07:22:30 mholst Exp $"
21  * ***************************************************************************
22  */
23 
24 /*
25  * ***************************************************************************
26  * File: vmp.h < vmp.c >
27  *
28  * Purpose: Class Vmp: a Virtual MPI communication layer object.
29  *
30  * Author: Michael Holst
31  * ***************************************************************************
32  */
33 
34 #ifndef _VMP_H_
35 #define _VMP_H_
36 
37 #include <maloc/maloc_base.h>
38 
39 #include <maloc/vsys.h>
40 #include <maloc/vmpi.h>
41 #include <maloc/vcom.h>
42 
43 /*
44  * ***************************************************************************
45  * Class Vmp: Parameters and datatypes
46  * ***************************************************************************
47  */
48 
49 /*
50  * ***************************************************************************
51  * Class Vmp: Definition
52  * ***************************************************************************
53  */
54 
55 typedef struct Vmp {
56  int mpi_rank; /* my process ID */
57  int mpi_size; /* number of processess in this execution */
58 } Vmp;
59 
60 /*
61  * ***************************************************************************
62  * Class Vmp: Inlineable methods (vmp.c)
63  * ***************************************************************************
64  */
65 
66 #if !defined(VINLINE_MALOC)
67 #else /* if defined(VINLINE_MALOC) */
68 #endif /* if !defined(VINLINE_MALOC) */
69 
70 /*
71  * ***************************************************************************
72  * Class Vmp: Non-inlineable methods (vmp.c)
73  * ***************************************************************************
74  */
75 
76 int Vmp_init(int *argc, char ***argv);
77 int Vmp_finalize(void);
78 
79 Vmp* Vmp_ctor(void);
80 void Vmp_dtor(Vmp **thee);
81 
82 int Vmp_rank(Vmp *thee);
83 int Vmp_size(Vmp *thee);
84 int Vmp_barr(Vmp *thee);
85 
86 int Vmp_send(Vmp *thee, int des, char *buf, int bufsize);
87 int Vmp_recv(Vmp *thee, int src, char *buf, int bufsize);
88 
89 #endif /* _VMP_H_ */
90 
Definition: vmp.h:55