MPIExchangeBlocksInfo.cpp

Go to the documentation of this file.
00001 #include "MPIExchangeBlocksInfo.h"
00002 
00003 MPIExchangeBlocksInfo::MPIExchangeBlocksInfo(int numBlocks)
00004                                                                         : numBlocks(numBlocks)
00005 {       
00006         counts = new int[numBlocks];
00007         displs = new int[numBlocks];
00008         datatypes = new MPI::Datatype[numBlocks];
00009         buffers = new void *[numBlocks];
00010 }
00011 
00012 MPIExchangeBlocksInfo::~MPIExchangeBlocksInfo()
00013 {
00014         delete [] counts;
00015         delete [] displs;
00016         delete [] datatypes;    
00017         delete [] buffers;
00018 }
00019 
00020 
00021 MPIMessageSpec MPIExchangeBlocksInfo::getMsgSpec(int buf_idx)
00022 {
00023         MPIMessageSpec msgSpec;
00024         msgSpec.count =&(counts[buf_idx]);
00025         msgSpec.displacement = &(displs[buf_idx]);
00026         msgSpec.buffer = &(buffers[buf_idx]);
00027         msgSpec.datatype = &(datatypes[buf_idx]);
00028         
00029         return msgSpec;         
00030 }
00031 

Generated on Wed Jul 9 16:34:37 2008 for PCSIM by  doxygen 1.5.5