PetaVision  Alpha
 All Data Structures Namespaces Functions Variables
PV::IdentConn Class Reference
Inheritance diagram for PV::IdentConn:
PV::HyPerConn PV::BaseConnection PV::BaseObject PV::RescaleConn

BaseConnection Parameters

List of parameters needed from the BaseConnection class

int getDelayArraySize ()
 
virtual void ioParam_preLayerName (enum ParamsIOFlag ioFlag)
 preLayerName: Specifies the connection's pre layer More...
 
virtual void ioParam_postLayerName (enum ParamsIOFlag ioFlag)
 postLayerName: Specifies the connection's post layer More...
 
virtual void ioParam_delay (enum ParamsIOFlag ioFlag)
 delay: Specifies delay(s) which the post layer will receive data More...
 
virtual int initializeDelays (const float *fDelayArray, int size)
 
int connId
 
char * preLayerName
 
char * postLayerName
 
HyPerLayerpre
 
HyPerLayerpost
 
ChannelType channel
 
int numAxonalArborLists
 
bool plasticityFlag
 
bool convertRateToSpikeCount
 
bool receiveGpu
 
bool initializeFromCheckpointFlag
 
BaseConnectionProbe ** probes
 
int numProbes
 
bool initInfoCommunicatedFlag
 
bool dataStructuresAllocatedFlag
 
bool initialValuesSetFlag
 
static int decodeChannel (int channel_code, ChannelType *channel_type)
 

HyPerConn Parameters

List of parameters needed from the HyPerConn class

virtual void ioParam_channelCode (enum ParamsIOFlag ioFlag)
 channelCode: Specifies which channel in the post layer this connection is attached to More...
 
virtual void ioParam_triggerFlag (enum ParamsIOFlag ioFlag)
 triggerFlag: If plasticity flag is set, allows weight updates to be triggered off layers
 
virtual void ioParam_triggerLayerName (enum ParamsIOFlag ioFlag)
 triggerLayerName: If trigger flag is set, specifies the layer to trigger off of
 
virtual void ioParam_triggerOffset (enum ParamsIOFlag ioFlag)
 triggerOffset: If trigger flag is set, triggers <triggerOffset> timesteps before target trigger More...
 
virtual void ioParam_initialWriteTime (enum ParamsIOFlag ioFlag)
 initialWriteTime: If writeStep is >= 0, sets the initial write time of the connection.
 
virtual void ioParam_nxpShrunken (enum ParamsIOFlag ioFlag)
 nxpShrunken: Specifies a shrunken patch size (deprecated)
 
virtual void ioParam_nypShrunken (enum ParamsIOFlag ioFlag)
 nypShrunken: Specifies a shrunken patch size (deprecated)
 
virtual void ioParam_shrinkPatchesThresh (enum ParamsIOFlag ioFlag)
 shrinkPatchesThresh: If shrinkPatches flag is set, specifies threshold to consider weight as zero
 
virtual void ioParam_dWMax (enum ParamsIOFlag ioFlag)
 dWMax: If plasticity flag is set, specifies the learning rate of the weight updates.
 
virtual void ioParam_normalizeGroupName (enum ParamsIOFlag ioFlag)
 groupNormalizerName: If normalizeMethod is set to "normalizeGroup", sets the name of the normalization group for this connection.
 
virtual void ioParam_normalizeDw (enum ParamsIOFlag ioFlag)
 normalizeDw: Specifies if this connection is averaging gradients (true) or summing them (false)
 
virtual void ioParam_useMask (enum ParamsIOFlag ioFlag)
 useMask: Specifies if this connection is using a post mask for learning
 
virtual void ioParam_maskLayerName (enum ParamsIOFlag ioFlag)
 maskLayerName: If using mask, specifies the layer to use as a binary mask layer
 
virtual void ioParam_maskFeatureIdx (enum ParamsIOFlag ioFlag)
 maskLayerName: If using mask, specifies which feature dim to use for the mask More...
 
virtual void ioParam_gpuGroupIdx (enum ParamsIOFlag ioFlag)
 gpuGroupIdx: All connections in the same group uses the same GPU memory for weights More...
 
virtual void ioParam_preDataLocal (enum ParamsIOFlag ioFlag)
 preDataLocal: If not using CUDNN, specifies if preData should be in local memory. This parameter is ignored if PetaVision was compiled without GPU acceleration.
 
virtual void ioParam_numXLocal (enum ParamsIOFlag ioFlag)
 numXLocal: Specifies number of local threads to run in x direction More...
 
virtual void ioParam_numYLocal (enum ParamsIOFlag ioFlag)
 numYLocal: Specifies number of local threads to run in xydirection More...
 
virtual void ioParam_numFLocal (enum ParamsIOFlag ioFlag)
 numYLocal: Specifies number of local threads to run in xydirection More...
 
virtual void ioParam_weightSparsity (enum ParamsIOFlag ioFlag)
 weightSparsity: Specifies what percentage of weights will be ignored. Default is 0.0
 

Public Types

enum  AccumulateType { UNDEFINED, CONVOLVE, STOCHASTIC }
 

Public Member Functions

 IdentConn (const char *name, HyPerCol *hc)
 
virtual void addClone (PlasticCloneConn *conn)
 
virtual int allocateDataStructures ()
 
virtual int communicateInitInfo ()
 
virtual double computeNewWeightUpdateTime (double time, double currentUpdateTime)
 
PVPatch *** convertPreSynapticWeights (double time)
 
virtual int dataIndexToUnitCellIndex (int dataIndex, int *kx=NULL, int *ky=NULL, int *kf=NULL)
 
virtual int deliver ()
 
virtual void deliverOnePostNeuronActivity (int arborID, int kTargetExt, int inSy, float *activityStartBuf, pvdata_t *gSynPatchPos, float dt_factor, taus_uint4 *rngPtr)
 
virtual void deliverOnePreNeuronActivity (int patchIndex, int arbor, pvadata_t a, pvgsyndata_t *postBufferStart, void *auxPtr)
 
virtual int finalizeUpdate (double timed, double dt)
 
int fPatchSize ()
 
int fPatchStride ()
 
int fPostPatchSize ()
 
long * get_activations (int arborId)
 
long * get_activations (int arborId, int patchIndex)
 
long * get_activationsHead (int arborId, int dataIndex)
 
pvwdata_t * get_dwData (int arborId, int patchIndex)
 
pvwdata_t * get_dwDataHead (int arborId, int dataIndex)
 
pvwdata_t * get_dwDataStart (int arborId)
 
pvwdata_t * get_wData (int arborId, int patchIndex)
 
pvwdata_t * get_wDataHead (int arborId, int dataIndex)
 
pvwdata_t * get_wDataStart (int arborId)
 
bool getAllocDeviceWeights ()
 
bool getAllocPostDeviceWeights ()
 
size_t getAPostOffset (int kPre, int arborId)
 
ChannelType getChannel ()
 
int getConnectionId ()
 
bool getConvertRateToSpikeCount ()
 
bool getDataStructuresAllocatedFlag ()
 
