Skip to content

Commit

Permalink
delete time parameter from whenidle entry method (#3820)
Browse files Browse the repository at this point in the history
Co-authored-by: Eric Bohm <[email protected]>
  • Loading branch information
ritvikrao and ericjbohm authored May 30, 2024
1 parent 64018b2 commit 1091e58
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/charm++/whenidle/idlework.C
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Test::Test() {

void Test::registerIdleWork() {
CkPrintf("[TEST] Registering Idle Work.\n");
CkCallWhenIdle(CkIndex_Test::idleProgress(0), this);
CkCallWhenIdle(CkIndex_Test::idleProgress(), this);
}

bool Test::idleProgress() {
Expand Down
6 changes: 3 additions & 3 deletions src/xlat-i/xi-Entry.C
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ void Entry::genIndexDecls(XStr& str) {
<< "(void* impl_msg, void* impl_obj);";
} else {
str << templateSpecLine << "\n static void _call_" << epStr()
<< "(void* impl_obj, double time);";
<< "(void* impl_obj);";
}
str << templateSpecLine << "\n static void _call_sdag_" << epStr()
<< "(void* impl_msg, void* impl_obj);";
Expand Down Expand Up @@ -2282,7 +2282,7 @@ void Entry::genDefs(XStr& str) {
// Generate the call-method body
if (isWhenIdle()) {
str << makeDecl("void") << "::_call_" << epStr()
<< "(void* impl_obj_void, double time)\n";
<< "(void* impl_obj_void)\n";
str << "{\n";
} else {
str << makeDecl("void") << "::_call_" << epStr()
Expand Down Expand Up @@ -2312,7 +2312,7 @@ void Entry::genDefs(XStr& str) {
str << postCall;
if (isThreaded() && param->isMarshalled()) str << " delete impl_msg_typed;\n";
} else if (isWhenIdle()) {
str << " bool res = impl_obj->" << name << "(time);\n";
str << " bool res = impl_obj->" << name << "();\n";
str << " if (res) CkCallWhenIdle(idx_" << epStr() << "(), impl_obj);\n";
} else {
str << " CkAbort(\"This method should never be called as it refers to a LOCAL entry "
Expand Down

0 comments on commit 1091e58

Please sign in to comment.