Skip to content

Commit

Permalink
#2063: Update void* to std::byte* in DispatchCollection
Browse files Browse the repository at this point in the history
  • Loading branch information
thearusable committed Mar 19, 2024
1 parent 686db79 commit 646622b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ void CallbackProxyBcastDirect::trigger(MsgT* msg, PipeType const& pipe) {

auto dispatcher = vrt::collection::getDispatcher(vrt_dispatch_han_);
auto const& proxy = proxy_;
dispatcher->broadcast(proxy, msg, handler_);
dispatcher->broadcast(proxy, reinterpret_cast<std::byte*>(msg), handler_);
}

}}} /* end namespace vt::pipe::callback */
Expand Down
8 changes: 4 additions & 4 deletions src/vt/vrt/collection/dispatch/dispatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ struct DispatchCollectionBase {
virtual ~DispatchCollectionBase() {}

virtual void
broadcast(VirtualProxyType proxy, void* msg, HandlerType han) = 0;
broadcast(VirtualProxyType proxy, std::byte* msg, HandlerType han) = 0;
virtual void
send(VirtualProxyType proxy, void* idx, void* msg, HandlerType han) = 0;
send(VirtualProxyType proxy, std::byte* idx, std::byte* msg, HandlerType han) = 0;

template <typename=void>
VirtualProxyType getDefaultProxy() const;
Expand All @@ -83,9 +83,9 @@ struct DispatchCollectionBase {
template <typename ColT, typename MsgT>
struct DispatchCollection final : DispatchCollectionBase {
private:
void broadcast(VirtualProxyType proxy, void* msg, HandlerType han) override;
void broadcast(VirtualProxyType proxy, std::byte* msg, HandlerType han) override;
void send(
VirtualProxyType proxy, void* idx, void* msg, HandlerType han
VirtualProxyType proxy, std::byte* idx, std::byte* msg, HandlerType han
) override;
};

Expand Down
4 changes: 2 additions & 2 deletions src/vt/vrt/collection/dispatch/dispatch.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ namespace vt { namespace vrt { namespace collection {

template <typename ColT, typename MsgT>
void DispatchCollection<ColT, MsgT>::broadcast(
VirtualProxyType proxy, void* msg, HandlerType han
VirtualProxyType proxy, std::byte* msg, HandlerType han
) {
using IdxT = typename ColT::IndexType;
auto const msg_typed = reinterpret_cast<MsgT*>(msg);
Expand All @@ -68,7 +68,7 @@ void DispatchCollection<ColT, MsgT>::broadcast(

template <typename ColT, typename MsgT>
void DispatchCollection<ColT, MsgT>::send(
VirtualProxyType proxy, void* idx, void* msg, HandlerType han
VirtualProxyType proxy, std::byte* idx, std::byte* msg, HandlerType han
) {
using IdxT = typename ColT::IndexType;
auto const msg_typed = reinterpret_cast<MsgT*>(msg);
Expand Down

0 comments on commit 646622b

Please sign in to comment.