|
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 | |
| using | value_type = RealType |
| The type of the real or imaginary parts of this complex number. | |
Public Member Functions | |
| KOKKOS_DEFAULTED_FUNCTION | complex ()=default |
| Default constructor (initializes both real and imaginary parts to zero). | |
| KOKKOS_DEFAULTED_FUNCTION | complex (const complex &) noexcept=default |
| Copy constructor. | |
| template<class RType , std::enable_if_t< std::is_convertible_v< RType, RealType >, int > = 0> | |
| KOKKOS_INLINE_FUNCTION | complex (const complex< RType > &other) noexcept |
| Conversion constructor from compatible RType. | |
| KOKKOS_INLINE_FUNCTION | complex (const std::complex< RealType > &src) noexcept |
| Conversion constructor from std::complex. | |
| operator std::complex< RealType > () const noexcept | |
| Conversion operator to std::complex. | |
| KOKKOS_INLINE_FUNCTION constexpr | complex (const RealType &val) noexcept |
| Constructor that takes just the real part, and sets the imaginary part to zero. | |
| KOKKOS_INLINE_FUNCTION constexpr | complex (const RealType &re, const RealType &im) noexcept |
| Constructor that takes the real and imaginary parts. | |
| KOKKOS_INLINE_FUNCTION constexpr complex & | operator= (const RealType &val) noexcept |
| Assignment operator (from a real number). | |
| complex & | operator= (const std::complex< RealType > &src) noexcept |
| Assignment operator from std::complex. | |
| KOKKOS_INLINE_FUNCTION constexpr RealType & | imag () noexcept |
| The imaginary part of this complex number. | |
| KOKKOS_INLINE_FUNCTION constexpr RealType & | real () noexcept |
| The real part of this complex number. | |
| KOKKOS_INLINE_FUNCTION constexpr RealType | imag () const noexcept |
| The imaginary part of this complex number. | |
| KOKKOS_INLINE_FUNCTION constexpr RealType | real () const noexcept |
| The real part of this complex number. | |
| KOKKOS_INLINE_FUNCTION constexpr void | imag (RealType v) noexcept |
| Set the imaginary part of this complex number. | |
| KOKKOS_INLINE_FUNCTION constexpr void | real (RealType v) noexcept |
| Set the real part of this complex number. | |
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 43 of file Kokkos_Complex.hpp.
The type of the real or imaginary parts of this complex number.
Definition at line 59 of file Kokkos_Complex.hpp.
|
default |
Default constructor (initializes both real and imaginary parts to zero).
|
defaultnoexcept |
Copy constructor.
|
inlinenoexcept |
Conversion constructor from compatible RType.
Definition at line 75 of file Kokkos_Complex.hpp.
|
inlinenoexcept |
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 87 of file Kokkos_Complex.hpp.
|
inlineconstexprnoexcept |
Constructor that takes just the real part, and sets the imaginary part to zero.
Definition at line 109 of file Kokkos_Complex.hpp.
|
inlineconstexprnoexcept |
Constructor that takes the real and imaginary parts.
Definition at line 114 of file Kokkos_Complex.hpp.
|
inlinenoexcept |
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 103 of file Kokkos_Complex.hpp.
|
inlineconstexprnoexcept |
Assignment operator (from a real number).
Definition at line 118 of file Kokkos_Complex.hpp.
|
inlinenoexcept |
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 130 of file Kokkos_Complex.hpp.
|
inlineconstexprnoexcept |
The imaginary part of this complex number.
Definition at line 137 of file Kokkos_Complex.hpp.
|
inlineconstexprnoexcept |
The real part of this complex number.
Definition at line 141 of file Kokkos_Complex.hpp.
|
inlineconstexprnoexcept |
The imaginary part of this complex number.
Definition at line 145 of file Kokkos_Complex.hpp.
|
inlineconstexprnoexcept |
The real part of this complex number.
Definition at line 149 of file Kokkos_Complex.hpp.
|
inlineconstexprnoexcept |
Set the imaginary part of this complex number.
Definition at line 153 of file Kokkos_Complex.hpp.
|
inlineconstexprnoexcept |
Set the real part of this complex number.
Definition at line 157 of file Kokkos_Complex.hpp.