source:
XIOS/dev/branch_openmp/src/buffer_client.hpp
@
1360
Last change on this file since 1360 was 1355, checked in by yushan, 7 years ago | |
---|---|
|
|
File size: 1012 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; |
[1331] | 15 | #pragma omp threadprivate(maxRequestSize) |
[509] | 16 | |
[1328] | 17 | CClientBuffer(ep_lib::MPI_Comm intercomm, int serverRank, StdSize bufferSize, StdSize estimatedMaxEventSize, StdSize maxBufferedEvents); |
[732] | 18 | ~CClientBuffer(); |
[509] | 19 | |
[732] | 20 | bool isBufferFree(int size); |
21 | CBufferOut* getBuffer(int size); | |
22 | bool checkBuffer(void); | |
23 | bool hasPendingRequest(void); | |
24 | int remain(void); | |
[300] | 25 | |
[732] | 26 | private: |
27 | char* buffer[2]; | |
[509] | 28 | |
[732] | 29 | int current; |
30 | int count; | |
[917] | 31 | int bufferedEvents; |
[1205] | 32 | int maxEventSize; |
[917] | 33 | const int maxBufferedEvents; |
34 | const int bufferSize; | |
[1205] | 35 | const int estimatedMaxEventSize; |
[917] | 36 | const int serverRank; |
[732] | 37 | bool pending; |
[509] | 38 | |
[1328] | 39 | ep_lib::MPI_Request request; |
[509] | 40 | |
[732] | 41 | CBufferOut* retBuffer; |
[1355] | 42 | ep_lib::MPI_Comm interComm; |
[732] | 43 | }; |
[300] | 44 | } |
45 | #endif |
Note: See TracBrowser
for help on using the repository browser.