Blaze 3.9
MakeComplex.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_TYPETRAITS_MAKECOMPLEX_H_
36#define _BLAZE_MATH_TYPETRAITS_MAKECOMPLEX_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
43#include <blaze/util/Complex.h>
44
45
46namespace blaze {
47
48//=================================================================================================
49//
50// CLASS DEFINITION
51//
52//=================================================================================================
53
54//*************************************************************************************************
72template< typename T >
74{};
75//*************************************************************************************************
76
77
78//*************************************************************************************************
83template<>
84struct MakeComplex<float>
85{
86 //**********************************************************************************************
87 using Type = complex<float>;
88 //**********************************************************************************************
89};
91//*************************************************************************************************
92
93
94//*************************************************************************************************
99template<>
100struct MakeComplex<double>
101{
102 //**********************************************************************************************
103 using Type = complex<double>;
104 //**********************************************************************************************
105};
107//*************************************************************************************************
108
109
110//*************************************************************************************************
115template<>
116struct MakeComplex<long double>
117{
118 //**********************************************************************************************
119 using Type = complex<long double>;
120 //**********************************************************************************************
121};
123//*************************************************************************************************
124
125
126//*************************************************************************************************
131template< typename T >
132struct MakeComplex< complex<T> >
133{
134 //**********************************************************************************************
135 using Type = complex<T>;
136 //**********************************************************************************************
137};
139//*************************************************************************************************
140
141
142//*************************************************************************************************
147template< typename T >
148struct MakeComplex<const T>
149{
150 //**********************************************************************************************
151 using Type = const typename MakeComplex<T>::Type;
152 //**********************************************************************************************
153};
155//*************************************************************************************************
156
157
158//*************************************************************************************************
163template< typename T >
164struct MakeComplex<volatile T>
165{
166 //**********************************************************************************************
167 using Type = volatile typename MakeComplex<T>::Type;
168 //**********************************************************************************************
169};
171//*************************************************************************************************
172
173
174//*************************************************************************************************
179template< typename T >
180struct MakeComplex<const volatile T>
181{
182 //**********************************************************************************************
183 using Type = const volatile typename MakeComplex<T>::Type;
184 //**********************************************************************************************
185};
187//*************************************************************************************************
188
189
190//*************************************************************************************************
203template< typename T >
205//*************************************************************************************************
206
207} // namespace blaze
208
209#endif
Header file for the complex data type.
Complex data type of the Blaze library.
typename MakeComplex< T >::Type MakeComplex_t
Auxiliary alias declaration for the MakeComplex type trait.
Definition: MakeComplex.h:204
Converting the given type to the matching 'complex' type.
Definition: MakeComplex.h:74