13 #include "cMakeHeader.h" 14 #include "observerpattern/BaseMessage.hpp" 15 #include "observerpattern/Observer.hpp" 16 #include "utils/Timer.hpp" 21 #include "arch/cuda/CudaDevice.hpp" 29 setMessageType(
"CommunicateInitInfo");
30 mHierarchy = hierarchy;
33 T *lookup(std::string
const &name)
const {
34 auto search = mHierarchy.find(name);
35 if (search == mHierarchy.end()) {
39 T *result =
dynamic_cast<T *
>(search->second);
43 std::map<std::string, Observer *> mHierarchy;
50 setMessageType(
"SetCudaDevice");
53 PVCuda::CudaDevice *mCudaDevice =
nullptr;
65 setMessageType(
"LayerSetPhase");
68 int *mMaxPhase =
nullptr;
111 setMessageType(
"ConnectionUpdate");
128 setMessageType(
"ConnectionFinalizeUpdate");
140 setMessageType(
"ConnectionOutput");
163 bool *someLayerIsPending,
164 bool *someLayerHasActed) {
165 setMessageType(
"LayerRecvSynapticInput");
169 mRecvOnGpuFlag = recvOnGpuFlag;
170 #endif // PV_USE_CUDA 173 mSomeLayerIsPending = someLayerIsPending;
174 mSomeLayerHasActed = someLayerHasActed;
180 #endif // PV_USE_CUDA 184 bool *mSomeLayerIsPending;
185 bool *mSomeLayerHasActed;
194 bool updateOnGpuFlag,
199 bool *someLayerIsPending,
200 bool *someLayerHasActed) {
201 setMessageType(
"LayerUpdateState");
204 mRecvOnGpuFlag = recvOnGpuFlag;
205 mUpdateOnGpuFlag = updateOnGpuFlag;
206 #endif // PV_USE_CUDA 209 mSomeLayerIsPending = someLayerIsPending;
210 mSomeLayerHasActed = someLayerHasActed;
215 bool mUpdateOnGpuFlag;
216 #endif // PV_USE_CUDA 220 bool *mSomeLayerIsPending;
221 bool *mSomeLayerHasActed;
228 setMessageType(
"LayerCopyFromGpu");
235 #endif // PV_USE_CUDA 240 setMessageType(
"LayerAdvanceDataStore");
249 setMessageType(
"LayerPublish");
264 setMessageType(
"LayerOutputState");
275 setMessageType(
"LayerCheckNotANumber");
284 setMessageType(
"ColProbeOutputState");
286 mDeltaTime = deltaTime;