-
-
Notifications
You must be signed in to change notification settings - Fork 543
Adapting HPX actions module to C++20 modules #7237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
hkaiser
merged 9 commits into
TheHPXProject:master
from
arpittkhandelwal:feature/cxx20-modules
May 12, 2026
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
53acba4
Enable C++20 module generation for remaining core and full modules
arpittkhandelwal 655255d
Modularize actions module for C++20
arpittkhandelwal 221c3a9
Fix CI module build failures for init_runtime and parcelports headers
arpittkhandelwal 19ccb23
Fix include ordering to pass clang-format CI check
arpittkhandelwal 8a86f15
Fix transfer_action C++20 module visibility
arpittkhandelwal 8894ff7
Fix clang-format issues in core
arpittkhandelwal 6bd29be
Run clang-format and cmake-format on all edited files
arpittkhandelwal efa686b
actions: ensure actions.hpp precedes transfer_continuation_action.hpp
arpittkhandelwal d34cb1d
Finalize adapting actions module to C++ modules
hkaiser File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,120 @@ | ||
| // Copyright (c) 2026 Arpit Khandelwal | ||
| // | ||
| // SPDX-License-Identifier: BSL-1.0 | ||
| // Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
| // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
|
|
||
| #pragma once | ||
|
|
||
| #include <hpx/config.hpp> | ||
| #include <hpx/actions_base/macros.hpp> | ||
| #include <hpx/modules/preprocessor.hpp> | ||
|
|
||
| #include <type_traits> | ||
|
|
||
| #if defined(HPX_HAVE_NETWORKING) | ||
|
|
||
| // Helper macro for action serialization; each of the defined actions needs to | ||
| // be registered with the serialization library. | ||
|
|
||
| #define HPX_DEFINE_GET_ACTION_NAME(action) \ | ||
| HPX_DEFINE_GET_ACTION_NAME_(action, action) \ | ||
| /**/ | ||
|
|
||
| #define HPX_DEFINE_GET_ACTION_NAME_(action, actionname) \ | ||
| HPX_DEFINE_GET_ACTION_NAME_ITT(action, actionname) \ | ||
| namespace hpx::actions::detail { \ | ||
| template <> \ | ||
| HPX_ALWAYS_EXPORT char const* get_action_name</**/ action>() noexcept \ | ||
| { \ | ||
| return HPX_PP_STRINGIZE(actionname); \ | ||
| } \ | ||
| } \ | ||
| /**/ | ||
|
|
||
| /////////////////////////////////////////////////////////////////////////////// | ||
| #if defined(HPX_HAVE_ITTNOTIFY) && HPX_HAVE_ITTNOTIFY != 0 && \ | ||
| !defined(HPX_HAVE_APEX) | ||
| #define HPX_DEFINE_GET_ACTION_NAME_ITT(action, actionname) \ | ||
| namespace hpx::actions::detail { \ | ||
| template <> \ | ||
| HPX_ALWAYS_EXPORT util::itt::string_handle const& \ | ||
| get_action_name_itt</**/ action>() noexcept \ | ||
| { \ | ||
| static util::itt::string_handle sh(HPX_PP_STRINGIZE(actionname)); \ | ||
| return sh; \ | ||
| } \ | ||
| } \ | ||
| /**/ | ||
|
|
||
| #define HPX_REGISTER_ACTION_DECLARATION_NO_DEFAULT_GUID_ITT(action) \ | ||
| namespace hpx::actions::detail { \ | ||
| template <> \ | ||
| HPX_ALWAYS_EXPORT util::itt::string_handle const& \ | ||
| get_action_name_itt</**/ action>() noexcept; \ | ||
| } \ | ||
| /**/ | ||
| #else // HPX_HAVE_ITTNOTIFY != 0 && !defined(HPX_HAVE_APEX) | ||
| #define HPX_DEFINE_GET_ACTION_NAME_ITT(action, actionname) /**/ | ||
| #define HPX_REGISTER_ACTION_DECLARATION_NO_DEFAULT_GUID_ITT(action) /**/ | ||
| #endif // HPX_HAVE_ITTNOTIFY != 0 && !defined(HPX_HAVE_APEX) | ||
|
|
||
| #define HPX_REGISTER_ACTION_DECLARATION_NO_DEFAULT_GUID(action) \ | ||
| HPX_REGISTER_ACTION_DECLARATION_NO_DEFAULT_GUID_ITT(action) \ | ||
| namespace hpx::actions::detail { \ | ||
| template <> \ | ||
| HPX_ALWAYS_EXPORT char const* get_action_name<action>() noexcept; \ | ||
| } \ | ||
| HPX_REGISTER_ACTION_EXTERN_DECLARATION(action) \ | ||
| \ | ||
| namespace hpx::traits { \ | ||
| template <> \ | ||
| struct is_action</**/ action> : std::true_type \ | ||
| { \ | ||
| }; \ | ||
| template <> \ | ||
| struct needs_automatic_registration</**/ action> : std::false_type \ | ||
| { \ | ||
| }; \ | ||
| } \ | ||
| /**/ | ||
|
|
||
| #define HPX_REGISTER_ACTION_DECLARATION_2(action, actionname) \ | ||
| HPX_REGISTER_ACTION_DECLARATION_NO_DEFAULT_GUID(action) \ | ||
| /**/ | ||
|
|
||
| #if defined(HPX_MSVC) || defined(HPX_MINGW) | ||
| #define HPX_REGISTER_ACTION_2(action, actionname) \ | ||
| HPX_DEFINE_GET_ACTION_NAME_(action, actionname) \ | ||
| HPX_REGISTER_ACTION_INVOCATION_COUNT(action) \ | ||
| HPX_REGISTER_PER_ACTION_DATA_COUNTER_TYPES(action) \ | ||
| namespace hpx::actions { \ | ||
| template struct HPX_ALWAYS_EXPORT transfer_action</**/ action>; \ | ||
| template struct HPX_ALWAYS_EXPORT \ | ||
| transfer_continuation_action</**/ action>; \ | ||
| } \ | ||
| /**/ | ||
| #define HPX_REGISTER_ACTION_EXTERN_DECLARATION(action) /**/ | ||
|
|
||
| #else // defined(HPX_MSVC) || defined(HPX_MINGW) | ||
|
|
||
| #define HPX_REGISTER_ACTION_2(action, actionname) \ | ||
| HPX_DEFINE_GET_ACTION_NAME_(action, actionname) \ | ||
| HPX_REGISTER_ACTION_INVOCATION_COUNT(action) \ | ||
| HPX_REGISTER_PER_ACTION_DATA_COUNTER_TYPES(action) \ | ||
| namespace hpx::actions { \ | ||
| template struct transfer_action</**/ action>; \ | ||
| template struct transfer_continuation_action</**/ action>; \ | ||
| } \ | ||
| /**/ | ||
| #define HPX_REGISTER_ACTION_EXTERN_DECLARATION(action) \ | ||
| namespace hpx::actions { \ | ||
| extern template struct HPX_ALWAYS_IMPORT transfer_action</**/ action>; \ | ||
| extern template struct HPX_ALWAYS_IMPORT \ | ||
| transfer_continuation_action</**/ action>; \ | ||
| } \ | ||
| /**/ | ||
|
|
||
| #endif // defined(HPX_MSVC) || defined(HPX_MINGW) | ||
|
|
||
| #endif // HPX_HAVE_NETWORKING | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.