diff --git a/include/buffer_transfer_manager.h b/include/buffer_transfer_manager.h index 7e3abd504..a5a2e5c7d 100644 --- a/include/buffer_transfer_manager.h +++ b/include/buffer_transfer_manager.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include #include @@ -47,6 +48,9 @@ namespace detail { alignas(std::max_align_t) payload_type data[]; // max_align to allow reinterpret_casting a pointer to this member to any buffer element pointer }; + // unique_frame_ptr assumes that the flexible payload member begins at exactly sizeof(Frame) bytes + static_assert(offsetof(data_frame, data) == sizeof(data_frame)); + struct transfer_in { node_id source_nid; MPI_Request request; diff --git a/include/command.h b/include/command.h index e4256ad97..d26c97115 100644 --- a/include/command.h +++ b/include/command.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include "intrusive_graph.h" @@ -237,5 +238,8 @@ namespace detail { iterable_range iter_dependencies() const { return {dependencies, dependencies + num_dependencies}; } }; + // unique_frame_ptr assumes that the flexible payload member begins at exactly sizeof(Frame) bytes + static_assert(offsetof(command_frame, dependencies) == sizeof(command_frame)); + } // namespace detail } // namespace celerity