int getDelay (int arbor)
 
PVCuda::CudaBuffer * getDeviceGSynPatchStart ()
 
PVCuda::CudaBuffer * getDevicePatches ()
 
virtual PVCuda::CudaBuffer * getDeviceWData ()
 
float getDWMax ()
 
size_t getGSynPatchStart (int kPre, int arborId)
 
size_t ** getGSynPatchStart ()
 
bool getInitialValuesSetFlag ()
 
bool getInitInfoCommunicatedFlag ()
 
bool getKeepKernelsSynchronized ()
 
char const * getKeyword () const
 
PVCuda::CudaRecvPostgetKrRecvPost ()
 
PVCuda::CudaRecvPregetKrRecvPre ()
 
double getLastUpdateTime ()
 
char const * getName () const
 
bool getNormalizeDwFlag ()
 
NormalizeBasegetNormalizer ()
 
int getNumDataPatches ()
 
virtual int getNumFLocal ()
 
int getNumProbes ()
 
int getNumWeightPatches ()
 
virtual int getNumXLocal ()
 
virtual int getNumYLocal ()
 
HyPerColgetParent () const
 
virtual int * getPatchToDataLUT ()
 
pvwdata_t * getPlasticIncr (int kPre, int arborId)
 
virtual PVLayerCubegetPlasticityDecrement ()
 
bool getPlasticityFlag ()
 
HyPerLayergetPost ()
 
const PVPatchStridesgetPostExtStrides ()
 
const char * getPostLayerName ()
 
const PVPatchStridesgetPostNonextStrides ()
 
virtual long * getPostToPreActivity ()
 
HyPerLayergetPre ()
 
bool getPreDataLocal ()
 
const char * getPreLayerName ()
 
BaseConnectionProbegetProbe (int i)
 
AccumulateType getPvpatchAccumulateType ()
 
taus_uint4getRandState (int index)
 
bool getReceiveGpu ()
 
bool getSelfFlag ()
 
bool getShrinkPatches_flag ()
 
bool getUpdateGSynFromPostPerspective ()
 
InitWeightsgetWeightInitializer ()
 
virtual PVPatch * getWeights (int kPre, int arborId)
 
double getWeightUpdatePeriod ()
 
double getWeightUpdateTime ()
 
float getWMax ()
 
float getWMin ()
 
pvwdata_t * getWPostData (int arbor, int patchIndex)
 
pvwdata_t * getWPostData (int arbor)
 
PVPatch * getWPostPatches (int arbor, int patchIndex)
 
int initializeState ()
 
virtual void initPatchToDataLUT ()
 
virtual int insertProbe (BaseConnectionProbe *p)
 
int ioParams (enum ParamsIOFlag ioFlag)
 
virtual float maxWeight (int arborId=0)
 
virtual float minWeight (int arborId=0)
 
virtual bool needUpdate (double time, double dt)
 
int numberOfAxonalArborLists ()
 
int outputProbeParams ()
 
virtual int outputState (double time, bool last=false)
 
virtual int patchIndexToDataIndex (int patchIndex, int *kx=NULL, int *ky=NULL, int *kf=NULL)
 
virtual int patchToDataLUT (int patchIndex)
 
PVPatch **** point2PreSynapticWeights ()
 
HyPerLayerpostSynapticLayer ()
 
int postSynapticPatchHead (int kPre, int *kxPostOut, int *kyPostOut, int *kfPostOut, int *dxOut, int *dyOut, int *nxpOut, int *nypOut)
 
HyPerLayerpreSynapticLayer ()
 
int preSynapticPatchHead (int kxPost, int kyPost, int kfPost, int *kxPre, int *kyPre)
 
virtual void setAllocDeviceWeights ()
 
virtual void setAllocPostDeviceWeights ()
 
void setDataStructuresAllocatedFlag ()
 
void setDeviceWData (PVCuda::CudaBuffer *inBuf)
 
void setInitialValuesSetFlag ()
 
void setInitInfoCommunicatedFlag ()
 
void setNeedAllocPostWeights (bool inBool)
 
void setNeedPost (bool inBool)
 
int shrinkPatch (int kExt, int arborId)
 
virtual int shrinkPatches (int arborId)
 
int sumWeights (int nx, int ny, int offset, pvwdata_t *dataStart, double *sum, double *sum2, float *maxVal)
 
virtual int updateInd_dW (int arbor_ID, int batch_ID, int kExt)
 
int updateState (double time, double dt)
 
virtual int updateWeights (int axonID)
 
bool usingSharedWeights ()
 
PVPatch ** weights (int arborId=0)
 
virtual int writePostSynapticWeights (double time, bool last)
 
virtual int writeTextWeights (const char *filename, int k)
 
virtual int writeTextWeightsExtra (OutStream *pvstream, int k, int arborID)
 
virtual int writeTimers (std::ostream &stream)
 
virtual int writeWeights (double timed, bool last=false)
 
virtual int writeWeights (const char *filename)
 
virtual int writeWeights (PVPatch ***patches, pvwdata_t **dataStart, int numPatches, const char *filename, double timef, bool compressWeights, bool last)
 
int xPatchSize ()
 
int xPatchStride ()
 
int xPostPatchSize ()
 
int yPatchSize ()
 
int yPatchStride ()
 
int yPostPatchSize ()
 

Static Public Member Functions

static PVPatch ** createPatches (int nPatches, int nx, int ny)
 
static int deletePatches (PVPatch **patchpointers)
 
static void pvpatch_adjust (PVPatch *p, int sx, int sy, int nxNew, int nyNew, int dx, int dy)
 
static void pvpatch_init (PVPatch *p, int nx, int ny)
 

Data Fields

int(* accumulateFunctionFromPostPointer )(int kPreRes, int nk, float *v, float *a, pvwdata_t *w, float dt_factor, void *auxPtr, int sf)
 
int(* accumulateFunctionPointer )(int kPreRes, int nk, float *v, float a, pvwdata_t *w, void *auxPtr, int sf)
 

Protected Member Functions

virtual int adjustAllPatches (int nxPre, int nyPre, int nfPre, const PVHalo *haloPre, int nxPost, int nyPost, int nfPost, const PVHalo *haloPost, PVPatch ***inWPatches, size_t **inGSynPatchStart, size_t **inAPostOffset, int arborId)
 
virtual int adjustAxonalArbors (int arborId)
 
virtual int allocateDeviceBuffers ()
 
virtual int allocateDeviceWeights ()
 
virtual int allocatePostConn ()
 
virtual int allocatePostDeviceWeights ()
 
virtual int allocatePostToPreBuffer ()
 
virtual int allocateReceivePostKernel ()
 
virtual int allocateReceivePreKernel ()
 
virtual pvwdata_t * allocWeights (int nPatches, int nxPatch, int nyPatch, int nfPatch)
 
virtual int calc_dW ()
 
int calcUnitCellIndex (int patchIndex, int *kxUnitCellIndex=NULL, int *kyUnitCellIndex=NULL, int *kfUnitCellIndex=NULL)
 
int checkPatchDimensions ()
 
