Prioritization changed.
This commit is contained in:
@@ -9,7 +9,6 @@
|
||||
#define CORE_GNP_DISTRIBUTED_DUALTREE_DFS_H
|
||||
|
||||
#include <boost/mpi/communicator.hpp>
|
||||
#include <boost/thread.hpp>
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
#include "core/math/range.h"
|
||||
|
||||
@@ -51,14 +50,6 @@ class DistributedDualtreeDfs {
|
||||
*/
|
||||
DistributedTableType *reference_table_;
|
||||
|
||||
/** @brief The worker pool.
|
||||
*/
|
||||
boost::thread_group worker_pool_;
|
||||
|
||||
/** @brief The work queue from which the workers work.
|
||||
*/
|
||||
std::multimap<TreeType *, TreeType *> work_queue_;
|
||||
|
||||
private:
|
||||
|
||||
template<typename MetricType>
|
||||
@@ -80,8 +71,6 @@ class DistributedDualtreeDfs {
|
||||
const MetricType &metric,
|
||||
TreeType *qnode, ResultType *query_results);
|
||||
|
||||
static void DoIt_();
|
||||
|
||||
/** @brief The class used for prioritizing a computation object
|
||||
* (query, reference pair).
|
||||
*/
|
||||
|
||||
-15
@@ -31,13 +31,6 @@ extern core::table::MemoryMappedFile *global_m_file_;
|
||||
namespace core {
|
||||
namespace gnp {
|
||||
|
||||
template<typename DistributedProblemType>
|
||||
void DistributedDualtreeDfs<DistributedProblemType>::DoIt_() {
|
||||
|
||||
// Dequeue a work.
|
||||
|
||||
}
|
||||
|
||||
template<typename DistributedProblemType>
|
||||
template<typename MetricType>
|
||||
void DistributedDualtreeDfs<DistributedProblemType>::AllToAllReduce_(
|
||||
@@ -222,13 +215,6 @@ void DistributedDualtreeDfs<DistributedProblemType>::Init(
|
||||
if(query_table_ != reference_table_) {
|
||||
ResetStatisticRecursion_(reference_table_->get_tree(), reference_table_);
|
||||
}
|
||||
|
||||
// Start the thread worker pool.
|
||||
//const int num_worker_threads = 8;
|
||||
//for(int i = 0; i < num_worker_threads; i++) {
|
||||
//worker_pool_.create_thread(
|
||||
// DistributedDualtreeDfs < DistributedProblemType >::DoIt_);
|
||||
//}
|
||||
}
|
||||
|
||||
template<typename DistributedProblemType>
|
||||
@@ -255,7 +241,6 @@ void DistributedDualtreeDfs<DistributedProblemType>::Compute(
|
||||
// workspace. This is currently doing an all-reduce type of
|
||||
// exchange.
|
||||
AllToAllReduce_(metric, query_results);
|
||||
worker_pool_.join_all();
|
||||
world_->barrier();
|
||||
|
||||
// Postprocess.
|
||||
|
||||
@@ -391,10 +391,12 @@ bool DualtreeDfs<ProblemType>::DualtreeCanonical_(
|
||||
// Otherwise, push into the list of reference nodes that must
|
||||
// be dealt later. These list will be used in the distributed
|
||||
// dualtree computation.
|
||||
double priority = squared_distance_range.lo /
|
||||
static_cast<double>(qnode->count() * rnode->count());
|
||||
unpruned_query_reference_pairs_.push_back(
|
||||
boost::make_tuple(
|
||||
qnode, std::pair<int, int>(
|
||||
rnode->begin(), rnode->count()), squared_distance_range.lo));
|
||||
rnode->begin(), rnode->count()), priority));
|
||||
unpruned_reference_nodes_[rnode->begin()] = rnode->count();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user