Skip to content

Commit

Permalink
#1163: collective: remove redundant initialize() override
Browse files Browse the repository at this point in the history
  • Loading branch information
cz4rs authored and lifflander committed Dec 16, 2020
1 parent 82110d1 commit a5d79b3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
16 changes: 6 additions & 10 deletions src/vt/collective/startup.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,16 @@ namespace vt {

// vt::{initialize,finalize} for main ::vt namespace
RuntimePtrType initialize(
int& argc, char**& argv, WorkerCountType const num_workers,
bool is_interop, MPI_Comm* comm
int argc, char** argv, WorkerCountType const num_workers,
bool is_interop /* = false */, MPI_Comm* comm /* = nullptr */
) {
return CollectiveOps::initialize(argc,argv,num_workers,is_interop,comm);
}

RuntimePtrType initialize(int& argc, char**& argv, MPI_Comm* comm) {
bool const is_interop = comm != nullptr;
return CollectiveOps::initialize(argc,argv,no_workers,is_interop,comm);
}

RuntimePtrType initialize(MPI_Comm* comm) {
int argc = 0;
char** argv = nullptr;
RuntimePtrType initialize(
int argc /* = 0 */, char** argv /* = nullptr */,
MPI_Comm* comm /* = nullptr */
) {
bool const is_interop = comm != nullptr;
return CollectiveOps::initialize(argc,argv,no_workers,is_interop,comm);
}
Expand Down
7 changes: 4 additions & 3 deletions src/vt/collective/startup.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,12 @@
namespace vt {

RuntimePtrType initialize(
int& argc, char**& argv, WorkerCountType const num_workers,
int argc, char** argv, WorkerCountType const num_workers,
bool is_interop = false, MPI_Comm* comm = nullptr
);
RuntimePtrType initialize(int& argc, char**& argv, MPI_Comm* comm = nullptr);
RuntimePtrType initialize(MPI_Comm* comm = nullptr);
RuntimePtrType initialize(
int argc = 0, char** argv = nullptr, MPI_Comm* comm = nullptr
);

void finalize(RuntimePtrType in_rt);
void finalize();
Expand Down

0 comments on commit a5d79b3

Please sign in to comment.