Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/test_example.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <vt-lb/comm/MPI/comm_mpi.h>
#include <vt-lb/comm/VT/comm_vt.h>
#include <vt-lb/comm/vt/comm_vt.h>
#include <vt-lb/algo/driver/driver.h>
#include <random>

Expand Down
4 changes: 2 additions & 2 deletions src/vt-lb/comm/MPI/class_handle.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ struct ClassHandle;
template <typename T>
struct ClassHandleRank {
ClassHandleRank(ClassHandle<T> in_handle, int in_rank);

template <auto fn, typename... Args>
void send(Args&&... args);

template <auto fn, typename... Args>
void sendTerm(Args&&... args);

Expand Down
12 changes: 6 additions & 6 deletions src/vt-lb/comm/MPI/comm_mpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ template <typename ObjT>
struct RegisteredInfo final : BaseRegisteredInfo {
using FnType = decltype(ObjT::getFunc());
FnType fn_ptr;

explicit RegisteredInfo(FnType in_fn_ptr) : fn_ptr(in_fn_ptr) {}

void dispatch(void* data, void* object, bool deserialize) const override {
typename ObjT::TupleType tup;
if (deserialize) {
Expand All @@ -95,7 +95,7 @@ struct RegisteredInfo final : BaseRegisteredInfo {
} else {
tup = *reinterpret_cast<typename ObjT::TupleType*>(data);
}

auto obj = reinterpret_cast<typename ObjT::ObjectType*>(object);
std::apply(
fn_ptr,
Expand Down Expand Up @@ -354,12 +354,12 @@ struct CommMPI {
if (flag) {
int count = 0;
MPI_Get_count(&status, MPI_BYTE, &count);

// Validate message size
if (count < static_cast<int>(3 * sizeof(int))) {
throw std::runtime_error("Received message is too small");
}

std::vector<char> buf(count);
// Ensure buffer is properly aligned
if (reinterpret_cast<std::uintptr_t>(buf.data()) % alignof(int) != 0) {
Expand All @@ -383,7 +383,7 @@ struct CommMPI {
assert(class_map_.find(class_index) != class_map_.end() && "Class index not found");
mem_fn->dispatch(
buf.data() + 3*sizeof(int),
class_map_[class_index],
class_map_[class_index],
true
);

Expand Down
2 changes: 1 addition & 1 deletion src/vt-lb/comm/vt/comm_vt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
//@HEADER
*/

#include "vt-lb/comm/VT/comm_vt.h"
#include "vt-lb/comm/vt/comm_vt.h"

#include <vt/transport.h>

Expand Down
2 changes: 1 addition & 1 deletion src/vt-lb/comm/vt/comm_vt.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,6 @@ struct CommVT {

} /* end namespace vt_lb::comm */

#include "vt-lb/comm/VT/comm_vt.impl.h"
#include "vt-lb/comm/vt/comm_vt.impl.h"

#endif /*INCLUDED_VT_LB_COMM_COMM_VT_H*/
6 changes: 3 additions & 3 deletions src/vt-lb/comm/vt/comm_vt.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
#if !defined INCLUDED_VT_LB_COMM_COMM_VT_IMPL_H
#define INCLUDED_VT_LB_COMM_COMM_VT_IMPL_H

#include "vt-lb/comm/VT/comm_vt.h"
#include "vt-lb/comm/VT/proxy_wrapper.h"
#include "vt-lb/comm/vt/comm_vt.h"
#include "vt-lb/comm/vt/proxy_wrapper.h"
#include <vt/transport.h>

namespace vt_lb::comm {
Expand All @@ -64,6 +64,6 @@ void CommVT::send(vt::NodeType dest, ProxyT proxy, Args&&... args) {

} // namespace vt_lb::comm

#include "vt-lb/comm/VT/proxy_wrapper.impl.h"
#include "vt-lb/comm/vt/proxy_wrapper.impl.h"

#endif /* INCLUDED_VT_LB_COMM_COMM_VT_IMPL_H */
2 changes: 1 addition & 1 deletion src/vt-lb/comm/vt/proxy_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@ struct ProxyWrapper : ProxyT {

} // namespace vt_lb::comm

#include "vt-lb/comm/VT/proxy_wrapper.impl.h"
#include "vt-lb/comm/vt/proxy_wrapper.impl.h"

#endif /* INCLUDED_VT_LB_COMM_PROXY_WRAPPER_H */