virtual int checkPatchSize (int patchSize, int scalePre, int scalePost, char dim)
 
int checkpointFilename (char *cpFilename, int size, const char *cpDir)
 
virtual int checkpointRead (const char *cpDir, double *timef)
 
virtual int checkpointWrite (const char *cpDir)
 
virtual int clear_dW (int arborId)
 
virtual int clear_numActivations (int arborId)
 
int clearWeights (pvwdata_t **dataStart, int numPatches, int nx, int ny, int nf)
 
virtual int constructWeights ()
 
virtual int createArbors ()
 
void createArborsOutOfMemory ()
 
virtual InitWeightscreateInitWeightsObject (const char *weightInitTypeStr)
 
virtual int createWeights (PVPatch ***patches, int nWeightPatches, int nDataPatches, int nxPatch, int nyPatch, int nfPatch, int arborId)
 
int createWeights (PVPatch ***patches, int arborId)
 
virtual int deliverPostsynapticPerspective (PVLayerCube const *activity, int arborID)
 
virtual int deliverPostsynapticPerspectiveConvolve (PVLayerCube const *activity, int arborID, int *numActive, int **activeList)
 
virtual int deliverPostsynapticPerspectiveGPU (PVLayerCube const *activity, int arborID)
 
virtual int deliverPostsynapticPerspectiveStochastic (PVLayerCube const *activity, int arborID, int *numActive, int **activeList)
 
virtual int deliverPresynapticPerspective (PVLayerCube const *activity, int arborID)
 
virtual int deliverPresynapticPerspectiveConvolve (PVLayerCube const *activity, int arborID)
 
virtual int deliverPresynapticPerspectiveGPU (PVLayerCube const *activity, int arborID)
 
virtual int deliverPresynapticPerspectiveStochastic (PVLayerCube const *activity, int arborID)
 
long ** get_activations ()
 
pvwdata_t ** get_dwDataStart ()
 
pvwdata_t ** get_wDataStart ()
 
PVPatch *** get_wPatches ()
 
size_t ** getAPostOffset ()
 
float getConvertToRateDeltaTimeFactor ()
 
virtual InitWeightsgetDefaultInitWeightsMethod (const char *keyword)
 
int getPreAndPostLayerNames (const char *name, char **preLayerNamePtr, char **postLayerNamePtr)
 
virtual void handleDefaultSelfFlag ()
 
virtual int handleMissingPreAndPostLayerNames ()
 
int initialize (const char *name, HyPerCol *hc)
 
int initialize (const char *name, HyPerCol *hc, InitWeights *weightInitializer, NormalizeBase *weightNormalizer)
 
int initialize_base ()
 
virtual int initialize_dW (int arborId)
 
virtual PVPatch *** initializeWeights (PVPatch ***arbors, pvwdata_t **dataStart)
 
virtual int initNumDataPatches ()
 
virtual int initNumWeightPatches ()
 
virtual int initPlasticityPatches ()
 
virtual void ioParam_combine_dW_with_W_flag (enum ParamsIOFlag ioFlag)
 combine_dW_with_W_flag: If plasticity flag is set, specifies if dW buffer is allocated More...
 
virtual void ioParam_convertRateToSpikeCount (enum ParamsIOFlag ioFlag)
 preActivityIsNotRate: If true, pre activity is spike rate. If false, pre activity is value More...
 
virtual void ioParam_initializeFromCheckpointFlag (enum ParamsIOFlag ioFlag)
 initializeFromCheckpointFlag: If set to true, initialize using checkpoint direcgtory set in HyPerCol. More...
 
void ioParam_initialWeightUpdateTime (enum ParamsIOFlag ioFlag)
 initialWeightUpdateTime: If plasticity flag is set, specifies the inital weight update time; ignored if triggerFlag = true
 
void ioParam_keepKernelsSynchronized (enum ParamsIOFlag ioFlag)
 keepKernelsSynchronized: If using sharedWeights and plasticityFlag, sets if kernels should be synchronized during the run.
 
virtual void ioParam_nfp (enum ParamsIOFlag ioFlag)
 nfp: Specifies the post feature patch size
 
virtual void ioParam_normalizeMethod (enum ParamsIOFlag ioFlag)
 normalizeMethod: Specifies the normalization method for weights More...
 
virtual void ioParam_numAxonalArbors (enum ParamsIOFlag ioFlag)
 numAxonalArbors: Specifies the number of arbors to use in this connection
 
virtual void ioParam_nxp (enum ParamsIOFlag ioFlag)
 nxp: Specifies the x patch size More...
 
virtual void ioParam_nyp (enum ParamsIOFlag ioFlag)
 nyp: Specifies the y patch size More...
 
virtual void ioParam_plasticityFlag (enum ParamsIOFlag ioFlag)
 plasticityFlag: Specifies if the weights will update
 
virtual void ioParam_pvpatchAccumulateType (enum ParamsIOFlag ioFlag)
 pvpatchAccumulateType: Specifies the method to accumulate synaptic input More...
 
virtual void ioParam_receiveGpu (enum ParamsIOFlag ioFlag)
 receiveGpu: If PetaVision was compiled with GPU acceleration and this flag is set to true, the connection uses the GPU to update the postsynaptic layer's GSyn. If compiled without GPU acceleration, it is an error to set this flag to true.
 
virtual void ioParam_selfFlag (enum ParamsIOFlag ioFlag)
 selfFlag: Indicates if pre and post is the same layer. More...
 
virtual void ioParam_sharedWeights (enum ParamsIOFlag ioFlag)
 sharedWeights: Defines if the HyPerConn uses shared weights (kernelConn)
 
virtual void ioParam_shrinkPatches (enum ParamsIOFlag ioFlag)
 shrinkPatches: Optimization for shrinking a patch to it's non-zero values
 
virtual void ioParam_updateGSynFromPostPerspective (enum ParamsIOFlag ioFlag)
 updateGSynFromPostPerspective: Specifies if the connection should push from pre or pull from post.
 
virtual void ioParam_weightInitType (enum ParamsIOFlag ioFlag)
 weightInitType: Specifies the initialization method of weights More...
 
void ioParam_weightUpdatePeriod (enum ParamsIOFlag ioFlag)
 plasticityFlag: Specifies if the weights will be updated More...
 
virtual void ioParam_writeCompressedCheckpoints (enum ParamsIOFlag ioFlag)
 writeCompressedCheckpoints: Checkpoint weights are written compressed. More...
 
virtual void ioParam_writeCompressedWeights (enum ParamsIOFlag ioFlag)
 writeCompressedWeights: If writeStep >= 0, weights written out are bytes as opposed to floats.
 
virtual void ioParam_writeStep (enum ParamsIOFlag ioFlag)
 writeStep: Specifies the write period of the connection. More...
 
virtual int ioParamsFillGroup (enum ParamsIOFlag ioFlag)
 
virtual int normalize_dW (int arbor_ID)
 
size_t patchStartIndex (int patchIndex)
 
size_t postPatchStartIndex (int patchIndex)
 
virtual int readStateFromCheckpoint (const char *cpDir, double *timeptr)
 
