 |
Ginkgo
Generated from pipelines/2837190956 branch based on develop. Ginkgo version 2.0.0
A numerical linear algebra library targeting many-core architectures
|
5 #ifndef GKO_PUBLIC_CORE_SYNTHESIZER_CONTAINERS_HPP_
6 #define GKO_PUBLIC_CORE_SYNTHESIZER_CONTAINERS_HPP_
10 #include <type_traits>
27 template <
typename T, T... Values>
36 template <
typename... Types>
47 template <
int Start,
int End,
int Step = 1>
60 template <
typename List1,
typename List2>
61 struct concatenate_impl;
70 template <
typename T, T... Values1, T... Values2>
72 using type =
value_list<T, Values1..., Values2...>;
85 template <
typename List1,
typename List2>
86 using concatenate =
typename detail::concatenate_impl<List1, List2>::type;
97 template <
typename T,
typename =
void>
106 template <
typename T, T... Values>
107 struct as_list_impl<
value_list<T, Values...>> {
116 template <
typename... Types>
117 struct as_list_impl<
type_list<Types...>> {
129 template <
int Start,
int End,
int Step>
130 struct as_list_impl<
range<Start, End, Step>, std::enable_if_t<(Start < End)>> {
133 typename as_list_impl<range<Start + Step, End, Step>>::type>;
143 template <
int Start,
int End,
int Step>
144 struct as_list_impl<
range<Start, End, Step>, std::enable_if_t<(Start >= End)>> {
158 template <
typename T>
159 using as_list =
typename detail::as_list_impl<T>::type;
173 template <
typename T, T... Value>
176 return std::array<T,
sizeof...(Value)>{Value...};
184 #endif // GKO_PUBLIC_CORE_SYNTHESIZER_CONTAINERS_HPP_
typename detail::as_list_impl< T >::type as_list
as_list<T> gives the alias type of as_list_impl<T>::type.
Definition: containers.hpp:159
type_list records several types in template
Definition: containers.hpp:37
The matrix should be written as dense matrix in column-major order.
constexpr std::array< T, sizeof...(Value)> as_array(value_list< T, Value... > vl)
as_array<T> returns the array from value_list.
Definition: containers.hpp:174
value_list records several values with the same type in template.
Definition: containers.hpp:28
range records start, end, step in template
Definition: containers.hpp:48
The Ginkgo namespace.
Definition: abstract_factory.hpp:19
typename detail::concatenate_impl< List1, List2 >::type concatenate
concatenate combines two value_list into one value_list.
Definition: containers.hpp:86