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
Refactoring component_base and base_action/transfer_base_action #3148
Conversation
00cecc6
to
2e8b98d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a minor nitpick, looks good otherwise!
naming::address component_base::get_current_address() const | ||
{ | ||
return naming::address(get_locality(), type_, | ||
std::uint64_t(static_cast<component_base const*>(this))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the static cast here is not necessary, is it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is needed as this
might be different from the base address of the whole component.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But this code is wrong for other reasons, will fix.
2e8b98d
to
881ad18
Compare
@@ -174,12 +174,12 @@ namespace hpx { namespace components | |||
|
|||
// Returns the (unique) name for a given component | |||
template <typename Component, typename Enable = void> | |||
const char* get_component_name(); | |||
HPX_CONSTEXPR char const* const get_component_name(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the extra const generates warnings for clang.
|
||
// Returns the (unique) name of the base component. If there is none, | ||
// nullptr is returned | ||
template <typename Component, typename Enable = void> | ||
const char* get_component_base_name(); | ||
HPX_CONSTEXPR const char* const get_component_base_name(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here.
template <> HPX_ALWAYS_EXPORT \ | ||
const char* get_component_name< Component, void>() \ | ||
template <> HPX_CONSTEXPR \ | ||
char const* const get_component_name< Component, void>() \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here.
template <> HPX_ALWAYS_EXPORT \ | ||
const char* get_component_base_name< Component, void>() \ | ||
template <> HPX_CONSTEXPR \ | ||
char const* const get_component_base_name< Component, void>() \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here.
template <> HPX_ALWAYS_EXPORT \ | ||
const char* get_component_name< Component, void>() \ | ||
template <> HPX_CONSTEXPR \ | ||
char const* const get_component_name< Component, void>() \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here.
template <> HPX_ALWAYS_EXPORT \ | ||
const char* get_component_base_name< Component, void>() \ | ||
template <> HPX_CONSTEXPR \ | ||
char const* const get_component_base_name< Component, void>() \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here.
c0673fc
to
7e4cabf
Compare
appveyor is not happy with this right now |
Yes, I know - but this was introduced earlier by one of the changes to the thread scheduling. |
Can you restart the build then? It looks like this PR is the only one affected to that timeout. |
The same happened here: https://ci.appveyor.com/project/hkaiser/hpx/build/fix_timed_suspension-1897, apparently this got branched off at a bad time... I'll rebase and restart the tests. |
…duce number of instantiated functions and exported symbols - making get_component_type() related functionality constexpr (instead of always exporting the functions)
7e4cabf
to
2783320
Compare
This allows to reduce the number of instantiated functions and exported symbols, especially for external modules that contain components.