source: XIOS/dev/branch_yushan_merged/src/buffer_client.hpp @ 1176

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

branch merged with trunk r1130

  • 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: 953 bytes
RevLine 
[300]1#ifndef __BUFFER_CLIENT_HPP__
2#define __BUFFER_CLIENT_HPP__
3
[591]4#include "xios_spl.hpp"
[300]5#include "buffer_out.hpp"
[382]6#include "mpi.hpp"
[509]7#include "cxios.hpp"
[1134]8#ifdef _usingEP
9#include "ep_declaration.hpp"
10#endif
[300]11
[335]12namespace xios
[300]13{
14  class CClientBuffer
15  {
16    public:
[732]17      static size_t maxRequestSize;
[1134]18      #pragma omp threadprivate(maxRequestSize)
[509]19
[917]20      CClientBuffer(MPI_Comm intercomm, int serverRank, StdSize bufferSize, StdSize maxBufferedEvents);
[732]21      ~CClientBuffer();
[509]22
[732]23      bool isBufferFree(int size);
24      CBufferOut* getBuffer(int size);
25      bool checkBuffer(void);
26      bool hasPendingRequest(void);
27      int remain(void);
[300]28
[732]29    private:
30      char* buffer[2];
[509]31
[732]32      int current;
33      int count;
[917]34      int bufferedEvents;
35      const int maxBufferedEvents;
36      const int bufferSize;
37      const int serverRank;
[732]38      bool pending;
[509]39
[732]40      MPI_Request request;
[509]41
[732]42      CBufferOut* retBuffer;
[917]43      const MPI_Comm interComm;
[732]44  };
[300]45}
46#endif
Note: See TracBrowser for help on using the repository browser.