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