8 #ifndef POOLINGDELIVERY_HPP_ 9 #define POOLINGDELIVERY_HPP_ 11 #include "components/ImpliedWeightsPair.hpp" 12 #include "components/PatchSize.hpp" 13 #include "delivery/BaseDelivery.hpp" 14 #include "layers/PoolingIndexLayer.hpp" 16 #include "cudakernels/CudaPoolingDeliverKernel.hpp" 73 enum AccumulateType { UNDEFINED, MAXPOOLING, SUMPOOLING, AVGPOOLING };
81 virtual void deliver()
override;
85 AccumulateType getAccumulateType()
const {
return mAccumulateType; }
102 int initialize(
char const *name,
HyPerCol *hc);
104 virtual void setObjectType()
override;
108 virtual Response::Status
109 communicateInitInfo(std::shared_ptr<CommunicateInitInfoMessage const> message)
override;
112 virtual Response::Status
113 setCudaDevice(std::shared_ptr<SetCudaDeviceMessage const> message)
override;
114 #endif // PV_USE_CUDA 116 virtual Response::Status allocateDataStructures()
override;
118 void initializeDeliverKernelArgs();
120 void allocateThreadGSyn();
122 void deliverPostsynapticPerspective();
124 void deliverPresynapticPerspective();
126 void clearGateIdxBuffer();
130 #endif // PV_USE_CUDA 134 AccumulateType mAccumulateType = UNDEFINED;
135 char *mPvpatchAccumulateTypeString =
nullptr;
136 bool mUpdateGSynFromPostPerspective =
false;
141 bool mNeedPostIndexLayer =
false;
142 char *mPostIndexLayerName =
nullptr;
145 std::vector<std::vector<float>> mThreadGSyn;
146 std::vector<std::vector<float>> mThreadGateIdxBuffer;
149 #endif // PV_USE_CUDA 155 #endif // POOLINGDELIVERY_HPP_ virtual bool isAllInputReady() override
void ioParam_needPostIndexLayer(enum ParamsIOFlag ioFlag)
virtual void ioParam_updateGSynFromPostPerspective(enum ParamsIOFlag ioFlag)
updateGSynFromPostPerspective: Specifies if the connection should push from pre or pull from post...
void ioParam_postIndexLayerName(enum ParamsIOFlag ioFlag)
virtual int ioParamsFillGroup(enum ParamsIOFlag ioFlag) override
virtual void ioParam_pvpatchAccumulateType(enum ParamsIOFlag ioFlag)
pvpatchAccumulateType: Specifies the method to accumulate synaptic input
static AccumulateType parseAccumulateTypeString(char const *typestring)