From 7c9fc7fb03a5d0c876ec8ee0f82a646cc8538dce Mon Sep 17 00:00:00 2001 From: Dongryeol Lee Date: Tue, 8 Feb 2011 17:14:13 +0000 Subject: [PATCH] Subtable test fix. --- .../core/table/sub_table.test.cc | 31 +------------------ .../thesis_research/mlpack/kde/kde_dualtree.h | 4 +-- 2 files changed, 2 insertions(+), 33 deletions(-) diff --git a/fastlib/trunk/contrib/dongryel/thesis_research/core/table/sub_table.test.cc b/fastlib/trunk/contrib/dongryel/thesis_research/core/table/sub_table.test.cc index 77023655e6..cbd476d286 100644 --- a/fastlib/trunk/contrib/dongryel/thesis_research/core/table/sub_table.test.cc +++ b/fastlib/trunk/contrib/dongryel/thesis_research/core/table/sub_table.test.cc @@ -151,9 +151,6 @@ class TestSubTable { } boost::mpi::broadcast(world, max_num_levels_to_serialize, 0); - // Define cache block size naively. - int cache_block_size = (1 << max_num_levels_to_serialize) * leaf_size; - // The master thinks of how many subtables to exchange. int num_subtables_to_exchange; if(world.rank() == 0) { @@ -162,24 +159,6 @@ class TestSubTable { } boost::mpi::broadcast(world, num_subtables_to_exchange, 0); - std::vector< std::vector< core::table::DenseMatrix> > data_matrices( - world.size()); - std::vector< std::vector< OldFromNewIndexType * > > old_from_news( - world.size()); - - for(int j = 0; j < world.size(); j++) { - if(j != world.rank()) { - data_matrices[j].resize(num_subtables_to_exchange); - old_from_news[j].resize(num_subtables_to_exchange); - for(int i = 0; i < num_subtables_to_exchange; i++) { - data_matrices[j][i].Init( - distributed_table.n_attributes(), cache_block_size); - old_from_news[j][i] = - new OldFromNewIndexType[ cache_block_size ]; - } - } - } - // Prepare the list of subtables. std::vector< SubTableListType > send_subtables(world.size()); for(int j = 0; j < world.size(); j++) { @@ -213,8 +192,7 @@ class TestSubTable { // Allocate the cache block to the subtable that is about // to be received. received_subtables_in_this_round[j].push_back( - j, data_matrices[j][i], old_from_news[j][i], - 0, cache_block_size, max_num_levels_to_serialize, false); + 0, max_num_levels_to_serialize, false); } } } @@ -233,13 +211,6 @@ class TestSubTable { } } - // Free memory. - for(unsigned int i = 0; i < old_from_news.size(); i++) { - for(unsigned int j = 0; j < old_from_news[i].size(); j++) { - delete[] old_from_news[i][j]; - } - } - printf("%d-th exchange done!\n\n", k); world.barrier(); diff --git a/fastlib/trunk/contrib/dongryel/thesis_research/mlpack/kde/kde_dualtree.h b/fastlib/trunk/contrib/dongryel/thesis_research/mlpack/kde/kde_dualtree.h index dc27e06995..431736b8b0 100644 --- a/fastlib/trunk/contrib/dongryel/thesis_research/mlpack/kde/kde_dualtree.h +++ b/fastlib/trunk/contrib/dongryel/thesis_research/mlpack/kde/kde_dualtree.h @@ -815,11 +815,9 @@ class KdeStatistic { private: + // For Boost serialization. friend class boost::serialization::access; - KdeStatistic(const KdeStatistic &stat_in) { - } - public: mlpack::kde::KdePostponed postponed_;