本文整理汇总了C++中Projector::get_result方法的典型用法代码示例。如果您正苦于以下问题:C++ Projector::get_result方法的具体用法?C++ Projector::get_result怎么用?C++ Projector::get_result使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Projector
的用法示例。
在下文中一共展示了Projector::get_result方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: operator
void operator()() {
/* Set up MPI */
setup ();
/* Set up norm */
compute_l2_norm ();
#if USE_PFUNC
task root_task;
attribute root_attribute (false /*nested*/, false /*grouped*/);
#endif
/* Iterate until one of the stopping conditions is triggered */
int num_selected = 0;
while (true) {
/* Create a projector and execute the loop for local result */
space_type my_space =
partitioner_t::create (0, N, mpi_rank, mpi_size);
Projector projector
(&R,&snp_map,&materializer,&filter,block_size,M,N,K);
#if USE_PFUNC
ProjectReduceType root_project (my_space, projector, *global_taskmgr);
pfunc::spawn (*global_taskmgr, root_task, root_attribute, root_project);
pfunc::wait (*global_taskmgr, root_task);
#else
projector (my_space);
#endif
/* Reduce globally to get the result */
edge_type selected = find_global_max (projector.get_result ());
X.insert (selected);
add_to_shadow (selected);
++num_selected;
/* Re-estimate the coefficients given the new information */
refit ();
/* Compute the residual again */
residual ();
/* See if we have reached termination conditions */
if (MAX_SELECT<num_selected || EPSILON>=fro_norm()) break;
}
/* Clean up MPI */
cleanup ();
}