1#ifndef BP_MAXIMAL_MATCHING_H
2#define BP_MAXIMAL_MATCHING_H
22template <
typename Par_DCSC_Bool,
typename IT>
66 std::vector<std::vector<double> >
timing;
71 cout <<
"=======================================================\n";
72 cout <<
"@@@@@@ Number of processes: " << nprocs <<
endl;
73 cout <<
"=======================================================\n";
74 cout <<
"It | UMRow | UMCol | newlyMatched | Time "<<
endl;
75 cout <<
"=======================================================\n";
97 std::vector<double>
times;
157 false,
static_cast<IT>(0));
186 for(
int i=0; i<
timing.size(); i++)
198 cout <<
"==========================================================\n";
199 cout <<
"\n================individual timings =======================\n";
200 cout <<
" SpMV Update-Match Update-UMC Total "<<
endl;
201 cout <<
"==========================================================\n";
202 for(
int i=0; i<
timing.size(); i++)
211 cout <<
"-------------------------------------------------------\n";
216 std::cout <<
"****** maximal matching runtime ********\n";
217 std::cout <<
"nprocesses nthreads ncores algorithm Unmatched-Rows Cardinality Total Time***\n";
219 if(type ==
DMD) std::cout <<
"DMD";
220 else if(type ==
GREEDY) std::cout <<
"Greedy";
221 else if(type ==
KARP_SIPSER) std::cout <<
"Karp-Sipser";
225 std::cout <<
"-------------------------------------------------------\n\n";
237template <
typename Par_MAT_Double,
typename IT>
279 std::vector<std::vector<double> >
timing;
284 cout <<
"=======================================================\n";
285 cout <<
"@@@@@@ Number of processes: " << nprocs <<
endl;
286 cout <<
"=======================================================\n";
287 cout <<
"It | UMRow | UMCol | newlyMatched | Time "<<
endl;
288 cout <<
"=======================================================\n";
301 std::vector<double>
times;
357 for(
int i=0; i<
timing.size(); i++)
369 cout <<
"==========================================================\n";
370 cout <<
"\n================individual timings =======================\n";
371 cout <<
" SpMV Update-Match Update-UMC Total "<<
endl;
372 cout <<
"==========================================================\n";
373 for(
int i=0; i<
timing.size(); i++)
382 cout <<
"-------------------------------------------------------\n";
387 std::cout <<
"****** maximal matching runtime ********\n";
388 std::cout <<
"Unmatched-Rows Cardinality Total Time***\n";
390 std::cout <<
"-------------------------------------------------------\n\n";
398template <
class Par_DCSC_Bool,
class IT,
class NT>
417 std::cout <<
"Not maximal matching!!\n";
428 std::cout <<
"Not maximal matching**!!\n";
SpParMat< int64_t, bool, SpDCCols< int64_t, bool > > Par_DCSC_Bool
void MaximalMatching(Par_DCSC_Bool &A, Par_DCSC_Bool &AT, FullyDistVec< IT, IT > &mateRow2Col, FullyDistVec< IT, IT > &mateCol2Row, FullyDistVec< IT, IT > °ColRecv, int type, bool rand=true)
bool isMaximalmatching(Par_DCSC_Bool &A, FullyDistVec< IT, NT > &mateRow2Col, FullyDistVec< IT, NT > &mateCol2Row)
void WeightedGreedy(Par_MAT_Double &A, FullyDistVec< IT, IT > &mateRow2Col, FullyDistVec< IT, IT > &mateCol2Row, FullyDistVec< IT, IT > °Col)
Dcsc< IU, typename promote_trait< NU1, NU2 >::T_promote > EWiseMult(const Dcsc< IU, NU1 > &A, const Dcsc< IU, NU2 > *B, bool exclude)