virtual int readWeightsFromCheckpoint (const char *cpDir, double *timeptr)
 
virtual int reduce_dW (int arborId)
 
virtual int reduceActivations (int arborID)
 
virtual int reduceKernels (int arborID)
 
void set_dwDataStart (pvwdata_t **datastart)
 
void set_dwDataStart (int arborId, pvwdata_t *pIncrStart)
 
void set_wDataStart (pvwdata_t **datastart)
 
void set_wDataStart (int arborId, pvwdata_t *pDataStart)
 
void set_wPatches (PVPatch ***patches)
 
void setAPostOffset (size_t **postoffset)
 
void setChannelType (ChannelType ch)
 
void setConvertRateToSpikeCount (bool convertRateToSpikeCountFlag)
 
void setDelay (int arborId, float delay)
 
void setGSynPatchStart (size_t **patchstart)
 
virtual int setInitialValues ()
 
int setName (char const *name)
 
void setNumberOfAxonalArborLists (int numArbors)
 
int setParent (HyPerCol *hc)
 
virtual int setPatchSize ()
 
virtual int setPatchStrides ()
 
int setPostLayerName (const char *post_name)
 
virtual int setPostPatchSize ()
 
void setPostSynapticLayer (HyPerLayer *post)
 
virtual int setPreAndPostLayerNames ()
 
int setPreLayerName (const char *pre_name)
 
void setPreSynapticLayer (HyPerLayer *pre)
 
void setReceiveGpu ()
 
virtual int setWeightInitializer ()
 
int setWeightNormalizer ()
 
virtual bool skipPre (pvdata_t preact)
 
virtual int update_dW (int arborId)
 
virtual void updateDeviceWeights ()
 
virtual pvdata_t updateRule_dW (pvdata_t pre, pvdata_t post)
 

Static Protected Member Functions

static int adjustedPatchDimension (int zPre, int preNeuronsPerPostNeuron, int postNeuronsPerPreNeuron, int nPost, int patchDim, int *postStartPtr, int *patchStartPtr, int *adjustedDim)
 
static int computeMargin (int prescale, int postscale, int patchsize)
 
static int inferPreAndPostFromConnName (const char *name, int rank, char **preLayerNamePtr, char **postLayerNamePtr)
 

Protected Attributes

bool allocDeviceWeights
 
bool allocPostDeviceWeights
 
bool * batchSkip
 
std::vector< PlasticCloneConn * > clones
 
bool combine_dW_with_W_flag
 
bool combineWeightFiles
 
PVCuda::CudaBuffer * d_GSynPatchStart
 
PVCuda::CudaBuffer * d_Patch2DataLookupTable
 
PVCuda::CudaBuffer * d_Patches
 
PVCuda::CudaBuffer * d_PostToPreActivity
 
PVCuda::CudaBuffer * d_WData
 
float dWMax
 
int fileparams [NUM_WGT_PARAMS]
 
int fileType
 
int gpuGroupIdx
 
double initialWeightUpdateTime
 
double initialWriteTime
 
Timerio_timer
 
bool ioAppend
 
bool keepKernelsSynchronized_flag
 
PVCuda::CudaRecvPostkrRecvPost
 
PVCuda::CudaRecvPrekrRecvPre
 
double lastUpdateTime
 
HyPerLayermask
 
int maskFeatureIdx
 
char * maskLayerName
 
char * name
 
bool needAllocPostWeights
 
bool needFinalize
 
int nfp
 
int nfpPost
 
float normalize_cutoff
 
bool normalize_max
 
bool normalize_RMS_amp
 
float normalize_strength
 
bool normalize_zero_offset
 
bool normalizeArborsIndividually
 
bool normalizeDwFlag
 
char * normalizeGroupName
 
char * normalizeMethod
 
NormalizeBasenormalizer
 
bool normalizeTotalToPost
 
int numDataPatches
 
int numFLocal
 
long ** numKernelActivations
 
int numParams
 
int numWeightPatches
 
int numXLocal
 
int numYLocal
 
int nxp
 
int nxpPost
 
int nyp
 
int nypPost
 
HyPerColparent
 
HyPerConnpostConn
 
bool preDataLocal
 
AccumulateType pvpatchAccumulateType
 
char * pvpatchAccumulateTypeString
 
RandomrandState
 
bool selfFlag
 
int sfp
 
bool sharedWeights
 
bool shrinkPatches_flag
 
float shrinkPatchesThresh
 
int sxp
 
bool symmetrizeWeightsFlag
 
int syp
 
pvdata_t ** thread_gSyn
 
bool triggerFlag
 
HyPerLayertriggerLayer
 
char * triggerLayerName
 
double triggerOffset
 
Timerupdate_timer
 
bool updateGSynFromPostPerspective
 
bool useListOfArborFiles
 
bool useMask
 
bool warnDefaultNfp
 
InitWeightsweightInitializer
 
char * weightInitTypeString
 
double weightUpdatePeriod
 
double weightUpdateTime
 
float wMax
 
float wMin
 
pvwdata_t ** wPostDataStart
 
pvwdata_t *** wPostDataStartp
 
PVPatch *** wPostPatches
 
PVPatch **** wPostPatchesp
 
double wPostTime
 
bool writeCompressedCheckpoints
 
bool writeCompressedWeights
 
double writeStep
 
double writeTime
 

Detailed Description

Definition at line 19 of file IdentConn.hpp.

Member Function Documentation

int PV::HyPerConn::adjustAxonalArbors ( int  arborId)
protectedvirtualinherited
  • Each neuron in the pre-synaptic layer projects a number of axonal arbors to the post-synaptic layer (Can they be projected accross columns too?).
  • numAxons is the number of axonal arbors projected by each neuron.
  • Each axonal arbor (PVAxonalArbor) connects to a patch of neurons in the post-synaptic layer.
  • The PVAxonalArbor structure contains STDP P variable.

REMARKS:

  • numArbors = (nxPre + 2*prePad)*(nyPre+2*prePad) = nxexPre * nyexPre This is the total number of weight patches for a given arbor. Is the number of pre-synaptic neurons including margins.
  • activity and STDP M variable are extended into margins

Definition at line 3885 of file HyPerConn.cpp.

int PV::HyPerConn::allocateDataStructures ( )
virtualinherited

allocateDataStructures is used to allocate blocks of memory whose size and arrangement depend on parameters. (For example, HyPerConn allocates weight patches and data patches). After a connection is constructed, it is not properly initialized until communicateInitInfo(), allocateDataStructures(), and initializeState() have been called.

Return values: PV_POSTPONE means that allocateDataStructures() cannot be run until other layers'/connections' own allocateDataStructures() have been run successfully.

PV_SUCCESS and PV_FAILURE have their usual meanings.

allocateDataStructures() is typically called by the parent HyPerCol's run() method.

Reimplemented from PV::BaseConnection.

Reimplemented in PV::CloneConn, PV::PoolingConn, PV::TransposePoolingConn, PV::ImprintConn, PV::TransposeConn, PV::MomentumConn, PV::privateTransposeConn, and PV::GapConn.

