Skip to content

Commit

Permalink
manual changes
Browse files Browse the repository at this point in the history
  • Loading branch information
yhmtsai committed Dec 3, 2024
1 parent f048ddb commit b4a3a40
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions core/config/parse_macro.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@


// for value_type only
#define GKO_PARSE_VALUE_TYPE_BASE_(_type, _configurator, \
_value_type_list_base) \
#define GKO_PARSE_VALUE_TYPE_(_type, _configurator, _value_type_list) \
template <> \
deferred_factory_parameter<gko::LinOpFactory> \
parse<gko::config::LinOpFactoryType::_type>( \
Expand All @@ -29,22 +28,21 @@
return gko::config::dispatch<gko::LinOpFactory, _configurator>( \
config, context, updated, \
gko::config::make_type_selector(updated.get_value_typestr(), \
_value_type_list_base)); \
_value_type_list)); \
} \
static_assert(true, \
"This assert is used to counter the false positive extra " \
"semi-colon warnings")
#define GKO_PARSE_VALUE_TYPE_BASE(_type, _configurator) \
GKO_PARSE_VALUE_TYPE_BASE_(_type, _configurator, \
gko::config::value_type_list_base())
GKO_PARSE_VALUE_TYPE_(_type, _configurator, \
gko::config::value_type_list_base())

#define GKO_PARSE_VALUE_TYPE(_type, _configurator) \
GKO_PARSE_VALUE_TYPE_BASE_(_type, _configurator, \
gko::config::value_type_list())
#define GKO_PARSE_VALUE_TYPE(_type, _configurator) \
GKO_PARSE_VALUE_TYPE_(_type, _configurator, gko::config::value_type_list())

// for value_type and index_type
#define GKO_PARSE_VALUE_AND_INDEX_TYPE_BASE_(_type, _configurator, \
_value_type_list_base) \
#define GKO_PARSE_VALUE_AND_INDEX_TYPE_(_type, _configurator, \
_value_type_list) \
template <> \
deferred_factory_parameter<gko::LinOpFactory> \
parse<gko::config::LinOpFactoryType::_type>( \
Expand All @@ -56,7 +54,7 @@
return gko::config::dispatch<gko::LinOpFactory, _configurator>( \
config, context, updated, \
gko::config::make_type_selector(updated.get_value_typestr(), \
_value_type_list_base), \
_value_type_list), \
gko::config::make_type_selector(updated.get_index_typestr(), \
gko::config::index_type_list())); \
} \
Expand All @@ -65,12 +63,12 @@
"semi-colon warnings")

#define GKO_PARSE_VALUE_AND_INDEX_TYPE_BASE(_type, _configurator) \
GKO_PARSE_VALUE_AND_INDEX_TYPE_BASE_(_type, _configurator, \
gko::config::value_type_list_base())
GKO_PARSE_VALUE_AND_INDEX_TYPE_(_type, _configurator, \
gko::config::value_type_list_base())

#define GKO_PARSE_VALUE_AND_INDEX_TYPE(_type, _configurator) \
GKO_PARSE_VALUE_AND_INDEX_TYPE_BASE_(_type, _configurator, \
gko::config::value_type_list())
#define GKO_PARSE_VALUE_AND_INDEX_TYPE(_type, _configurator) \
GKO_PARSE_VALUE_AND_INDEX_TYPE_(_type, _configurator, \
gko::config::value_type_list())


#endif // GKO_CORE_CONFIG_PARSE_MACRO_HPP_

0 comments on commit b4a3a40

Please sign in to comment.