Ginkgo  Generated from tags/v1.0.0^0 branch based on master. Ginkgo version 1.0.0
A numerical linear algebra library targeting many-core architectures
std_extensions.hpp
1 /*******************************<GINKGO LICENSE>******************************
2 Copyright (c) 2017-2019, the Ginkgo authors
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions
7 are met:
8 
9 1. Redistributions of source code must retain the above copyright
10 notice, this list of conditions and the following disclaimer.
11 
12 2. Redistributions in binary form must reproduce the above copyright
13 notice, this list of conditions and the following disclaimer in the
14 documentation and/or other materials provided with the distribution.
15 
16 3. Neither the name of the copyright holder nor the names of its
17 contributors may be used to endorse or promote products derived from
18 this software without specific prior written permission.
19 
20 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
21 IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22 TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
23 PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 ******************************<GINKGO LICENSE>*******************************/
32 
33 #ifndef GKO_CORE_STD_EXTENSIONS_HPP_
34 #define GKO_CORE_STD_EXTENSIONS_HPP_
35 
36 
37 #include <memory>
38 #include <type_traits>
39 
40 
41 // This header provides implementations of useful utilities introduced into the
42 // C++ standard after C++11 (i.e. C++14 and C++17).
43 // For documentation about these utilities refer to the newer version of the
44 // standard.
45 
46 
47 namespace gko {
53 namespace xstd {
54 namespace detail {
55 
56 
57 template <typename... Ts>
58 struct make_void {
59  using type = void;
60 };
61 
62 
63 } // namespace detail
64 
65 
66 template <typename... Ts>
67 using void_t = typename detail::make_void<Ts...>::type;
68 
69 
70 template <bool B, typename T = void>
71 using enable_if_t = typename std::enable_if<B, T>::type;
72 
73 
74 template <bool B, typename T, typename F>
75 using conditional_t = typename std::conditional<B, T, F>::type;
76 
77 
78 template <typename T>
79 using decay_t = typename std::decay<T>::type;
80 
81 
82 } // namespace xstd
83 } // namespace gko
84 
85 
86 #endif // GKO_CORE_STD_EXTENSIONS_HPP_
The Ginkgo namespace.
Definition: abstract_factory.hpp:45