Definition at line 1482 of file HyPerConn.cpp.

int PV::HyPerConn::calc_dW ( )
protectedvirtualinherited

calc_dW is a function that calls initialze_dW, update_dW, reduce_dW, and normalize_dW

Reimplemented in PV::MomentumConn.

Definition at line 2557 of file HyPerConn.cpp.

virtual int PV::IdentConn::checkpointRead ( const char *  cpDir,
double *  timeptr 
)
inlineprotectedvirtual

A pure virtual function for reading the state of the connection from the directory specified in cpDir. On exit, *timeptr is the time at which the checkpoint was written. checkpointRead() should restore the state of the connection completely, so that restarting from a checkpoint is equivalent to having the run continue.

Reimplemented from PV::HyPerConn.

Definition at line 62 of file IdentConn.hpp.

virtual int PV::IdentConn::checkpointWrite ( const char *  cpDir)
inlineprotectedvirtual

A pure virtual function for writing the state of the connection to the directory specified in cpDir. checkpointWrite() should save the complete state of the connection, so that restarting from a checkpoint is equivalent to having the run continue.

Reimplemented from PV::HyPerConn.

Definition at line 63 of file IdentConn.hpp.

int PV::IdentConn::communicateInitInfo ( )
virtual

communicateInitInfo is used to allow connections and layers to set params and related member variables based on what other layers or connections are doing. (For example, CloneConn sets many parameters the same as its originalConn.) After a connection is constructed, it is not properly initialized until communicateInitInfo(), allocateDataStructures(), and initializeState() have been called.

Return values: PV_POSTPONE means that communicateInitInfo() cannot be run until other layers'/connections' own communicateInitInfo() have been run successfully.

PV_SUCCESS and PV_FAILURE have their usual meanings.

communicateInitInfo() is typically called by the parent HyPerCol's run() method.

Reimplemented from PV::HyPerConn.

Definition at line 222 of file IdentConn.cpp.

int PV::HyPerConn::constructWeights ( )
protectedvirtualinherited

REMARKS:

  • Each neuron in the pre-synaptic layer can project "up" a number of arbors. Each arbor connects to a patch in the post-synaptic layer.
  • writeTime and writeStep are used to write post-synaptic patches.These patches are written every writeStep.

Reimplemented in PV::CloneConn, PV::TransposeConn, PV::TransposePoolingConn, PV::PoolingConn, PV::privateTransposeConn, and PV::PlasticCloneConn.

Definition at line 289 of file HyPerConn.cpp.

int PV::HyPerConn::createWeights ( PVPatch ***  patches,
int  arborId 
)
protectedinherited

Create a separate patch of weights for every neuron

Definition at line 3717 of file HyPerConn.cpp.

static int PV::BaseConnection::decodeChannel ( int  channel_code,
ChannelType *  channel_type 
)
inlinestaticinherited

Type-safe method of translating an integer channel_code into an allowed channel type. If channel_code corresponds to a recognized channel type, *channel_type is set accordingly and the function returns successfully. Otherwise, *channel_type is undefined and the function returns PV_FAILURE.

Definition at line 501 of file BaseConnection.hpp.

int PV::HyPerConn::deliver ( )
virtualinherited

Uses presynaptic layer's activity to modify the postsynaptic GSyn or thread_gSyn

Implements PV::BaseConnection.

Reimplemented in PV::privateTransposeConn.

Definition at line 2843 of file HyPerConn.cpp.

int PV::HyPerConn::finalizeUpdate ( double  timed,
double  dt 
)
virtualinherited

A virtual function for performing any necessary updates after the normalizers are called.

Reimplemented from PV::BaseConnection.

Reimplemented in PV::CloneConn, PV::PoolingConn, PV::TransposeConn, and PV::privateTransposeConn.

Definition at line 2486 of file HyPerConn.cpp.

int PV::BaseConnection::getConnectionId ( )
inlineinherited

Returns the connection's connId (assigned when added to its parent HyPerCol)

Definition at line 193 of file BaseConnection.hpp.

bool PV::BaseConnection::getDataStructuresAllocatedFlag ( )
inlineinherited

Returns true or false, depending on whether communicateInitInfo() has been called successfully.

Definition at line 99 of file BaseConnection.hpp.

int PV::BaseConnection::getDelay ( int  arbor)
inlineinherited

Returns the delay (in timesteps) belonging the given arbor.

Definition at line 241 of file BaseConnection.hpp.

bool PV::BaseConnection::getInitialValuesSetFlag ( )
inlineinherited

Returns true or false, depending on whether initializeState() has been called successfully.

Definition at line 132 of file BaseConnection.hpp.

bool PV::BaseConnection::getInitInfoCommunicatedFlag ( )
inlineinherited

Returns true or false, depending on whether communicateInitInfo() has been called successfully.

Definition at line 70 of file BaseConnection.hpp.

int PV::BaseConnection::getNumProbes ( )
inlineinherited

Returns the number of probes that have been attached to this connection

Definition at line 251 of file BaseConnection.hpp.

int PV::BaseConnection::getPreAndPostLayerNames ( const char *  name,
char **  preLayerNamePtr,
char **  postLayerNamePtr 
)
protectedinherited

Sets *preLayerNamePtr and *postLayerNamePtr according to the preLayerName and postLayerName parameters in the parameter group specified by the name and params arguments.

Definition at line 185 of file BaseConnection.cpp.

BaseConnectionProbe* PV::BaseConnection::getProbe ( int  i)
inlineinherited

Returns the probe with the indicated position in the list of probes. It does not do sanity checking on the value of i.

Definition at line 257 of file BaseConnection.hpp.

float PV::HyPerConn::getWMax ( )
inlineinherited

Maximum allowed weight value

Definition at line 162 of file HyPerConn.hpp.

float PV::HyPerConn::getWMin ( )
inlineinherited

Minimum allowed weight value

Definition at line 157 of file HyPerConn.hpp.

int PV::BaseConnection::handleMissingPreAndPostLayerNames ( )
protectedvirtualinherited

Called by BaseConnection::communicateInitInfo of the params did not set pre- and post- layers.

Reimplemented in PV::FeedbackConn.

Definition at line 125 of file BaseConnection.cpp.

int PV::BaseConnection::inferPreAndPostFromConnName ( const char *  name,
int  rank,
char **  preLayerNamePtr,
char **  postLayerNamePtr 
)
staticprotectedinherited

The default behavior of BaseConnection::handleMissingPreAndPostLayerNames. It tries to parse the name argument of the connection in the form "PreLayerToPostLayer". Then "PreLayer" put into *preLayerNamePtr and "PostLayer" is put into *postLayerNamePtr, and PV_SUCCESS is returned. If name does not contain the string "To", or if it contains it in more than one place, then PV_FAILURE is returned and *preLayerNamePtr and *postLayerNamePtr are not changed. rank is the rank of the process under MPI; the root process will print a message to the error stream if the routine fails; non-root process will not. This routine uses malloc to fill *{pre,post}LayerNamePtr, so the routine calling this one is responsible for freeing them.

