PetaVision  Alpha
CopyWeightsPair.hpp
1 /*
2  * CopyWeightsPair.hpp
3  *
4  * Created on: Dec 15, 2017
5  * Author: Pete Schultz
6  */
7 
8 #ifndef COPYWEIGHTSPAIR_HPP_
9 #define COPYWEIGHTSPAIR_HPP_
10 
11 #include "components/WeightsPair.hpp"
12 #include "connections/HyPerConn.hpp"
13 
14 namespace PV {
15 
24 class CopyWeightsPair : public WeightsPair {
25  public:
26  CopyWeightsPair(char const *name, HyPerCol *hc);
27 
28  virtual ~CopyWeightsPair();
29 
35  void synchronizeMarginsPre();
36 
43 
47  void copy();
48 
49  WeightsPair const *getOriginalWeightsPair() const { return mOriginalWeightsPair; }
50 
51  protected:
52  CopyWeightsPair() {}
53 
54  int initialize(char const *name, HyPerCol *hc);
55 
56  virtual void setObjectType() override;
57 
58  int ioParamsFillGroup(enum ParamsIOFlag ioFlag) override;
59 
60  virtual Response::Status
61  communicateInitInfo(std::shared_ptr<CommunicateInitInfoMessage const> message) override;
62 
63  virtual void createPreWeights(std::string const &weightsName) override;
64  virtual void createPostWeights(std::string const &weightsName) override;
65 
66  protected:
67  HyPerConn *mOriginalConn = nullptr;
68  WeightsPair *mOriginalWeightsPair = nullptr;
69 };
70 
71 } // namespace PV
72 
73 #endif // COPYWEIGHTSPAIR_HPP_
virtual void createPreWeights(std::string const &weightsName) override
virtual void createPostWeights(std::string const &weightsName) override
int ioParamsFillGroup(enum ParamsIOFlag ioFlag) override