PetaVision  Alpha
PresynapticPerspectiveStochasticDelivery.hpp
1 /*
2  * PresynapticPerspectiveStochasticDelivery.hpp
3  *
4  * Created on: Aug 24, 2017
5  * Author: Pete Schultz
6  */
7 
8 #ifndef PRESYNAPTICPERSPECTIVESTOCHASTICDELIVERY_HPP_
9 #define PRESYNAPTICPERSPECTIVESTOCHASTICDELIVERY_HPP_
10 
11 #include "delivery/HyPerDelivery.hpp"
12 
13 namespace PV {
14 
20  protected:
31  virtual void ioParam_receiveGpu(enum ParamsIOFlag ioFlag) override; // End of list of BaseDelivery parameters.
33 
34  public:
36 
38 
39  virtual Response::Status
40  communicateInitInfo(std::shared_ptr<CommunicateInitInfoMessage const> message) override;
41 
53  virtual void deliver() override;
54 
55  virtual void deliverUnitInput(float *recvBuffer) override;
56 
57  protected:
59 
60  int initialize(char const *name, HyPerCol *hc);
61 
62  virtual void setObjectType() override;
63 
64  virtual int ioParamsFillGroup(enum ParamsIOFlag ioFlag) override;
65 
66  virtual Response::Status allocateDataStructures() override;
67 
68  void allocateThreadGSyn();
69 
70  void allocateRandState();
71 
72  // Data members
73  protected:
74  std::vector<std::vector<float>> mThreadGSyn;
75  Random *mRandState = nullptr;
76 }; // end class PresynapticPerspectiveStochasticDelivery
77 
78 } // end namespace PV
79 
80 #endif // PRESYNAPTICPERSPECTIVESTOCHASTICDELIVERY_HPP_
virtual int ioParamsFillGroup(enum ParamsIOFlag ioFlag) override
virtual void ioParam_receiveGpu(enum ParamsIOFlag ioFlag) override
receiveGpu: PresynapticPerspectiveStochasticDelivery always sets receiveGpu to false. The receiveGpu=true case is handled by the PresynapticPerspectiveGPUDelivery class.