Ignore:
Timestamp:
Apr 24, 2012, 2:26:14 PM (14 years ago)
Author:
Julian Iseringhausen <isering@…>
Children:
b51c3b
Parents:
e3dbbf
Message:

Fix energy calculation.

git-svn-id: https://svn.version.fz-juelich.de/scafacos/trunk@1729 5161e1c8-67bf-11de-9fd5-51895aff932f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/comm/mpi/datatype.hpp

    re3dbbf r716da7  
    2121    _starts(0),
    2222    _rank(-1),
    23     _type(MPI_DATATYPE_NULL)
     23    _tag_send(0),
     24    _tag_recv(0),
     25    _type(MPI_DATATYPE_NULL),
     26    _alloc_buffer(false)
    2427  {}
    2528
    2629  Datatype(Index sizes, Index subsizes, Index starts, const int& rank,
    27            const int& tag_send, const int& tag_receive) :
     30           const int& tag_send, const int& tag_receive,
     31           const bool& alloc_buffer) :
    2832    _sizes(sizes),
    2933    _subsizes(subsizes),
     
    3236    _tag_send(tag_send),
    3337    _tag_recv(tag_receive),
    34     _buffer(subsizes.Product())
     38    _alloc_buffer(alloc_buffer)
    3539  {
    3640    InitDatatype();
     
    3842
    3943  Datatype(const GridIteratorSet& bounds, const Grid& grid, const int& rank,
    40            const int& tag_send, const int& tag_receive) :
     44           const int& tag_send, const int& tag_receive,
     45           const bool& alloc_buffer) :
    4146    _sizes(grid.Local().SizeTotal()),
    4247    _subsizes(bounds.Begin().GetEnd() - bounds.Begin().GetBegin()),
     
    4550    _tag_send(tag_send),
    4651    _tag_recv(tag_receive),
    47     _buffer(_subsizes.Product())
     52    _alloc_buffer(alloc_buffer)
    4853  {
    4954    InitDatatype();
     
    5762    _tag_send(other._tag_send),
    5863    _tag_recv(other._tag_recv),
    59     _buffer(_subsizes.Product())
     64    _alloc_buffer(other._alloc_buffer)
    6065  {
    6166    InitDatatype();
     
    8489  const MPI_Datatype& Type() const {return _type;}
    8590
     91  std::vector<vmg_float>& Buffer() {return _buffer;}
    8692  const std::vector<vmg_float>& Buffer() const {return _buffer;}
    8793
     
    111117  MPI_Datatype _type;
    112118  std::vector<vmg_float> _buffer;
     119  bool _alloc_buffer;
    113120};
    114121
Note: See TracChangeset for help on using the changeset viewer.