PetaVision  Alpha
CheckpointEntryRandState.hpp
1 /*
2  * CheckpointEntryRandState.hpp
3  *
4  * Created on Oct 6, 2016
5  * Author: Pete Schultz
6  */
7 
8 #ifndef CHECKPOINTENTRYRANDSTATE_HPP_
9 #define CHECKPOINTENTRYRANDSTATE_HPP_
10 
11 #include "CheckpointEntry.hpp"
12 #include "include/pv_types.h"
13 
14 namespace PV {
15 
17  public:
19  std::string const &dataName,
20  MPIBlock const *mpiBlock,
21  taus_uint4 *dataPointer,
22  PVLayerLoc *layerLoc,
23  bool extendedFlag)
24  : CheckpointEntry(dataName, mpiBlock),
25  mDataPointer(dataPointer),
26  mLayerLoc(layerLoc),
27  mExtendedFlag(extendedFlag) {}
29  std::string const &objName,
30  std::string const &dataName,
31  MPIBlock const *mpiBlock,
32  taus_uint4 *dataPointer,
33  PVLayerLoc const *layerLoc,
34  bool extendedFlag)
35  : CheckpointEntry(objName, dataName, mpiBlock),
36  mDataPointer(dataPointer),
37  mLayerLoc(layerLoc),
38  mExtendedFlag(extendedFlag) {}
39  virtual void write(std::string const &checkpointDirectory, double simTime, bool verifyWritesFlag)
40  const override;
41  virtual void read(std::string const &checkpointDirectory, double *simTimePtr) const override;
42  virtual void remove(std::string const &checkpointDirectory) const override;
43 
44  private:
45  taus_uint4 *mDataPointer;
46  PVLayerLoc const *mLayerLoc;
47  bool mExtendedFlag;
48 };
49 
50 } // namespace PV
51 
52 #endif // CHECKPOINTENTRYRANDSTATE_HPP_