1#ifndef BP_MAXIMAL_MATCHING_H
2#define BP_MAXIMAL_MATCHING_H
4#include "CombBLAS/CombBLAS.h"
22template <
typename Par_DCSC_Bool,
typename IT>
68 std::vector<std::vector<double> >
timing;
73 cout <<
"=======================================================\n";
75 cout <<
"=======================================================\n";
76 cout <<
"It | UMRow | UMCol | newlyMatched | Time "<<
endl;
77 cout <<
"=======================================================\n";
99 std::vector<double>
times;
159 false,
static_cast<IT>(0));
188 for(
int i=0; i<
timing.size(); i++)
200 cout <<
"==========================================================\n";
201 cout <<
"\n================individual timings =======================\n";
202 cout <<
" SpMV Update-Match Update-UMC Total "<<
endl;
203 cout <<
"==========================================================\n";
204 for(
int i=0; i<
timing.size(); i++)
213 cout <<
"-------------------------------------------------------\n";
218 std::cout <<
"****** maximal matching runtime ********\n";
219 std::cout <<
"nprocesses nthreads ncores algorithm Unmatched-Rows Cardinality Total Time***\n";
221 if(type ==
DMD) std::cout <<
"DMD";
222 else if(type ==
GREEDY) std::cout <<
"Greedy";
223 else if(type ==
KARP_SIPSER) std::cout <<
"Karp-Sipser";
227 std::cout <<
"-------------------------------------------------------\n\n";
239template <
typename Par_MAT_Double,
typename IT>
281 std::vector<std::vector<double> >
timing;
286 cout <<
"=======================================================\n";
288 cout <<
"=======================================================\n";
289 cout <<
"It | UMRow | UMCol | newlyMatched | Time "<<
endl;
290 cout <<
"=======================================================\n";
303 std::vector<double>
times;
359 for(
int i=0; i<
timing.size(); i++)
371 cout <<
"==========================================================\n";
372 cout <<
"\n================individual timings =======================\n";
373 cout <<
" SpMV Update-Match Update-UMC Total "<<
endl;
374 cout <<
"==========================================================\n";
375 for(
int i=0; i<
timing.size(); i++)
384 cout <<
"-------------------------------------------------------\n";
390 std::cout <<
"****** maximal matching runtime ********\n";
391 std::cout <<
"Unmatched-Rows Cardinality Total Time***\n";
393 std::cout <<
"-------------------------------------------------------\n\n";
402template <
class Par_DCSC_Bool,
class IT,
class NT>
422 std::cout <<
"Not maximal matching!!\n";
433 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)