Ginkgo: ginkgo/core/config/type_descriptor.hpp Source File

| Ginkgo Generated from branch based on main. Ginkgo version 1.11.0 A numerical linear algebra library targeting many-core architectures

Loading...
Searching...
No Matches
type_descriptor.hpp
1// SPDX-FileCopyrightText: 2017 - 2024 The Ginkgo authors
2//
3// SPDX-License-Identifier: BSD-3-Clause
4
5#ifndef GKO_PUBLIC_CORE_CONFIG_TYPE_DESCRIPTOR_HPP_
6#define GKO_PUBLIC_CORE_CONFIG_TYPE_DESCRIPTOR_HPP_
7
8
9#include <string>
10
11#include <ginkgo/core/base/types.hpp>
12
13namespace gko {
14namespace config {
15
16
39 class type_descriptor final {
40public:
52 explicit type_descriptor(std::string value_typestr = "float64",
53 std::string index_typestr = "int32",
54 std::string global_index_typestr = "int64");
55
59 const std::string& get_value_typestr() const;
60
64 const std::string& get_index_typestr() const;
65
70 const std::string& get_local_index_typestr() const;
71
75 const std::string& get_global_index_typestr() const;
76
77private:
78 std::string value_typestr_;
79 std::string index_typestr_;
80 std::string global_index_typestr_;
81};
82
83
92template <typename ValueType = double, typename IndexType = int32,
93 typename GlobalIndexType = int64>
94 type_descriptor make_type_descriptor();
95
96
97} // namespace config
98} // namespace gko
99
100#endif // GKO_PUBLIC_CORE_CONFIG_TYPE_DESCRIPTOR_HPP_
gko::config::type_descriptor
This class describes the value and index types to be used when building a Ginkgo type from a configur...
Definition type_descriptor.hpp:39
gko::config::type_descriptor::type_descriptor
type_descriptor(std::string value_typestr="float64", std::string index_typestr="int32", std::string global_index_typestr="int64")
type_descriptor constructor.
gko::config::type_descriptor::get_value_typestr
const std::string & get_value_typestr() const
Get the value type string.
gko::config::type_descriptor::get_local_index_typestr
const std::string & get_local_index_typestr() const
Get the local index type string, which gives the same result as get_index_typestr().
gko::config::type_descriptor::get_global_index_typestr
const std::string & get_global_index_typestr() const
Get the global index type string.
gko::config::type_descriptor::get_index_typestr
const std::string & get_index_typestr() const
Get the index type string.
gko
The Ginkgo namespace.
Definition abstract_factory.hpp:20
gko::int32
std::int32_t int32
32-bit signed integral type.
Definition types.hpp:107
gko::int64
std::int64_t int64
64-bit signed integral type.
Definition types.hpp:113