<commit_before>/*
 * CloneKernelConn.hpp
 *
 *  Created on: May 24, 2011
 *      Author: peteschultz
 */

#ifndef CLONEKERNELCONN_HPP_
#define CLONEKERNELCONN_HPP_

#include "KernelConn.hpp"
#include "../weightinit/InitCloneKernelWeights.hpp"

namespace PV {

class CloneKernelConn : public KernelConn {

public:
   CloneKernelConn();
   CloneKernelConn(const char * name, HyPerCol * hc,
      HyPerLayer * pre, HyPerLayer * post, ChannelType channel,
      KernelConn * originalConn);
   virtual ~CloneKernelConn();
   int initialize_base();
   int initialize(const char * name, HyPerCol * hc,
      HyPerLayer * pre, HyPerLayer * post, ChannelType channel,
      KernelConn * originalConn);

   virtual int setPatchSize(const char * filename);
   // For CloneKernelConn, filename is ignored, but we include it
   // to agree with the interface for HyPerConn

   virtual int initShrinkPatches();

   virtual int setParams(PVParams * params);

   virtual int updateState(float time, float dt);

   // virtual int writeWeights(PVPatch *** patches, pvdata_t ** dataStart, int numPatches,
   //      const char * filename, float timef, bool last){return PV_SUCCESS;};

protected:
   virtual PVPatch *** initializeWeights(PVPatch *** patches, pvdata_t ** dataStart, int numPatches,
            const char * filename);
   virtual int constructWeights(const char * filename);
   void constructWeightsOutOfMemory();
   virtual int createAxonalArbors(int arborId);
   virtual int initNormalize();

   KernelConn * originalConn;

private:
   int deleteWeights();

}; // end class CloneKernelConn
<commit_msg>override write and checkpoint functions for clone conns<commit_after>/*
 * CloneKernelConn.hpp
 *
 *  Created on: May 24, 2011
 *      Author: peteschultz
 */

#ifndef CLONEKERNELCONN_HPP_
#define CLONEKERNELCONN_HPP_

#include "KernelConn.hpp"
#include "../weightinit/InitCloneKernelWeights.hpp"

namespace PV {

class CloneKernelConn : public KernelConn {

public:
   CloneKernelConn();
   CloneKernelConn(const char * name, HyPerCol * hc,
      HyPerLayer * pre, HyPerLayer * post, ChannelType channel,
      KernelConn * originalConn);
   virtual ~CloneKernelConn();
   int initialize_base();
   int initialize(const char * name, HyPerCol * hc,
      HyPerLayer * pre, HyPerLayer * post, ChannelType channel,
      KernelConn * originalConn);

   virtual int setPatchSize(const char * filename);
   // For CloneKernelConn, filename is ignored, but we include it
   // to agree with the interface for HyPerConn

   virtual int initShrinkPatches();

   virtual int setParams(PVParams * params);

   virtual int updateState(float time, float dt);

   // virtual int writeWeights(PVPatch *** patches, pvdata_t ** dataStart, int numPatches,
   //      const char * filename, float timef, bool last){return PV_SUCCESS;};
   virtual int writeWeights(float time, bool last=false){return PV_SUCCESS;};
   virtual int writeWeights(const char * filename){return PV_SUCCESS;};
   virtual int checkpointWrite(){return PV_SUCCESS;};
   virtual int checkpointRead(float *timef){return PV_SUCCESS;};

protected:
   virtual PVPatch *** initializeWeights(PVPatch *** patches, pvdata_t ** dataStart, int numPatches,
            const char * filename);
   virtual int constructWeights(const char * filename);
   void constructWeightsOutOfMemory();
   virtual int createAxonalArbors(int arborId);
   virtual int initNormalize();

   KernelConn * originalConn;

private:
   int deleteWeights();

}; // end class CloneKernelConn

{'fraction_non_alphanumeric': 0.09347392419492732, 'fraction_numerical': 0.003419777714448561, 'mean_word_length': 4.13909224011713, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5546072', 'n_tokens_mistral': 1066, 'n_tokens_neox': 1016, 'n_words': 309}