10 #define MatchingDefs_h 12 #include "../CombBLAS.h" 18 template <
typename T1,
typename T2>
38 template <
typename IT>
64 template <
typename T1,
typename T2>
67 static T2
id(){
return 1; };
69 static MPI_Op
mpi_op() {
return MPI_SUM; };
71 static T2
add(
const T2 & arg1,
const T2 & arg2)
73 return std::plus<T2>()(arg1, arg2);
76 static T2
multiply(
const T1 & arg1,
const T2 & arg2)
78 return static_cast<T2
> (1);
81 static void axpy(
const T1 a,
const T2 & x, T2 & y)
89 template <
typename T1,
typename T2>
92 static T2
id(){
return T2(); };
94 static MPI_Op
mpi_op() {
return MPI_MIN; };
96 static T2
add(
const T2 & arg1,
const T2 & arg2)
98 return std::min(arg1, arg2);
101 static T2
multiply(
const T1 & arg1,
const T2 & arg2)
106 static void axpy(
const T1 a,
const T2 & x, T2 & y)
113 template <
typename T1,
typename T2>
116 static T2
id(){
return T2(-1, std::numeric_limits<T1>::lowest()); };
118 static MPI_Op
mpi_op() {
return MPI_MAX; };
120 static T2
add(
const T2 & arg1,
const T2 & arg2)
122 return std::max(arg1, arg2);
125 static T2
multiply(
const T1 & arg1,
const T2 & arg2)
127 return T2(arg2.parent, arg1);
130 static void axpy(
const T1 a,
const T2 & x, T2 & y)
140 template <
typename T1,
typename T2>
143 static T2
id(){
return T2(-1, -1, std::numeric_limits<T1>::lowest()); };
145 static MPI_Op
mpi_op() {
return MPI_MAX; };
147 static T2
add(
const T2 & arg1,
const T2 & arg2)
149 return std::max(arg1, arg2);
152 static T2
multiply(
const T1 & arg1,
const T2 & arg2)
154 return T2(arg2.parent, arg2.root, arg1);
158 static void axpy(
const T1 a,
const T2 & x, T2 & y)
static T2 multiply(const T1 &arg1, const T2 &arg2)
static bool returnedSAID()
friend bool operator<(const VertexTypeMM &vtx1, const VertexTypeMM &vtx2)
friend bool operator==(const VertexTypeMM &vtx1, const VertexTypeMM &vtx2)
VertexTypeML(T1 p=-1, T2 com=0)
static T2 add(const T2 &arg1, const T2 &arg2)
static void axpy(const T1 a, const T2 &x, T2 &y)
static bool returnedSAID()
static void axpy(const T1 a, const T2 &x, T2 &y)
static T2 multiply(const T1 &arg1, const T2 &arg2)
VertexTypeMM(IT p=-1, IT r=-1, double w=0)
static void axpy(const T1 a, const T2 &x, T2 &y)
static bool returnedSAID()
static void axpy(const T1 a, const T2 &x, T2 &y)
friend bool operator<(const VertexTypeML &vtx1, const VertexTypeML &vtx2)
friend bool operator==(const VertexTypeML &vtx1, const VertexTypeML &vtx2)
static T2 multiply(const T1 &arg1, const T2 &arg2)
static bool returnedSAID()
static T2 add(const T2 &arg1, const T2 &arg2)
static T2 add(const T2 &arg1, const T2 &arg2)
friend std::ostream & operator<<(std::ostream &os, const VertexTypeML &vertex)
static T2 multiply(const T1 &arg1, const T2 &arg2)
static T2 add(const T2 &arg1, const T2 &arg2)
SpDCCols< IT, NT > * multiply(SpDCCols< IT, NT > &splitA, SpDCCols< IT, NT > &splitB, CCGrid &CMG, bool isBT, bool threaded)