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 volatile complex< RealType > & | operator= (const complex< InputRealType > &src) volatile |
Assignment operator. 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... | |
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 60 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 66 of file Kokkos_Complex.hpp.
|
inline |
Default constructor (initializes both real and imaginary parts to zero).
Definition at line 69 of file Kokkos_Complex.hpp.
|
inline |
Copy constructor.
Definition at line 74 of file Kokkos_Complex.hpp.
|
inline |
Copy constructor from volatile.
Definition at line 79 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 89 of file Kokkos_Complex.hpp.
|
inline |
Constructor that takes just the real part, and sets the imaginary part to zero.
Definition at line 105 of file Kokkos_Complex.hpp.
|
inline |
Constructor that takes the real and imaginary parts.
Definition at line 111 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 98 of file Kokkos_Complex.hpp.
|
inline |
Assignment operator.
Definition at line 118 of file Kokkos_Complex.hpp.
|
inline |
Assignment operator.
Definition at line 127 of file Kokkos_Complex.hpp.
|
inline |
Assignment operator.
Definition at line 136 of file Kokkos_Complex.hpp.
|
inline |
Assignment operator.
Definition at line 145 of file Kokkos_Complex.hpp.
|
inline |
Assignment operator (from a real number).
Definition at line 154 of file Kokkos_Complex.hpp.
|
inline |
Assignment operator (from a real number).
Definition at line 163 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 174 of file Kokkos_Complex.hpp.
|
inline |
The imaginary part of this complex number.
Definition at line 181 of file Kokkos_Complex.hpp.
|
inline |
The real part of this complex number.
Definition at line 186 of file Kokkos_Complex.hpp.
|
inline |
The imaginary part of this complex number.
Definition at line 191 of file Kokkos_Complex.hpp.
|
inline |
The real part of this complex number.
Definition at line 196 of file Kokkos_Complex.hpp.
|
inline |
The imaginary part of this complex number (volatile overload).
Definition at line 201 of file Kokkos_Complex.hpp.
|
inline |
The real part of this complex number (volatile overload).
Definition at line 206 of file Kokkos_Complex.hpp.
|
inline |
The imaginary part of this complex number (volatile overload).
Definition at line 211 of file Kokkos_Complex.hpp.
|
inline |
The real part of this complex number (volatile overload).
Definition at line 216 of file Kokkos_Complex.hpp.