|
Kokkos Core Kernels Package
Version of the Day
|
Partial reimplementation of std::complex that works as the result of a Kokkos::parallel_reduce. More...
#include <Kokkos_Complex.hpp>
Public Types | |
| typedef RealType | value_type |
| The type of the real or imaginary parts of this complex number. More... | |
Public Member Functions | |
| KOKKOS_INLINE_FUNCTION | complex () |
| Default constructor (initializes both real and imaginary parts to zero). More... | |
| KOKKOS_INLINE_FUNCTION | complex (const complex< RealType > &src) |
| Copy constructor. More... | |
| KOKKOS_INLINE_FUNCTION | complex (const volatile complex< RealType > &src) |
| Copy constructor from volatile. More... | |
| template<class InputRealType > | |
| complex (const std::complex< InputRealType > &src) | |
| Conversion constructor from std::complex. More... | |
| operator std::complex< RealType > () const | |
| Conversion operator to std::complex. More... | |
| template<class InputRealType > | |
| KOKKOS_INLINE_FUNCTION | complex (const InputRealType &val) |
| Constructor that takes just the real part, and sets the imaginary part to zero. More... | |
| template<class RealType1 , class RealType2 > | |
| KOKKOS_INLINE_FUNCTION | complex (const RealType1 &re, const RealType2 &im) |
| Constructor that takes the real and imaginary parts. More... | |
| template<class InputRealType > | |
| KOKKOS_INLINE_FUNCTION complex < RealType > & | operator= (const complex< InputRealType > &src) |
| Assignment operator. More... | |
| template<class InputRealType > | |
| KOKKOS_INLINE_FUNCTION void | operator= (const complex< InputRealType > &src) volatile |
Assignment operator, for volatile *this and nonvolatile input. More... | |
| template<class InputRealType > | |
| KOKKOS_INLINE_FUNCTION volatile complex< RealType > & | operator= (const volatile complex< InputRealType > &src) volatile |
| Assignment operator. More... | |
| template<class InputRealType > | |
| KOKKOS_INLINE_FUNCTION complex < RealType > & | operator= (const volatile complex< InputRealType > &src) |
| Assignment operator. More... | |
| template<class InputRealType > | |
| KOKKOS_INLINE_FUNCTION complex < RealType > & | operator= (const InputRealType &val) |
| Assignment operator (from a real number). More... | |
| template<class InputRealType > | |
| KOKKOS_INLINE_FUNCTION void | operator= (const InputRealType &val) volatile |
| Assignment operator (from a real number). More... | |
| template<class InputRealType > | |
| complex< RealType > & | operator= (const std::complex< InputRealType > &src) |
| Assignment operator from std::complex. More... | |
| KOKKOS_INLINE_FUNCTION RealType & | imag () |
| The imaginary part of this complex number. More... | |
| KOKKOS_INLINE_FUNCTION RealType & | real () |
| The real part of this complex number. More... | |
| KOKKOS_INLINE_FUNCTION const RealType | imag () const |
| The imaginary part of this complex number. More... | |
| KOKKOS_INLINE_FUNCTION const RealType | real () const |
| The real part of this complex number. More... | |
| KOKKOS_INLINE_FUNCTION volatile RealType & | imag () volatile |
| The imaginary part of this complex number (volatile overload). More... | |
| KOKKOS_INLINE_FUNCTION volatile RealType & | real () volatile |
| The real part of this complex number (volatile overload). More... | |
| KOKKOS_INLINE_FUNCTION const RealType | imag () const volatile |
| The imaginary part of this complex number (volatile overload). More... | |
| KOKKOS_INLINE_FUNCTION const RealType | real () const volatile |
| The real part of this complex number (volatile overload). More... | |
| KOKKOS_INLINE_FUNCTION void | imag (RealType v) |
| Set the imaginary part of this complex number. More... | |
| KOKKOS_INLINE_FUNCTION void | real (RealType v) |
| Set the real part of this complex number. More... | |
Partial reimplementation of std::complex that works as the result of a Kokkos::parallel_reduce.
| RealType | The type of the real and imaginary parts of the complex number. As with std::complex, this is only defined for float, double, and long double. The latter is currently forbidden in CUDA device kernels. |
Definition at line 61 of file Kokkos_Complex.hpp.
| typedef RealType Kokkos::complex< RealType >::value_type |
The type of the real or imaginary parts of this complex number.
Definition at line 67 of file Kokkos_Complex.hpp.
|
inline |
Default constructor (initializes both real and imaginary parts to zero).
Definition at line 70 of file Kokkos_Complex.hpp.
|
inline |
Copy constructor.
Definition at line 75 of file Kokkos_Complex.hpp.
|
inline |
Copy constructor from volatile.
Definition at line 80 of file Kokkos_Complex.hpp.
|
inline |
Conversion constructor from std::complex.
This constructor cannot be called in a CUDA device function, because std::complex's methods and nonmember functions are not marked as CUDA device functions.
Definition at line 90 of file Kokkos_Complex.hpp.
|
inline |
Constructor that takes just the real part, and sets the imaginary part to zero.
Definition at line 106 of file Kokkos_Complex.hpp.
|
inline |
Constructor that takes the real and imaginary parts.
Definition at line 117 of file Kokkos_Complex.hpp.
|
inline |
Conversion operator to std::complex.
This operator cannot be called in a CUDA device function, because std::complex's methods and nonmember functions are not marked as CUDA device functions.
Definition at line 99 of file Kokkos_Complex.hpp.
|
inline |
Assignment operator.
Definition at line 124 of file Kokkos_Complex.hpp.
|
inline |
Assignment operator, for volatile *this and nonvolatile input.
| src | [in] Input; right-hand side of the assignment. |
This operator returns void instead of volatile complex<RealType>& . See Kokkos Issue #177 for the explanation. In practice, this means that you should not chain assignments with volatile lvalues.
Definition at line 141 of file Kokkos_Complex.hpp.
|
inline |
Assignment operator.
Definition at line 151 of file Kokkos_Complex.hpp.
|
inline |
Assignment operator.
Definition at line 160 of file Kokkos_Complex.hpp.
|
inline |
Assignment operator (from a real number).
Definition at line 169 of file Kokkos_Complex.hpp.
|
inline |
Assignment operator (from a real number).
Definition at line 178 of file Kokkos_Complex.hpp.
|
inline |
Assignment operator from std::complex.
This constructor cannot be called in a CUDA device function, because std::complex's methods and nonmember functions are not marked as CUDA device functions.
Definition at line 189 of file Kokkos_Complex.hpp.
|
inline |
The imaginary part of this complex number.
Definition at line 196 of file Kokkos_Complex.hpp.
|
inline |
The real part of this complex number.
Definition at line 201 of file Kokkos_Complex.hpp.
|
inline |
The imaginary part of this complex number.
Definition at line 206 of file Kokkos_Complex.hpp.
|
inline |
The real part of this complex number.
Definition at line 211 of file Kokkos_Complex.hpp.
|
inline |
The imaginary part of this complex number (volatile overload).
Definition at line 216 of file Kokkos_Complex.hpp.
|
inline |
The real part of this complex number (volatile overload).
Definition at line 221 of file Kokkos_Complex.hpp.
|
inline |
The imaginary part of this complex number (volatile overload).
Definition at line 226 of file Kokkos_Complex.hpp.
|
inline |
The real part of this complex number (volatile overload).
Definition at line 231 of file Kokkos_Complex.hpp.
|
inline |
Set the imaginary part of this complex number.
Definition at line 236 of file Kokkos_Complex.hpp.
|
inline |
Set the real part of this complex number.
Definition at line 241 of file Kokkos_Complex.hpp.
1.8.5