source: XIOS/dev/dev_trunk_omp/src/buffer_client.hpp @ 1601

Last change on this file since 1601 was 1601, checked in by yushan, 5 years ago

branch_openmp merged with trunk r1597

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