Skip to content

Commit

Permalink
Move action declarations to headers
Browse files Browse the repository at this point in the history
  • Loading branch information
kordejong committed Feb 20, 2024
1 parent 347da60 commit c992ad0
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ namespace lue::server {
} \
\
HPX_REGISTER_COMPONENT( \
lue::detail::ArrayPartitionServerComponent_##unique, ArrayPartitionServer_##unique) \
lue::detail::ArrayPartitionServerComponent_##unique, lue_ArrayPartitionServer_##unique) \
\
HPX_REGISTER_ACTION( \
lue::detail::ArrayPartitionServer_##unique::DataAction, ArrayPartitionServerDataAction_##unique) \
Expand All @@ -146,3 +146,25 @@ namespace lue::server {
HPX_REGISTER_ACTION( \
lue::detail::ArrayPartitionServer_##unique::NrElementsAction, \
ArrayPartitionServerNrElementsAction_##unique)


#define LUE_REGISTER_ARRAY_PARTITION_ACTION_DECLARATIONS_RANK(Element) \
LUE_REGISTER_ARRAY_PARTITION_ACTION_DECLARATIONS(Element, 0, Element##_0) \
LUE_REGISTER_ARRAY_PARTITION_ACTION_DECLARATIONS(Element, 1, Element##_1) \
LUE_REGISTER_ARRAY_PARTITION_ACTION_DECLARATIONS(Element, 2, Element##_2)

#define LUE_REGISTER_ARRAY_PARTITION_ACTION_DECLARATIONS_ELEMENT() \
LUE_REGISTER_ARRAY_PARTITION_ACTION_DECLARATIONS_RANK(bool) \
LUE_REGISTER_ARRAY_PARTITION_ACTION_DECLARATIONS_RANK(uint8_t) \
LUE_REGISTER_ARRAY_PARTITION_ACTION_DECLARATIONS_RANK(int32_t) \
LUE_REGISTER_ARRAY_PARTITION_ACTION_DECLARATIONS_RANK(uint32_t) \
LUE_REGISTER_ARRAY_PARTITION_ACTION_DECLARATIONS_RANK(int64_t) \
LUE_REGISTER_ARRAY_PARTITION_ACTION_DECLARATIONS_RANK(uint64_t) \
LUE_REGISTER_ARRAY_PARTITION_ACTION_DECLARATIONS_RANK(float) \
LUE_REGISTER_ARRAY_PARTITION_ACTION_DECLARATIONS_RANK(double)

LUE_REGISTER_ARRAY_PARTITION_ACTION_DECLARATIONS_ELEMENT()

#undef LUE_REGISTER_ARRAY_PARTITION_ACTION_DECLARATIONS
#undef LUE_REGISTER_ARRAY_PARTITION_ACTION_DECLARATIONS_ELEMENT
#undef LUE_REGISTER_ARRAY_PARTITION_ACTION_DECLARATIONS_RANK
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "lue/framework/partitioned_array/server/array_partition_impl.hpp"


// Boilerplate required once per component module
HPX_REGISTER_COMPONENT_MODULE()
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#include "lue/framework/partitioned_array/server/array_partition_impl.hpp"


LUE_REGISTER_ARRAY_PARTITION_ACTION_DECLARATIONS(
{{ Element }},
{{ rank }},
{{ Element }}_{{ rank }})
LUE_REGISTER_ARRAY_PARTITION_ACTIONS(
{{ Element }},
{{ rank }},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ namespace lue::server {
} \
\
HPX_REGISTER_COMPONENT( \
lue::detail::SerialRoutePartitionServerComponent_##unique, SerialRoutePartitionServer_##unique) \
lue::detail::SerialRoutePartitionServerComponent_##unique, lue_SerialRoutePartitionServer_##unique) \
\
HPX_REGISTER_ACTION( \
lue::detail::SerialRoutePartitionServer_##unique::OffsetAction, \
Expand Down Expand Up @@ -172,3 +172,21 @@ namespace lue::server {
HPX_REGISTER_ACTION( \
lue::detail::SerialRoutePartitionServer_##unique::RemoteRouteFragmentLocationsAction, \
SerialRoutePartitionServerRemoteRouteFragmentLocationsAction_##unique)


#define LUE_REGISTER_SERIAL_ROUTE_PARTITION_ACTION_DECLARATIONS_RANK(Element) \
LUE_REGISTER_SERIAL_ROUTE_PARTITION_ACTION_DECLARATIONS(Element, 1, Element##_1) \
LUE_REGISTER_SERIAL_ROUTE_PARTITION_ACTION_DECLARATIONS(Element, 2, Element##_2)

#define LUE_REGISTER_SERIAL_ROUTE_PARTITION_ACTION_DECLARATIONS_ELEMENT() \
LUE_REGISTER_SERIAL_ROUTE_PARTITION_ACTION_DECLARATIONS_RANK(uint8_t) \
LUE_REGISTER_SERIAL_ROUTE_PARTITION_ACTION_DECLARATIONS_RANK(int32_t) \
LUE_REGISTER_SERIAL_ROUTE_PARTITION_ACTION_DECLARATIONS_RANK(uint32_t) \
LUE_REGISTER_SERIAL_ROUTE_PARTITION_ACTION_DECLARATIONS_RANK(int64_t) \
LUE_REGISTER_SERIAL_ROUTE_PARTITION_ACTION_DECLARATIONS_RANK(uint64_t)

LUE_REGISTER_SERIAL_ROUTE_PARTITION_ACTION_DECLARATIONS_ELEMENT()

#undef LUE_REGISTER_SERIAL_ROUTE_PARTITION_ACTION_DECLARATIONS
#undef LUE_REGISTER_SERIAL_ROUTE_PARTITION_ACTION_DECLARATIONS_ELEMENT
#undef LUE_REGISTER_SERIAL_ROUTE_PARTITION_ACTION_DECLARATIONS_RANK
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "lue/framework/partitioned_route/server/serial_route_partition_impl.hpp"


// Once per module (shared lib)
// Boilerplate required once per component module
HPX_REGISTER_COMPONENT_MODULE()
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#include "lue/framework/partitioned_route/server/serial_route_partition_impl.hpp"


LUE_REGISTER_SERIAL_ROUTE_PARTITION_ACTION_DECLARATIONS(
{{ RouteID }},
{{ rank }},
{{ RouteID }}_{{ rank }})
LUE_REGISTER_SERIAL_ROUTE_PARTITION_ACTIONS(
{{ RouteID }},
{{ rank }},
Expand Down

0 comments on commit c992ad0

Please sign in to comment.