PetaVision  Alpha
CopyUpdater.hpp
1 /*
2  * CopyUpdater.hpp
3  *
4  * Created on: Dec 15, 2017
5  * Author: Pete Schultz
6  */
7 
8 #ifndef COPYUPDATER_HPP_
9 #define COPYUPDATER_HPP_
10 
11 #include "components/CopyWeightsPair.hpp"
12 #include "components/Weights.hpp"
13 #include "weightupdaters/BaseWeightUpdater.hpp"
14 
15 namespace PV {
16 
18  protected:
29  virtual void ioParam_plasticityFlag(enum ParamsIOFlag ioFlag) override;
30  // end of CopyUpdater parameters
32 
33  public:
34  CopyUpdater(char const *name, HyPerCol *hc);
35 
36  virtual ~CopyUpdater() {}
37 
38  protected:
39  CopyUpdater() {}
40 
41  int initialize(char const *name, HyPerCol *hc);
42 
43  virtual void setObjectType() override;
44 
45  virtual Response::Status
46  communicateInitInfo(std::shared_ptr<CommunicateInitInfoMessage const> message) override;
47 
48  virtual Response::Status registerData(Checkpointer *checkpointer) override;
49 
50  virtual void updateState(double timestamp, double dt) override;
51 
52  protected:
53  CopyWeightsPair *mCopyWeightsPair = nullptr;
54  Weights *mOriginalWeights = nullptr;
55 
56  bool mWriteCompressedCheckpoints = false;
57  double mLastUpdateTime = 0.0;
58 };
59 
60 } // namespace PV
61 
62 #endif // COPYUPDATER_HPP_
virtual void ioParam_plasticityFlag(enum ParamsIOFlag ioFlag) override
Definition: CopyUpdater.cpp:26