Skip to content

Commit

Permalink
Fix compile error for the flash bc algorithm on ubuntu (#2839)
Browse files Browse the repository at this point in the history
## What do these changes do?

Some compilers were failing to match the most suitable overloaded
functions when `EjoinV` is used in the FLASH model , causing unexpected
errors. So I add an extra parameter to force the compiler to use the
required overloaded function.
This change is intended to ensure that the function is correctly matched
by the compiler and that the program runs correctly.

Fixes #2835

Co-authored-by: Weibin Zeng <qiaozi.zwb@alibaba-inc.com>
  • Loading branch information
lixueclaire and acezen committed Jun 8, 2023
1 parent 0de3063 commit 3c4cd9d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions analytical_engine/apps/flash/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ template <typename fragment_t, typename fw_t, typename value_t, class F,
class M, class C>
VSet edgeMapDenseFunction(const fragment_t& graph,
const std::shared_ptr<fw_t> fw, VSet& U, int h,
VSet& T, F& f, M& m, C& c, bool b = true) {
VSet& T, bool is_join, F& f, M& m, C& c,
bool b = true) {
if ((&T) == (&All))
return edgeMapDenseFunction(graph, fw, U, h, f, m, c, b);
using vertex_t = typename fragment_t::vertex_t;
Expand Down Expand Up @@ -219,7 +220,8 @@ template <typename fragment_t, typename fw_t, typename value_t, class F,
class M, class C, class H>
VSet edgeMapDenseFunction(const fragment_t& graph,
const std::shared_ptr<fw_t> fw, VSet& U, H& h,
VSet& T, F& f, M& m, C& c, bool b = true) {
VSet& T, bool is_join, F& f, M& m, C& c,
bool b = true) {
using vid_t = typename fragment_t::vid_t;
using edata_t = typename fragment_t::edata_t;
bool flag = ((&U) == (&All));
Expand Down Expand Up @@ -381,8 +383,9 @@ template <typename fragment_t, typename fw_t, typename value_t, class F,
class M, class C, class H>
inline VSet edgeMapFunction(const fragment_t& graph,
const std::shared_ptr<fw_t> fw, VSet& U, H h,
VSet& T, F& f, M& m, C& c, bool b = true) {
return edgeMapDenseFunction(graph, fw, U, h, T, f, m, c, b);
VSet& T, bool is_join, F& f, M& m, C& c,
bool b = true) {
return edgeMapDenseFunction(graph, fw, U, h, T, is_join, f, m, c, b);
}

template <typename fragment_t, typename fw_t>
Expand Down
2 changes: 1 addition & 1 deletion analytical_engine/apps/flash/flash_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ namespace gs {
#define CTrueV cTrueV<vid_t, value_t>
#define CTrueE cTrueE<vid_t, value_t, edata_t>

#define EjoinV(E, V) E, V
#define EjoinV(E, V) E, V, true
#define VjoinP(property) \
std::vector<vid_t> res; \
res.clear(); \
Expand Down

0 comments on commit 3c4cd9d

Please sign in to comment.