Changeset 717


Ignore:
Timestamp:
10/05/15 15:32:51 (6 years ago)
Author:
rlacroix
Message:

Fix: The "buffer_factor_size" was applied twice to the server buffers.

Also reduce the visibility of the member variables of CServerBuffer.

Location:
XIOS/trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/buffer_server.cpp

    r591 r717  
    99  CServerBuffer::CServerBuffer(StdSize buffSize) 
    1010  { 
    11     bufferSizeByClient= buffSize * 2 * CXios::bufferServerFactorSize; //::bufferSize*CXios::bufferServerFactorSize ; 
    12     size=bufferSizeByClient ; 
    13     first=0 ; 
    14     current=1 ; 
    15     end=size ; 
    16     buffer=new char[size] ;  // change later for MPI_ALLOC_MEM later 
     11    size = 2 * buffSize; 
     12    first = 0; 
     13    current = 1; 
     14    end = size; 
     15    buffer = new char[size]; // use MPI_ALLOC_MEM later? 
    1716  } 
    1817 
  • XIOS/trunk/src/buffer_server.hpp

    r591 r717  
    99namespace xios 
    1010{ 
    11  
    1211  class CServerBuffer 
    1312  { 
     13    public: 
     14      CServerBuffer(StdSize bufSize) ; 
     15      ~CServerBuffer() ; 
    1416 
    15     public: 
     17      bool isBufferFree(size_t count) ; 
     18      void* getBuffer(size_t count) ; 
     19      void freeBuffer(size_t count) ; 
    1620 
    17     CServerBuffer(StdSize bufSize) ; 
    18     ~CServerBuffer() ; 
    19     char* buffer ; 
    20  
    21     bool isBufferFree(size_t count) ; 
    22     void* getBuffer(size_t count) ; 
    23     void freeBuffer(size_t count) ; 
    24  
    25     size_t first ;   // first occupied element 
    26     size_t current ; // first free element 
    27     size_t end ; 
    28     size_t size ; 
    29     size_t bufferSizeByClient ; 
    30   } ; 
    31  
    32  
     21    private: 
     22      char* buffer; 
     23      size_t first;   // first occupied element 
     24      size_t current; // first free element 
     25      size_t end; 
     26      size_t size; 
     27  }; 
    3328} 
    3429 
Note: See TracChangeset for help on using the changeset viewer.