From c0e296e7fc7e4373c5d1e61bc79dca3f2d2280ce Mon Sep 17 00:00:00 2001 From: bangerth Date: Fri, 29 Oct 2010 22:55:08 +0000 Subject: [PATCH] Add a few more basic types. git-svn-id: https://svn.dealii.org/trunk@22551 0785d39b-7218-0410-832d-ea1e28bc413d --- .../include/deal.II/base/memory_consumption.h | 37 ++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/deal.II/include/deal.II/base/memory_consumption.h b/deal.II/include/deal.II/base/memory_consumption.h index 4b2f3f517f..970deacc8c 100644 --- a/deal.II/include/deal.II/base/memory_consumption.h +++ b/deal.II/include/deal.II/base/memory_consumption.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 by the deal.II authors +// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -16,7 +16,9 @@ #include #include + #include +#include #include #include @@ -167,6 +169,23 @@ namespace MemoryConsumption inline unsigned int memory_consumption (const double); + /** + * Determine the amount of memory + * in bytes consumed by a long double + * variable. + */ + inline + unsigned int memory_consumption (const long double); + + /** + * Determine the amount of memory + * in bytes consumed by a std::complex + * variable. + */ + template + inline + unsigned int memory_consumption (const std::complex &); + /** * Determine an estimate of the * amount of memory in bytes @@ -468,6 +487,22 @@ namespace MemoryConsumption + inline + unsigned int memory_consumption (const long double) + { + return sizeof(long double); + } + + + template + inline + unsigned int memory_consumption (const std::complex &) + { + return sizeof(std::complex); + } + + + inline unsigned int memory_consumption (const std::string &s) { -- 2.39.5