PetaVision  Alpha
PtwiseProductLayer.hpp
1 /*
2  * PtwiseProductLayer.hpp
3  *
4  * The output V is the pointwise product of GSynExc and GSynInh
5  *
6  * "Exc" and "Inh" are really misnomers for this class, but the
7  * terminology is inherited from the base class.
8  *
9  * Created on: Apr 25, 2011
10  * Author: peteschultz
11  */
12 
13 #ifndef PTWISEPRODUCTLAYER_HPP_
14 #define PTWISEPRODUCTLAYER_HPP_
15 
16 #include "ANNLayer.hpp"
17 
18 namespace PV {
19 
20 class PtwiseProductLayer : public ANNLayer {
21  public:
22  PtwiseProductLayer(const char *name, HyPerCol *hc);
23  virtual ~PtwiseProductLayer();
24 
25  virtual Response::Status allocateDataStructures() override;
26  virtual Response::Status updateState(double timef, double dt) override;
27 
28  protected:
30  int initialize(const char *name, HyPerCol *hc);
31 
32  int updateState(
33  double timef,
34  double dt,
35  const PVLayerLoc *loc,
36  float *A,
37  float *V,
38  int num_channels,
39  float *gSynHead);
40 
41  private:
42  int initialize_base();
43 }; // end class PtwiseProductLayer
44 
45 } // end namespace PV
46 
47 #endif /* PTWISEPRODUCTLAYER_HPP_ */