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

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

modif for Curie, CurrContext?->CurrContext_ptr in object_factory and group_factory

  • 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: 955 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      //#pragma omp threadprivate(maxRequestSize)
19
20      CClientBuffer(MPI_Comm intercomm, int serverRank, StdSize bufferSize, StdSize maxBufferedEvents);
21      ~CClientBuffer();
22
23      bool isBufferFree(int size);
24      CBufferOut* getBuffer(int size);
25      bool checkBuffer(void);
26      bool hasPendingRequest(void);
27      int remain(void);
28
29    private:
30      char* buffer[2];
31
32      int current;
33      int count;
34      int bufferedEvents;
35      const int maxBufferedEvents;
36      const int bufferSize;
37      const int serverRank;
38      bool pending;
39
40      MPI_Request request;
41
42      CBufferOut* retBuffer;
43      const MPI_Comm interComm;
44  };
45}
46#endif
Note: See TracBrowser for help on using the repository browser.