Definition at line 129 of file BaseConnection.cpp.

int PV::HyPerConn::initialize_dW ( int  arborId)
protectedvirtualinherited

Initializes dW. Default behaviour is to clear dW.

Reimplemented in PV::ImprintConn.

Definition at line 2479 of file HyPerConn.cpp.

int PV::BaseConnection::initializeDelays ( const float *  fDelayArray,
int  size 
)
protectedvirtualinherited

Allocates the delays array and calls setDelay() for each arbor. fDelayArray is an array of length size, of delays, measured in the same units as the parent HyPerCol's dt.

If size=0, all delays are set to zero. If size=1, all delays are set to fDelayArray[0] If size=numArbors, delays[k] is calculated from fDelayArray[k]. If size is any other value, it is an error.

Reimplemented in PV::privateTransposeConn.

Definition at line 473 of file BaseConnection.cpp.

int PV::BaseConnection::initializeState ( )
inherited

initializeState is used to set the initial values of the connection. If the parent HyPerCol's checkpointReadFlag is set, it calls checkpointRead() If not, but the connection's initializeFromCheckpointFlag is set, it calls readStateFromCheckpoint(). If neither of these flags is set, it calls setInitialValues. Note that derived classes must implement the methods checkpointRead(), readStateFromCheckpoint(), and setInitialValues().

After a connection is constructed, it is not properly initialized until communicateInitInfo(), allocateDataStructures(), and initializeState() have been called.

Return values: PV_POSTPONE means that initializeState() cannot be run until other layers'/connections' own initializeState() have been run successfully.

PV_SUCCESS and PV_FAILURE have their usual meanings.

initializeState() is typically called by the parent HyPerCol's run() method.

Definition at line 513 of file BaseConnection.cpp.

int PV::HyPerConn::insertProbe ( BaseConnectionProbe p)
virtualinherited

Adds the given probe to the list of probes.

Reimplemented from PV::BaseConnection.

Definition at line 2286 of file HyPerConn.cpp.

void PV::HyPerConn::ioParam_channelCode ( enum ParamsIOFlag  ioFlag)
protectedvirtualinherited

channelCode: Specifies which channel in the post layer this connection is attached to

Channels can be -1 for no update, or >= 0 for channel number.
0 is excitatory, 1 is inhibitory

Reimplemented from PV::BaseConnection.

Reimplemented in PV::GapConn.

Definition at line 687 of file HyPerConn.cpp.

void PV::IdentConn::ioParam_combine_dW_with_W_flag ( enum ParamsIOFlag  ioFlag)
protectedvirtual

combine_dW_with_W_flag: If plasticity flag is set, specifies if dW buffer is allocated

dW buffer, if not allocated, will point to weight buffer and accumulate weights as it gets them

Reimplemented from PV::HyPerConn.

Definition at line 149 of file IdentConn.cpp.

void PV::IdentConn::ioParam_convertRateToSpikeCount ( enum ParamsIOFlag  ioFlag)
protectedvirtual

preActivityIsNotRate: If true, pre activity is spike rate. If false, pre activity is value

The post synaptic layer needs to interpret pre synaptic activity as a spike rate Other situations interpret as a value. This flag sets either one or the other. convertRateToSpikeCount: If true, presynaptic activity should be converted from a rate to a count.

If this flag is true and the presynaptic layer is not spiking, the activity will be interpreted as a spike rate, and will be converted to a spike count when delivering activity to the postsynaptic GSyn buffer. If this flag is false, activity will not be converted.

Reimplemented from PV::BaseConnection.

Definition at line 122 of file IdentConn.cpp.

void PV::BaseConnection::ioParam_delay ( enum ParamsIOFlag  ioFlag)
protectedvirtualinherited

delay: Specifies delay(s) which the post layer will receive data

: Delays are specified in units of dt, but are rounded to be integer multiples of dt. If delay is a scalar, all arbors of the connection have that value of delay. If delay is an array, the length must match the number of arbors and the arbors are assigned the delays sequentially.

Definition at line 277 of file BaseConnection.cpp.

void PV::HyPerConn::ioParam_gpuGroupIdx ( enum ParamsIOFlag  ioFlag)
protectedvirtualinherited

gpuGroupIdx: All connections in the same group uses the same GPU memory for weights

Specify a group index. An index of -1 means no group (default). This parameter is ignored if PetaVision was compiled without GPU acceleration.

Definition at line 604 of file HyPerConn.cpp.

void PV::IdentConn::ioParam_initializeFromCheckpointFlag ( enum ParamsIOFlag  ioFlag)
protectedvirtual

initializeFromCheckpointFlag: If set to true, initialize using checkpoint direcgtory set in HyPerCol.

Checkpoint read directory must be set in HyPerCol to initialize from checkpoint.

Reimplemented from PV::BaseConnection.

Definition at line 63 of file IdentConn.cpp.

void PV::HyPerConn::ioParam_maskFeatureIdx ( enum ParamsIOFlag  ioFlag)
protectedvirtualinherited

maskLayerName: If using mask, specifies which feature dim to use for the mask

Defaults to -1, which means point wise mask

Definition at line 1104 of file HyPerConn.cpp.

void PV::IdentConn::ioParam_normalizeMethod ( enum ParamsIOFlag  ioFlag)
protectedvirtual

normalizeMethod: Specifies the normalization method for weights

Weights will be normalized after initialization and after each weight update. Possible choices are:

Further parameters are needed depending on initialization type.

Reimplemented from PV::HyPerConn.

Definition at line 77 of file IdentConn.cpp.

void PV::HyPerConn::ioParam_numFLocal ( enum ParamsIOFlag  ioFlag)
protectedvirtualinherited

numYLocal: Specifies number of local threads to run in xydirection

Only set if receiving from gpu. Not used if using receive CUDNN from post. If using preDataLocal and recv form post, must be set to 1. numXLocal * numYLocal * numFLocal must be less than the amount of local threads specified by the hardware. Must be set to 1. This parameter is ignored if PetaVision was compiled without GPU acceleration.

Definition at line 649 of file HyPerConn.cpp.

void PV::HyPerConn::ioParam_numXLocal ( enum ParamsIOFlag  ioFlag)
protectedvirtualinherited

numXLocal: Specifies number of local threads to run in x direction

Only set if receiving from gpu. Not used if using receive CUDNN from post. This parameter is ignored if PetaVision was compiled without GPU acceleration.

Definition at line 620 of file HyPerConn.cpp.

void PV::HyPerConn::ioParam_numYLocal ( enum ParamsIOFlag  ioFlag)
protectedvirtualinherited

numYLocal: Specifies number of local threads to run in xydirection

Only set if receiving from gpu. Not used if using receive CUDNN from post. Must be divisible by post layer x size. numXLocal * numYLocal * numFLocal must be less than the amount of local threads specified by the hardware. This parameter is ignored if PetaVision was compiled without GPU acceleration.

Definition at line 635 of file HyPerConn.cpp.

void PV::IdentConn::ioParam_nxp ( enum ParamsIOFlag  ioFlag)
protectedvirtual

