vmp.h

00001 /*
00002  * ***************************************************************************
00003  * MALOC = < Minimal Abstraction Layer for Object-oriented C >
00004  * Copyright (C) 1994--2006  Michael Holst
00005  * 
00006  * This program is free software; you can redistribute it and/or modify it
00007  * under the terms of the GNU General Public License as published by the
00008  * Free Software Foundation; either version 2 of the License, or (at your
00009  * option) any later version.
00010  * 
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00014  * See the GNU General Public License for more details.
00015  * 
00016  * You should have received a copy of the GNU General Public License along
00017  * with this program; if not, write to the Free Software Foundation, Inc.,
00018  * 675 Mass Ave, Cambridge, MA 02139, USA.
00019  * 
00020  * rcsid="$Id: vmp.h,v 1.10 2006/06/03 07:22:30 mholst Exp $"
00021  * ***************************************************************************
00022  */
00023 
00024 /*
00025  * ***************************************************************************
00026  * File:     vmp.h    < vmp.c >
00027  *
00028  * Purpose:  Class Vmp: a Virtual MPI communication layer object.
00029  *
00030  * Author:   Michael Holst
00031  * ***************************************************************************
00032  */
00033 
00034 #ifndef _VMP_H_
00035 #define _VMP_H_
00036 
00037 #include <maloc/maloc_base.h>
00038 
00039 #include <maloc/vsys.h>
00040 #include <maloc/vmpi.h>
00041 #include <maloc/vcom.h>
00042 
00043 /*
00044  * ***************************************************************************
00045  * Class Vmp: Parameters and datatypes
00046  * ***************************************************************************
00047  */
00048 
00049 /*
00050  * ***************************************************************************
00051  * Class Vmp: Definition
00052  * ***************************************************************************
00053  */
00054 
00055 typedef struct Vmp {
00056     int  mpi_rank;     /* my process ID                                     */
00057     int  mpi_size;     /* number of processess in this execution            */
00058 } Vmp;
00059 
00060 /*
00061  * ***************************************************************************
00062  * Class Vmp: Inlineable methods (vmp.c)
00063  * ***************************************************************************
00064  */
00065 
00066 #if !defined(VINLINE_MALOC)
00067 #else /* if defined(VINLINE_MALOC) */
00068 #endif /* if !defined(VINLINE_MALOC) */
00069 
00070 /*
00071  * ***************************************************************************
00072  * Class Vmp: Non-inlineable methods (vmp.c)
00073  * ***************************************************************************
00074  */
00075 
00076 int Vmp_init(int *argc, char ***argv);
00077 int Vmp_finalize(void);
00078 
00079 Vmp* Vmp_ctor(void);
00080 void Vmp_dtor(Vmp **thee);
00081 
00082 int Vmp_rank(Vmp *thee);
00083 int Vmp_size(Vmp *thee);
00084 int Vmp_barr(Vmp *thee);
00085 
00086 int Vmp_send(Vmp *thee, int des, char *buf, int bufsize);
00087 int Vmp_recv(Vmp *thee, int src, char *buf, int bufsize);
00088 
00089 #endif /* _VMP_H_ */
00090 
00091 

Generated on Wed Jul 12 18:49:21 2006 for MALOC by  doxygen 1.4.7