From: Wolfgang Bangerth Date: Tue, 18 Aug 2009 18:41:27 +0000 (+0000) Subject: Be more consistent in using sizeof(type) instead of sizeof(variable). X-Git-Tag: v8.0.0~7262 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab111167148cc8f88ee76d33b04549c8a6ebb42c;p=dealii.git Be more consistent in using sizeof(type) instead of sizeof(variable). git-svn-id: https://svn.dealii.org/trunk@19306 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/include/base/memory_consumption.h b/deal.II/base/include/base/memory_consumption.h index 4fe8eb4810..7bd90da8df 100644 --- a/deal.II/base/include/base/memory_consumption.h +++ b/deal.II/base/include/base/memory_consumption.h @@ -228,7 +228,7 @@ namespace MemoryConsumption template inline unsigned int memory_consumption (const T (&v)[N]); - + /** * Specialization of the * determination of the memory @@ -242,7 +242,7 @@ namespace MemoryConsumption */ inline unsigned int memory_consumption (const std::vector &v); - + /** * Specialization of the * determination of the memory @@ -251,7 +251,7 @@ namespace MemoryConsumption */ inline unsigned int memory_consumption (const std::vector &v); - + /** * Specialization of the * determination of the memory @@ -260,7 +260,7 @@ namespace MemoryConsumption */ inline unsigned int memory_consumption (const std::vector &v); - + /** * Specialization of the * determination of the memory @@ -269,7 +269,7 @@ namespace MemoryConsumption */ inline unsigned int memory_consumption (const std::vector &v); - + /** * Specialization of the * determination of the memory @@ -278,7 +278,7 @@ namespace MemoryConsumption */ inline unsigned int memory_consumption (const std::vector &v); - + /** * Specialization of the * determination of the memory @@ -287,7 +287,7 @@ namespace MemoryConsumption */ inline unsigned int memory_consumption (const std::vector &v); - + /** * Specialization of the * determination of the memory @@ -298,7 +298,7 @@ namespace MemoryConsumption inline unsigned int memory_consumption (const std::vector &v); - /** + /** * Specialization of the * determination of the memory * consumption of a vector, here @@ -309,7 +309,7 @@ namespace MemoryConsumption * necessary for compatibility with * IBM's xlC 5.0 compiler, and * doesn't harm for other compilers - * as well. + * as well. */ unsigned int memory_consumption (const std::vector &v); @@ -322,7 +322,7 @@ namespace MemoryConsumption template inline unsigned int memory_consumption (const std::pair &p); - + /** * Return the amount of memory * used by a pointer. Make sure @@ -334,7 +334,7 @@ namespace MemoryConsumption template inline unsigned int memory_consumption (const T * const); - + /** * Return the amount of memory * used by a pointer. Make sure @@ -368,7 +368,7 @@ namespace MemoryConsumption */ inline unsigned int memory_consumption (void * const); - + /** * Return the amount of memory used * by a shared pointer. Make @@ -380,7 +380,7 @@ namespace MemoryConsumption template inline unsigned int memory_consumption (const std_cxx1x::shared_ptr &); - + /** * For all other types which are * not explicitly listed: try if @@ -408,27 +408,27 @@ namespace MemoryConsumption { return sizeof(bool); } - - - + + + inline unsigned int memory_consumption (const char) { return sizeof(char); } - + inline - unsigned int memory_consumption (const short int) + unsigned int memory_consumption (const short int) { return sizeof(short int); } - + inline - unsigned int memory_consumption (const short unsigned int) + unsigned int memory_consumption (const short unsigned int) { return sizeof(short unsigned int); } @@ -436,15 +436,15 @@ namespace MemoryConsumption inline - unsigned int memory_consumption (const int) + unsigned int memory_consumption (const int) { return sizeof(int); } - + inline - unsigned int memory_consumption (const unsigned int) + unsigned int memory_consumption (const unsigned int) { return sizeof(unsigned int); } @@ -466,7 +466,7 @@ namespace MemoryConsumption } - + inline unsigned int memory_consumption (const std::string &s) { @@ -506,15 +506,15 @@ namespace MemoryConsumption } - + inline unsigned int memory_consumption (const std::vector &v) { return (v.capacity() * sizeof(int) + sizeof(v)); } - - + + inline unsigned int memory_consumption (const std::vector &v) @@ -522,8 +522,8 @@ namespace MemoryConsumption return (v.capacity() * sizeof(double) + sizeof(v)); } - - + + inline unsigned int memory_consumption (const std::vector &v) @@ -531,18 +531,18 @@ namespace MemoryConsumption return (v.capacity() * sizeof(float) + sizeof(v)); } - - - + + + inline unsigned int memory_consumption (const std::vector &v) { return (v.capacity() * sizeof(char) + sizeof(v)); } - - + + inline unsigned int memory_consumption (const std::vector &v) { @@ -551,7 +551,7 @@ namespace MemoryConsumption } - + template inline unsigned int memory_consumption (const std::vector &v) @@ -559,9 +559,9 @@ namespace MemoryConsumption return (v.capacity() * sizeof(T *) + sizeof(v)); } - - + + template inline unsigned int memory_consumption (const std::pair &p) @@ -570,8 +570,8 @@ namespace MemoryConsumption memory_consumption(p.second)); } - - + + template inline unsigned int @@ -581,7 +581,7 @@ namespace MemoryConsumption } - + template inline unsigned int @@ -590,8 +590,8 @@ namespace MemoryConsumption return sizeof(T*); } - - + + inline unsigned int memory_consumption (void * const) @@ -604,13 +604,13 @@ namespace MemoryConsumption template inline unsigned int - memory_consumption (const std_cxx1x::shared_ptr &ptr) + memory_consumption (const std_cxx1x::shared_ptr &) { - return sizeof(ptr); + return sizeof(std_cxx1x::shared_ptr); } - - - + + + template inline unsigned int