PetaVision  Alpha
PV::HyPerCol Class Reference
Inheritance diagram for PV::HyPerCol:
PV::Subject PV::Observer

HyPerCol Parameters

List of parameters needed from the HyPerCol class

std::vector< BaseConnection * > mConnections
std::vector< BaseProbe * > mBaseProbes
ObserverTable mObjectHierarchy
bool mErrorOnNotANumber
bool mCheckpointReadFlag
bool mReadyFlag
bool mParamsProcessedFlag
bool mWriteTimeScaleFieldnames
bool mWriteProgressToErr
bool mOwnsCommunicator
bool mWriteTimescales
char * mName
char * mPrintParamsFilename
std::vector< ColProbe * > mColProbes
double mStartTime
double mSimTime
double mStopTime
double mDeltaTime
double mProgressInterval
double mNextProgressTime
std::vector< HyPerLayer * > mLayers
int mNumPhases
int mNumXGlobal
int mNumYGlobal
int mNumBatch
int mNumBatchGlobal
int mOrigStdOut
int mOrigStdErr
int mNumThreads
int * mLayerStatus
int * mConnectionStatus
CheckpointermCheckpointer = nullptr
long int mInitialStep
long int mCurrentStep
long int mFinalStep
std::vector< NormalizeBase * > mNormalizers
size_t mLayerArraySize
size_t mConnectionArraySize
size_t mNormalizerArraySize
std::ofstream mTimeScaleStream
std::vector< HyPerLayer * > mRecvLayerBuffer
std::vector< HyPerLayer * > mUpdateLayerBufferGpu
std::vector< HyPerLayer * > mUpdateLayerBuffer
std::vector< Timer * > mPhaseRecvTimers
unsigned int mRandomSeed
std::vector< BaseConnection * > mGpuGroupConns
int mNumGpuGroup
PVCuda::CudaDevice * mCudaDevice
virtual void ioParam_startTime (enum ParamsIOFlag ioFlag)
 mStartTime: The set starting time for the run
virtual void ioParam_stopTime (enum ParamsIOFlag ioFlag)
 mStopTime: The set stopping time for the run
virtual void ioParam_dt (enum ParamsIOFlag ioFlag)
 dt: The default delta time to use. More...
virtual void ioParam_progressInterval (enum ParamsIOFlag ioFlag)
 mProgressInterval: Specifies how often a progress report prints out More...
virtual void ioParam_writeProgressToErr (enum ParamsIOFlag ioFlag)
 writeProgressToErr: Whether to print timestep progress to the error stream instead of the output stream
virtual void ioParam_printParamsFilename (enum ParamsIOFlag ioFlag)
 mPrintParamsFilename: Specifies the output mParams filename. More...
virtual void ioParam_randomSeed (enum ParamsIOFlag ioFlag)
 randomSeed: The seed for the random number generator for reproducability
virtual void ioParam_nx (enum ParamsIOFlag ioFlag)
 nx: Specifies the size of the column
virtual void ioParam_ny (enum ParamsIOFlag ioFlag)
 ny: Specifies the size of the column
virtual void ioParam_nBatch (enum ParamsIOFlag ioFlag)
 ny: Specifies the batch size of the column
virtual void ioParam_errorOnNotANumber (enum ParamsIOFlag ioFlag)
 errorOnNotANumber: Specifies if the run should check on each timestep for nans in activity.
int getAutoGPUDevice ()
void setDescription ()
int initialize_base ()
int initialize (const char *name, PV_Init *initObj)
int ioParams (enum ParamsIOFlag ioFlag)
int ioParamsFillGroup (enum ParamsIOFlag ioFlag)
int checkDirExists (const char *dirname, struct stat *pathstat)
void notify (std::vector< std::shared_ptr< BaseMessage const >> messages)
void notify (std::shared_ptr< BaseMessage const > message)
int respondPrepareCheckpointWrite (PrepareCheckpointWriteMessage const *message)
void initializeCUDA (std::string const &in_device)
int finalizeCUDA ()
int normalizeWeights ()
int outputParams (char const *path)
int outputParamsHeadComments (FileStream *fileStream, char const *commentToken)
int calcTimeScaleTrue ()
int setNumThreads (bool printMessagesFlag)
 HyPerCol (const char *name, PV_Init *initObj)
virtual ~HyPerCol ()
virtual int respond (std::shared_ptr< BaseMessage const > message) override
BaseConnectiongetConnFromName (const char *connectionName)
BaseProbegetBaseProbeFromName (const char *probeName)
ColProbegetColProbeFromName (const char *probeName)
HyPerLayergetLayerFromName (const char *layerName)
void addObject (BaseObject *obj)
int addBaseProbe (BaseProbe *p)
int addConnection (BaseConnection *conn)
int addNormalizer (NormalizeBase *normalizer)
int addLayer (HyPerLayer *l)
void advanceTimeLoop (Clock &runClock, int const runClockStartingStep)
int advanceTime (double time)
void nonblockingLayerUpdate (std::shared_ptr< LayerRecvSynapticInputMessage const > recvMessage, std::shared_ptr< LayerUpdateStateMessage const > updateMessage)
int insertProbe (ColProbe *p)
int outputState (double time)
int processParams (char const *path)
int ioParamsFinishGroup (enum ParamsIOFlag)
int ioParamsStartGroup (enum ParamsIOFlag ioFlag, const char *group_name)
void allocateColumn ()
int run ()
int run (double mStartTime, double mStopTime, double dt)
NormalizeBasegetNormalizerFromName (const char *normalizerName)
void addGpuGroup (BaseConnection *conn, int gpuGroupIdx)
BaseConnectiongetConnection (int which)
BaseProbegetBaseProbe (int which)
bool getVerifyWrites ()
bool getCheckpointWriteFlag () const
char const * getLastCheckpointDir () const
bool getWriteTimescales () const
const char * getName ()
const char * getOutputPath ()
const char * getPrintParamsFilename () const
ColProbegetColProbe (int which)
double getDeltaTime () const
double simulationTime () const
double getStartTime () const
double getStopTime () const
HyPerLayergetLayer (int which)
int globalRank ()
int columnId ()
int getNxGlobal ()
int getNyGlobal ()
int getNBatch ()
int getNBatchGlobal ()
int getNumThreads () const
int numberOfLayers () const
int numberOfConnections () const
int numberOfNormalizers () const
int numberOfProbes () const
int numberOfBaseProbes () const
int numberOfBorderRegions () const
int numberOfColumns ()
int numberOfGlobalColumns ()
int commColumn ()
int commRow ()
int commBatch ()
int numCommColumns ()
int numCommRows ()
int numCommBatches ()
CommunicatorgetCommunicator () const
NormalizeBasegetNormalizer (int which)
PV_InitgetPV_InitObj () const
FileStreamgetPrintParamsStream () const
PVParamsparameters () const
long int getInitialStep () const
long int getFinalStep () const
unsigned int getRandomSeed ()
unsigned int seedRandomFromWallClock ()
std::map< std::string, Observer * > * copyObjectMap ()
BaseConnectiongetGpuGroupConn (int gpuGroupIdx)
PVCuda::CudaDevice * getDevice ()

Public Member Functions

virtual void addObserver (Observer *observer, BaseMessage const &message)

Protected Member Functions

void notify (ObserverTable const &table, std::vector< std::shared_ptr< BaseMessage const >> messages, bool printFlag)
void notify (ObserverTable const &table, std::shared_ptr< BaseMessage const > message, bool printFlag)

Private Member Functions

std::string const & getDescription () const
char const * getDescription_c () const

Private Attributes

std::string description

Detailed Description

Definition at line 49 of file HyPerCol.hpp.

Member Function Documentation

void PV::HyPerCol::addObject ( BaseObject obj)

Adds an object (layer, connection, etc.) to the hierarchy. Exits with an error if adding the object failed. The usual reason for failing to add the object is that the name is the same as that of an earlier added object. Currently, addLayer, addConnection, and addBaseProbe call addObject; therefore it is usually not necessary to call addObject.

Definition at line 1276 of file HyPerCol.cpp.

void PV::HyPerCol::allocateColumn ( )

This function tells each added object to perform the tasks necessary before calling advanceTimeLoop. Specifically, if mReadyFlag is not set, performs the CommunicateInitInfo, AllocateDataStructures, and RegisterData stages, and outputs the generated params file, and sets the mReadyFlag If mReadyFlag is set, does nothing, so that the above stages are not performed more than once. This method is called by the run() method.

Definition at line 392 of file HyPerCol.cpp.

void PV::HyPerCol::ioParam_dt ( enum ParamsIOFlag  ioFlag)

dt: The default delta time to use.

This dt is used for advancing the run time.

Definition at line 272 of file HyPerCol.cpp.

void PV::HyPerCol::ioParam_printParamsFilename ( enum ParamsIOFlag  ioFlag)

mPrintParamsFilename: Specifies the output mParams filename.

Defaults to pv.params. Relative paths are relative to the OutputPath.

Definition at line 304 of file HyPerCol.cpp.

void PV::HyPerCol::ioParam_progressInterval ( enum ParamsIOFlag  ioFlag)

mProgressInterval: Specifies how often a progress report prints out

Units of dt

Definition at line 280 of file HyPerCol.cpp.

int PV::HyPerCol::setNumThreads ( bool  printMessagesFlag)

Sets the mNumThreads member variable based on whether PV_USE_OPENMP is set and the NumThreads argument in the ConfigFile (-t option if using the command line). If printMessagesFlag is true, it may print to the output and/or error stream. If printMessagesFlag is false, these messages are suppressed.

Definition at line 546 of file HyPerCol.cpp.

The documentation for this class was generated from the following files: