alpaka
Abstraction Library for Parallel Kernel Acceleration
|
Classes | |
class | Complex |
Implementation of a complex number useable on host and device. More... | |
struct | ViewAccessOps |
Functions | |
template<typename T , typename TChar , typename TTraits > | |
std::basic_ostream< TChar, TTraits > & | 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 > & | operator>> (std::basic_istream< TChar, TTraits > &is, Complex< T > const &x) |
Host-only input of a complex number. More... | |
template<typename T > | |
ALPAKA_FN_HOST_ACC Complex< T > | operator+ (Complex< T > const &val) |
Host-device arithmetic operations matching std::complex<T>. More... | |
template<typename T > | |
ALPAKA_FN_HOST_ACC Complex< T > | operator- (Complex< T > const &val) |
Unary minus. More... | |
template<typename T > | |
ALPAKA_FN_HOST_ACC Complex< T > | operator+ (Complex< T > const &lhs, Complex< T > const &rhs) |
Addition of two complex numbers. More... | |
template<typename T > | |
ALPAKA_FN_HOST_ACC Complex< T > | 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 > | 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 > | operator- (Complex< T > const &lhs, Complex< T > const &rhs) |
Subtraction of two complex numbers. More... | |
template<typename T > | |
ALPAKA_FN_HOST_ACC Complex< T > | 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 > | 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 > | operator* (Complex< T > const &lhs, Complex< T > const &rhs) |
Muptiplication of two complex numbers. More... | |
template<typename T > | |
ALPAKA_FN_HOST_ACC Complex< T > | 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 > | 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 > | operator/ (Complex< T > const &lhs, Complex< T > const &rhs) |
Division of two complex numbers. More... | |
template<typename T > | |
ALPAKA_FN_HOST_ACC Complex< T > | 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 > | 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 | operator== (Complex< T > const &lhs, Complex< T > const &rhs) |
Equality of two complex numbers. More... | |
template<typename T > | |
constexpr ALPAKA_FN_HOST_ACC bool | 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 | operator== (T const &lhs, Complex< T > const &rhs) |
Equality of a real and a complex number. More... | |
template<typename T > | |
constexpr ALPAKA_FN_HOST_ACC bool | operator!= (Complex< T > const &lhs, Complex< T > const &rhs) |
Inequality of two complex numbers. More... | |
template<typename T > | |
constexpr ALPAKA_FN_HOST_ACC bool | 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 | operator!= (T const &lhs, Complex< T > const &rhs) |
Inequality of a real and a complex number. More... | |
template<typename T > | |
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC T | 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 > | acos (Complex< T > const &x) |
Arc cosine. More... | |
template<typename T > | |
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > | acosh (Complex< T > const &x) |
Arc hyperbolic cosine. More... | |
template<typename T > | |
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC T | arg (Complex< T > const &x) |
Argument. More... | |
template<typename T > | |
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > | asin (Complex< T > const &x) |
Arc sine. More... | |
template<typename T > | |
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > | asinh (Complex< T > const &x) |
Arc hyperbolic sine. More... | |
template<typename T > | |
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > | atan (Complex< T > const &x) |
Arc tangent. More... | |
template<typename T > | |
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > | atanh (Complex< T > const &x) |
Arc hyperbolic tangent. More... | |
template<typename T > | |
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > | conj (Complex< T > const &x) |
Complex conjugate. More... | |
template<typename T > | |
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > | cos (Complex< T > const &x) |
Cosine. More... | |
template<typename T > | |
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > | cosh (Complex< T > const &x) |
Hyperbolic cosine. More... | |
template<typename T > | |
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > | exp (Complex< T > const &x) |
Exponential. More... | |
template<typename T > | |
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > | log (Complex< T > const &x) |
Natural logarithm. More... | |
template<typename T > | |
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > | log10 (Complex< T > const &x) |
Base 10 logarithm. More... | |
template<typename T > | |
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC T | norm (Complex< T > const &x) |
Squared magnitude. More... | |
template<typename T > | |
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > | 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 | 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 | 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 | 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 > | 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 > | sin (Complex< T > const &x) |
Sine. More... | |
template<typename T > | |
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > | sinh (Complex< T > const &x) |
Hyperbolic sine. More... | |
template<typename T > | |
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > | sqrt (Complex< T > const &x) |
Square root. More... | |
template<typename T > | |
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > | tan (Complex< T > const &x) |
Tangent. More... | |
template<typename T > | |
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > | tanh (Complex< T > const &x) |
Hyperbolic tangent. More... | |
Variables | |
template<typename T , typename SFINAE = void> | |
constexpr bool | isView = false |
|
constexpr |
Host-only math functions matching std::complex<T>.
Due to issue #1688, these functions are technically marked host-device and suppress related warnings. However, they must be called for host only.
They take and return alpaka::Complex (or a real number when appropriate). Internally cast, fall back to std::complex implementation and cast back. These functions can be used directly on the host side. They are also picked up by ADL in math traits for CPU backends.
On the device side, alpaka math traits must be used instead. Note that the set of the traits is currently a bit smaller. Absolute value
Definition at line 378 of file Complex.hpp.
|
constexpr |
Arc cosine.
Definition at line 386 of file Complex.hpp.
|
constexpr |
Arc hyperbolic cosine.
Definition at line 394 of file Complex.hpp.
|
constexpr |
Argument.
Definition at line 402 of file Complex.hpp.
|
constexpr |
Arc sine.
Definition at line 410 of file Complex.hpp.
|
constexpr |
Arc hyperbolic sine.
Definition at line 418 of file Complex.hpp.
|
constexpr |
Arc tangent.
Definition at line 426 of file Complex.hpp.
|
constexpr |
Arc hyperbolic tangent.
Definition at line 434 of file Complex.hpp.
|
constexpr |
Complex conjugate.
Definition at line 442 of file Complex.hpp.
|
constexpr |
Cosine.
Definition at line 450 of file Complex.hpp.
|
constexpr |
Hyperbolic cosine.
Definition at line 458 of file Complex.hpp.
|
constexpr |
Exponential.
Definition at line 466 of file Complex.hpp.
|
constexpr |
Natural logarithm.
Definition at line 474 of file Complex.hpp.
|
constexpr |
Base 10 logarithm.
Definition at line 482 of file Complex.hpp.
|
constexpr |
Squared magnitude.
Definition at line 490 of file Complex.hpp.
|
constexpr |
Inequality of two complex numbers.
Definition at line 318 of file Complex.hpp.
|
constexpr |
Inequality of a complex and a real number.
Definition at line 325 of file Complex.hpp.
|
constexpr |
Inequality of a real and a complex number.
Definition at line 333 of file Complex.hpp.
ALPAKA_FN_HOST_ACC Complex<T> alpaka::internal::operator* | ( | Complex< T > const & | lhs, |
Complex< T > const & | rhs | ||
) |
Muptiplication of two complex numbers.
Definition at line 242 of file Complex.hpp.
ALPAKA_FN_HOST_ACC Complex<T> alpaka::internal::operator* | ( | Complex< T > const & | lhs, |
T const & | rhs | ||
) |
Muptiplication of a complex and a real number.
Definition at line 251 of file Complex.hpp.
ALPAKA_FN_HOST_ACC Complex<T> alpaka::internal::operator* | ( | T const & | lhs, |
Complex< T > const & | rhs | ||
) |
Muptiplication of a real and a complex number.
Definition at line 258 of file Complex.hpp.
ALPAKA_FN_HOST_ACC Complex<T> alpaka::internal::operator+ | ( | Complex< T > const & | lhs, |
Complex< T > const & | rhs | ||
) |
Addition of two complex numbers.
Definition at line 200 of file Complex.hpp.
ALPAKA_FN_HOST_ACC Complex<T> alpaka::internal::operator+ | ( | Complex< T > const & | lhs, |
T const & | rhs | ||
) |
Addition of a complex and a real number.
Definition at line 207 of file Complex.hpp.
ALPAKA_FN_HOST_ACC Complex<T> alpaka::internal::operator+ | ( | Complex< T > const & | val | ) |
Host-device arithmetic operations matching std::complex<T>.
They take and return alpaka::Complex. Unary plus (added for compatibility with std::complex)
Definition at line 186 of file Complex.hpp.
ALPAKA_FN_HOST_ACC Complex<T> alpaka::internal::operator+ | ( | T const & | lhs, |
Complex< T > const & | rhs | ||
) |
Addition of a real and a complex number.
Definition at line 214 of file Complex.hpp.
ALPAKA_FN_HOST_ACC Complex<T> alpaka::internal::operator- | ( | Complex< T > const & | lhs, |
Complex< T > const & | rhs | ||
) |
Subtraction of two complex numbers.
Definition at line 221 of file Complex.hpp.
ALPAKA_FN_HOST_ACC Complex<T> alpaka::internal::operator- | ( | Complex< T > const & | lhs, |
T const & | rhs | ||
) |
Subtraction of a complex and a real number.
Definition at line 228 of file Complex.hpp.
ALPAKA_FN_HOST_ACC Complex<T> alpaka::internal::operator- | ( | Complex< T > const & | val | ) |
Unary minus.
Definition at line 193 of file Complex.hpp.
ALPAKA_FN_HOST_ACC Complex<T> alpaka::internal::operator- | ( | T const & | lhs, |
Complex< T > const & | rhs | ||
) |
Subtraction of a real and a complex number.
Definition at line 235 of file Complex.hpp.
ALPAKA_FN_HOST_ACC Complex<T> alpaka::internal::operator/ | ( | Complex< T > const & | lhs, |
Complex< T > const & | rhs | ||
) |
Division of two complex numbers.
Definition at line 265 of file Complex.hpp.
ALPAKA_FN_HOST_ACC Complex<T> alpaka::internal::operator/ | ( | Complex< T > const & | lhs, |
T const & | rhs | ||
) |
Division of complex and a real number.
Definition at line 276 of file Complex.hpp.
ALPAKA_FN_HOST_ACC Complex<T> alpaka::internal::operator/ | ( | T const & | lhs, |
Complex< T > const & | rhs | ||
) |
Division of a real and a complex number.
Definition at line 283 of file Complex.hpp.
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.
Definition at line 333 of file Complex.hpp.
|
constexpr |
Equality of two complex numbers.
Definition at line 292 of file Complex.hpp.
|
constexpr |
Equality of a complex and a real number.
Definition at line 300 of file Complex.hpp.
|
constexpr |
Equality of a real and a complex number.
Definition at line 308 of file Complex.hpp.
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.
Definition at line 351 of file Complex.hpp.
|
constexpr |
Get a complex number with given magnitude and phase angle.
Definition at line 498 of file Complex.hpp.
|
constexpr |
Complex power of a complex number.
Definition at line 506 of file Complex.hpp.
|
constexpr |
Real power of a complex number.
Definition at line 517 of file Complex.hpp.
|
constexpr |
Complex power of a real number.
Definition at line 525 of file Complex.hpp.
|
constexpr |
Projection onto the Riemann sphere.
Definition at line 533 of file Complex.hpp.
|
constexpr |
Sine.
Definition at line 541 of file Complex.hpp.
|
constexpr |
Hyperbolic sine.
Definition at line 549 of file Complex.hpp.
|
constexpr |
Square root.
Definition at line 557 of file Complex.hpp.
|
constexpr |
Tangent.
Definition at line 565 of file Complex.hpp.
|
constexpr |
Hyperbolic tangent.
Definition at line 573 of file Complex.hpp.
|
inlineconstexpr |
Definition at line 20 of file ViewAccessOps.hpp.