ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/brains/DataStorage.hpp
(Generate patch)

Comparing trunk/src/brains/DataStorage.hpp (file contents):
Revision 1993 by gezelter, Tue Apr 29 17:32:31 2014 UTC vs.
Revision 2069 by gezelter, Thu Mar 5 16:30:23 2015 UTC

# Line 88 | Line 88 | namespace OpenMD {
88      };
89  
90      DataStorage();
91 <    DataStorage(int size, int storageLayout = 0);
91 >    DataStorage(std::size_t size, int storageLayout = 0);
92      /** return the size of this DataStorage. */
93 <    int getSize();
93 >    std::size_t getSize();
94      /**
95       * Changes the size of this DataStorage.
96       * @param newSize new size of this DataStorage
97       */
98 <    void resize(int newSize);
98 >    void resize(std::size_t newSize);
99      /**
100       * Reallocates memory manually.
101       *
# Line 104 | Line 104 | namespace OpenMD {
104       * then it is usually more efficient to allocate that memory all
105       * at once.
106       */
107 <    void reserve(int size);
107 >    void reserve(std::size_t size);
108      /**
109       * Copies data inside DataStorage class.
110       *
# Line 116 | Line 116 | namespace OpenMD {
116       * @param num number of element to be moved
117       * @param target
118       */
119 <    void copy(int source, int num, int target);
119 >    void copy(int source, std::size_t num, std::size_t target);
120      /** Returns the storage layout  */
121      int getStorageLayout();
122      /** Sets the storage layout  */
# Line 143 | Line 143 | namespace OpenMD {
143      vector<RealType> flucQFrc;        /** fluctuating charge forces */
144      vector<RealType> sitePotential;   /** electrostatic site potentials */
145  
146 <    static int getBytesPerStuntDouble(int layout);
146 >    static std::size_t getBytesPerStuntDouble(int layout);
147  
148    private:
149  
# Line 152 | Line 152 | namespace OpenMD {
152      RealType* internalGetArrayPointer(vector<RealType>& v);
153              
154      template<typename T>
155 <    void internalResize(std::vector<T>& v, int newSize);
155 >    void internalResize(std::vector<T>& v, std::size_t newSize);
156  
157      template<typename T>
158 <    void internalCopy(std::vector<T>& v, int source,  int num, int target);
158 >    void internalCopy(std::vector<T>& v, int source, std::size_t num, std::size_t target);
159              
160 <    int size_;
160 >    std::size_t size_;
161      int storageLayout_;
162  
163    };

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines