source: XIOS/dev/branch_yushan/src/buffer_client.hpp @ 1037

Last change on this file since 1037 was 1037, checked in by yushan, 7 years ago

initialize the branch

  • Property copyright set to
    Software name : XIOS (Xml I/O Server)
    http://forge.ipsl.jussieu.fr/ioserver
    Creation date : January 2009
    Licence : CeCCIL version2
    see license file in root directory : Licence_CeCILL_V2-en.txt
    or http://www.cecill.info/licences/Licence_CeCILL_V2-en.html
    Holder : CEA/LSCE (Laboratoire des Sciences du CLimat et de l'Environnement)
    CNRS/IPSL (Institut Pierre Simon Laplace)
    Project Manager : Yann Meurdesoif
    yann.meurdesoif@cea.fr
File size: 905 bytes
Line 
1#ifndef __BUFFER_CLIENT_HPP__
2#define __BUFFER_CLIENT_HPP__
3
4#include "xios_spl.hpp"
5#include "buffer_out.hpp"
6#include "mpi.hpp"
7#include "cxios.hpp"
8#ifdef _usingEP
9#include "ep_declaration.hpp"
10#endif
11
12namespace xios
13{
14  class CClientBuffer
15  {
16    public:
17      static size_t maxRequestSize;
18
19      CClientBuffer(MPI_Comm intercomm, int serverRank, StdSize bufferSize, StdSize maxBufferedEvents);
20      ~CClientBuffer();
21
22      bool isBufferFree(int size);
23      CBufferOut* getBuffer(int size);
24      bool checkBuffer(void);
25      bool hasPendingRequest(void);
26      int remain(void);
27
28    private:
29      char* buffer[2];
30
31      int current;
32      int count;
33      int bufferedEvents;
34      const int maxBufferedEvents;
35      const int bufferSize;
36      const int serverRank;
37      bool pending;
38
39      MPI_Request request;
40
41      CBufferOut* retBuffer;
42      const MPI_Comm interComm;
43  };
44}
45#endif
Note: See TracBrowser for help on using the repository browser.