[PPL-devel] [GIT] ppl/ppl(sparse_matrices): Fixes build: MIP_Problem: enable previously disabled methods total_memory_in_bytes() and external_memory_in_bytes()
Marco Poletti
poletti.marco at gmail.com
Wed Feb 24 22:24:12 CET 2010
Module: ppl/ppl
Branch: sparse_matrices
Commit: dcd1bbb9c1f90b4ac701c25832303bd55066ae04
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=dcd1bbb9c1f90b4ac701c25832303bd55066ae04
Author: Marco Poletti <poletti.marco at gmail.com>
Date: Wed Feb 24 22:14:30 2010 +0100
Fixes build: MIP_Problem: enable previously disabled methods total_memory_in_bytes() and external_memory_in_bytes()
---
src/MIP_Problem.defs.hh | 2 --
src/MIP_Problem.inlines.hh | 11 +++++++----
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/MIP_Problem.defs.hh b/src/MIP_Problem.defs.hh
index 8766884..89eac7f 100644
--- a/src/MIP_Problem.defs.hh
+++ b/src/MIP_Problem.defs.hh
@@ -420,13 +420,11 @@ public:
*/
bool ascii_load(std::istream& s);
-/*
//! Returns the total size in bytes of the memory occupied by \p *this.
memory_size_type total_memory_in_bytes() const;
//! Returns the size in bytes of the memory managed by \p *this.
memory_size_type external_memory_in_bytes() const;
-*/
//! Swaps \p *this with \p y.
void swap(MIP_Problem& y);
diff --git a/src/MIP_Problem.inlines.hh b/src/MIP_Problem.inlines.hh
index 2dff145..0eb3419 100644
--- a/src/MIP_Problem.inlines.hh
+++ b/src/MIP_Problem.inlines.hh
@@ -149,12 +149,15 @@ MIP_Problem::clear() {
swap(tmp);
}
-/*
+
inline memory_size_type
MIP_Problem::external_memory_in_bytes() const {
memory_size_type n
- = tableau.external_memory_in_bytes()
- + working_cost.external_memory_in_bytes()
+ = working_cost.external_memory_in_bytes()
+// FIXME: add method external_memory_in_bytes() to Sparse_Matrix
+#ifndef USE_PPL_SPARSE_MATRIX
+ + tableau.external_memory_in_bytes()
+#endif
+ input_obj_function.external_memory_in_bytes()
+ last_generator.external_memory_in_bytes();
// Adding the external memory for `input_cs'.
@@ -173,7 +176,7 @@ inline memory_size_type
MIP_Problem::total_memory_in_bytes() const {
return sizeof(*this) + external_memory_in_bytes();
}
-*/
+
} // namespace Parma_Polyhedra_Library
namespace std {
More information about the PPL-devel
mailing list