nxp: Specifies the x patch size

If one pre to many post, nxp restricted to many * an odd number If many pre to one post or one pre to one post, nxp restricted to an odd number

Reimplemented from PV::HyPerConn.

Definition at line 180 of file IdentConn.cpp.

void PV::IdentConn::ioParam_nyp ( enum ParamsIOFlag  ioFlag)
protectedvirtual

nyp: Specifies the y patch size

If one pre to many post, nyp restricted to many * an odd number If many pre to one post or one pre to one post, nyp restricted to an odd number

Reimplemented from PV::HyPerConn.

Definition at line 187 of file IdentConn.cpp.

void PV::BaseConnection::ioParam_postLayerName ( enum ParamsIOFlag  ioFlag)
protectedvirtualinherited

postLayerName: Specifies the connection's post layer

Required parameter

Reimplemented in PV::FeedbackConn.

Definition at line 250 of file BaseConnection.cpp.

void PV::BaseConnection::ioParam_preLayerName ( enum ParamsIOFlag  ioFlag)
protectedvirtualinherited

preLayerName: Specifies the connection's pre layer

Required parameter

Reimplemented in PV::FeedbackConn.

Definition at line 246 of file BaseConnection.cpp.

void PV::IdentConn::ioParam_pvpatchAccumulateType ( enum ParamsIOFlag  ioFlag)
protectedvirtual

pvpatchAccumulateType: Specifies the method to accumulate synaptic input

Possible choices are

  • convolve: Accumulates through convolution
  • stochastic: Accumulates through stochastic release
  • maxpooling: Accumulates through max pooling
  • sumpooling: Accumulates through sum pooling

Defaults to convolve.

Reimplemented from PV::HyPerConn.

Definition at line 95 of file IdentConn.cpp.

void PV::IdentConn::ioParam_selfFlag ( enum ParamsIOFlag  ioFlag)
protectedvirtual

selfFlag: Indicates if pre and post is the same layer.

The default value for selfFlag should be pre==post, but at the time ioParams(PARAMS_IO_READ) is called, pre and post have not been set. So we read the value with no warning if it's present; if it's absent, set the value to pre==post in the communicateInitInfo stage and issue the using-default-value warning then.

Reimplemented from PV::HyPerConn.

Definition at line 142 of file IdentConn.cpp.

void PV::HyPerConn::ioParam_triggerOffset ( enum ParamsIOFlag  ioFlag)
protectedvirtualinherited

triggerOffset: If trigger flag is set, triggers <triggerOffset> timesteps before target trigger

Defaults to 0.

Definition at line 767 of file HyPerConn.cpp.

void PV::IdentConn::ioParam_weightInitType ( enum ParamsIOFlag  ioFlag)
protectedvirtual

weightInitType: Specifies the initialization method of weights

Possible choices are

Further parameters are needed depending on initialization type

Reimplemented from PV::HyPerConn.

Definition at line 70 of file IdentConn.cpp.

void PV::IdentConn::ioParam_weightUpdatePeriod ( enum ParamsIOFlag  ioFlag)
protectedvirtual

plasticityFlag: Specifies if the weights will be updated

weightUpdatePeriod: If plasticity flag is set, specifies the update period of weights

Reimplemented from PV::HyPerConn.

Definition at line 165 of file IdentConn.cpp.

void PV::IdentConn::ioParam_writeCompressedCheckpoints ( enum ParamsIOFlag  ioFlag)
protectedvirtual

writeCompressedCheckpoints: Checkpoint weights are written compressed.

The parent HyPerCol must be writing checkpoints for this flag to be used

Reimplemented from PV::HyPerConn.

Definition at line 135 of file IdentConn.cpp.

void PV::IdentConn::ioParam_writeStep ( enum ParamsIOFlag  ioFlag)
protectedvirtual

writeStep: Specifies the write period of the connection.

Defaults to every timestep. -1 to not write at all.

Reimplemented from PV::HyPerConn.

Definition at line 103 of file IdentConn.cpp.

int PV::BaseConnection::ioParams ( enum ParamsIOFlag  ioFlag)
inherited

Method for reading or writing the params from group in the parent HyPerCol's parameters. The group from params is selected using the name of the connection.

Note that ioParams is not virtual. To add parameters in a derived class, override ioParamFillGroup.

Definition at line 218 of file BaseConnection.cpp.

int PV::IdentConn::ioParamsFillGroup ( enum ParamsIOFlag  ioFlag)
protectedvirtual

The virtual method for reading parameters from the parent HyPerCol's parameters, and writing to the output params file.

BaseConnection::ioParamsFillGroup reads/writes the paremeters preLayerName, postLayerName, channelCode, delay, numAxonalArbors, and convertRateToSpikeCount.

Derived classes with additional parameters typically override ioParamsFillGroup to call the base class's ioParamsFillGroup method and then call ioParam_[parametername] for each of their parameters. The ioParam_[parametername] methods should call the parent HyPerCol's ioParamValue() and related methods, to ensure that all parameters that get read also get written to the outputParams-generated file.

Reimplemented from PV::HyPerConn.

Reimplemented in PV::RescaleConn.

Definition at line 32 of file IdentConn.cpp.

float PV::HyPerConn::maxWeight ( int  arborId = 0)
virtualinherited

Actual maximum weight value

Reimplemented in PV::PoolingConn.

Definition at line 2258 of file HyPerConn.cpp.

float PV::HyPerConn::minWeight ( int  arborId = 0)
virtualinherited

Actual mininum weight value

Reimplemented in PV::PoolingConn.

Definition at line 2230 of file HyPerConn.cpp.

bool PV::HyPerConn::needUpdate ( double  time,
double  dt 
)
virtualinherited

A pure virtual method whose implementation returns true if an the weights should update on the given timestep and false if not.

Implements PV::BaseConnection.

Reimplemented in PV::TransposePoolingConn, PV::TransposeConn, PV::privateTransposeConn, and PV::CopyConn.

Definition at line 2360 of file HyPerConn.cpp.

int PV::HyPerConn::normalize_dW ( int  arbor_ID)
protectedvirtualinherited

Normalizes all dW by dividing dW by activations

Definition at line 2771 of file HyPerConn.cpp.

int PV::HyPerConn::outputProbeParams ( )
virtualinherited

Called by HyPerCol::outputParams to output the params groups for probes whose ownership has been transferred to this connection. (Does this need to be virtual?)

Reimplemented from PV::BaseConnection.

Definition at line 2319 of file HyPerConn.cpp.

int PV::HyPerConn::outputState ( double  timed,
bool  last = false 
)
virtualinherited

A pure virtual function for writing the state of the connection to file(s) in the output directory. For example, HyPerConn writes the weights to a .pvp file with a schedule defined by writeStep and initialWriteTime.

Implements PV::BaseConnection.

Reimplemented in PV::CloneConn.

Definition at line 2328 of file HyPerConn.cpp.

