more restrictions.
authorYangqing Jia <jiayq84@gmail.com>
Fri, 27 Sep 2013 18:55:11 +0000 (11:55 -0700)
committerYangqing Jia <jiayq84@gmail.com>
Fri, 27 Sep 2013 18:55:11 +0000 (11:55 -0700)
src/caffe/blob.hpp
src/caffe/net.hpp
src/caffe/syncedmem.hpp

index 39a2cf05cfa6033fa420d5ed855c3f95fdf494be..f0e19c277de09ae49591a4d774cba501376042e5 100644 (file)
@@ -50,9 +50,9 @@ class Blob {
   Dtype* mutable_gpu_diff();
   void Update();
   void FromProto(const BlobProto& proto);
-  void ToProto(BlobProto* proto, bool write_diff = false);
+  void ToProto(BlobProto* proto, bool write_diff = false) const;
 
- private:
+ protected:
   shared_ptr<SyncedMemory> data_;
   shared_ptr<SyncedMemory> diff_;
   int num_;
index a653df5c78b3b4fd8654f298b2ca2a76bf383f22..e91081b9c82e9a781599b50056908137c6497d96 100644 (file)
@@ -66,6 +66,8 @@ class Net {
   vector<int> net_input_blob_indices_;
   vector<int> net_output_blob_indices_;
   string name_;
+
+  DISABLE_COPY_AND_ASSIGN(Net);
 };
 
 
index 9cf3b87a005815d67b06268a109deccda318016b..862512f9250ca55a63c873ef33e02fc4c796014b 100644 (file)
@@ -26,6 +26,8 @@ class SyncedMemory {
   void* gpu_ptr_;
   size_t size_;
   SyncedHead head_;
+
+  DISABLE_COPY_AND_ASSIGN(SyncedMemory);
 };  // class SyncedMemory
 
 }  // namespace caffe