Commit 8f455934 by Francois Gygi

Use MPI_Offset in SharedFilePtr

parent 7460397f
......@@ -20,14 +20,7 @@
#include "mpi.h"
typedef int MPI_Comm;
typedef std::ofstream MPI_File;
typedef long long int MPI_Offset;
class SharedFilePtr
......@@ -35,27 +28,23 @@ class SharedFilePtr
MPI_Comm comm_;
MPI_File& fh_;
long long int offset_;
MPI_Offset offset_;
MPI_File& file(void) { return fh_; }
long long int offset(void) const { return offset_; }
MPI_Offset mpi_offset(void) const { return (MPI_Offset) offset_; }
MPI_Offset offset(void) const { return offset_; }
void sync(void)
// set all offsets to the largest offset
long long int s_off = offset_;
MPI_Offset s_off = offset_;
void set_offset(long long int off)
void set_offset(MPI_Offset off)
offset_ = off;
void advance(long long int dist)
void advance(MPI_Offset dist)
offset_ += dist;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment