Skip to content

Commit

Permalink
#1565 fix footprinting compilation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Strzebonski committed Sep 28, 2021
1 parent 7c9c916 commit 09c9f67
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 1 deletion.
19 changes: 19 additions & 0 deletions src/vt/messaging/active.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,14 @@ struct InProgressIRecv : InProgressBase {
return flag;
}

/**
* \brief Reconstructor for footprinting
*/
static InProgressIRecv& reconstruct(void* buf) {
auto* ipir = new (buf) InProgressIRecv{nullptr, 0, 0};
return *ipir;
}

private:
MPI_Request req = MPI_REQUEST_NULL;
};
Expand Down Expand Up @@ -235,6 +243,17 @@ struct InProgressDataIRecv : InProgressBase {
| reqs;
}

/**
* \brief Reconstructor for footprinting
*/
static InProgressDataIRecv& reconstruct(void* buf) {
auto* ipdir = new (buf) InProgressDataIRecv{
nullptr, 0, 0, std::vector<MPI_Request>{},
nullptr, ActionType{}, ContinuationDeleterType{}, 0
};
return *ipdir;
}

void* user_buf = nullptr;
ActionType dealloc_user_buf = nullptr;
ContinuationDeleterType next = nullptr;
Expand Down
8 changes: 8 additions & 0 deletions src/vt/messaging/async_op_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@ struct AsyncOpWrapper {
s | valid | op_ | tid_;
}

/**
* \brief Reconstructor for footprinting
*/
static AsyncOpWrapper& reconstruct(void* buf) {
auto* asyncOpWrapper = new (buf) AsyncOpWrapper{nullptr};
return *asyncOpWrapper;
}

public:
bool valid = false; /**< Whether op is valid */

Expand Down
8 changes: 8 additions & 0 deletions src/vt/rdma/rdma_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ struct Info {
offset(in_offset), is_local(in_is_local)
{ }

/**
* \brief Reconstructor for footprinting
*/
static Info& reconstruct(void* buf) {
auto* info = new (buf) Info{RDMA_TypeType::Uninitialized};
return *info;
}

template <typename Serializer>
void serialize(Serializer& s) {
s | rdma_type
Expand Down
11 changes: 10 additions & 1 deletion src/vt/trace/trace_log.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ struct Log final {
}
}

// No default constructor. Seems wierd? Copy+move all the way..
// No default constructor. Seems weird? Copy+move all the way..
// (Copy-constructible and copy-assignable required for dequeue.)
Log() = delete;
Log(Log const& in) = default;
Expand Down Expand Up @@ -334,6 +334,15 @@ struct Log final {
return data.sys;
}

/**
* \brief Reconstructor for footprinting
*/
static Log& reconstruct(void* buf) {
auto* l = new (buf)
Log{0.0, TraceConstantsType::InvalidTraceType, std::string{}, 0};
return *l;
}

template <typename Serializer>
void serialize(Serializer& s) {
s | time
Expand Down

0 comments on commit 09c9f67

Please sign in to comment.