Enhacement of the macro functionalities within hpx #6420
andreichalapco
started this conversation in
General
Replies: 2 comments 2 replies
-
I think so, yes.
Part of this could be replaced with a solution relying on the |
Beta Was this translation helpful? Give feedback.
0 replies
-
I have this minimal example impl: #include <hpx/include/actions.hpp>
std::uint64_t fibonacci(std::uint64_t n) { return n; };
template<auto F>
struct f_action : hpx::actions::make_action_t<decltype(F), F, f_action<F>> {
};
namespace hpx::actions::detail {
template<auto F>
__attribute__((visibility("default")))
constexpr const char *get_action_name(f_action <F>) noexcept {
return typeid(f_action < F > ).name();
}
} // namespace hpx::actions::detail
namespace hpx::traits {
// should be a specialization
template<auto F>
struct is_action<f_action < F>> : std::true_type {
};
template<auto F>
struct needs_automatic_registration<f_action<F>> : std::false_type {
};
} // namespace hpx::traits
namespace hpx::actions {
template<auto F>
struct __attribute__((visibility("default"))) transfer_action<f_action < F>>;
template<auto F>
struct __attribute__((visibility("default"))) transfer_continuation_action<f_action < F>>;
} // namespace hpx::actions Is there potential for a pull request here? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I've currently analyzed a bit the examples in the tutorials and I found the macros for creating the boiler plate code for remote actions (e.g HPX_PLAIN_ACTION).
I found this macro implementation is really hard to debug or also understand for the first comers on the hpx project and I wanted to start an initial issues for enhancement ... maybe with a follow-up pull request based on this.
I used the cpp preprocessor to expand the above example and came to the following macro expansion:
My question are:
template<auto fn>
work for replacing this entire macro?Beta Was this translation helpful? Give feedback.
All reactions