27 #include <cuComplex.h> 41 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 44 float const &
real(cuFloatComplex
const &z) {
return z.x; }
47 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 50 float &
real(cuFloatComplex &z) {
return z.x; }
53 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 56 double const &
real(cuDoubleComplex
const &z) {
return z.x; }
59 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 62 double &
real(cuDoubleComplex &z) {
return z.x; }
65 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 68 float const &
imag(cuFloatComplex
const &z) {
return z.y; }
71 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 74 float &
imag(cuFloatComplex &z) {
return z.y; }
77 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 80 double const &
imag(cuDoubleComplex
const &z) {
return z.y; }
83 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 86 double &
imag(cuDoubleComplex &z) {
return z.y; }
115 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 118 complex(T r = T(0), T i = T(0)) : _real(r), _imag(i) {}
121 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 124 complex(cuFloatComplex
const &z) : _real(platform::
real(z)), _imag(platform::
imag(z)) {}
127 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 130 complex(cuDoubleComplex
const &z) : _real(platform::
real(z)), _imag(platform::
imag(z)) {}
133 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 136 T
const &
real()
const {
return _real; }
139 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 145 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 148 T
const &
imag()
const {
return _imag; }
151 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 157 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 160 operator cuFloatComplex()
const {
return make_cuFloatComplex(
real(),
imag()); }
163 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 166 operator cuDoubleComplex()
const {
return make_cuDoubleComplex(
real(),
imag()); }
174 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 176 template <
typename T>
182 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 184 template <
typename T>
190 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 192 template <
typename T>
198 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 200 template <
typename T>
209 template <
typename T>
210 std::ostream &operator<<(std::ostream &out, complex<T>
const &z) {
213 return out << _r <<
"+i" << _i;
221 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 223 template <
typename T>
229 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 231 template <
typename T>
233 return !(lhs == rhs);
237 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 239 template <
typename T>
245 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 247 template <
typename T>
253 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 255 template <
typename T>
262 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 264 template <
typename T>
270 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 272 template <
typename T>
278 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 280 template <
typename T>
289 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 291 template <
typename T>
297 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 299 template <
typename T>
307 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 309 template <
typename T>
316 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 318 template <
typename T>
325 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 327 template <
typename T>
334 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 336 template <
typename T>
343 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 345 template <
typename T>
356 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 358 template <
typename T>
364 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 366 template <
typename T>
372 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 374 template <
typename T>
380 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 382 template <
typename T>
388 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 390 template <
typename T>
397 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 399 template <
typename T>
405 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 407 template <
typename T>
413 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 415 template <
typename T>
421 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 423 template <
typename T>
425 return log(z) / T(
log(T(10)));
429 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 431 template <
typename T>
433 return sqrt(T(2)) / T(2) *
439 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 441 template <
typename T>
443 return (
exp(z) +
exp(-z)) / T(2);
447 #pragma hd_warning_disable // Suppresses warnings when attempting to instantiate complex<T> with a 449 template <
typename T>
#define CUTLASS_HOST_DEVICE
Definition: cutlass.h:46
Basic include for CUTLASS macros.