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. | |
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. | |
template<typename T > | |
ALPAKA_FN_HOST_ACC Complex< T > | operator+ (Complex< T > const &val) |
Host-device arithmetic operations matching std::complex<T>. | |
template<typename T > | |
ALPAKA_FN_HOST_ACC Complex< T > | operator- (Complex< T > const &val) |
Unary minus. | |
template<typename T > | |
ALPAKA_FN_HOST_ACC Complex< T > | operator+ (Complex< T > const &lhs, Complex< T > const &rhs) |
Addition of two complex numbers. | |
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. | |
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. | |
template<typename T > | |
ALPAKA_FN_HOST_ACC Complex< T > | operator- (Complex< T > const &lhs, Complex< T > const &rhs) |
Subtraction of two complex numbers. | |
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. | |
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. | |
template<typename T > | |
ALPAKA_FN_HOST_ACC Complex< T > | operator* (Complex< T > const &lhs, Complex< T > const &rhs) |
Muptiplication of two complex numbers. | |
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. | |
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. | |
template<typename T > | |
ALPAKA_FN_HOST_ACC Complex< T > | operator/ (Complex< T > const &lhs, Complex< T > const &rhs) |
Division of two complex numbers. | |
template<typename T > | |
ALPAKA_FN_HOST_ACC Complex< T > | operator/ (Complex< T > const &lhs, T const &rhs) |
Division of complex and a real number. | |
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. | |
template<typename T > | |
constexpr ALPAKA_FN_HOST_ACC bool | operator== (Complex< T > const &lhs, Complex< T > const &rhs) |
Equality of two complex numbers. | |
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. | |
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. | |
template<typename T > | |
constexpr ALPAKA_FN_HOST_ACC bool | operator!= (Complex< T > const &lhs, Complex< T > const &rhs) |
Inequality of two complex numbers. | |
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. | |
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. | |
template<typename T > | |
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC T | abs (Complex< T > const &x) |
Host-only math functions matching std::complex<T>. | |
template<typename T > | |
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC Complex< T > | acos (Complex< T > const &x) |
Arc cosine. | |
template<typename T > | |
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC Complex< T > | acosh (Complex< T > const &x) |
Arc hyperbolic cosine. | |
template<typename T > | |
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC T | arg (Complex< T > const &x) |
Argument. | |
template<typename T > | |
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC Complex< T > | asin (Complex< T > const &x) |
Arc sine. | |
template<typename T > | |
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC Complex< T > | asinh (Complex< T > const &x) |
Arc hyperbolic sine. | |
template<typename T > | |
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC Complex< T > | atan (Complex< T > const &x) |
Arc tangent. | |
template<typename T > | |
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC Complex< T > | atanh (Complex< T > const &x) |
Arc hyperbolic tangent. | |
template<typename T > | |
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC Complex< T > | conj (Complex< T > const &x) |
Complex conjugate. | |
template<typename T > | |
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC Complex< T > | cos (Complex< T > const &x) |
Cosine. | |
template<typename T > | |
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC Complex< T > | cosh (Complex< T > const &x) |
Hyperbolic cosine. | |
template<typename T > | |
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC Complex< T > | exp (Complex< T > const &x) |
Exponential. | |
template<typename T > | |
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC Complex< T > | log (Complex< T > const &x) |
Natural logarithm. | |
template<typename T > | |
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC Complex< T > | log10 (Complex< T > const &x) |
Base 10 logarithm. | |
template<typename T > | |
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC T | norm (Complex< T > const &x) |
Squared magnitude. | |
template<typename T > | |
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC Complex< T > | polar (T const &r, T const &theta=T()) |
Get a complex number with given magnitude and phase angle. | |
template<typename T , typename U > | |
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC auto | pow (Complex< T > const &x, Complex< U > const &y) |
Complex power of a complex number. | |
template<typename T , typename U > | |
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC auto | pow (Complex< T > const &x, U const &y) |
Real power of a complex number. | |
template<typename T , typename U > | |
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC auto | pow (T const &x, Complex< U > const &y) |
Complex power of a real number. | |
template<typename T > | |
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC Complex< T > | proj (Complex< T > const &x) |
Projection onto the Riemann sphere. | |
template<typename T > | |
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC Complex< T > | sin (Complex< T > const &x) |
Sine. | |
template<typename T > | |
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC Complex< T > | sinh (Complex< T > const &x) |
Hyperbolic sine. | |
template<typename T > | |
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC Complex< T > | sqrt (Complex< T > const &x) |
Square root. | |
template<typename T > | |
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC Complex< T > | tan (Complex< T > const &x) |
Tangent. | |
template<typename T > | |
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC Complex< T > | tanh (Complex< T > const &x) |
Hyperbolic tangent. | |
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 380 of file Complex.hpp.
|
constexpr |
Arc cosine.
Definition at line 388 of file Complex.hpp.
|
constexpr |
Arc hyperbolic cosine.
Definition at line 396 of file Complex.hpp.
|
constexpr |
Argument.
Definition at line 404 of file Complex.hpp.
|
constexpr |
Arc sine.
Definition at line 412 of file Complex.hpp.
|
constexpr |
Arc hyperbolic sine.
Definition at line 420 of file Complex.hpp.
|
constexpr |
Arc tangent.
Definition at line 428 of file Complex.hpp.
|
constexpr |
Arc hyperbolic tangent.
Definition at line 436 of file Complex.hpp.
|
constexpr |
Complex conjugate.
Definition at line 444 of file Complex.hpp.
|
constexpr |
Cosine.
Definition at line 452 of file Complex.hpp.
|
constexpr |
Hyperbolic cosine.
Definition at line 460 of file Complex.hpp.
|
constexpr |
Exponential.
Definition at line 468 of file Complex.hpp.
|
constexpr |
Natural logarithm.
Definition at line 476 of file Complex.hpp.
|
constexpr |
Base 10 logarithm.
Definition at line 484 of file Complex.hpp.
|
constexpr |
Squared magnitude.
Definition at line 492 of file Complex.hpp.
|
constexpr |
Inequality of two complex numbers.
Definition at line 320 of file Complex.hpp.
|
constexpr |
Inequality of a complex and a real number.
Definition at line 327 of file Complex.hpp.
|
constexpr |
Inequality of a real and a complex number.
Definition at line 335 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 244 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 253 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 260 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 202 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 209 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 188 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 216 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 223 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 230 of file Complex.hpp.
ALPAKA_FN_HOST_ACC Complex< T > alpaka::internal::operator- | ( | Complex< T > const & | val | ) |
Unary minus.
Definition at line 195 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 237 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 267 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 278 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 285 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 335 of file Complex.hpp.
|
constexpr |
Equality of two complex numbers.
Definition at line 294 of file Complex.hpp.
|
constexpr |
Equality of a complex and a real number.
Definition at line 302 of file Complex.hpp.
|
constexpr |
Equality of a real and a complex number.
Definition at line 310 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 353 of file Complex.hpp.
|
constexpr |
Get a complex number with given magnitude and phase angle.
Definition at line 500 of file Complex.hpp.
|
constexpr |
Complex power of a complex number.
Definition at line 508 of file Complex.hpp.
|
constexpr |
Real power of a complex number.
Definition at line 519 of file Complex.hpp.
|
constexpr |
Complex power of a real number.
Definition at line 527 of file Complex.hpp.
|
constexpr |
Projection onto the Riemann sphere.
Definition at line 535 of file Complex.hpp.
|
constexpr |
Sine.
Definition at line 543 of file Complex.hpp.
|
constexpr |
Hyperbolic sine.
Definition at line 551 of file Complex.hpp.
|
constexpr |
Square root.
Definition at line 559 of file Complex.hpp.
|
constexpr |
Tangent.
Definition at line 567 of file Complex.hpp.
|
constexpr |
Hyperbolic tangent.
Definition at line 575 of file Complex.hpp.
|
inlineconstexpr |
Definition at line 20 of file ViewAccessOps.hpp.