mgcpp
A C++ Math Library Based on CUDA
is_supported_type.hpp
Go to the documentation of this file.
1 
2 // Copyright RedPortal, mujjingun 2017 - 2018.
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
6 
7 #ifndef _MGCPP_TYPE_TRAITS_IS_SUPPORTED_TYPE_HPP_
8 #define _MGCPP_TYPE_TRAITS_IS_SUPPORTED_TYPE_HPP_
9 
10 #include <complex>
12 #include <type_traits>
13 
14 namespace mgcpp {
15 template <typename T>
16 struct is_supported_type : std::false_type {};
17 
18 template <>
19 struct is_supported_type<float> : std::true_type {};
20 
21 template <>
22 struct is_supported_type<double> : std::true_type {};
23 
24 template <>
25 struct is_supported_type<std::complex<float>> : std::true_type {};
26 
27 template <>
28 struct is_supported_type<std::complex<double>> : std::true_type {};
29 
30 #ifdef USE_HALF
31 template <>
32 struct is_supported_type<half> : std::true_type {};
33 #endif
34 } // namespace mgcpp
35 #endif
Definition: adapter_base.hpp:12
std::complex< Type > complex
Definition: complex.hpp:15
Definition: shape.hpp:33
Definition: is_supported_type.hpp:16