source:
XIOS/trunk/src/buffer_client.hpp
@
1984
Last change on this file since 1984 was 1639, checked in by yushan, 6 years ago | |
---|---|
|
|
File size: 985 bytes |
Rev | Line | |
---|---|---|
[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] | 9 | namespace xios |
[300] | 10 | { |
11 | class CClientBuffer | |
12 | { | |
13 | public: | |
[732] | 14 | static size_t maxRequestSize; |
[509] | 15 | |
[1639] | 16 | CClientBuffer(MPI_Comm intercomm, int serverRank, StdSize bufferSize, StdSize estimatedMaxEventSize, StdSize maxBufferedEvents); |
[732] | 17 | ~CClientBuffer(); |
[509] | 18 | |
[1227] | 19 | bool isBufferFree(StdSize size); |
20 | CBufferOut* getBuffer(StdSize size); | |
[732] | 21 | bool checkBuffer(void); |
22 | bool hasPendingRequest(void); | |
[1227] | 23 | StdSize remain(void); |
[300] | 24 | |
[732] | 25 | private: |
26 | char* buffer[2]; | |
[509] | 27 | |
[732] | 28 | int current; |
[1227] | 29 | |
30 | StdSize count; | |
31 | StdSize bufferedEvents; | |
32 | StdSize maxEventSize; | |
33 | const StdSize maxBufferedEvents; | |
34 | const StdSize bufferSize; | |
35 | const StdSize estimatedMaxEventSize; | |
36 | ||
37 | ||
[917] | 38 | const int serverRank; |
[732] | 39 | bool pending; |
[509] | 40 | |
[1639] | 41 | MPI_Request request; |
[509] | 42 | |
[732] | 43 | CBufferOut* retBuffer; |
[1639] | 44 | const MPI_Comm interComm; |
[732] | 45 | }; |
[300] | 46 | } |
47 | #endif |
Note: See TracBrowser
for help on using the repository browser.