Blaze 3.9
Imag.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_FUNCTORS_IMAG_H_
36#define _BLAZE_MATH_FUNCTORS_IMAG_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
43#include <utility>
60#include <blaze/system/Inline.h>
61
62
63namespace blaze {
64
65//=================================================================================================
66//
67// CLASS DEFINITION
68//
69//=================================================================================================
70
71//*************************************************************************************************
75struct Imag
76{
77 //**********************************************************************************************
83 template< typename T >
84 BLAZE_ALWAYS_INLINE BLAZE_DEVICE_CALLABLE decltype(auto) operator()( T&& a ) const
85 {
86 return imag( std::forward<T>( a ) );
87 }
88 //**********************************************************************************************
89};
90//*************************************************************************************************
91
92
93
94
95//=================================================================================================
96//
97// YIELDSUNIFORM SPECIALIZATIONS
98//
99//=================================================================================================
100
101//*************************************************************************************************
103template< typename T >
104struct YieldsUniform<Imag,T>
105 : public IsUniform<T>
106{};
108//*************************************************************************************************
109
110
111
112
113//=================================================================================================
114//
115// YIELDSSYMMETRIC SPECIALIZATIONS
116//
117//=================================================================================================
118
119//*************************************************************************************************
121template< typename MT >
122struct YieldsSymmetric<Imag,MT>
123 : public IsSymmetric<MT>
124{};
126//*************************************************************************************************
127
128
129
130
131//=================================================================================================
132//
133// YIELDSLOWER SPECIALIZATIONS
134//
135//=================================================================================================
136
137//*************************************************************************************************
139template< typename MT >
140struct YieldsLower<Imag,MT>
141 : public IsLower<MT>
142{};
144//*************************************************************************************************
145
146
147
148
149//=================================================================================================
150//
151// YIELDSSTRICTLYLOWER SPECIALIZATIONS
152//
153//=================================================================================================
154
155//*************************************************************************************************
157template< typename MT >
158struct YieldsStrictlyLower<Imag,MT>
159 : public IsStrictlyLower<MT>
160{};
162//*************************************************************************************************
163
164
165
166
167//=================================================================================================
168//
169// YIELDSUPPER SPECIALIZATIONS
170//
171//=================================================================================================
172
173//*************************************************************************************************
175template< typename MT >
176struct YieldsUpper<Imag,MT>
177 : public IsUpper<MT>
178{};
180//*************************************************************************************************
181
182
183
184
185//=================================================================================================
186//
187// YIELDSSTRICTLYUPPER SPECIALIZATIONS
188//
189//=================================================================================================
190
191//*************************************************************************************************
193template< typename MT >
194struct YieldsStrictlyUpper<Imag,MT>
195 : public IsStrictlyUpper<MT>
196{};
198//*************************************************************************************************
199
200
201
202
203//=================================================================================================
204//
205// YIELDSZERO SPECIALIZATIONS
206//
207//=================================================================================================
208
209//*************************************************************************************************
211template< typename T >
212struct YieldsZero<Imag,T>
213 : public IsZero<T>
214{};
216//*************************************************************************************************
217
218} // namespace blaze
219
220#endif
Macro for CUDA compatibility.
Header file for the imaginary shim.
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 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 YieldsUniform type trait.
Header file for the YieldsUpper type trait.
Header file for the YieldsZero type trait.
decltype(auto) imag(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the imaginary part of each single element of dm.
Definition: DMatMapExpr.h:1557
#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
Generic wrapper for the imag() function.
Definition: Imag.h:76
System settings for the inline keywords.
Header file for the IsZero type trait.