source: XIOS/dev/branch_openmp/src/buffer_client.hpp @ 1355

Last change on this file since 1355 was 1355, checked in by yushan, 6 years ago

unify MPI_Comm type

  • 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: 1012 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
9namespace xios
10{
11  class CClientBuffer
12  {
13    public:
14      static size_t maxRequestSize;
15      #pragma omp threadprivate(maxRequestSize)
16
17      CClientBuffer(ep_lib::MPI_Comm intercomm, int serverRank, StdSize bufferSize, StdSize estimatedMaxEventSize, StdSize maxBufferedEvents);
18      ~CClientBuffer();
19
20      bool isBufferFree(int size);
21      CBufferOut* getBuffer(int size);
22      bool checkBuffer(void);
23      bool hasPendingRequest(void);
24      int remain(void);
25
26    private:
27      char* buffer[2];
28
29      int current;
30      int count;
31      int bufferedEvents;
32      int maxEventSize;
33      const int maxBufferedEvents;
34      const int bufferSize;
35      const int estimatedMaxEventSize;
36      const int serverRank;
37      bool pending;
38
39      ep_lib::MPI_Request request;
40
41      CBufferOut* retBuffer;
42      ep_lib::MPI_Comm interComm;
43  };
44}
45#endif
Note: See TracBrowser for help on using the repository browser.