int PV::HyPerConn::postSynapticPatchHead ( int  kPreEx,
int *  kxPostOut,
int *  kyPostOut,
int *  kfPostOut,
int *  dxOut,
int *  dyOut,
int *  nxpOut,
int *  nypOut 
)
inherited

Returns the head (kxPostOut, kyPostOut) of the post-synaptic patch plus other patch information. the pre-synaptic k index (extended units) address of the kx index in post layer (non-extended units) on output address of the ky index in post layer (non-extended units) on output address of the kf index in post layer (non-extended units) on output address of the change in x dimension size of patch (to fit border) on output address of the change in y dimension size of patch (to fit border) on output address of x dimension patch size (includes border reduction) on output address of y dimension patch size (includes border reduction) on output

NOTE: kxPostOut and kyPostOut are always within the post-synaptic non-extended layer because the patch size is reduced at borders

Definition at line 4180 of file HyPerConn.cpp.

int PV::HyPerConn::preSynapticPatchHead ( int  kxPost,
int  kyPost,
int  kfPost,
int *  kxPre,
int *  kyPre 
)
inherited

Returns the head (kxPre, kyPre) of a pre-synaptic patch given post-synaptic layer indices. the post-synaptic kx index (non-extended units) the post-synaptic ky index (non-extended units) the post-synaptic kf index address of the kx index in the pre-synaptic layer (non-extended units) on output address of the ky index in the pre-synaptic layer (non-extended units) on output

NOTE: kxPre and kyPre may be in the border region

Definition at line 4144 of file HyPerConn.cpp.

int PV::HyPerConn::readStateFromCheckpoint ( const char *  cpDir,
double *  timeptr 
)
protectedvirtualinherited

A pure virtual method that uses an existing checkpoint to initialize the connection. BaseConnection::initializeState calls it when initializeFromCheckpointFlag is true. A Subclass may also call this method as part of the implementation of checkpointRead (for example, HyPerConn does this).

Implements PV::BaseConnection.

Reimplemented in PV::CloneConn.

Definition at line 2135 of file HyPerConn.cpp.

int PV::HyPerConn::reduce_dW ( int  arborId)
protectedvirtualinherited

Reduces all dW and activations across MPI

Definition at line 2505 of file HyPerConn.cpp.

void PV::BaseConnection::setChannelType ( ChannelType  ch)
protectedinherited

Sets the channel to the indicated argument. It is an error to try to change channels after communicateInitInfo() has completed successfully.

Definition at line 105 of file BaseConnection.cpp.

void PV::BaseConnection::setConvertRateToSpikeCount ( bool  convertRateToSpikeCountFlag)
protectedinherited

Sets the preActivityIsNotRate flag to the indicated argument. It is an error to try to change preActivityIsNotRate after communicateInitInfo() has completed successfully.

Definition at line 120 of file BaseConnection.cpp.

void PV::BaseConnection::setDataStructuresAllocatedFlag ( )
inlineinherited

This method sets the flag returned by getDataStructuresAllocatedFlag() to true. It is public so that the parent HyPerCol's run method can set it after receiving a successful allocateDataStructures command (this behavior should probably be changed so that BaseConnection::allocateDataStructuresWrapper, not the calling routine, is responsible for setting the flag).

Definition at line 94 of file BaseConnection.hpp.

void PV::BaseConnection::setDelay ( int  arborId,
float  delay 
)
protectedinherited

Sets the delay of the given arbor to the given amount. delay is specified in the same units that the parent HyPerCol's dt parameter is specified in. Internally, the delay is set as an integral number of timesteps, specifically round(delay/dt).

Definition at line 503 of file BaseConnection.cpp.

int PV::HyPerConn::setInitialValues ( )
protectedvirtualinherited

A pure virtual method for initializing the connection if we are neither restarting from a checkpoint or initializing the connection from a checkpoint. It should return PV_SUCCESS if successful, or PV_POSTPONE if it needs to wait for other objects to set their initial values before it can set its own initial values. (e.g. TransposeConn has to wait for original conn)

Implements PV::BaseConnection.

Reimplemented in PV::CopyConn, PV::TransposeConn, PV::TransposePoolingConn, PV::PoolingConn, and PV::privateTransposeConn.

Definition at line 2314 of file HyPerConn.cpp.

void PV::BaseConnection::setInitialValuesSetFlag ( )
inlineinherited

This method sets the flag returned by getInitialValuesSetFlag() to true. It is public so that the parent HyPerCol's run method can set it after receiving a successful initializeState command (this behavior should probably be changed so that BaseConnection::allocateDataStructuresWrapper, not the calling routine, is responsible for setting the flag).

Definition at line 127 of file BaseConnection.hpp.

void PV::BaseConnection::setInitInfoCommunicatedFlag ( )
inlineinherited

This method sets the flag returned by getInitInfoCommunicatedFlag() to true. It is public so that the parent HyPerCol's run method can set it after receiving a successful communicateInitInfo command (this behavior should probably be changed so that BaseConnection::communicateInitInfoWrapper, not the calling routine, is responsible for setting the flag).

Definition at line 65 of file BaseConnection.hpp.

void PV::BaseConnection::setNumberOfAxonalArborLists ( int  numArbors)
protectedinherited

Sets the number of arbors to the indicated argument. It is an error to try to change numArbors after communicateInitInfo() has completed successfully.

Definition at line 110 of file BaseConnection.cpp.

void PV::BaseConnection::setPostSynapticLayer ( HyPerLayer post)
protectedinherited

Sets the postsynaptic layer to the given layer. It is an error to try to set postLayer after it has already been set, or to call setPostLayerName() with a NULL argument.

Definition at line 94 of file BaseConnection.cpp.

int PV::BaseConnection::setPreAndPostLayerNames ( )
protectedvirtualinherited

Sets the pre- and post-synaptic layer names according to the parent HyPerCol's params. Virtual to allow subclasses to infer layer names in other ways (for example, FeedbackConn flips pre- and post- layers from originalConn).

Reimplemented in PV::FeedbackConn.

Definition at line 56 of file BaseConnection.cpp.

void PV::BaseConnection::setPreSynapticLayer ( HyPerLayer pre)
protectedinherited

Sets the presynaptic layer to the given layer. It is an error to try to set preLayer after it has already been set, or to call setPreLayerName() with a NULL argument.

Definition at line 83 of file BaseConnection.cpp.

int PV::HyPerConn::update_dW ( int  arborId)
protectedvirtualinherited

Updates the dW buffer

Reimplemented in PV::ImprintConn.

Definition at line 2585 of file HyPerConn.cpp.

int PV::HyPerConn::updateState ( double  timed,
double  dt 
)
virtualinherited

A pure virtual function for updating the state of the connection. timed is simulation time, and dt is the time increment between steps.

Implements PV::BaseConnection.

Reimplemented in PV::TransposePoolingConn, PV::TransposeConn, and PV::privateTransposeConn.

Definition at line 2386 of file HyPerConn.cpp.

int PV::HyPerConn::writeTimers ( std::ostream &  stream)
virtualinherited

A pure virtual function for writing timing information.

Implements PV::BaseConnection.

Definition at line 2216 of file HyPerConn.cpp.


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