-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update documentation and move the macro
Co-authored-by: Marcel Koch <marcel.koch@kit.edu>
- Loading branch information
1 parent
399b6b3
commit 2410d2d
Showing
15 changed files
with
131 additions
and
102 deletions.
There are no files selected for viewing
This file contains 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,61 @@ | ||
// SPDX-FileCopyrightText: 2017 - 2024 The Ginkgo authors | ||
// | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
|
||
#ifndef GKO_CORE_CONFIG_PARSE_MACRO_HPP_ | ||
#define GKO_CORE_CONFIG_PARSE_MACRO_HPP_ | ||
|
||
|
||
#include <ginkgo/core/config/config.hpp> | ||
#include <ginkgo/core/config/registry.hpp> | ||
#include <ginkgo/core/config/type_descriptor.hpp> | ||
|
||
|
||
#include "core/config/config_helper.hpp" | ||
#include "core/config/dispatch.hpp" | ||
#include "core/config/type_descriptor_helper.hpp" | ||
|
||
|
||
// for value_type only | ||
#define PARSE_VALUE_TYPE(_type, _configurator) \ | ||
template <> \ | ||
deferred_factory_parameter<gko::LinOpFactory> \ | ||
parse<gko::config::LinOpFactoryType::_type>( \ | ||
const gko::config::pnode& config, \ | ||
const gko::config::registry& context, \ | ||
const gko::config::type_descriptor& td) \ | ||
{ \ | ||
auto updated = gko::config::update_type(config, td); \ | ||
return gko::config::dispatch<gko::LinOpFactory, _configurator>( \ | ||
config, context, updated, \ | ||
gko::config::make_type_selector(updated.get_value_typestr(), \ | ||
gko::config::value_type_list())); \ | ||
} \ | ||
static_assert(true, \ | ||
"This assert is used to counter the false positive extra " \ | ||
"semi-colon warnings") | ||
|
||
|
||
// for value_type and index_type | ||
#define PARSE_VALUE_AND_INDEX_TYPE(_type, _configurator) \ | ||
template <> \ | ||
deferred_factory_parameter<gko::LinOpFactory> \ | ||
parse<gko::config::LinOpFactoryType::_type>( \ | ||
const gko::config::pnode& config, \ | ||
const gko::config::registry& context, \ | ||
const gko::config::type_descriptor& td) \ | ||
{ \ | ||
auto updated = gko::config::update_type(config, td); \ | ||
return gko::config::dispatch<gko::LinOpFactory, _configurator>( \ | ||
config, context, updated, \ | ||
gko::config::make_type_selector(updated.get_value_typestr(), \ | ||
gko::config::value_type_list()), \ | ||
gko::config::make_type_selector(updated.get_index_typestr(), \ | ||
gko::config::index_type_list())); \ | ||
} \ | ||
static_assert(true, \ | ||
"This assert is used to counter the false positive extra " \ | ||
"semi-colon warnings") | ||
|
||
|
||
#endif // GKO_CORE_CONFIG_PARSE_MACRO_HPP_ |
This file contains 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 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 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 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 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 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 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 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 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
Oops, something went wrong.