Blaze 3.9
Real.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_FUNCTORS_REAL_H_
36#define _BLAZE_MATH_FUNCTORS_REAL_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
43#include <utility>
65#include <blaze/system/Inline.h>
67
68
69namespace blaze {
70
71//=================================================================================================
72//
73// CLASS DEFINITION
74//
75//=================================================================================================
76
77//*************************************************************************************************
81struct Real
82{
83 //**********************************************************************************************
89 template< typename T >
90 BLAZE_ALWAYS_INLINE BLAZE_DEVICE_CALLABLE decltype(auto) operator()( T&& a ) const
91 {
92 return real( std::forward<T>( a ) );
93 }
94 //**********************************************************************************************
95};
96//*************************************************************************************************
97
98
99
100
101//=================================================================================================
102//
103// YIELDSUNIFORM SPECIALIZATIONS
104//
105//=================================================================================================
106
107//*************************************************************************************************
109template< typename T >
110struct YieldsUniform<Real,T>
111 : public IsUniform<T>
112{};
114//*************************************************************************************************
115
116
117
118
119//=================================================================================================
120//
121// YIELDSSYMMETRIC SPECIALIZATIONS
122//
123//=================================================================================================
124
125//*************************************************************************************************
127template< typename MT >
128struct YieldsSymmetric<Real,MT>
129 : public BoolConstant< IsSymmetric_v<MT> || IsHermitian_v<MT> >
130{};
132//*************************************************************************************************
133
134
135
136
137//=================================================================================================
138//
139// YIELDSLOWER SPECIALIZATIONS
140//
141//=================================================================================================
142
143//*************************************************************************************************
145template< typename MT >
146struct YieldsLower<Real,MT>
147 : public IsLower<MT>
148{};
150//*************************************************************************************************
151
152
153
154
155//=================================================================================================
156//
157// YIELDSUNILOWER SPECIALIZATIONS
158//
159//=================================================================================================
160
161//*************************************************************************************************
163template< typename MT >
164struct YieldsUniLower<Real,MT>
165 : public IsUniLower<MT>
166{};
168//*************************************************************************************************
169
170
171
172
173//=================================================================================================
174//
175// YIELDSSTRICTLYLOWER SPECIALIZATIONS
176//
177//=================================================================================================
178
179//*************************************************************************************************
181template< typename MT >
182struct YieldsStrictlyLower<Real,MT>
183 : public IsStrictlyLower<MT>
184{};
186//*************************************************************************************************
187
188
189
190
191//=================================================================================================
192//
193// YIELDSUPPER SPECIALIZATIONS
194//
195//=================================================================================================
196
197//*************************************************************************************************
199template< typename MT >
200struct YieldsUpper<Real,MT>
201 : public IsUpper<MT>
202{};
204//*************************************************************************************************
205
206
207
208
209//=================================================================================================
210//
211// YIELDSUNIUPPER SPECIALIZATIONS
212//
213//=================================================================================================
214
215//*************************************************************************************************
217template< typename MT >
218struct YieldsUniUpper<Real,MT>
219 : public IsUniUpper<MT>
220{};
222//*************************************************************************************************
223
224
225
226
227//=================================================================================================
228//
229// YIELDSSTRICTLYUPPER SPECIALIZATIONS
230//
231//=================================================================================================
232
233//*************************************************************************************************
235template< typename MT >
236struct YieldsStrictlyUpper<Real,MT>
237 : public IsStrictlyUpper<MT>
238{};
240//*************************************************************************************************
241
242
243
244
245//=================================================================================================
246//
247// YIELDSZERO SPECIALIZATIONS
248//
249//=================================================================================================
250
251//*************************************************************************************************
253template< typename T >
254struct YieldsZero<Real,T>
255 : public IsZero<T>
256{};
258//*************************************************************************************************
259
260} // namespace blaze
261
262#endif
Macro for CUDA compatibility.
Header file for the IntegralConstant class template.
Header file for the IsHermitian type trait.
Header file for the IsLower type trait.
Header file for the IsStrictlyLower type trait.
Header file for the IsStrictlyUpper type trait.
Header file for the IsSymmetric type trait.
Header file for the IsUniLower type trait.
Header file for the IsUniUpper type trait.
Header file for the IsUniform type trait.
Header file for the IsUpper type trait.
Header file for the YieldsLower type trait.
Header file for the YieldsStrictlyLower type trait.
Header file for the YieldsStrictlyUpper type trait.
Header file for the YieldsSymmetric type trait.
Header file for the YieldsUniLower type trait.
Header file for the YieldsUniUpper type trait.
Header file for the YieldsUniform type trait.
Header file for the YieldsUpper type trait.
Header file for the YieldsZero type trait.
decltype(auto) real(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the real part of each single element of dm.
Definition: DMatMapExpr.h:1529
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
#define BLAZE_DEVICE_CALLABLE
Conditional macro that sets host and device attributes when compiled with CUDA.
Definition: HostDevice.h:94
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.
Definition: IntegralConstant.h:110
Header file for the real shim.
Generic wrapper for the real() function.
Definition: Real.h:82
System settings for the inline keywords.
Header file for the IsZero type trait.