bsp_mesgqueue.h

Go to the documentation of this file.
00001 /*
00002     BSPonMPI. This is an implementation of the BSPlib standard on top of MPI
00003     Copyright (C) 2006  Wijnand J. Suijlen
00004                                                                                 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Lesser General Public
00007     License as published by the Free Software Foundation; either
00008     version 2.1 of the License, or (at your option) any later version.
00009                                                                                 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Lesser General Public License for more details.
00014                                                                                 
00015     You should have received a copy of the GNU Lesser General Public
00016     License along with this library; if not, write to the Free Software
00017     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00018                                                                                 
00019     You may contact me via electronic mail:
00020       wjsuijle@users.sourceforge.net
00021     or snail mail:
00022       W.J. Suijlen
00023       Kraaiheidelaan 10
00024       2803 VP Gouda
00025       The Netherlands
00026 */
00027 
00033 #ifndef BSP_MESGQUEUE_H
00034 #define BSP_MESGQUEUE_H
00035 #include "bsp_exptable.h"
00036 #include <config.h>
00037 
00039 typedef struct {
00041   unsigned int recv_tag_size;
00043   unsigned int send_tag_size;
00045   unsigned int n_mesg;
00047   unsigned int accum_size;
00049   ALIGNED_TYPE * restrict head;
00050 } MessageQueue;  
00051 
00052 
00053 
00056 static inline void
00057 messageQueue_initialize (MessageQueue * restrict mesgq)
00058 {
00059   mesgq->recv_tag_size = 0;
00060   mesgq->send_tag_size = 0;
00061   mesgq->n_mesg = 0;
00062   mesgq->accum_size = 0;
00063   mesgq->head = NULL;
00064 }
00065 
00067 static inline void
00068 messageQueue_sync(MessageQueue * restrict mesgq)
00069 {
00070   mesgq->recv_tag_size = mesgq->send_tag_size;
00071   mesgq->n_mesg = 0;
00072   mesgq->accum_size = 0;
00073   mesgq->head = NULL ;
00074 }
00075 
00076 #endif

Generated on Sat Apr 8 20:12:29 2006 for BSPonMPI by  doxygen 1.4.6