Skip to Content.
Sympa Menu

charm - [charm] Passing an rvalue reference to SDAG method

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

[charm] Passing an rvalue reference to SDAG method


Chronological Thread 
  • From: Jozsef Bakosi <jbakosi AT lanl.gov>
  • To: charm AT lists.cs.illinois.edu
  • Subject: [charm] Passing an rvalue reference to SDAG method
  • Date: Wed, 9 Oct 2019 12:32:01 -0600
  • Authentication-results: illinois.edu; spf=pass smtp.mailfrom=jbakosi AT lanl.gov; dkim=pass header.d=lanl.gov header.s=lanl; dmarc=pass header.from=lanl.gov

Hi folks,

Is it possible to pass an r-value to an SDAG method?

Example ci:

entry void wait4rhs() {
when ownrhs_complete( tk::Fields&& dif ), comrhs_complete()
serial "rhs" { solve( std::move(dif) ); } }

entry void ownrhs_complete( tk::Fields&& dif );
entry void comrhs_complete();

I guess not (yet), because I get a compile error that says that
ownrhs_complete() needs an l-value instead of an r-value:

[...]/DiagCG.cpp:323:3: error: no matching member function for call to
'ownrhs_complete'
ownrhs_complete( std::move(dif) );
^~~~~~~~~~~~~~~
[...]/DiagCG.hpp:67:5: note: candidate function not viable: no known
conversion from 'typename remove_reference<Data<'\x00'> &>::type' (aka
'tk::Data<'\x00'>') to 'Closure_DiagCG::ownrhs_complete_20_closure *' for 1st
argument
DiagCG_SDAG_CODE
^
[...]/diagcg.decl.h:1347:8: note: expanded from macro 'DiagCG_SDAG_CODE'
void ownrhs_complete(Closure_DiagCG::ownrhs_complete_20_closure*
genClosure);\
^
[...]/DiagCG.hpp:67:5: note: candidate function not viable: expects an
l-value for 1st argument
Inciter/../Inciter/../Inciter/diagcg.decl.h:1348:8: note: expanded from macro
'DiagCG_SDAG_CODE'
void ownrhs_complete(tk::Fields &dif);
\
^

I'm using 918f46306 from Sep 3.

Thanks,
Jozsef


  • [charm] Passing an rvalue reference to SDAG method, Jozsef Bakosi, 10/09/2019

Archive powered by MHonArc 2.6.19.

Top of Page