alpaka
Abstraction Library for Parallel Kernel Acceleration
Complex.hpp File Reference
#include "alpaka/core/Common.hpp"
#include "alpaka/math/FloatEqualExact.hpp"
#include <cmath>
#include <complex>
#include <iostream>
#include <type_traits>

Go to the source code of this file.

Classes

class  alpaka::internal::Complex< T >
 Implementation of a complex number useable on host and device. More...
 

Namespaces

 alpaka
 The alpaka accelerator library.
 
 alpaka::internal
 

Functions

template<typename T , typename TChar , typename TTraits >
std::basic_ostream< TChar, TTraits > & alpaka::internal::operator<< (std::basic_ostream< TChar, TTraits > &os, Complex< T > const &x)
 Host-only output of a complex number. More...
 
template<typename T , typename TChar , typename TTraits >
std::basic_istream< TChar, TTraits > & alpaka::internal::operator>> (std::basic_istream< TChar, TTraits > &is, Complex< T > const &x)
 Host-only input of a complex number. More...
 
template<typename T >
constexpr ALPAKA_FN_HOST_ACC bool alpaka::internal::operator!= (Complex< T > const &lhs, Complex< T > const &rhs)
 Inequality of two complex numbers. More...
 
template<typename T >
constexpr ALPAKA_FN_HOST_ACC bool alpaka::internal::operator!= (Complex< T > const &lhs, T const &rhs)
 Inequality of a complex and a real number. More...
 
template<typename T >
constexpr ALPAKA_FN_HOST_ACC bool alpaka::internal::operator!= (T const &lhs, Complex< T > const &rhs)
 Inequality of a real and a complex number. More...
 
template<typename T >
ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::operator* (Complex< T > const &lhs, Complex< T > const &rhs)
 Muptiplication of two complex numbers. More...
 
template<typename T >
ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::operator* (Complex< T > const &lhs, T const &rhs)
 Muptiplication of a complex and a real number. More...
 
template<typename T >
ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::operator* (T const &lhs, Complex< T > const &rhs)
 Muptiplication of a real and a complex number. More...
 
template<typename T >
ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::operator+ (Complex< T > const &lhs, Complex< T > const &rhs)
 Addition of two complex numbers. More...
 
template<typename T >
ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::operator+ (Complex< T > const &lhs, T const &rhs)
 Addition of a complex and a real number. More...
 
template<typename T >
ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::operator+ (Complex< T > const &val)
 Host-device arithmetic operations matching std::complex<T>. More...
 
template<typename T >
ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::operator+ (T const &lhs, Complex< T > const &rhs)
 Addition of a real and a complex number. More...
 
template<typename T >
ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::operator- (Complex< T > const &lhs, Complex< T > const &rhs)
 Subtraction of two complex numbers. More...
 
template<typename T >
ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::operator- (Complex< T > const &lhs, T const &rhs)
 Subtraction of a complex and a real number. More...
 
template<typename T >
ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::operator- (Complex< T > const &val)
 Unary minus. More...
 
template<typename T >
ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::operator- (T const &lhs, Complex< T > const &rhs)
 Subtraction of a real and a complex number. More...
 
template<typename T >
ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::operator/ (Complex< T > const &lhs, Complex< T > const &rhs)
 Division of two complex numbers. More...
 
template<typename T >
ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::operator/ (Complex< T > const &lhs, T const &rhs)
 Division of complex and a real number. More...
 
template<typename T >
ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::operator/ (T const &lhs, Complex< T > const &rhs)
 Division of a real and a complex number. More...
 
template<typename T >
constexpr ALPAKA_FN_HOST_ACC bool alpaka::internal::operator== (Complex< T > const &lhs, Complex< T > const &rhs)
 Equality of two complex numbers. More...
 
template<typename T >
constexpr ALPAKA_FN_HOST_ACC bool alpaka::internal::operator== (Complex< T > const &lhs, T const &rhs)
 Equality of a complex and a real number. More...
 
template<typename T >
constexpr ALPAKA_FN_HOST_ACC bool alpaka::internal::operator== (T const &lhs, Complex< T > const &rhs)
 Equality of a real and a complex number. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACCalpaka::internal::abs (Complex< T > const &x)
 Host-only math functions matching std::complex<T>. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::acos (Complex< T > const &x)
 Arc cosine. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::acosh (Complex< T > const &x)
 Arc hyperbolic cosine. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACCalpaka::internal::arg (Complex< T > const &x)
 Argument. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::asin (Complex< T > const &x)
 Arc sine. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::asinh (Complex< T > const &x)
 Arc hyperbolic sine. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::atan (Complex< T > const &x)
 Arc tangent. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::atanh (Complex< T > const &x)
 Arc hyperbolic tangent. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::conj (Complex< T > const &x)
 Complex conjugate. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::cos (Complex< T > const &x)
 Cosine. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::cosh (Complex< T > const &x)
 Hyperbolic cosine. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::exp (Complex< T > const &x)
 Exponential. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::log (Complex< T > const &x)
 Natural logarithm. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::log10 (Complex< T > const &x)
 Base 10 logarithm. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACCalpaka::internal::norm (Complex< T > const &x)
 Squared magnitude. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::polar (T const &r, T const &theta=T())
 Get a complex number with given magnitude and phase angle. More...
 
template<typename T , typename U >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::internal::pow (Complex< T > const &x, Complex< U > const &y)
 Complex power of a complex number. More...
 
template<typename T , typename U >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::internal::pow (Complex< T > const &x, U const &y)
 Real power of a complex number. More...
 
template<typename T , typename U >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::internal::pow (T const &x, Complex< U > const &y)
 Complex power of a real number. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::proj (Complex< T > const &x)
 Projection onto the Riemann sphere. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::sin (Complex< T > const &x)
 Sine. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::sinh (Complex< T > const &x)
 Hyperbolic sine. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::sqrt (Complex< T > const &x)
 Square root. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::tan (Complex< T > const &x)
 Tangent. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::tanh (Complex< T > const &x)
 Hyperbolic tangent. More...